return true;
}
+bool AuxiliaryXhair_customize(entity this, entity client)
+{
+ //entity e = WaypointSprite_getviewentity(client);
+ entity axh = client.(AuxiliaryXhair[this.cnt]);
+ return axh.owner == this.owner; // cheaply check if the client's axh owner is the same as our real owner
+}
+
.vector axh_prevorigin;
.vector axh_prevcolors;
{
axh = new(auxiliary_xhair);
axh.cnt = axh_id;
- axh.drawonlytoclient = own;
+ //axh.drawonlytoclient = own; // not spectatable
+ setcefc(axh, AuxiliaryXhair_customize);
axh.owner = own;
Net_LinkEntity(axh, false, 0, SendAuxiliaryXhair);
}
WriteHeader(MSG_ONE, TE_CSQC_VEHICLESETUP);
WriteByte(MSG_ONE, vehicle_id);
+
+ if(vehicle_id == 0 || vehicle_id == HUD_NORMAL)
+ {
+ for(int i = 0; i < MAX_AXH; ++i)
+ {
+ entity axh = own.(AuxiliaryXhair[i]);
+ own.(AuxiliaryXhair[i]) = NULL;
+
+ if(axh.owner == own && axh != NULL && !wasfreed(axh))
+ delete(axh);
+ }
+ }
}
void vehicles_locktarget(entity this, float incr, float decr, float _lock_time)
this.oldvelocity = this.velocity;
this.fire_endtime = -1;
this.event_damage = func_null;
+
+ for(int slot = 0; slot < MAX_AXH; ++slot)
+ {
+ entity axh = this.(AuxiliaryXhair[slot]);
+ this.(AuxiliaryXhair[slot]) = NULL;
+
+ if(axh.owner == this && axh != NULL && !wasfreed(axh))
+ delete(axh);
+ }
}
int player_getspecies(entity 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)