X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_player.qc;h=9dfc2a5b2825384ec16c351e645534b9480a9069;hb=c4b09062e3dc4b40cd17bc7658e8a21043abb66b;hp=4d20ed736e9a544abe83ecdfef0f892f56854b5c;hpb=819f1a4ffd4d77fb2e6a950bb6959cb6619e06b7;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 4d20ed736..9dfc2a5b2 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -185,6 +185,7 @@ void CopyBody(float keepvelocity) if (keepvelocity == 1) self.velocity = oldself.velocity; self.oldvelocity = self.velocity; + self.alpha = oldself.alpha; self.fade_time = oldself.fade_time; self.fade_rate = oldself.fade_rate; //self.weapon = oldself.weapon; @@ -195,6 +196,8 @@ void CopyBody(float keepvelocity) Drag_MoveDrag(oldself, self); + self.owner = oldself; + if(self.colormap <= maxclients && self.colormap > 0) self.colormap = 1024 + oldself.clientcolors; @@ -408,7 +411,7 @@ void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float self.dmg_take = self.dmg_take + take;//max(take - 10, 0); self.dmg_inflictor = inflictor; - if (self.health <= -autocvar_sv_gibhealth && !(self.effects & CSQCMODEL_EF_INVISIBLE)) + if (self.health <= -autocvar_sv_gibhealth && self.alpha >= 0) { // don't use any animations as a gib self.frame = 0; @@ -416,8 +419,9 @@ void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float self.view_ofs = '0 0 4'; Violence_GibSplash(self, 1, 1, attacker); - self.effects |= CSQCMODEL_EF_INVISIBLE; + self.alpha = -1; self.solid = SOLID_NOT; // restore later + self.takedamage = DAMAGE_NO; // restore later } } @@ -656,7 +660,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht if(!g_freezetag) { // become fully visible - self.alpha = 1; + self.alpha = default_player_alpha; // throw a weapon SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon); }