-entity CopyBody(float keepvelocity);
+void CopyBody(float keepvelocity);
#ifdef NOCHEATS
case CHIMPULSE_CLONE_MOVING:
IS_CHEAT(i, 0, 0);
makevectors (self.v_angle);
- e = CopyBody(1);
- if(e.colormap <= maxclients && e.colormap > 0)
- e.colormap = 1024 + self.clientcolors;
- e.velocity = e.velocity + v_forward * 300;
+ self.velocity = self.velocity + v_forward * 300;
+ CopyBody(1);
self.lip += 1;
+ self.velocity = self.velocity - v_forward * 300;
DID_CHEAT();
break;
case CHIMPULSE_CLONE_STANDING:
IS_CHEAT(i, 0, 0);
- e = CopyBody(0);
- if(e.colormap <= maxclients && e.colormap > 0)
- e.colormap = 1024 + self.clientcolors;
+ CopyBody(0);
self.lip += 1;
DID_CHEAT();
break;
CSQCMODEL_AUTOUPDATE();
self.nextthink = time;
}
-entity CopyBody(float keepvelocity)
+void CopyBody(float keepvelocity)
{
- entity ret;
entity oldself;
if (self.effects & EF_NODRAW)
- return world;
+ return;
oldself = self;
- ret = self = spawn();
+ self = spawn();
self.enemy = oldself;
self.lip = oldself.lip;
self.colormap = oldself.colormap;
self.owner = oldself;
+ if(self.colormap <= maxclients && self.colormap > 0)
+ self.colormap = 1024 + oldself.clientcolors;
+
CSQCMODEL_AUTOINIT();
self.CopyBody_nextthink = oldself.nextthink;
self.CopyBody_think = oldself.think;
self.think = CopyBody_Think;
self = oldself;
-
- return ret;
}
float player_getspecies()