]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Don't fade player leaning back to normal based on damage any more. It didn't work...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 27 Aug 2011 16:15:09 +0000 (19:15 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 27 Aug 2011 16:15:09 +0000 (19:15 +0300)
data/defaultVT.cfg
data/qcsrc/server/cl_client.qc
data/qcsrc/server/defs.qh
data/qcsrc/server/g_damage.qc

index 84e235fabf140a4d3d6327aa7ed961cd15f8da64..6368811c0aa16923e6568db54d41f7c93bd16307 100644 (file)
@@ -300,7 +300,7 @@ set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rota
 set g_respawn_ghosts_maxtime 6 "maximum amount of time a respawn ghost can last, minimum time is half this value. 0 disables and ghosts fade when the body would"\r
 \r
 set g_leanplayer_damage 0.1 "lean players that are shot by this amount, based on the force they take"\r
-set g_leanplayer_damage_fade 0.001 "how fast players return to normal angles, based on damage taken"\r
+set g_leanplayer_damage_fade 0.95 "how fast players return to normal angles, based on damage taken"\r
 set g_leanplayer_damage_max 10 "damage leaning is limited to this amount"\r
 set g_leanplayer_acceleration 0.05 "lean players as they accelerate, by this amount"\r
 set g_leanplayer_acceleration_fade 5 "velocity averaging steps for acceleration, higher values cause a shorter leaning"\r
index 1ff6d43bf93f0d1f926f16c4932c60620b15d1fa..945b419f732c662a857006b3588dc03cc04fe225 100644 (file)
@@ -2591,15 +2591,9 @@ void PlayerPreThink (void)
 \r
                        LA = AnglesTransform_Multiply(LA, LF);\r
 \r
-                       // fade the player back to normal rotation each frame, based on how much damage they have taken\r
-                       // this is used to simulate damage, so a wounded player will get back up slower\r
-                       if(self.leanangle_damage) // prevent division by zero\r
-                       if(self.leanangle_damage_force) // extra safety\r
-                       {\r
-                               float leanangle_damage_fade;\r
-                               leanangle_damage_fade = 1 / (1 + (self.leanangle_damage * cvar("g_leanplayer_damage_fade")));\r
-                               self.leanangle_damage_force = self.leanangle_damage_force * leanangle_damage_fade;\r
-                       }\r
+                       // fade the player back to normal rotation each frame\r
+                       if(self.leanangle_damage_force) // safety\r
+                               self.leanangle_damage_force = self.leanangle_damage_force * cvar("g_leanplayer_damage_fade");\r
                        // end of damage leaning\r
 \r
                        self.angles = AnglesTransform_Normalize(AnglesTransform_ToAngles(LA), TRUE);\r
index 9df71320c12c46af29444c34c90bcca9e987f284..a401f69713c097bfbb9b93f902e28198ab8a0916 100644 (file)
@@ -298,7 +298,6 @@ entity timeoutInitiator; // contains the entity of the player who started the la
 float orig_slowmo; // contains the value of cvar("slowmo") so that, after timeout finished, it isn't set to slowmo 1 necessarily\r
 .vector lastV_angle; //used when pausing the game in order to force the player to keep his old view angle fixed\r
 .vector leanangle_damage_loc, leanangle_damage_force; // used for leaning the player model\r
-.float leanangle_damage;\r
 entity timeoutHandler; //responsible for centerprinting the timeout countdowns and playing sounds\r
 void timeoutHandler_Think();\r
 void evaluateTimeout();\r
index 02411d412fb49e7a1ba808cbb468c3ff3b06557e..920975bfda48b18da96c12b553e4428909d9dec1 100644 (file)
@@ -870,7 +870,6 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                {\r
                        targ.leanangle_damage_loc = hitloc - targ.origin;\r
                        targ.leanangle_damage_force += force * cvar("g_leanplayer_damage"); // keep existing force if any\r
-                       targ.leanangle_damage = damage;\r
 \r
                        // bound angles to the specified limit\r
                        targ.leanangle_damage_force_x = bound(-cvar("g_leanplayer_damage_max"), targ.leanangle_damage_force_x, cvar("g_leanplayer_damage_max"));\r