]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Merge branch 'master' into mirceakitsune/health_size
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 2 May 2011 17:09:39 +0000 (20:09 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 2 May 2011 17:09:39 +0000 (20:09 +0300)
1  2 
data/defaultVT.cfg
data/qcsrc/server/vore.qc

diff --combined data/defaultVT.cfg
index d8d69312dd8a3f4db8332e952c3e262ecf171644,1fa995f9284b5854998d26d7fc8b76580be8fbb1..f2d04205c2550cb2ce95d252b31dc80a72af1f47
@@@ -1529,7 -1529,7 +1529,7 @@@ seta g_ghost_items_color "-1 -1 -1" "co
  set cl_vore_stomachmodel 1 "when enabled, we see the stomach model around us when eaten. -1 = disabled, 1 = enabled, anything between = alpha"\r
  set cl_vore_cameraspeed 1.5 "speed at which you see yourself sliding down when swallowed, 0 disables"\r
  seta cl_vore_cutvolume_sound 0.75 "sound volume is reduced to this amount when you are in a stomach"\r
- seta cl_vore_cutvolume_music 0.5 "music volume is reduced to this amount when you are in a stomach"\r
+ seta cl_vore_cutvolume_music 0.25 "music volume is reduced to this amount when you are in a stomach"\r
  seta cl_vore_cutvolume_fade 0.1 "fading speed of the volume change"\r
  seta cl_vore_autodigest 0 "when enabled, the player will automatically begin digesting enemy prey after eating them, as long as no team mates are inside (automated digest key)"\r
  set g_vore 1 "enables the vore system, you want this on!"\r
@@@ -1547,14 -1547,6 +1547,14 @@@ set g_vore_regurgitatecolor_release_fad
  set g_vore_regurgitatecolor_digest "0.15 0.25 0" "the color players will have when digested, only works when g_vore_keepdeadprey is disabled"\r
  set g_vore_keepdeadprey 1 "If enabled, prey remains in the stomach after dying, else the predator throws up their dead body. 0 = disabled, 1 = enabled, anything between = probability"\r
  \r
 +set g_healthsize 100 "Players who are low on health shrink and become smaller, value specifies health at which the player has default size"\r
 +set g_healthsize_movementfactor 0.5 "Amount by which player size affects jumping and running"\r
 +set g_healthsize_exteriorweapon_scalefactor 1 "Amount by which player size resizes the exterior weapon model"\r
 +set g_healthsize_weapon_scalefactor 0.5 "Amount by which player size resizes the view weapon model"\r
 +set g_healthsize_weapon_scalefactor_pos 4 "Amount by which the view model is moved vertically based on player size"\r
 +set g_healthsize_min 50 "Player size may not drop below this amount of health"\r
 +set g_healthsize_max 150 "Player size may not grow past this amount of health"\r
 +\r
  // part of an ugly hack for the menu audio sliders to work with the cutsound feature\r
  seta menu_volume 0.5\r
  seta menu_bgmvolume 1\r
index 790c000a3667a83bd0f5da0bfedea4aa02dcf54c,60999e71fe0f3474eabc1923e7413833c8aa8f37..2429326b16f27201a30e3b64501e923cbb51bfd4
@@@ -12,16 -12,11 +12,16 @@@ entity Swallow_player_check(
  {\r
        // check if we can swallow a player instead of firing our weapon\r
  \r
 +      float swallow_range;\r
        vector vore_w_shotorg, vore_w_shotdir;\r
 -      vore_w_shotorg = self.origin + self.view_ofs;\r
 +\r
 +      swallow_range = cvar("g_balance_vore_swallow_range");\r
 +      if(self.scale) // we can swallow from further or closer based on our size\r
 +              swallow_range *= self.scale;\r
 +      vore_w_shotorg = self.origin;\r
        vore_w_shotdir = v_forward;\r
  \r
 -      WarpZone_traceline_antilag(self, vore_w_shotorg, vore_w_shotorg + vore_w_shotdir * cvar("g_balance_vore_swallow_range"), FALSE, self, ANTILAG_LATENCY(self));\r
 +      WarpZone_traceline_antilag(self, vore_w_shotorg, vore_w_shotorg + vore_w_shotdir * swallow_range, FALSE, self, ANTILAG_LATENCY(self));\r
        if(trace_fraction < 1)\r
        if(trace_ent.classname == "player")\r
                return trace_ent;\r
@@@ -129,7 -124,7 +129,7 @@@ void Vore_CameraEffect_Set(entity e
  }\r
  void Vore_CameraEffect_Apply()\r
  {\r
-       if(self.predator.classname != "player")\r
+       if not(self.predator.classname == "player" || self.fakeprey)\r
                return;\r
  \r
        if(self.cvar_cl_vore_cameraspeed)\r
        else\r
                self.cameraeffect_current = self.cameraeffect_target;\r
  \r
-       self.view_ofs_z = PL_VIEW_OFS_z / self.cameraeffect_current;\r
+       self.view_ofs_z = PL_PREY_VIEW_OFS_z / self.cameraeffect_current;\r
  }\r
  \r
  .float gurgle_oldstomachload;\r
@@@ -628,6 -623,8 +628,8 @@@ void Vore(
  // Code that addresses the prey:\r
  // --------------------------------\r
  \r
+       Vore_CameraEffect_Apply();\r
\r
        // keepdeadprey - detach dead prey if their predator died or got swallowed\r
        if(self.fakepredator.classname == "player")\r
        if(self.fakepredator.deadflag != DEAD_NO || self.fakepredator.predator.classname == "player")\r
        if(self.BUTTON_JUMP)\r
                Vore_StomachLeave();\r
  \r
-       Vore_CameraEffect_Apply();\r
\r
        // Ugly workaround for a Keyhunt issue. Your team's key can still be given to you while in the stomach\r
        // (at round start), which is pretty ugly and wrong. So attempt to drop keys each frame for prey\r
        kh_Key_DropAll(self, FALSE);\r