{
if (veh.cannot_respawn)
{
+ sound (veh, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
+ Send_Effect(EFFECT_EXPLOSION_BIG, veh.origin + '0 0 100', '0 0 0', 1);
+
delete(veh);
return;
}
}
else
{
- ret.nextthink = min(time + veh.respawntime, time + veh.respawntime - 1);
+ if (!veh.cannot_respawn) // if true, don't respawn
+ ret.nextthink = min(time + veh.respawntime, time + veh.respawntime - 1);
}
setorigin(ret, veh.pos1 + '0 0 96');
return true;
}
-entity spawnvehicle (entity e, string vehicle, Vehicle veh, entity spawnedby, entity own, vector orig, bool no_respwn, bool removeifinvalid, bool optional)
+entity spawnvehicle (entity e, string vehicle, Vehicle veh, entity spawnedby, entity own, vector orig, bool no_respwn, bool removeifinvalid, bool optional, bool nodrop)
{
e.spawnflags = VHF_MULTISLOT;
return NULL; // no good
}
// select a random valid vehicle type if no valid vehicle was provided
- return spawnvehicle(e, "random", VEH_Null, spawnedby, own, orig, no_respwn, removeifinvalid, optional);
+ return spawnvehicle(e, "random", VEH_Null, spawnedby, own, orig, no_respwn, removeifinvalid, optional, nodrop);
}
}
e.spawnfunc_checked = true;
// spawn!
- vehicle_initialize(e, veh, true);
+ vehicle_initialize(e, veh, nodrop);
return e;
}
.float vehicle_enter_delay; // prevent players jumping to and from vehicles instantly
-entity spawnvehicle(entity e, string vehicle, Vehicle veh, entity spawnedby, entity own, vector orig, bool no_respwn, bool removeifinvalid, bool optional);
+entity spawnvehicle(entity e, string vehicle, Vehicle veh, entity spawnedby, entity own, vector orig, bool no_respwn, bool removeifinvalid, bool optional, bool nodrop);
void vehicles_exit(entity vehic, int eject);
bool vehicle_initialize(entity this, Vehicle info, float nodrop);
bool vehicle_impulse(entity this, int imp);