X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_player.qc;h=3ff7f9166ee05cd19d86fe4bbcf37cfc29f04b7c;hp=17569147fb091d9e08f9ee4ea7e877287c69f34d;hb=b0a06888ff894f9d334f6277b996f98ae8a665a0;hpb=88e2b104926cf3d356cfdf2cd3598f7d743a1a35 diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 17569147fb..3ff7f9166e 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -91,6 +91,7 @@ void CopyBody(float keepvelocity) self.nextthink = time; self.think = CopyBody_Think; // "bake" the current animation frame for clones (they don't get clientside animation) + animdecide_init(self); animdecide_setframes(self, FALSE, frame, frame1time, frame2, frame2time); self = oldself; @@ -535,7 +536,8 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht } // print an obituary message - Obituary (attacker, inflictor, self, deathtype); + if(self.classname != "body") + Obituary (attacker, inflictor, self, deathtype); // increment frag counter for used weapon type float w; @@ -563,7 +565,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht // player could have been miraculously resuscitated ;) // e.g. players in freezetag get frozen, they don't really die - if(self.health >= 1 || !IS_PLAYER(self)) + if(self.health >= 1 || !(IS_PLAYER(self) || self.classname == "body")) return; // when we get here, player actually dies @@ -615,6 +617,14 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht // set up to fade out later SUB_SetFade (self, time + 6 + random (), 1); + // reset body think wrapper broken by SUB_SetFade + if(self.classname == "body" && self.think != CopyBody_Think) { + self.CopyBody_think = self.think; + self.CopyBody_nextthink = self.nextthink; + self.think = CopyBody_Think; + self.nextthink = time; + } + if(autocvar_sv_gentle > 0 || autocvar_ekg) { // remove corpse PlayerCorpseDamage (inflictor, attacker, autocvar_sv_gibhealth+1.0, deathtype, hitloc, force);