.entity pusher;
.float pushltime;
+.float CopyBody_nextthink;
+.void(void) CopyBody_think;
+void CopyBody_Think(void)
+{
+ if(self.CopyBody_nextthink && time > self.CopyBody_nextthink)
+ {
+ self.CopyBody_think();
+ if(wasfreed(self))
+ return;
+ self.CopyBody_nextthink = self.nextthink;
+ self.CopyBody_think = self.think;
+ self.think = CopyBody_Think;
+ }
+ CSQCMODEL_AUTOUPDATE();
+ self.nextthink = time;
+}
void CopyBody(float keepvelocity)
{
entity oldself;
self.skin = oldself.skin;
self.species = oldself.species;
self.movetype = oldself.movetype;
- self.nextthink = oldself.nextthink;
self.solid = oldself.solid;
self.ballistics_density = oldself.ballistics_density;
self.takedamage = oldself.takedamage;
- self.think = oldself.think;
self.customizeentityforclient = oldself.customizeentityforclient;
self.uncustomizeentityforclient = oldself.uncustomizeentityforclient;
self.uncustomizeentityforclient_set = oldself.uncustomizeentityforclient_set;
if(self.colormap <= maxclients && self.colormap > 0)
self.colormap = 1024 + self.clientcolors;
+ CSQCMODEL_AUTOINIT();
+ self.CopyBody_nextthink = oldself.nextthink;
+ self.CopyBody_think = oldself.think;
+ self.nextthink = time;
+ self.think = CopyBody_Think;
+
self = oldself;
}
self.dmg_take = self.dmg_take + take;//max(take - 10, 0);
self.dmg_inflictor = inflictor;
- if (self.health <= -autocvar_sv_gibhealth && self.modelindex != 0)
+ if (self.health <= -autocvar_sv_gibhealth && !(self.effects & CSQCMODEL_EF_INVISIBLE))
{
// don't use any animations as a gib
self.frame = 0;
self.view_ofs = '0 0 4';
Violence_GibSplash(self, 1, 1, attacker);
- self.modelindex = 0; // restore later
+ self.effects |= CSQCMODEL_EF_INVISIBLE;
self.solid = SOLID_NOT; // restore later
}
}
float w;
w = DEATH_WEAPONOF(deathtype);
if(WEP_VALID(w))
- if(self.classname == "player")
- if(self != attacker)
+ if(accuracy_isgooddamage(attacker, self))
attacker.accuracy.(accuracy_frags[w-1]) += 1;
if(deathtype == DEATH_HURTTRIGGER && g_freezetag)
else
DropFlag(self.flagcarried, world, attacker);
}
- if(self.ballcarried && g_nexball)
- DropBall(self.ballcarried, self.origin, self.velocity);
Portal_ClearAllLater(self);
if(clienttype(self) == CLIENTTYPE_REAL)