mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-16 00:24:35 +00:00
Merge branch 'Dev' into Stable
This commit is contained in:
commit
0dd6da557c
10 changed files with 846 additions and 306 deletions
|
|
@ -5,301 +5,39 @@
|
||||||
package AntiLouExploitFixes
|
package AntiLouExploitFixes
|
||||||
{
|
{
|
||||||
|
|
||||||
// MPB INSTANT ENERGY FIX
|
|
||||||
|
|
||||||
// VehicleData::onRemove(%this, %obj)
|
// VehicleData::onRemove(%this, %obj)
|
||||||
// Info: this is called after the MPB is destroyed. Reset the variable
|
// Info: this is called after the MPB is destroyed. Reset the variable
|
||||||
function VehicleData::onRemove(%this, %obj)
|
function VehicleData::onRemove(%this, %obj)
|
||||||
{
|
{
|
||||||
if(%obj.station.isDestroyed)
|
if(%obj.station.isDestroyed)
|
||||||
%obj.station.isDestroyed = 0;
|
%obj.station.isDestroyed = 0;
|
||||||
|
|
||||||
parent::onRemove(%this, %obj);
|
parent::onRemove(%this, %obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
// END MPB INSTANT ENERGY FIX
|
|
||||||
|
|
||||||
// VEHICLE STATION SPAM FIX
|
|
||||||
|
|
||||||
// serverCmdBuyVehicle(%client, %blockName)
|
|
||||||
// Info: Fix an exploit that makes the server lag.
|
|
||||||
function serverCmdBuyVehicle(%client, %blockName)
|
|
||||||
{
|
|
||||||
// if the client has already created a vehicle, don't execute the function
|
|
||||||
if(%client.cantBuyVehicle)
|
|
||||||
return;
|
|
||||||
|
|
||||||
%team = %client.getSensorGroup();
|
|
||||||
if(vehicleCheck(%blockName, %team))
|
|
||||||
{
|
|
||||||
%station = %client.player.station.pad;
|
|
||||||
if((%station.ready) && (%station.station.vehicle[%blockName]))
|
|
||||||
{
|
|
||||||
%trans = %station.getTransform();
|
|
||||||
%pos = getWords(%trans, 0, 2);
|
|
||||||
%matrix = VectorOrthoBasis(getWords(%trans, 3, 6));
|
|
||||||
%yrot = getWords(%matrix, 3, 5);
|
|
||||||
%p = vectorAdd(%pos,vectorScale(%yrot, -3));
|
|
||||||
%p = getWords(%p, 0, 1) @ " " @ getWord(%p, 2) + 4;
|
|
||||||
%p = vectorAdd(%p, %blockName.spawnOffset);
|
|
||||||
%rot = getWords(%trans, 3, 5);
|
|
||||||
%angle = getWord(%trans, 6) + 3.14;
|
|
||||||
%mask = $TypeMasks::VehicleObjectType | $TypeMasks::PlayerObjectType | $TypeMasks::StationObjectType | $TypeMasks::TurretObjectType;
|
|
||||||
InitContainerRadiusSearch(%p, %blockName.checkRadius, %mask);
|
|
||||||
|
|
||||||
%clear = 1;
|
|
||||||
for(%x = 0; (%obj = containerSearchNext()) != 0; %x++)
|
|
||||||
{
|
|
||||||
if((%obj.getType() & $TypeMasks::VehicleObjectType) && (%obj.getDataBlock().checkIfPlayersMounted(%obj)))
|
|
||||||
{
|
|
||||||
%clear = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
%removeObjects[%x] = %obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(%clear)
|
|
||||||
{
|
|
||||||
%fadeTime = 0;
|
|
||||||
for(%i = 0; %i < %x; %i++)
|
|
||||||
{
|
|
||||||
if(%removeObjects[%i].getType() & $TypeMasks::PlayerObjectType)
|
|
||||||
{
|
|
||||||
%pData = %removeObjects[%i].getDataBlock();
|
|
||||||
%pData.damageObject(%removeObjects[%i], 0, "0 0 0", 1000, $DamageType::VehicleSpawn);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
%removeObjects[%i].mountable = 0;
|
|
||||||
%removeObjects[%i].startFade(1000, 0, true);
|
|
||||||
%removeObjects[%i].schedule(1001, "delete");
|
|
||||||
%fadeTime = 1500;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// client has buyed a vehicle
|
|
||||||
%client.cantBuyVehicle = 1;
|
|
||||||
schedule(%fadeTime, 0, "createVehicle", %client, %station, %blockName, %team , %p, %rot, %angle);
|
|
||||||
// wait 6,5 seconds (time a vehicle needs to be created) before buying another vehicle
|
|
||||||
schedule(6500, 0, "resetBuyVehicle", %client);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
MessageClient(%client, "", 'Can\'t create vehicle. A player is on the creation pad.');
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
messageClient(%client, "", "~wfx/misc/misc.error.wav");
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
messageClient(%client, "", "~wfx/misc/misc.error.wav");
|
|
||||||
}
|
|
||||||
|
|
||||||
// resetBuyVehicle(%client)
|
|
||||||
// Info: delete the variable, so client can buy another vehicle
|
|
||||||
function resetBuyVehicle(%client)
|
|
||||||
{
|
|
||||||
%client.cantBuyVehicle = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
// END VEHICLE STATION SPAM FIX
|
|
||||||
|
|
||||||
|
|
||||||
// Fix for observer vehicle bug, where observers are drawn to
|
|
||||||
// a vehicle no matter whether they are observing the client or not
|
|
||||||
// Thanks to MT for pointing out.
|
|
||||||
function resetObserveFollow( %client, %dismount )
|
|
||||||
{
|
|
||||||
if( %dismount )
|
|
||||||
{
|
|
||||||
if( !isObject( %client.player ) )
|
|
||||||
return;
|
|
||||||
|
|
||||||
for( %i = 0; %i < %client.observeCount; %i++ )
|
|
||||||
{
|
|
||||||
// Check if data in %client.observers[%i] is correct at all
|
|
||||||
if ( %client.observers[%i].clientObserve != %client )
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
%client.observers[%i].camera.setOrbitMode( %client.player, %client.player.getTransform(), 0.5, 4.5, 4.5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if( !%client.player.isMounted() )
|
|
||||||
return;
|
|
||||||
|
|
||||||
// grab the vehicle...
|
|
||||||
%mount = %client.player.getObjectMount();
|
|
||||||
if( %mount.getDataBlock().observeParameters $= "" )
|
|
||||||
%params = %client.player.getTransform();
|
|
||||||
else
|
|
||||||
%params = %mount.getDataBlock().observeParameters;
|
|
||||||
|
|
||||||
for( %i = 0; %i < %client.observeCount; %i++ )
|
|
||||||
{
|
|
||||||
// Check if data in %client.observers[%i] is correct at all
|
|
||||||
if ( %client.observers[%i].clientObserve != %client )
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
%client.observers[%i].camera.setOrbitMode(%mount, %mount.getTransform(), getWord( %params, 0 ), getWord( %params, 1 ), getWord( %params, 2 ));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ilys - No lava, please.
|
|
||||||
function StationVehiclePad::createStationVehicle(%data, %obj)
|
|
||||||
{
|
|
||||||
%group = %obj.getGroup();
|
|
||||||
%xform = %obj.getSlotTransform(0);
|
|
||||||
%position = getWords(%xform, 0, 2);
|
|
||||||
%rotation = getWords(%xform, 3, 5);
|
|
||||||
%angle = (getWord(%xform, 6) * 180) / 3.14159;
|
|
||||||
if(%obj.stationPos $= "" || %obj.stationRot $= "")
|
|
||||||
{
|
|
||||||
%pos = %position;
|
|
||||||
%rot = %rotation @ " " @ %angle;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
%pos = %obj.stationPos;
|
|
||||||
%rot = %obj.stationRot;
|
|
||||||
}
|
|
||||||
%sv = new StaticShape() {
|
|
||||||
scale = "1 1 1";
|
|
||||||
dataBlock = "StationVehicle";
|
|
||||||
lockCount = "0";
|
|
||||||
homingCount = "0";
|
|
||||||
team = %obj.team;
|
|
||||||
position = %pos;
|
|
||||||
rotation = %rot;
|
|
||||||
};
|
|
||||||
%group.add(%sv);
|
|
||||||
%sv.setPersistent(false);
|
|
||||||
%sv.getDataBlock().gainPower(%sv);
|
|
||||||
%sv.getDataBlock().createTrigger(%sv);
|
|
||||||
%sv.pad = %obj;
|
|
||||||
%obj.station = %sv;
|
|
||||||
%sv.trigger.mainObj = %obj;
|
|
||||||
%sv.trigger.disableObj = %sv;
|
|
||||||
if(%sv.getTarget() != -1)
|
|
||||||
setTargetSensorGroup(%sv.getTarget(), %obj.team);
|
|
||||||
if(%obj.scoutVehicle !$= "Removed")
|
|
||||||
%sv.vehicle[scoutvehicle] = true;
|
|
||||||
if(%obj.assaultVehicle !$= "Removed")
|
|
||||||
%sv.vehicle[assaultVehicle] = true;
|
|
||||||
if(%obj.mobileBaseVehicle !$= "Removed")
|
|
||||||
{
|
|
||||||
// ilys - Removed lava waterblock code from here
|
|
||||||
%sv.vehicle[mobileBasevehicle] = true;
|
|
||||||
%sv.getDataBlock().createTeleporter(%sv, %group);
|
|
||||||
}
|
|
||||||
if(%obj.scoutFlyer !$= "Removed")
|
|
||||||
%sv.vehicle[scoutFlyer] = true;
|
|
||||||
if(%obj.bomberFlyer !$= "Removed")
|
|
||||||
%sv.vehicle[bomberFlyer] = true;
|
|
||||||
if(%obj.hapcFlyer !$= "Removed")
|
|
||||||
%sv.vehicle[hapcFlyer] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ilys - We dont do anything here now
|
|
||||||
function serverCmdClientTeamChange( %client )
|
|
||||||
{
|
|
||||||
// Don't do it, man. DON'T DO IT!
|
|
||||||
}
|
|
||||||
|
|
||||||
// ilys - Only allow the client to force play when the match has started
|
|
||||||
function serverCmdClientJoinGame(%client)
|
|
||||||
{
|
|
||||||
if(!$MatchStarted) return;
|
|
||||||
parent::serverCmdClientJoinGame(%client);
|
|
||||||
}
|
|
||||||
|
|
||||||
function serverCmdPlayAnim(%client, %anim)
|
function serverCmdPlayAnim(%client, %anim)
|
||||||
{
|
{
|
||||||
// Not used in Classic
|
// Not used in Classic
|
||||||
}
|
}
|
||||||
|
|
||||||
// ilys - Fix for the Standing Pilot bug
|
|
||||||
function Armor::onMount(%this,%obj,%vehicle,%node)
|
|
||||||
{
|
|
||||||
if (%node == 0)
|
|
||||||
{
|
|
||||||
%obj.setTransform("0 0 0 0 0 1 0");
|
|
||||||
%obj.setActionThread(%vehicle.getDatablock().mountPose[%node],true,true);
|
|
||||||
%obj.schedule(300,"setActionThread",%vehicle.getDatablock().mountPose[%node],true,true);
|
|
||||||
if(!%obj.inStation) %obj.lastWeapon = (%obj.getMountedImage($WeaponSlot) == 0 ) ? "" : %obj.getMountedImage($WeaponSlot).item;
|
|
||||||
%obj.unmountImage($WeaponSlot);
|
|
||||||
if(!%obj.client.isAIControlled())
|
|
||||||
{
|
|
||||||
%obj.setControlObject(%vehicle);
|
|
||||||
%obj.client.setObjectActiveImage(%vehicle, 2);
|
|
||||||
}
|
|
||||||
if(%obj == %obj.lastVehicle.lastPilot && %obj.lastVehicle != %vehicle)
|
|
||||||
{
|
|
||||||
schedule(15000, %obj.lastVehicle,"vehicleAbandonTimeOut", %obj.lastVehicle);
|
|
||||||
%obj.lastVehicle.lastPilot = "";
|
|
||||||
}
|
|
||||||
if(%vehicle.lastPilot !$= "" && %vehicle == %vehicle.lastPilot.lastVehicle) %vehicle.lastPilot.lastVehicle = "";
|
|
||||||
%vehicle.abandon = false;
|
|
||||||
%vehicle.lastPilot = %obj;
|
|
||||||
%obj.lastVehicle = %vehicle;
|
|
||||||
if((%vehicle.getTarget() != -1) && %vehicle.getDatablock().cantTeamSwitch $= "")
|
|
||||||
{
|
|
||||||
setTargetSensorGroup(%vehicle.getTarget(), %obj.client.getSensorGroup());
|
|
||||||
if( %vehicle.turretObject > 0 ) setTargetSensorGroup(%vehicle.turretObject.getTarget(), %obj.client.getSensorGroup());
|
|
||||||
}
|
|
||||||
commandToClient( %obj.client, 'VehicleMount' );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(%vehicle.getDataBlock().mountPose[%node] !$= "") %obj.setActionThread(%vehicle.getDatablock().mountPose[%node]);
|
|
||||||
else %obj.setActionThread("root", true);
|
|
||||||
}
|
|
||||||
if(%vehicle.getDatablock().numMountPoints > 1)
|
|
||||||
{
|
|
||||||
%nodeName = findNodeName(%vehicle, %node); // function in vehicle.cs
|
|
||||||
for(%i = 0; %i < %vehicle.getDatablock().numMountPoints; %i++)
|
|
||||||
{
|
|
||||||
if (%vehicle.getMountNodeObject(%i) > 0)
|
|
||||||
{
|
|
||||||
if(%vehicle.getMountNodeObject(%i).client != %obj.client)
|
|
||||||
{
|
|
||||||
%team = (%obj.team == %vehicle.getMountNodeObject(%i).client.team ? 'Teammate' : 'Enemy');
|
|
||||||
messageClient( %vehicle.getMountNodeObject(%i).client, 'MsgShowPassenger', '\c2%3: \c3%1\c2 has boarded in the \c3%2\c2 position.', %obj.client.name, %nodeName, %team );
|
|
||||||
}
|
|
||||||
commandToClient( %vehicle.getMountNodeObject(%i).client, 'showPassenger', %node, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( %obj.getImageTrigger( $BackpackSlot ) ) %obj.setImageTrigger( $BackpackSlot, false );
|
|
||||||
%obj.client.vehicleMounted = %vehicle;
|
|
||||||
AIVehicleMounted(%vehicle);
|
|
||||||
if(%obj.client.isAIControlled()) %this.AIonMount(%obj, %vehicle, %node);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fix a problem with the package system
|
// Fix a problem with the package system
|
||||||
// dropping the first package when a non-active
|
// dropping the first package when a non-active
|
||||||
// package is deactivated
|
// package is deactivated
|
||||||
function DeactivatePackage(%this)
|
function DeactivatePackage(%this)
|
||||||
{
|
{
|
||||||
if(!isActivePackage(%this)) return;
|
if(!isActivePackage(%this)) return;
|
||||||
parent::DeactivatePackage(%this);
|
parent::DeactivatePackage(%this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevents clients from being vulnerable to crashing via NULL voice exploit
|
// Prevents clients from being vulnerable to crashing via NULL voice exploit
|
||||||
function alxGetWaveLen(%wavFile) {
|
function alxGetWaveLen(%wavFile) {
|
||||||
if ( strstr( %wavFile , ".wav" ) == -1 ) return $MaxMessageWavLength + 1;
|
if ( strstr( %wavFile , ".wav" ) == -1 ) return $MaxMessageWavLength + 1;
|
||||||
echo("Length check: " @ %wavFile);
|
echo("Length check: " @ %wavFile);
|
||||||
parent::alxGetWaveLen(%wavFile);
|
parent::alxGetWaveLen(%wavFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Prevent package from being activated if it is already
|
// Prevent package from being activated if it is already
|
||||||
if (!isActivePackage(AntiLouExploitFixes))
|
if (!isActivePackage(AntiLouExploitFixes))
|
||||||
activatePackage(AntiLouExploitFixes);
|
activatePackage(AntiLouExploitFixes);
|
||||||
|
|
|
||||||
|
|
@ -292,11 +292,11 @@ function VehicleData::createPositionMarker(%data, %obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
//Conc Throw (Almost Normal Grenades) 1500 Normal
|
//Conc Throw (Almost Normal Grenades) 1500 Normal
|
||||||
function ConcussionGrenadeThrown::onThrow(%this, %gren)
|
// function ConcussionGrenadeThrown::onThrow(%this, %gren)
|
||||||
{
|
// {
|
||||||
AIGrenadeThrown(%gren);
|
// AIGrenadeThrown(%gren);
|
||||||
%gren.detThread = schedule(1800, %gren, "detonateGrenade", %gren); // Was 2000
|
// %gren.detThread = schedule(1800, %gren, "detonateGrenade", %gren); // Was 2000
|
||||||
}
|
// }
|
||||||
|
|
||||||
//Attack LOS Sky Fix
|
//Attack LOS Sky Fix
|
||||||
function serverCmdSendTaskToClient(%client, %targetClient, %fromCmdMap)
|
function serverCmdSendTaskToClient(%client, %targetClient, %fromCmdMap)
|
||||||
|
|
@ -334,6 +334,90 @@ function ShapeBase::throwWeapon(%this)
|
||||||
parent::throwWeapon(%this);
|
parent::throwWeapon(%this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Added object check
|
||||||
|
function VehicleData::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %theClient, %proj)
|
||||||
|
{
|
||||||
|
if(%proj !$= "")
|
||||||
|
{
|
||||||
|
if(%amount > 0 && %targetObject.lastDamageProj !$= %proj)
|
||||||
|
{
|
||||||
|
%targetObject.lastDamageProj = %proj;
|
||||||
|
%targetObject.lastDamageAmount = %amount;
|
||||||
|
}
|
||||||
|
else if(%targetObject.lastDamageAmount < %amount)
|
||||||
|
%amount = %amount - %targetObject.lastDamageAmount;
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// check for team damage
|
||||||
|
//%sourceClient = %sourceObject ? %sourceObject.getOwnerClient() : 0;
|
||||||
|
%sourceClient = isObject(%sourceObject) ? %sourceObject.getOwnerClient() : 0; //Object Check
|
||||||
|
%targetTeam = getTargetSensorGroup(%targetObject.getTarget());
|
||||||
|
|
||||||
|
if(%sourceClient)
|
||||||
|
%sourceTeam = %sourceClient.getSensorGroup();
|
||||||
|
else if(isObject(%sourceObject) && %sourceObject.getClassName() $= "Turret")
|
||||||
|
{
|
||||||
|
%sourceTeam = getTargetSensorGroup(%sourceObject.getTarget());
|
||||||
|
%sourceClient = %sourceObject.getControllingClient(); // z0dd - ZOD, 6/10/02. Play a sound to client when they hit a vehicle with a controlled turret
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%sourceTeam = %sourceObject ? getTargetSensorGroup(%sourceObject.getTarget()) : -1;
|
||||||
|
// Client is allready defined and this spams console - ZOD
|
||||||
|
//%sourceClient = %sourceObject.getControllingClient(); // z0dd - ZOD, 6/10/02. Play a sound to client when they hit a vehicle from a vehicle
|
||||||
|
}
|
||||||
|
|
||||||
|
// vehicles no longer obey team damage -JR
|
||||||
|
// if(!$teamDamage && (%targetTeam == %sourceTeam) && %targetObject.getDamagePercent() > 0.5)
|
||||||
|
// return;
|
||||||
|
//but we do want to track the destroyer
|
||||||
|
if(%sourceObject)
|
||||||
|
{
|
||||||
|
%targetObject.lastDamagedBy = %sourceObject;
|
||||||
|
%targetObject.lastDamageType = %damageType;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
%targetObject.lastDamagedBy = 0;
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------
|
||||||
|
// z0dd - ZOD, 6/10/02. Play a sound to client when they hit a vehicle
|
||||||
|
if(%sourceClient && %sourceClient.vehicleHitSound)
|
||||||
|
{
|
||||||
|
if(%targetTeam != %sourceTeam)
|
||||||
|
{
|
||||||
|
if ((%damageType > 0 && %damageType < 11) ||
|
||||||
|
(%damageType == 13) ||
|
||||||
|
(%damageType > 15 && %damageType < 24) ||
|
||||||
|
(%damageType > 25 && %damageType < 32))
|
||||||
|
{
|
||||||
|
messageClient(%sourceClient, 'MsgClientHit', %sourceClient.vehicleHitWav);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Scale damage type & include shield calculations...
|
||||||
|
if (%data.isShielded)
|
||||||
|
%amount = %data.checkShields(%targetObject, %position, %amount, %damageType);
|
||||||
|
|
||||||
|
|
||||||
|
%damageScale = %data.damageScale[%damageType];
|
||||||
|
if(%damageScale !$= "")
|
||||||
|
%amount *= %damageScale;
|
||||||
|
|
||||||
|
if(%amount != 0)
|
||||||
|
%targetObject.applyDamage(%amount);
|
||||||
|
|
||||||
|
if(%targetObject.getDamageState() $= "Destroyed" )
|
||||||
|
{
|
||||||
|
if( %momVec !$= "")
|
||||||
|
%targetObject.setMomentumVector(%momVec);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Prevent package from being activated if it is already
|
// Prevent package from being activated if it is already
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
||||||
{
|
{
|
||||||
case "VoteKickPlayer":
|
case "VoteKickPlayer":
|
||||||
%curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime();
|
%curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime();
|
||||||
if(%curTimeLeftMS <= 120000)
|
if(%curTimeLeftMS <= 120000 && $countdownStarted && $MatchStarted && !%isAdmin)
|
||||||
{
|
{
|
||||||
messageClient(%client, "", "\c2Kick votes are restricted at this time.");
|
messageClient(%client, "", "\c2Kick votes are restricted at this time.");
|
||||||
return;
|
return;
|
||||||
|
|
@ -378,7 +378,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
||||||
|
|
||||||
case "VoteChangeMission":
|
case "VoteChangeMission":
|
||||||
%curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime();
|
%curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime();
|
||||||
if(%curTimeLeftMS <= 120000)
|
if(%curTimeLeftMS <= 120000 && $countdownStarted && $MatchStarted && !%isAdmin)
|
||||||
{
|
{
|
||||||
messageClient(%client, "", "\c2Change mission votes are restricted at this time.");
|
messageClient(%client, "", "\c2Change mission votes are restricted at this time.");
|
||||||
return;
|
return;
|
||||||
|
|
@ -712,7 +712,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
||||||
|
|
||||||
case "VoteNextMission":
|
case "VoteNextMission":
|
||||||
%curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime();
|
%curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime();
|
||||||
if(%curTimeLeftMS <= 120000)
|
if(%curTimeLeftMS <= 120000 && $countdownStarted && $MatchStarted && !%isAdmin)
|
||||||
{
|
{
|
||||||
messageClient(%client, "", "\c2Set next mission votes are restricted at this time.");
|
messageClient(%client, "", "\c2Set next mission votes are restricted at this time.");
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,33 @@
|
||||||
|
|
||||||
package dtBan
|
package dtBan
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//Keep track of gags (Disconnecting and Reconnecting)
|
||||||
|
function GameConnection::onDrop(%client, %reason)
|
||||||
|
{
|
||||||
|
%ip = %client.getAddress();
|
||||||
|
%ip = getSubStr(%ip, 3, strLen(%ip));
|
||||||
|
%ip = getSubStr(%ip, 0, strstr(%ip, ":"));
|
||||||
|
%ip = strReplace(%ip, ".", "_");
|
||||||
|
|
||||||
|
$chatGagged[%ip] = $chatGagged[%client.guid] = (%client.isGagged == 1); //save status of this
|
||||||
|
|
||||||
|
parent::onDrop(%client, %reason);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Reapply the gag
|
||||||
|
function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch )
|
||||||
|
{
|
||||||
|
parent::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch );
|
||||||
|
|
||||||
|
%ip = %client.getAddress();
|
||||||
|
%ip = getSubStr(%ip, 3, strLen(%ip));
|
||||||
|
%ip = getSubStr(%ip, 0, strstr(%ip, ":"));
|
||||||
|
%ip = strReplace(%ip, ".", "_");
|
||||||
|
|
||||||
|
%client.isGagged = ($chatGagged[%ip] || $chatGagged[%client.guid]); //restore status
|
||||||
|
}
|
||||||
|
|
||||||
function ClassicLoadBanlist()
|
function ClassicLoadBanlist()
|
||||||
{
|
{
|
||||||
$ClassicPermaBans = 0;
|
$ClassicPermaBans = 0;
|
||||||
|
|
|
||||||
|
|
@ -214,13 +214,13 @@ function ALTsendModInfoToClient(%client)
|
||||||
switch$(%randompics)
|
switch$(%randompics)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
$dtLoadingScreen::LoadScreenMessage[$dmlP++] = "<Just:CENTER><bitmap:twb/twb_lakedebris_01><Just:RIGHT><bitmap:twb/twb_waterdemise_03><Just:LEFT><bitmap:twb/twb_action_05>";
|
$dtLoadingScreen::LoadScreenMessage[$dmlP++] = "<lmargin:24><bitmap:twb/twb_waterdemise_03><bitmap:twb/twb_lakedebris_01><Just:LEFT><bitmap:twb/twb_action_05>";
|
||||||
case 2:
|
case 2:
|
||||||
$dtLoadingScreen::LoadScreenMessage[$dmlP++] = "<Just:CENTER><bitmap:twb/twb_blowngen_01><Just:RIGHT><bitmap:twb/twb_action_03><Just:LEFT><bitmap:twb/twb_starwolf_shrike>";
|
$dtLoadingScreen::LoadScreenMessage[$dmlP++] = "<lmargin:24><bitmap:twb/twb_action_03><bitmap:twb/twb_blowngen_01><Just:LEFT><bitmap:twb/twb_starwolf_shrike>";
|
||||||
case 3:
|
case 3:
|
||||||
$dtLoadingScreen::LoadScreenMessage[$dmlP++] = "<Just:CENTER><bitmap:twb/twb_TRIBES2><Just:RIGHT><bitmap:twb/twb_Harbingers><Just:LEFT><bitmap:twb/twb_action_10>";
|
$dtLoadingScreen::LoadScreenMessage[$dmlP++] = "<lmargin:24><bitmap:twb/twb_Harbingers><bitmap:twb/twb_TRIBES2><Just:LEFT><bitmap:twb/twb_action_10>";
|
||||||
case 4:
|
case 4:
|
||||||
$dtLoadingScreen::LoadScreenMessage[$dmlP++] = "<Just:CENTER><bitmap:twb/twb_inferno_02><Just:RIGHT><bitmap:twb/twb_action_04><Just:LEFT><bitmap:twb/twb_action_06>";
|
$dtLoadingScreen::LoadScreenMessage[$dmlP++] = "<lmargin:24><bitmap:twb/twb_action_04><bitmap:twb/twb_inferno_02><Just:LEFT><bitmap:twb/twb_action_06>";
|
||||||
}
|
}
|
||||||
//$dtLoadingScreen::LoadScreenMessage[$dmlP++] = "<Just:CENTER><bitmap:Cred_logo5.png><bitmap:twb/twb_action_04><bitmap:twb/twb_action_06><Just:LEFT>";
|
//$dtLoadingScreen::LoadScreenMessage[$dmlP++] = "<Just:CENTER><bitmap:Cred_logo5.png><bitmap:twb/twb_action_04><bitmap:twb/twb_action_06><Just:LEFT>";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1091,6 +1091,11 @@ $dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "plasmaDeathGround";
|
||||||
$dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "blasterDeathGround";
|
$dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "blasterDeathGround";
|
||||||
$dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "mineDeathGround";
|
$dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "mineDeathGround";
|
||||||
|
|
||||||
|
$dtStats::FV[$dtStats::FC["Game"]++,"Game"] = "skin";
|
||||||
|
$dtStats::FV[$dtStats::FC["Game"]++,"Game"] = "sex";
|
||||||
|
$dtStats::FV[$dtStats::FC["Game"]++,"Game"] = "race";
|
||||||
|
$dtStats::FV[$dtStats::FC["Game"]++,"Game"] = "voice";
|
||||||
|
|
||||||
$dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "null";//rng number
|
$dtStats::FV[$dtStats::FC["TG"]++,"TG"] = "null";//rng number
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
//Unused vars that are not tracked but used for other things and need to be reset
|
//Unused vars that are not tracked but used for other things and need to be reset
|
||||||
|
|
@ -3589,6 +3594,11 @@ function dtStatsMissionDropReady(%game, %client){ // called when client has fini
|
||||||
else
|
else
|
||||||
%dtStats = %client.dtStats;
|
%dtStats = %client.dtStats;
|
||||||
|
|
||||||
|
%dtStats.skin = getTaggedString(%client.skin);
|
||||||
|
%dtStats.race = %client.race;
|
||||||
|
%dtStats.sex = %client.sex;
|
||||||
|
%dtStats.voice = %client.voice;
|
||||||
|
|
||||||
%dtStats.joinPCT = (isGameRun() == 1) ? %game.getGamePct() : 0;
|
%dtStats.joinPCT = (isGameRun() == 1) ? %game.getGamePct() : 0;
|
||||||
updateTeamTime(%dtStats, -1);
|
updateTeamTime(%dtStats, -1);
|
||||||
%dtStats.team = %client.team;// should be 0
|
%dtStats.team = %client.team;// should be 0
|
||||||
|
|
@ -9514,4 +9524,5 @@ function testVarsRandomAll(%max){
|
||||||
// Removed Map Stats
|
// Removed Map Stats
|
||||||
// Removed all stat menus other then leaderboard stuff and server panel
|
// Removed all stat menus other then leaderboard stuff and server panel
|
||||||
// Made Live Stats Admin only its useful for testing stats
|
// Made Live Stats Admin only its useful for testing stats
|
||||||
// Changed stats compile speed to 64ms with map stats gone
|
// Changed stats compile speed to 64ms with map stats gone
|
||||||
|
// Extra stats for player model
|
||||||
|
|
@ -33,7 +33,7 @@ datablock AudioDescription(CloakLooping3d)
|
||||||
isLooping= true;
|
isLooping= true;
|
||||||
|
|
||||||
is3D = true;
|
is3D = true;
|
||||||
minDistance= 15.0; //Was 10
|
minDistance= 10.0;
|
||||||
MaxDistance= 55.0; //Was 50
|
MaxDistance= 55.0; //Was 50
|
||||||
type = $EffectAudioType;
|
type = $EffectAudioType;
|
||||||
environmentLevel = 1.0;
|
environmentLevel = 1.0;
|
||||||
|
|
@ -59,7 +59,7 @@ datablock ShapeBaseImageData(CloakingPackImage)
|
||||||
|
|
||||||
stateName[0] = "Idle";
|
stateName[0] = "Idle";
|
||||||
stateTransitionOnTriggerDown[0] = "Activate";
|
stateTransitionOnTriggerDown[0] = "Activate";
|
||||||
|
|
||||||
stateName[1] = "Activate";
|
stateName[1] = "Activate";
|
||||||
stateScript[1] = "onActivate";
|
stateScript[1] = "onActivate";
|
||||||
stateSequence[1] = "fire";
|
stateSequence[1] = "fire";
|
||||||
|
|
@ -105,12 +105,12 @@ function CloakingPackImage::onUnmount(%data, %obj, %node)
|
||||||
function CloakingPackImage::onActivate(%data, %obj, %slot)
|
function CloakingPackImage::onActivate(%data, %obj, %slot)
|
||||||
{
|
{
|
||||||
if(%obj.reCloak !$= "")
|
if(%obj.reCloak !$= "")
|
||||||
{
|
{
|
||||||
Cancel(%obj.reCloak);
|
Cancel(%obj.reCloak);
|
||||||
%obj.reCloak = "";
|
%obj.reCloak = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(%obj.client.armor $= "Light")
|
if(%obj.client.armor $= "Light")
|
||||||
{
|
{
|
||||||
// can the player currently cloak (function returns "true" or reason for failure)?
|
// can the player currently cloak (function returns "true" or reason for failure)?
|
||||||
if(%obj.canCloak() $= "true")
|
if(%obj.canCloak() $= "true")
|
||||||
|
|
@ -127,7 +127,7 @@ function CloakingPackImage::onActivate(%data, %obj, %slot)
|
||||||
%obj.setImageTrigger(%slot, false);
|
%obj.setImageTrigger(%slot, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// hopefully avoid some loopholes
|
// hopefully avoid some loopholes
|
||||||
messageClient(%obj.client, 'MsgCloakingPackInvalid', '\c2Cloaking available for light armors only.');
|
messageClient(%obj.client, 'MsgCloakingPackInvalid', '\c2Cloaking available for light armors only.');
|
||||||
|
|
@ -138,11 +138,11 @@ function CloakingPackImage::onActivate(%data, %obj, %slot)
|
||||||
function CloakingPackImage::onDeactivate(%data, %obj, %slot)
|
function CloakingPackImage::onDeactivate(%data, %obj, %slot)
|
||||||
{
|
{
|
||||||
if(%obj.reCloak !$= "")
|
if(%obj.reCloak !$= "")
|
||||||
{
|
{
|
||||||
Cancel(%obj.reCloak);
|
Cancel(%obj.reCloak);
|
||||||
%obj.reCloak = "";
|
%obj.reCloak = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// if pack is not on then dont bother...
|
// if pack is not on then dont bother...
|
||||||
if(%obj.getImageState($BackpackSlot) $= "activate")
|
if(%obj.getImageState($BackpackSlot) $= "activate")
|
||||||
messageClient(%obj.client, 'MsgCloakingPackOff', '\c2Cloaking pack off.');
|
messageClient(%obj.client, 'MsgCloakingPackOff', '\c2Cloaking pack off.');
|
||||||
|
|
@ -168,12 +168,12 @@ function Armor::onForceUncloak(%this, %obj, %reason)
|
||||||
%pack = %obj.getMountedImage($BackpackSlot);
|
%pack = %obj.getMountedImage($BackpackSlot);
|
||||||
if((%pack <= 0) || (%pack.item !$= "CloakingPack"))
|
if((%pack <= 0) || (%pack.item !$= "CloakingPack"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(%obj.getImageState($BackpackSlot) $= "activate")
|
if(%obj.getImageState($BackpackSlot) $= "activate")
|
||||||
{
|
{
|
||||||
// cancel recloak thread
|
// cancel recloak thread
|
||||||
if(%obj.reCloak !$= "")
|
if(%obj.reCloak !$= "")
|
||||||
{
|
{
|
||||||
Cancel(%obj.reCloak);
|
Cancel(%obj.reCloak);
|
||||||
%obj.reCloak = "";
|
%obj.reCloak = "";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ datablock ShapeBaseImageData(SensorJammerPackImage)
|
||||||
|
|
||||||
stateName[0] = "Idle";
|
stateName[0] = "Idle";
|
||||||
stateTransitionOnTriggerDown[0] = "Activate";
|
stateTransitionOnTriggerDown[0] = "Activate";
|
||||||
|
|
||||||
stateName[1] = "Activate";
|
stateName[1] = "Activate";
|
||||||
stateScript[1] = "onActivate";
|
stateScript[1] = "onActivate";
|
||||||
stateSequence[1] = "fire";
|
stateSequence[1] = "fire";
|
||||||
|
|
@ -75,9 +75,9 @@ datablock SensorData(JammerSensorObjectPassive) //v2 was commented out...
|
||||||
detectsFOVOnly = true;
|
detectsFOVOnly = true;
|
||||||
detectFOVPercent = 1.3;
|
detectFOVPercent = 1.3;
|
||||||
useObjectFOV = true;
|
useObjectFOV = true;
|
||||||
|
|
||||||
//detectscloaked = 1; //v2
|
detectscloaked = 1; //v2
|
||||||
|
|
||||||
jams = true;
|
jams = true;
|
||||||
jamsOnlyGroup = true;
|
jamsOnlyGroup = true;
|
||||||
jamsUsingLOS = true;
|
jamsUsingLOS = true;
|
||||||
|
|
@ -95,13 +95,13 @@ datablock SensorData(JammerSensorObjectActive)
|
||||||
detectsFOVOnly = true;
|
detectsFOVOnly = true;
|
||||||
detectFOVPercent = 1.3;
|
detectFOVPercent = 1.3;
|
||||||
useObjectFOV = true;
|
useObjectFOV = true;
|
||||||
|
|
||||||
detectscloaked = 1; //v2
|
detectscloaked = 1; //v2
|
||||||
|
|
||||||
jams = true;
|
jams = true;
|
||||||
jamsOnlyGroup = true;
|
jamsOnlyGroup = true;
|
||||||
jamsUsingLOS = true;
|
jamsUsingLOS = true;
|
||||||
jamRadius = 30;
|
jamRadius = 45; //was 30
|
||||||
};
|
};
|
||||||
|
|
||||||
function SensorJammerPackImage::onMount(%data, %obj, %slot)
|
function SensorJammerPackImage::onMount(%data, %obj, %slot)
|
||||||
|
|
@ -109,7 +109,7 @@ function SensorJammerPackImage::onMount(%data, %obj, %slot)
|
||||||
setTargetSensorData(%obj.client.target, JammerSensorObjectPassive); //v2
|
setTargetSensorData(%obj.client.target, JammerSensorObjectPassive); //v2
|
||||||
%obj.setImageTrigger(%slot, false);
|
%obj.setImageTrigger(%slot, false);
|
||||||
commandToClient( %obj.client, 'setSenJamIconOff' );
|
commandToClient( %obj.client, 'setSenJamIconOff' );
|
||||||
//%obj.setJammerFX(false);
|
%obj.setJammerFX(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function deactivateJammer(%data, %obj, %slot)
|
function deactivateJammer(%data, %obj, %slot)
|
||||||
|
|
@ -128,7 +128,7 @@ function SensorJammerPackImage::onActivate(%data, %obj, %slot)
|
||||||
messageClient(%obj.client, 'MsgSensorJammerPackOn', '\c2Sensor jammer pack on.');
|
messageClient(%obj.client, 'MsgSensorJammerPackOn', '\c2Sensor jammer pack on.');
|
||||||
setTargetSensorData(%obj.client.target, JammerSensorObjectActive);
|
setTargetSensorData(%obj.client.target, JammerSensorObjectActive);
|
||||||
commandToClient( %obj.client, 'setSenJamIconOn' );
|
commandToClient( %obj.client, 'setSenJamIconOn' );
|
||||||
//%obj.setJammerFX( true );
|
%obj.setJammerFX( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
function SensorJammerPackImage::onDeactivate(%data, %obj, %slot)
|
function SensorJammerPackImage::onDeactivate(%data, %obj, %slot)
|
||||||
|
|
@ -138,7 +138,7 @@ function SensorJammerPackImage::onDeactivate(%data, %obj, %slot)
|
||||||
%obj.setImageTrigger(%slot, false);
|
%obj.setImageTrigger(%slot, false);
|
||||||
setTargetSensorData(%obj.client.target, JammerSensorObjectPassive); //v2 was PlayerSensor
|
setTargetSensorData(%obj.client.target, JammerSensorObjectPassive); //v2 was PlayerSensor
|
||||||
commandToClient( %obj.client, 'setSenJamIconOff' );
|
commandToClient( %obj.client, 'setSenJamIconOff' );
|
||||||
//%obj.setJammerFX( false );
|
%obj.setJammerFX( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
function SensorJammerPack::onPickup(%this, %obj, %shape, %amount)
|
function SensorJammerPack::onPickup(%this, %obj, %shape, %amount)
|
||||||
|
|
|
||||||
|
|
@ -2649,7 +2649,7 @@ function resetObserveFollow( %client, %dismount )
|
||||||
for( %i = 0; %i < %client.observeCount; %i++ )
|
for( %i = 0; %i < %client.observeCount; %i++ )
|
||||||
{
|
{
|
||||||
// z0dd - ZOD, 5/21/03. Make sure this client actually obs this client
|
// z0dd - ZOD, 5/21/03. Make sure this client actually obs this client
|
||||||
if ( %client.observers[%i].clientObserve != %client )
|
if ( %client.observers[%i].observeClient != %client )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
%client.observers[%i].camera.setOrbitMode( %client.player, %client.player.getTransform(), 0.5, 4.5, 4.5);
|
%client.observers[%i].camera.setOrbitMode( %client.player, %client.player.getTransform(), 0.5, 4.5, 4.5);
|
||||||
|
|
@ -2670,7 +2670,7 @@ function resetObserveFollow( %client, %dismount )
|
||||||
for( %i = 0; %i < %client.observeCount; %i++ )
|
for( %i = 0; %i < %client.observeCount; %i++ )
|
||||||
{
|
{
|
||||||
// z0dd - ZOD, 5/21/03. Make sure this client actually obs this client
|
// z0dd - ZOD, 5/21/03. Make sure this client actually obs this client
|
||||||
if ( %client.observers[%i].clientObserve != %client )
|
if ( %client.observers[%i].observeClient != %client )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
%client.observers[%i].camera.setOrbitMode(%mount, %mount.getTransform(), getWord( %params, 0 ), getWord( %params, 1 ), getWord( %params, 2 ));
|
%client.observers[%i].camera.setOrbitMode(%mount, %mount.getTransform(), getWord( %params, 0 ), getWord( %params, 1 ), getWord( %params, 2 ));
|
||||||
|
|
@ -2891,8 +2891,8 @@ function Armor::applyConcussion( %this, %dist, %radius, %sourceObject, %targetOb
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
%flagChance = 0.75;
|
%flagChance = 0.70;
|
||||||
%itemChance = 0.75;
|
%itemChance = 0.70;
|
||||||
}
|
}
|
||||||
|
|
||||||
%probabilityFlag = %flagChance * %percentage;
|
%probabilityFlag = %flagChance * %percentage;
|
||||||
|
|
|
||||||
680
Classic/scripts/vehicles/vehicle_tank.cs
Executable file
680
Classic/scripts/vehicles/vehicle_tank.cs
Executable file
|
|
@ -0,0 +1,680 @@
|
||||||
|
//**************************************************************
|
||||||
|
// BEOWULF ASSAULT VEHICLE
|
||||||
|
//**************************************************************
|
||||||
|
//**************************************************************
|
||||||
|
// SOUNDS
|
||||||
|
//**************************************************************
|
||||||
|
datablock EffectProfile(AssaultVehicleEngineEffect)
|
||||||
|
{
|
||||||
|
effectname = "vehicles/tank_engine";
|
||||||
|
minDistance = 5.0;
|
||||||
|
maxDistance = 10.0;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock EffectProfile(AssaultVehicleThrustEffect)
|
||||||
|
{
|
||||||
|
effectname = "vehicles/tank_boost";
|
||||||
|
minDistance = 5.0;
|
||||||
|
maxDistance = 10.0;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock EffectProfile(AssaultTurretActivateEffect)
|
||||||
|
{
|
||||||
|
effectname = "vehicles/tank_activate";
|
||||||
|
minDistance = 5.0;
|
||||||
|
maxDistance = 10.0;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock EffectProfile(AssaultMortarDryFireEffect)
|
||||||
|
{
|
||||||
|
effectname = "weapons/mortar_dryfire";
|
||||||
|
minDistance = 5.0;
|
||||||
|
maxDistance = 10.0;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock EffectProfile(AssaultMortarFireEffect)
|
||||||
|
{
|
||||||
|
effectname = "vehicles/tank_mortar_fire";
|
||||||
|
minDistance = 5.0;
|
||||||
|
maxDistance = 10.0;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock EffectProfile(AssaultMortarReloadEffect)
|
||||||
|
{
|
||||||
|
effectname = "weapons/mortar_reload";
|
||||||
|
minDistance = 5.0;
|
||||||
|
maxDistance = 10.0;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock EffectProfile(AssaultChaingunFireEffect)
|
||||||
|
{
|
||||||
|
effectname = "weapons/chaingun_fire";
|
||||||
|
minDistance = 5.0;
|
||||||
|
maxDistance = 10.0;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock AudioProfile(AssaultVehicleSkid)
|
||||||
|
{
|
||||||
|
filename = "fx/vehicles/tank_skid.wav";
|
||||||
|
description = ClosestLooping3d;
|
||||||
|
preload = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock AudioProfile(AssaultVehicleEngineSound)
|
||||||
|
{
|
||||||
|
filename = "fx/vehicles/tank_engine.wav";
|
||||||
|
description = AudioDefaultLooping3d;
|
||||||
|
preload = true;
|
||||||
|
effect = AssaultVehicleEngineEffect;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock AudioProfile(AssaultVehicleThrustSound)
|
||||||
|
{
|
||||||
|
filename = "fx/vehicles/tank_boost.wav";
|
||||||
|
description = AudioDefaultLooping3d;
|
||||||
|
preload = true;
|
||||||
|
effect = AssaultVehicleThrustEffect;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock AudioProfile(AssaultChaingunFireSound)
|
||||||
|
{
|
||||||
|
filename = "fx/vehicles/tank_chaingun.wav";
|
||||||
|
description = AudioDefaultLooping3d;
|
||||||
|
preload = true;
|
||||||
|
effect = AssaultChaingunFireEffect;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock AudioProfile(AssaultChaingunReloadSound)
|
||||||
|
{
|
||||||
|
filename = "fx/weapons/chaingun_dryfire.wav";
|
||||||
|
description = AudioClose3d;
|
||||||
|
preload = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock AudioProfile(TankChaingunProjectile)
|
||||||
|
{
|
||||||
|
filename = "fx/weapons/chaingun_projectile.wav";
|
||||||
|
description = ProjectileLooping3d;
|
||||||
|
preload = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock AudioProfile(AssaultTurretActivateSound)
|
||||||
|
{
|
||||||
|
filename = "fx/vehicles/tank_activate.wav";
|
||||||
|
description = AudioClose3d;
|
||||||
|
preload = true;
|
||||||
|
effect = AssaultTurretActivateEffect;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock AudioProfile(AssaultChaingunDryFireSound)
|
||||||
|
{
|
||||||
|
filename = "fx/weapons/chaingun_dryfire.wav";
|
||||||
|
description = AudioClose3d;
|
||||||
|
preload = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock AudioProfile(AssaultChaingunIdleSound)
|
||||||
|
{
|
||||||
|
filename = "fx/misc/diagnostic_on.wav";
|
||||||
|
description = ClosestLooping3d;
|
||||||
|
preload = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock AudioProfile(AssaultMortarDryFireSound)
|
||||||
|
{
|
||||||
|
filename = "fx/weapons/mortar_dryfire.wav";
|
||||||
|
description = AudioClose3d;
|
||||||
|
preload = true;
|
||||||
|
effect = AssaultMortarDryFireEffect;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock AudioProfile(AssaultMortarFireSound)
|
||||||
|
{
|
||||||
|
filename = "fx/vehicles/tank_mortar_fire.wav";
|
||||||
|
description = AudioClose3d;
|
||||||
|
preload = true;
|
||||||
|
effect = AssaultMortarFireEffect;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock AudioProfile(AssaultMortarReloadSound)
|
||||||
|
{
|
||||||
|
filename = "fx/weapons/mortar_reload.wav";
|
||||||
|
description = AudioClose3d;
|
||||||
|
preload = true;
|
||||||
|
effect = AssaultMortarReloadEffect;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock AudioProfile(AssaultMortarIdleSound)
|
||||||
|
{
|
||||||
|
filename = "fx/misc/diagnostic_on.wav";
|
||||||
|
description = ClosestLooping3d;
|
||||||
|
preload = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
//**************************************************************
|
||||||
|
// LIGHTS
|
||||||
|
//**************************************************************
|
||||||
|
datablock RunningLightData(TankLight1)
|
||||||
|
{
|
||||||
|
radius = 1.5;
|
||||||
|
color = "1.0 1.0 1.0 0.2";
|
||||||
|
nodeName = "Headlight_node01";
|
||||||
|
direction = "0.0 1.0 0.0";
|
||||||
|
texture = "special/headlight4";
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock RunningLightData(TankLight2)
|
||||||
|
{
|
||||||
|
radius = 1.5;
|
||||||
|
color = "1.0 1.0 1.0 0.2";
|
||||||
|
nodeName = "Headlight_node02";
|
||||||
|
direction = "0.0 1.0 0.0";
|
||||||
|
texture = "special/headlight4";
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock RunningLightData(TankLight3)
|
||||||
|
{
|
||||||
|
radius = 1.5;
|
||||||
|
color = "1.0 1.0 1.0 0.2";
|
||||||
|
nodeName = "Headlight_node03";
|
||||||
|
direction = "0.0 1.0 0.0";
|
||||||
|
texture = "special/headlight4";
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock RunningLightData(TankLight4)
|
||||||
|
{
|
||||||
|
radius = 1.5;
|
||||||
|
color = "1.0 1.0 1.0 0.2";
|
||||||
|
nodeName = "Headlight_node04";
|
||||||
|
direction = "0.0 1.0 0.0";
|
||||||
|
texture = "special/headlight4";
|
||||||
|
};
|
||||||
|
|
||||||
|
//**************************************************************
|
||||||
|
// VEHICLE CHARACTERISTICS
|
||||||
|
//**************************************************************
|
||||||
|
|
||||||
|
datablock HoverVehicleData(AssaultVehicle) : TankDamageProfile
|
||||||
|
{
|
||||||
|
spawnOffset = "0 0 4";
|
||||||
|
|
||||||
|
floatingGravMag = 4.5;
|
||||||
|
|
||||||
|
catagory = "Vehicles";
|
||||||
|
shapeFile = "vehicle_grav_tank.dts";
|
||||||
|
multipassenger = true;
|
||||||
|
computeCRC = true;
|
||||||
|
renderWhenDestroyed = false;
|
||||||
|
|
||||||
|
weaponNode = 1;
|
||||||
|
// z0dd - ZOD, 5/07/04. Attempt at squashing the UE bug
|
||||||
|
debrisShapeName = "vehicle_land_assault_debris.dts";
|
||||||
|
//debrisShapeName = "vehicle_land_mpbase_debris.dts";
|
||||||
|
debris = ShapeDebris;
|
||||||
|
|
||||||
|
drag = 0.0;
|
||||||
|
density = 0.9;
|
||||||
|
|
||||||
|
mountPose[0] = sitting;
|
||||||
|
mountPose[1] = sitting;
|
||||||
|
numMountPoints = 2;
|
||||||
|
isProtectedMountPoint[0] = true;
|
||||||
|
isProtectedMountPoint[1] = true;
|
||||||
|
|
||||||
|
cameraMaxDist = 20;
|
||||||
|
cameraOffset = 3;
|
||||||
|
cameraLag = 1.5;
|
||||||
|
explosion = LargeGroundVehicleExplosion;
|
||||||
|
explosionDamage = 0.5;
|
||||||
|
explosionRadius = 5.0;
|
||||||
|
|
||||||
|
maxSteeringAngle = 0.5; // 20 deg.
|
||||||
|
|
||||||
|
maxDamage = 3.15;
|
||||||
|
destroyedLevel = 3.15;
|
||||||
|
|
||||||
|
isShielded = true;
|
||||||
|
rechargeRate = 1.0;
|
||||||
|
energyPerDamagePoint = 142; //was 135
|
||||||
|
maxEnergy = 400;
|
||||||
|
minJetEnergy = 15;
|
||||||
|
jetEnergyDrain = 2.0;
|
||||||
|
|
||||||
|
// Rigid Body
|
||||||
|
mass = 1500;
|
||||||
|
bodyFriction = 0.8;
|
||||||
|
bodyRestitution = 0.5;
|
||||||
|
minRollSpeed = 3;
|
||||||
|
gyroForce = 400;
|
||||||
|
gyroDamping = 0.3;
|
||||||
|
stabilizerForce = 20;
|
||||||
|
minDrag = 10;
|
||||||
|
softImpactSpeed = 18; // Play SoftImpact Sound. z0dd - ZOD, 3/30/02. Higher speed before tank takes ground collision dmg. Was 15
|
||||||
|
hardImpactSpeed = 21; // Play HardImpact Sound. z0dd - ZOD, 3/30/02. Higher speed before tank takes ground collision dmg. Was 18
|
||||||
|
|
||||||
|
// Ground Impact Damage (uses DamageType::Ground)
|
||||||
|
minImpactSpeed = 20; // z0dd - ZOD, 3/30/02. Higher speed before tank takes ground collision dmg. Was 17
|
||||||
|
speedDamageScale = 0.060;
|
||||||
|
|
||||||
|
// Object Impact Damage (uses DamageType::Impact)
|
||||||
|
collDamageThresholdVel = 18;
|
||||||
|
collDamageMultiplier = 0.045;
|
||||||
|
|
||||||
|
dragForce = 40 / 20;
|
||||||
|
vertFactor = 0.0;
|
||||||
|
floatingThrustFactor = 0.15; // z0dd - ZOD, 3/30/02. Stronger air cushion. Was 0.15
|
||||||
|
|
||||||
|
mainThrustForce = 55; // z0dd - ZOD, 3/30/02. Was 50
|
||||||
|
reverseThrustForce = 40;
|
||||||
|
strafeThrustForce = 40;
|
||||||
|
turboFactor = 1.85; // z0dd - ZOD, 3/30/02. Was 1.7
|
||||||
|
|
||||||
|
brakingForce = 25;
|
||||||
|
brakingActivationSpeed = 4;
|
||||||
|
|
||||||
|
stabLenMin = 3.25;
|
||||||
|
stabLenMax = 4;
|
||||||
|
stabSpringConstant = 50;
|
||||||
|
stabDampingConstant = 20;
|
||||||
|
|
||||||
|
gyroDrag = 20;
|
||||||
|
normalForce = 20;
|
||||||
|
restorativeForce = 10;
|
||||||
|
steeringForce = 15;
|
||||||
|
rollForce = 5;
|
||||||
|
pitchForce = 3;
|
||||||
|
|
||||||
|
dustEmitter = TankDustEmitter;
|
||||||
|
triggerDustHeight = 3.5;
|
||||||
|
dustHeight = 1.0;
|
||||||
|
dustTrailEmitter = TireEmitter;
|
||||||
|
dustTrailOffset = "0.0 -1.0 0.5";
|
||||||
|
triggerTrailHeight = 3.6;
|
||||||
|
dustTrailFreqMod = 15.0;
|
||||||
|
|
||||||
|
jetSound = AssaultVehicleThrustSound;
|
||||||
|
engineSound = AssaultVehicleEngineSound;
|
||||||
|
floatSound = AssaultVehicleSkid;
|
||||||
|
softImpactSound = GravSoftImpactSound;
|
||||||
|
hardImpactSound = HardImpactSound;
|
||||||
|
wheelImpactSound = WheelImpactSound;
|
||||||
|
|
||||||
|
forwardJetEmitter = TankJetEmitter;
|
||||||
|
|
||||||
|
//
|
||||||
|
softSplashSoundVelocity = 5.0;
|
||||||
|
mediumSplashSoundVelocity = 10.0;
|
||||||
|
hardSplashSoundVelocity = 15.0;
|
||||||
|
exitSplashSoundVelocity = 10.0;
|
||||||
|
|
||||||
|
exitingWater = VehicleExitWaterMediumSound;
|
||||||
|
impactWaterEasy = VehicleImpactWaterSoftSound;
|
||||||
|
impactWaterMedium = VehicleImpactWaterMediumSound;
|
||||||
|
impactWaterHard = VehicleImpactWaterMediumSound;
|
||||||
|
waterWakeSound = VehicleWakeMediumSplashSound;
|
||||||
|
|
||||||
|
minMountDist = 4;
|
||||||
|
|
||||||
|
damageEmitter[0] = SmallLightDamageSmoke;
|
||||||
|
damageEmitter[1] = SmallHeavyDamageSmoke;
|
||||||
|
damageEmitter[2] = DamageBubbles;
|
||||||
|
damageEmitterOffset[0] = "0.0 -1.5 3.5 ";
|
||||||
|
damageLevelTolerance[0] = 0.3;
|
||||||
|
damageLevelTolerance[1] = 0.7;
|
||||||
|
numDmgEmitterAreas = 1;
|
||||||
|
|
||||||
|
splashEmitter[0] = VehicleFoamDropletsEmitter;
|
||||||
|
splashEmitter[1] = VehicleFoamEmitter;
|
||||||
|
|
||||||
|
shieldImpact = VehicleShieldImpact;
|
||||||
|
|
||||||
|
cmdCategory = "Tactical";
|
||||||
|
cmdIcon = CMDGroundTankIcon;
|
||||||
|
cmdMiniIconName = "commander/MiniIcons/com_tank_grey";
|
||||||
|
targetNameTag = 'Beowulf';
|
||||||
|
targetTypeTag = 'Assault Tank';
|
||||||
|
sensorData = VehiclePulseSensor;
|
||||||
|
sensorRadius = VehiclePulseSensor.detectRadius; // z0dd - ZOD, 3/30/02. Allows sensor to be shown on CC
|
||||||
|
|
||||||
|
checkRadius = 5.5535;
|
||||||
|
observeParameters = "1 10 10";
|
||||||
|
runningLight[0] = TankLight1;
|
||||||
|
runningLight[1] = TankLight2;
|
||||||
|
runningLight[2] = TankLight3;
|
||||||
|
runningLight[3] = TankLight4;
|
||||||
|
shieldEffectScale = "0.9 1.0 0.6";
|
||||||
|
showPilotInfo = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
//**************************************************************
|
||||||
|
// WEAPONS
|
||||||
|
//**************************************************************
|
||||||
|
|
||||||
|
//-------------------------------------
|
||||||
|
// ASSAULT CHAINGUN (projectile)
|
||||||
|
//-------------------------------------
|
||||||
|
|
||||||
|
datablock TracerProjectileData(AssaultChaingunBullet)
|
||||||
|
{
|
||||||
|
doDynamicClientHits = true;
|
||||||
|
|
||||||
|
projectileShapeName = "";
|
||||||
|
directDamage = 0.16;
|
||||||
|
directDamageType = $DamageType::TankChaingun;
|
||||||
|
hasDamageRadius = false;
|
||||||
|
splash = ChaingunSplash;
|
||||||
|
|
||||||
|
kickbackstrength = 0.0;
|
||||||
|
sound = TankChaingunProjectile;
|
||||||
|
|
||||||
|
dryVelocity = 425.0;
|
||||||
|
wetVelocity = 100.0;
|
||||||
|
velInheritFactor = 1.0;
|
||||||
|
fizzleTimeMS = 3000;
|
||||||
|
lifetimeMS = 3000;
|
||||||
|
explodeOnDeath = false;
|
||||||
|
reflectOnWaterImpactAngle = 0.0;
|
||||||
|
explodeOnWaterImpact = false;
|
||||||
|
deflectionOnWaterImpact = 0.0;
|
||||||
|
fizzleUnderwaterMS = 3000;
|
||||||
|
|
||||||
|
tracerLength = 15.0;
|
||||||
|
tracerAlpha = false;
|
||||||
|
tracerMinPixels = 6;
|
||||||
|
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
|
||||||
|
tracerTex[0] = "special/tracer00";
|
||||||
|
tracerTex[1] = "special/tracercross";
|
||||||
|
tracerWidth = 0.10;
|
||||||
|
crossSize = 0.20;
|
||||||
|
crossViewAng = 0.990;
|
||||||
|
renderCross = true;
|
||||||
|
|
||||||
|
decalData[0] = ChaingunDecal1;
|
||||||
|
decalData[1] = ChaingunDecal2;
|
||||||
|
decalData[2] = ChaingunDecal3;
|
||||||
|
decalData[3] = ChaingunDecal4;
|
||||||
|
decalData[4] = ChaingunDecal5;
|
||||||
|
decalData[5] = ChaingunDecal6;
|
||||||
|
|
||||||
|
activateDelayMS = 100;
|
||||||
|
|
||||||
|
explosion = ChaingunExplosion;
|
||||||
|
};
|
||||||
|
|
||||||
|
//-------------------------------------
|
||||||
|
// ASSAULT CHAINGUN CHARACTERISTICS
|
||||||
|
//-------------------------------------
|
||||||
|
|
||||||
|
datablock TurretData(AssaultPlasmaTurret) : TurretDamageProfile
|
||||||
|
{
|
||||||
|
className = VehicleTurret;
|
||||||
|
catagory = "Turrets";
|
||||||
|
shapeFile = "Turret_tank_base.dts";
|
||||||
|
preload = true;
|
||||||
|
|
||||||
|
mass = 1.0; // Not really relevant
|
||||||
|
|
||||||
|
maxEnergy = 1;
|
||||||
|
maxDamage = AssaultVehicle.maxDamage;
|
||||||
|
destroyedLevel = AssaultVehicle.destroyedLevel;
|
||||||
|
repairRate = 0;
|
||||||
|
|
||||||
|
// capacitor
|
||||||
|
maxCapacitorEnergy = 250;
|
||||||
|
capacitorRechargeRate = 1.0;
|
||||||
|
|
||||||
|
thetaMin = 0;
|
||||||
|
thetaMax = 100;
|
||||||
|
|
||||||
|
inheritEnergyFromMount = true;
|
||||||
|
firstPersonOnly = true;
|
||||||
|
useEyePoint = true;
|
||||||
|
numWeapons = 2;
|
||||||
|
|
||||||
|
cameraDefaultFov = 90.0;
|
||||||
|
cameraMinFov = 5.0;
|
||||||
|
cameraMaxFov = 120.0;
|
||||||
|
|
||||||
|
targetNameTag = 'Beowulf Chaingun';
|
||||||
|
targetTypeTag = 'Turret';
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock TurretImageData(AssaultPlasmaTurretBarrel)
|
||||||
|
{
|
||||||
|
shapeFile = "turret_tank_barrelchain.dts";
|
||||||
|
mountPoint = 1;
|
||||||
|
|
||||||
|
projectile = AssaultChaingunBullet;
|
||||||
|
projectileType = TracerProjectile;
|
||||||
|
|
||||||
|
casing = ShellDebris;
|
||||||
|
shellExitDir = "1.0 0.3 1.0";
|
||||||
|
shellExitOffset = "0.15 -0.56 -0.1";
|
||||||
|
shellExitVariance = 15.0;
|
||||||
|
shellVelocity = 3.0;
|
||||||
|
|
||||||
|
projectileSpread = 12.0 / 1000.0;
|
||||||
|
|
||||||
|
useCapacitor = true;
|
||||||
|
usesEnergy = true;
|
||||||
|
useMountEnergy = true;
|
||||||
|
fireEnergy = 7.5;
|
||||||
|
minEnergy = 15.0;
|
||||||
|
|
||||||
|
// Turret parameters
|
||||||
|
activationMS = 4000;
|
||||||
|
deactivateDelayMS = 500;
|
||||||
|
thinkTimeMS = 200;
|
||||||
|
degPerSecTheta = 360;
|
||||||
|
degPerSecPhi = 360;
|
||||||
|
attackRadius = 1000;
|
||||||
|
|
||||||
|
// State transitions
|
||||||
|
stateName[0] = "Activate";
|
||||||
|
stateTransitionOnNotLoaded[0] = "Dead";
|
||||||
|
stateTransitionOnLoaded[0] = "ActivateReady";
|
||||||
|
stateSound[0] = AssaultTurretActivateSound;
|
||||||
|
|
||||||
|
stateName[1] = "ActivateReady";
|
||||||
|
stateSequence[1] = "Activate";
|
||||||
|
stateSound[1] = AssaultTurretActivateSound;
|
||||||
|
stateTimeoutValue[1] = 1;
|
||||||
|
stateTransitionOnTimeout[1] = "Ready";
|
||||||
|
stateTransitionOnNotLoaded[1] = "Deactivate";
|
||||||
|
|
||||||
|
stateName[2] = "Ready";
|
||||||
|
stateTransitionOnNotLoaded[2] = "Deactivate";
|
||||||
|
stateTransitionOnTriggerDown[2] = "Fire";
|
||||||
|
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||||
|
|
||||||
|
stateName[3] = "Fire";
|
||||||
|
stateSequence[3] = "Fire";
|
||||||
|
stateSequenceRandomFlash[3] = true;
|
||||||
|
stateFire[3] = true;
|
||||||
|
stateAllowImageChange[3] = false;
|
||||||
|
stateSound[3] = AssaultChaingunFireSound;
|
||||||
|
stateScript[3] = "onFire";
|
||||||
|
stateTimeoutValue[3] = 0.1;
|
||||||
|
stateTransitionOnTimeout[3] = "Fire";
|
||||||
|
stateTransitionOnTriggerUp[3] = "Reload";
|
||||||
|
stateTransitionOnNoAmmo[3] = "noAmmo";
|
||||||
|
|
||||||
|
stateName[4] = "Reload";
|
||||||
|
stateSequence[4] = "Reload";
|
||||||
|
stateTimeoutValue[4] = 0.1;
|
||||||
|
stateAllowImageChange[4] = false;
|
||||||
|
stateTransitionOnTimeout[4] = "Ready";
|
||||||
|
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||||
|
stateWaitForTimeout[4] = true;
|
||||||
|
|
||||||
|
stateName[5] = "Deactivate";
|
||||||
|
stateSequence[5] = "Activate";
|
||||||
|
stateDirection[5] = false;
|
||||||
|
stateTimeoutValue[5] = 30;
|
||||||
|
stateTransitionOnTimeout[5] = "ActivateReady";
|
||||||
|
|
||||||
|
stateName[6] = "Dead";
|
||||||
|
stateTransitionOnLoaded[6] = "ActivateReady";
|
||||||
|
stateTransitionOnTriggerDown[6] = "DryFire";
|
||||||
|
|
||||||
|
stateName[7] = "DryFire";
|
||||||
|
stateSound[7] = AssaultChaingunDryFireSound;
|
||||||
|
stateTimeoutValue[7] = 0.5;
|
||||||
|
stateTransitionOnTimeout[7] = "NoAmmo";
|
||||||
|
|
||||||
|
stateName[8] = "NoAmmo";
|
||||||
|
stateTransitionOnAmmo[8] = "Reload";
|
||||||
|
stateSequence[8] = "NoAmmo";
|
||||||
|
stateTransitionOnTriggerDown[8] = "DryFire";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
//-------------------------------------
|
||||||
|
// ASSAULT MORTAR (projectile)
|
||||||
|
//-------------------------------------
|
||||||
|
|
||||||
|
datablock ItemData(AssaultMortarAmmo)
|
||||||
|
{
|
||||||
|
className = Ammo;
|
||||||
|
catagory = "Ammo";
|
||||||
|
shapeFile = "repair_kit.dts";
|
||||||
|
mass = 1;
|
||||||
|
elasticity = 0.5;
|
||||||
|
friction = 0.6;
|
||||||
|
pickupRadius = 1;
|
||||||
|
|
||||||
|
computeCRC = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock GrenadeProjectileData(AssaultMortar)
|
||||||
|
{
|
||||||
|
projectileShapeName = "mortar_projectile.dts";
|
||||||
|
emitterDelay = -1;
|
||||||
|
directDamage = 0.0;
|
||||||
|
hasDamageRadius = true;
|
||||||
|
indirectDamage = 1.0;
|
||||||
|
damageRadius = 25.0;
|
||||||
|
radiusDamageType = $DamageType::TankMortar;
|
||||||
|
kickBackStrength = 2500;
|
||||||
|
|
||||||
|
sound = MortarProjectileSound;
|
||||||
|
explosion = "MortarExplosion";
|
||||||
|
velInheritFactor = 1.0;
|
||||||
|
|
||||||
|
baseEmitter = MortarSmokeEmitter;
|
||||||
|
|
||||||
|
grenadeElasticity = 0.0;
|
||||||
|
grenadeFriction = 0.4;
|
||||||
|
armingDelayMS = 250;
|
||||||
|
muzzleVelocity = 77.15; // z0dd - ZOD, 9/27/02. More velocity to compensate for higher gravity. Was 65
|
||||||
|
drag = 0.1;
|
||||||
|
|
||||||
|
hasLight = true;
|
||||||
|
lightRadius = 4;
|
||||||
|
lightColor = "0.1 0.4 0.1";
|
||||||
|
};
|
||||||
|
|
||||||
|
//-------------------------------------
|
||||||
|
// ASSAULT MORTAR CHARACTERISTICS
|
||||||
|
//-------------------------------------
|
||||||
|
|
||||||
|
datablock TurretImageData(AssaultMortarTurretBarrel)
|
||||||
|
{
|
||||||
|
shapeFile = "turret_tank_barrelmortar.dts";
|
||||||
|
mountPoint = 0;
|
||||||
|
|
||||||
|
// ammo = AssaultMortarAmmo;
|
||||||
|
projectile = AssaultMortar;
|
||||||
|
projectileType = GrenadeProjectile;
|
||||||
|
|
||||||
|
usesEnergy = true;
|
||||||
|
useMountEnergy = true;
|
||||||
|
fireEnergy = 77.00;
|
||||||
|
minEnergy = 77.00;
|
||||||
|
useCapacitor = true;
|
||||||
|
|
||||||
|
// Turret parameters
|
||||||
|
activationMS = 4000;
|
||||||
|
deactivateDelayMS = 1500;
|
||||||
|
thinkTimeMS = 200;
|
||||||
|
degPerSecTheta = 360;
|
||||||
|
degPerSecPhi = 360;
|
||||||
|
attackRadius = 1000;
|
||||||
|
|
||||||
|
// State transitions
|
||||||
|
stateName[0] = "Activate";
|
||||||
|
stateTransitionOnNotLoaded[0] = "Dead";
|
||||||
|
stateTransitionOnLoaded[0] = "ActivateReady";
|
||||||
|
|
||||||
|
stateName[1] = "ActivateReady";
|
||||||
|
stateSequence[1] = "Activate";
|
||||||
|
stateSound[1] = AssaultTurretActivateSound;
|
||||||
|
stateTimeoutValue[1] = 1.0;
|
||||||
|
stateTransitionOnTimeout[1] = "Ready";
|
||||||
|
stateTransitionOnNotLoaded[1] = "Deactivate";
|
||||||
|
|
||||||
|
stateName[2] = "Ready";
|
||||||
|
stateTransitionOnNotLoaded[2] = "Deactivate";
|
||||||
|
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||||
|
stateTransitionOnTriggerDown[2] = "Fire";
|
||||||
|
|
||||||
|
stateName[3] = "Fire";
|
||||||
|
stateSequence[3] = "Fire";
|
||||||
|
stateTransitionOnTimeout[3] = "Reload";
|
||||||
|
stateTimeoutValue[3] = 1.0;
|
||||||
|
stateFire[3] = true;
|
||||||
|
stateRecoil[3] = LightRecoil;
|
||||||
|
stateAllowImageChange[3] = false;
|
||||||
|
stateSound[3] = AssaultMortarFireSound;
|
||||||
|
stateScript[3] = "onFire";
|
||||||
|
|
||||||
|
stateName[4] = "Reload";
|
||||||
|
stateSequence[4] = "Reload";
|
||||||
|
stateTimeoutValue[4] = 1.0;
|
||||||
|
stateAllowImageChange[4] = false;
|
||||||
|
stateTransitionOnTimeout[4] = "Ready";
|
||||||
|
//stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||||
|
stateWaitForTimeout[4] = true;
|
||||||
|
|
||||||
|
stateName[5] = "Deactivate";
|
||||||
|
stateDirection[5] = false;
|
||||||
|
stateSequence[5] = "Activate";
|
||||||
|
stateTimeoutValue[5] = 1.0;
|
||||||
|
stateTransitionOnLoaded[5] = "ActivateReady";
|
||||||
|
stateTransitionOnTimeout[5] = "Dead";
|
||||||
|
|
||||||
|
stateName[6] = "Dead";
|
||||||
|
stateTransitionOnLoaded[6] = "ActivateReady";
|
||||||
|
stateTransitionOnTriggerDown[6] = "DryFire";
|
||||||
|
|
||||||
|
stateName[7] = "DryFire";
|
||||||
|
stateSound[7] = AssaultMortarDryFireSound;
|
||||||
|
stateTimeoutValue[7] = 1.0;
|
||||||
|
stateTransitionOnTimeout[7] = "NoAmmo";
|
||||||
|
|
||||||
|
stateName[8] = "NoAmmo";
|
||||||
|
stateSequence[8] = "NoAmmo";
|
||||||
|
stateTransitionOnAmmo[8] = "Reload";
|
||||||
|
stateTransitionOnTriggerDown[8] = "DryFire";
|
||||||
|
};
|
||||||
|
|
||||||
|
datablock TurretImageData(AssaultTurretParam)
|
||||||
|
{
|
||||||
|
mountPoint = 2;
|
||||||
|
shapeFile = "turret_muzzlepoint.dts";
|
||||||
|
|
||||||
|
projectile = AssaultChaingunBullet;
|
||||||
|
projectileType = TracerProjectile;
|
||||||
|
|
||||||
|
useCapacitor = true;
|
||||||
|
usesEnergy = true;
|
||||||
|
|
||||||
|
// Turret parameters
|
||||||
|
activationMS = 1000;
|
||||||
|
deactivateDelayMS = 1500;
|
||||||
|
thinkTimeMS = 200;
|
||||||
|
degPerSecTheta = 500;
|
||||||
|
degPerSecPhi = 500;
|
||||||
|
|
||||||
|
attackRadius = 1000;
|
||||||
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue