mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-15 08:04:39 +00:00
MPB station variable
This commit is contained in:
parent
df96abdaa8
commit
5f91f9fb37
1 changed files with 11 additions and 2 deletions
|
|
@ -37,9 +37,11 @@ function VehicleData::onDestroyed(%data, %obj, %prevState)
|
||||||
}
|
}
|
||||||
|
|
||||||
radiusVehicleExplosion(%data, %obj);
|
radiusVehicleExplosion(%data, %obj);
|
||||||
|
|
||||||
if(%obj.turretObject)
|
if(%obj.turretObject)
|
||||||
if(%obj.turretObject.getControllingClient())
|
if(%obj.turretObject.getControllingClient())
|
||||||
%obj.turretObject.getDataBlock().playerDismount(%obj.turretObject);
|
%obj.turretObject.getDataBlock().playerDismount(%obj.turretObject);
|
||||||
|
|
||||||
for(%i = 0; %i < %obj.getDatablock().numMountPoints; %i++)
|
for(%i = 0; %i < %obj.getDatablock().numMountPoints; %i++)
|
||||||
{
|
{
|
||||||
if (%obj.getMountNodeObject(%i)) {
|
if (%obj.getMountNodeObject(%i)) {
|
||||||
|
|
@ -55,15 +57,22 @@ function VehicleData::onDestroyed(%data, %obj, %prevState)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// From AntiLou.vl2
|
||||||
|
// Info: MPB just destroyed. Change the variable
|
||||||
|
if(%data.getName() $= "MobileBaseVehicle") // If the vehicle is the MPB, change %obj.station.isDestroyed to 1
|
||||||
|
%obj.station.isDestroyed = 1;
|
||||||
|
|
||||||
%data.deleteAllMounted(%obj);
|
%data.deleteAllMounted(%obj);
|
||||||
// -----------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------
|
||||||
// z0dd - ZOD - Czar, 6/24/02. Move this vehicle out of the way so nothing collides with it.
|
// z0dd - ZOD - Czar, 6/24/02. Move this vehicle out of the way so nothing collides with it.
|
||||||
if(%data.getName() $="BomberFlyer" || %data.getName() $="MobileBaseVehicle" || %data.getName() $="AssaultVehicle")
|
if(%data.getName() $="BomberFlyer" || %data.getName() $="MobileBaseVehicle" || %data.getName() $="AssaultVehicle")
|
||||||
{
|
{
|
||||||
// %obj.setFrozenState(true);
|
// %obj.setFrozenState(true);
|
||||||
%obj.schedule(2000, "delete");
|
%obj.schedule(2000, "delete");
|
||||||
//%data.schedule(500, 'onAvoidCollisions', %obj);
|
//%data.schedule(500, 'onAvoidCollisions', %obj);
|
||||||
%obj.schedule(500, "setPosition", vectorAdd(%obj.getPosition(), "40 -27 10000"));
|
|
||||||
|
//Transfer the vehicle far away
|
||||||
|
%obj.schedule(10, "setPosition", vectorAdd(%obj.getPosition(), "40 -27 10000")); //Lowered: was 500
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue