bool AuxiliaryXhair_customize(entity this, entity client)
{
- //entity e = WaypointSprite_getviewentity(client);
- entity axh = client.(AuxiliaryXhair[this.cnt]);
+ entity e = WaypointSprite_getviewentity(client);
+ entity axh = e.(AuxiliaryXhair[this.cnt]);
return axh.owner == this.owner; // cheaply check if the client's axh owner is the same as our real owner
}
//this.spawnpoint_targ = NULL; // keep it so they can return to where they were?
- for(int slot = 0; slot < MAX_AXH; ++slot)
- {
- entity axh = this.(AuxiliaryXhair[slot]);
- this.(AuxiliaryXhair[slot]) = NULL;
- if(axh && axh.owner == this)
- delete(axh);
- }
-
this.weaponmodel = "";
for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
this.viewloc = NULL;
- this.spawnpoint_targ = NULL;
-
for(int slot = 0; slot < MAX_AXH; ++slot)
{
entity axh = this.(AuxiliaryXhair[slot]);
this.(AuxiliaryXhair[slot]) = NULL;
- if(axh && axh.owner == this)
+
+ if(axh.owner == this && axh != NULL && !wasfreed(axh))
delete(axh);
}
+ this.spawnpoint_targ = NULL;
+
this.crouch = false;
this.view_ofs = STAT(PL_VIEW_OFS, this);
setsize(this, STAT(PL_MIN, this), STAT(PL_MAX, this));
this.(weaponentity) = spectatee.(weaponentity);
}
- for(int slot = 0; slot < MAX_AXH; ++slot)
- {
- this.(AuxiliaryXhair[slot]) = spectatee.(AuxiliaryXhair[slot]);
- }
-
anticheat_spectatecopy(this, spectatee);
this.hud = spectatee.hud;
if(spectatee.vehicle)