}
if(self.vehicle)
- {
- entity oldself;
- oldself = self;
- self = self.vehicle;
vehicles_exit(VHEF_RELESE);
- self = oldself;
- }
if(self.flagcarried)
DropFlag(self.flagcarried, world, world);
{
if(self.vehicle)
{
- entity oldself;
- oldself = self;
- self = self.vehicle;
vehicles_exit(VHEF_RELESE);
- if(!oldself.killindicator_teamchange)
+ if(!self.killindicator_teamchange)
{
self.vehicle_health = -1;
Damage(self, self, self, 1 , DEATH_KILL, self.origin, '0 0 0');
}
- self = oldself;
}
remove(self.killindicator);
void ClientDisconnect (void)
{
if(self.vehicle)
- {
- entity oldself;
- oldself = self;
- self = self.vehicle;
vehicles_exit(VHEF_RELESE);
- self = oldself;
- }
if not(self.flags & FL_CLIENT)
{
if(self.vehicle)
{
- dprint("Use cought for vehicle\n");
- entity oldself;
- oldself = self;
- self = self.vehicle;
vehicles_exit(VHEF_NORMAL);
- self = oldself;
return;
}
self = racer;
- /*
- if(player.BUTTON_USE)
- {
- vehicles_exit(VHEF_NORMAL);
- self = player;
- return 0;
- }
- */
-
if(racer.deadflag != DEAD_NO)
{
self = player;
self.wait = ftmp;
}
*/
-
- /*
- if(player.BUTTON_USE && raptor.deadflag == DEAD_NO)
- {
- self = raptor;
- vehicles_exit(VHEF_NORMAL);
- self = player;
- return 0;
- }
- */
+
if(raptor.deadflag != DEAD_NO)
{
player.BUTTON_CROUCH = 0;
player.switchweapon = 0;
- /*
- if(player.BUTTON_USE)
- {
- vehicles_exit(VHEF_NORMAL);
- self = player;
- return 0;
- }
- */
-
crosshair_trace(player);
//UpdateAuxiliaryXhair(player, trace_endpos, ('1 0 0' * player.vehicle_reload2) + ('0 1 0' * (1 - player.vehicle_reload2)), 2);
void spiderbot_enter()
{
-
self.movetype = MOVETYPE_WALK;
self.owner.vehicle_health = (self.vehicle_health / autocvar_g_vehicle_spiderbot_health);
setattachment(self.owner.flagcarried, self.tur_head, "");
setorigin(self.owner.flagcarried, '-20 0 120');
}
-
-
}
void spiderbot_exit(float eject)
**/
void vehicles_exit(float eject)
{
+ entity oldself;
+ if(self.flags & FL_CLIENT)
+ {
+ oldself = self;
+ self = self.vehicle;
+ }
+
self.flags |= FL_NOTARGET;
if (self.owner)
self.vehicle_exit(eject);
self.owner = world;
+
+ if(oldself)
+ self = oldself;
}