mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-13 15:14:34 +00:00
Update TacoOverrides.cs
Treat all vehicles the same
This commit is contained in:
parent
97c9bf7270
commit
e99b013183
1 changed files with 7 additions and 23 deletions
|
|
@ -57,7 +57,7 @@ function VehicleData::onDestroyed(%data, %obj, %prevState)
|
||||||
%zVel = (getRandom() * 100.0) + 50.0;
|
%zVel = (getRandom() * 100.0) + 50.0;
|
||||||
%flingVel = %xVel @ " " @ %yVel @ " " @ %zVel;
|
%flingVel = %xVel @ " " @ %yVel @ " " @ %zVel;
|
||||||
%flingee.applyImpulse(%flingee.getTransform(), %flingVel);
|
%flingee.applyImpulse(%flingee.getTransform(), %flingVel);
|
||||||
echo("got player..." @ %flingee.getClassName());
|
//echo("got player..." @ %flingee.getClassName());
|
||||||
%flingee.damage(0, %obj.getPosition(), 0.4, $DamageType::Crash);
|
%flingee.damage(0, %obj.getPosition(), 0.4, $DamageType::Crash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -70,29 +70,13 @@ function VehicleData::onDestroyed(%data, %obj, %prevState)
|
||||||
%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() $="AssaultVehicle")
|
%obj.setFrozenState(true);
|
||||||
{
|
%obj.schedule(2000, "delete"); //was 500
|
||||||
// %obj.setFrozenState(true);
|
%data.schedule(500, 'onAvoidCollisions', %obj);
|
||||||
%obj.schedule(500, "delete"); //was 2000
|
|
||||||
//%data.schedule(500, 'onAvoidCollisions', %obj);
|
|
||||||
|
|
||||||
//Transfer the vehicle far away
|
//Transfer the vehicle far away
|
||||||
%obj.schedule(128, "setPosition", vectorAdd(%obj.getPosition(), "40 -27 10000")); //Lowered: was 500
|
%obj.schedule(128, "setPosition", vectorAdd(%obj.getPosition(), "40 -27 10000")); //Lowered: was 500
|
||||||
}
|
|
||||||
else if(%data.getName() $="BomberFlyer" || %data.getName() $="MobileBaseVehicle")
|
|
||||||
{
|
|
||||||
// %obj.setFrozenState(true);
|
|
||||||
%obj.schedule(2000, "delete"); //was 2000
|
|
||||||
//%data.schedule(500, 'onAvoidCollisions', %obj);
|
|
||||||
|
|
||||||
//Transfer the vehicle far away
|
|
||||||
%obj.schedule(128, "setPosition", vectorAdd(%obj.getPosition(), "40 -27 10000")); //Lowered: was 500
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
%obj.setFrozenState(true);
|
|
||||||
%obj.schedule(500, "delete"); //was 500
|
|
||||||
}
|
|
||||||
// -----------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -422,4 +406,4 @@ if (!isActivePackage(TacoOverrides))
|
||||||
// %z = getWord(%impulseVec, 2) / %data.mass;
|
// %z = getWord(%impulseVec, 2) / %data.mass;
|
||||||
// %vel = %x SPC %y SPC %z;
|
// %vel = %x SPC %y SPC %z;
|
||||||
// %this.setVelocity(vectorAdd(%this.getVelocity(), %vel));
|
// %this.setVelocity(vectorAdd(%this.getVelocity(), %vel));
|
||||||
// }
|
// }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue