mirror of
https://github.com/Ragora/T2-BoL.git
synced 2026-07-13 21:24:32 +00:00
Brought up to date with the newest T2BoL I've located
This commit is contained in:
parent
8c96cba3e1
commit
accd31895e
287 changed files with 108557 additions and 107608 deletions
|
|
@ -1,61 +1,61 @@
|
|||
//--------------------------------------------------------------------------
|
||||
//
|
||||
// ELF barrel pack
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
datablock ShapeBaseImageData(ELFBarrelPackImage)
|
||||
{
|
||||
mass = 10; // z0dd - ZOD, 7/17/02. Lower mass due to higher gravity. Was 15.
|
||||
|
||||
shapeFile = "pack_barrel_elf.dts";
|
||||
item = ELFBarrelPack;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
turretBarrel = "ELFBarrelLarge";
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateTransitionOnTriggerUp[1] = "Deactivate";
|
||||
|
||||
stateName[2] = "Deactivate";
|
||||
stateScript[2] = "onDeactivate";
|
||||
stateTransitionOnTimeOut[2] = "Idle";
|
||||
|
||||
isLarge = true;
|
||||
};
|
||||
|
||||
datablock ItemData(ELFBarrelPack)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Packs";
|
||||
shapeFile = "pack_barrel_elf.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
rotate = true;
|
||||
image = "ELFBarrelPackImage";
|
||||
pickUpName = "an ELF barrel pack";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
function ELFBarrelPackImage::onActivate(%data, %obj, %slot)
|
||||
{
|
||||
checkTurretMount(%data, %obj, %slot);
|
||||
}
|
||||
|
||||
function ELFBarrelPackImage::onDeactivate(%data, %obj, %slot)
|
||||
{
|
||||
%obj.setImageTrigger($BackpackSlot, false);
|
||||
}
|
||||
|
||||
function ELFBarrelPack::onPickup(%this, %obj, %shape, %amount)
|
||||
{
|
||||
// created to prevent console errors
|
||||
//--------------------------------------------------------------------------
|
||||
//
|
||||
// ELF barrel pack
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
datablock ShapeBaseImageData(ELFBarrelPackImage)
|
||||
{
|
||||
mass = 10; // z0dd - ZOD, 7/17/02. Lower mass due to higher gravity. Was 15.
|
||||
|
||||
shapeFile = "pack_barrel_elf.dts";
|
||||
item = ELFBarrelPack;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
turretBarrel = "ELFBarrelLarge";
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateTransitionOnTriggerUp[1] = "Deactivate";
|
||||
|
||||
stateName[2] = "Deactivate";
|
||||
stateScript[2] = "onDeactivate";
|
||||
stateTransitionOnTimeOut[2] = "Idle";
|
||||
|
||||
isLarge = true;
|
||||
};
|
||||
|
||||
datablock ItemData(ELFBarrelPack)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Packs";
|
||||
shapeFile = "pack_barrel_elf.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
rotate = true;
|
||||
image = "ELFBarrelPackImage";
|
||||
pickUpName = "an ELF barrel pack";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
function ELFBarrelPackImage::onActivate(%data, %obj, %slot)
|
||||
{
|
||||
checkTurretMount(%data, %obj, %slot);
|
||||
}
|
||||
|
||||
function ELFBarrelPackImage::onDeactivate(%data, %obj, %slot)
|
||||
{
|
||||
%obj.setImageTrigger($BackpackSlot, false);
|
||||
}
|
||||
|
||||
function ELFBarrelPack::onPickup(%this, %obj, %shape, %amount)
|
||||
{
|
||||
// created to prevent console errors
|
||||
}
|
||||
|
|
@ -1,63 +1,63 @@
|
|||
//--------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
datablock ShapeBaseImageData(AABarrelPackImage)
|
||||
{
|
||||
mass = 10; // z0dd - ZOD, 7/17/02. Lower mass due to higher gravity. Was 15.
|
||||
|
||||
shapeFile = "pack_barrel_aa.dts";
|
||||
item = AABarrelPack;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
turretBarrel = "AABarrelLarge";
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateTransitionOnTriggerUp[1] = "Deactivate";
|
||||
|
||||
stateName[2] = "Deactivate";
|
||||
stateScript[2] = "onDeactivate";
|
||||
stateTransitionOnTimeOut[2] = "Idle";
|
||||
|
||||
isLarge = true;
|
||||
};
|
||||
|
||||
datablock ItemData(AABarrelPack)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Packs";
|
||||
shapeFile = "pack_barrel_aa.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
rotate = true;
|
||||
image = "AABarrelPackImage";
|
||||
pickUpName = "an anti-aircraft barrel pack";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
//AABarrelPackImage.turretBarrel = "AABarrelLarge";
|
||||
|
||||
function AABarrelPackImage::onActivate(%data, %obj, %slot)
|
||||
{
|
||||
checkTurretMount(%data, %obj, %slot);
|
||||
}
|
||||
|
||||
function AABarrelPackImage::onDeactivate(%data, %obj, %slot)
|
||||
{
|
||||
%obj.setImageTrigger($BackpackSlot, false);
|
||||
}
|
||||
|
||||
function AABarrelPack::onPickup(%this, %obj, %shape, %amount)
|
||||
{
|
||||
// created to prevent console errors
|
||||
//--------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
datablock ShapeBaseImageData(AABarrelPackImage)
|
||||
{
|
||||
mass = 10; // z0dd - ZOD, 7/17/02. Lower mass due to higher gravity. Was 15.
|
||||
|
||||
shapeFile = "pack_barrel_aa.dts";
|
||||
item = AABarrelPack;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
turretBarrel = "AABarrelLarge";
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateTransitionOnTriggerUp[1] = "Deactivate";
|
||||
|
||||
stateName[2] = "Deactivate";
|
||||
stateScript[2] = "onDeactivate";
|
||||
stateTransitionOnTimeOut[2] = "Idle";
|
||||
|
||||
isLarge = true;
|
||||
};
|
||||
|
||||
datablock ItemData(AABarrelPack)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Packs";
|
||||
shapeFile = "pack_barrel_aa.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
rotate = true;
|
||||
image = "AABarrelPackImage";
|
||||
pickUpName = "an anti-aircraft barrel pack";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
//AABarrelPackImage.turretBarrel = "AABarrelLarge";
|
||||
|
||||
function AABarrelPackImage::onActivate(%data, %obj, %slot)
|
||||
{
|
||||
checkTurretMount(%data, %obj, %slot);
|
||||
}
|
||||
|
||||
function AABarrelPackImage::onDeactivate(%data, %obj, %slot)
|
||||
{
|
||||
%obj.setImageTrigger($BackpackSlot, false);
|
||||
}
|
||||
|
||||
function AABarrelPack::onPickup(%this, %obj, %shape, %amount)
|
||||
{
|
||||
// created to prevent console errors
|
||||
}
|
||||
|
|
@ -1,129 +1,129 @@
|
|||
//---------------------------------------------------------
|
||||
// Deployable Spine, Code by Mostlikely, Prettied by JackTL
|
||||
//---------------------------------------------------------
|
||||
|
||||
$TeamDeployableMax[constructorDeployable] = 1;
|
||||
|
||||
datablock ShapeBaseImageData(constructorDeployableImage) {
|
||||
mass = 1;
|
||||
emap = true;
|
||||
shapeFile = "ammo_plasma.dts";
|
||||
item = constructorDeployable;
|
||||
mountPoint = 1;
|
||||
offset = "0 -0.2 -0.55";
|
||||
deployed = DeployedSpine;
|
||||
heatSignature = 0;
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateTransitionOnTriggerUp[1] = "Idle";
|
||||
|
||||
isLarge = false;
|
||||
maxDepSlope = 360;
|
||||
deploySound = ItemPickupSound;
|
||||
|
||||
minDeployDis = 0.1;
|
||||
maxDeployDis = 50.0;
|
||||
};
|
||||
|
||||
datablock ItemData(constructorDeployable) {
|
||||
className = Pack;
|
||||
catagory = "Deployables";
|
||||
shapeFile = "stackable1s.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 1;
|
||||
rotate = true;
|
||||
image = "constructorDeployableImage";
|
||||
pickUpName = "a light support beam pack";
|
||||
heatSignature = 0;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
function constructorDeployableImage::testObjectTooClose(%item) {
|
||||
return "";
|
||||
}
|
||||
|
||||
function constructorDeployableImage::testNoTerrainFound(%item) {
|
||||
// don't check this for non-Landspike turret deployables
|
||||
}
|
||||
|
||||
function constructorDeployable::onPickup(%this, %obj, %shape, %amount) {
|
||||
// created to prevent console errors
|
||||
}
|
||||
|
||||
function constructorDeployableImage::onDeploy(%item, %plyr, %slot) {
|
||||
//Object
|
||||
%className = "StaticShape";
|
||||
|
||||
%grounded = 0;
|
||||
if (%item.surface.getClassName() $= TerrainBlock)
|
||||
%grounded = 1;
|
||||
|
||||
%playerVector = vectorNormalize(-1 * getWord(%plyr.getEyeVector(),1) SPC getWord(%plyr.getEyeVector(),0) SPC "0");
|
||||
|
||||
if (%item.surfaceinher == 0) {
|
||||
if (vAbs(floorVec(%item.surfaceNrm,100)) $= "0 0 1")
|
||||
%item.surfaceNrm2 = %playerVector;
|
||||
else
|
||||
%item.surfaceNrm2 = vectorNormalize(vectorCross(%item.surfaceNrm,"0 0 1"));
|
||||
}
|
||||
|
||||
%item.surfaceNrm3 = vectorCross(%item.surfaceNrm,%item.surfaceNrm2);
|
||||
|
||||
%rot = fullRot(%item.surfaceNrm,%item.surfaceNrm2);
|
||||
%scale = getWords($packSetting["spine",%plyr.packSet],0,2);
|
||||
%dataBlock = %item.deployed;
|
||||
|
||||
if (%plyr.packSet == 5) {
|
||||
%space = rayDist(%item.surfacePt SPC %item.surfaceNrm,%scale,$AllObjMask);
|
||||
if (%space != getWord(%scale,1))
|
||||
%type = true;
|
||||
%scale = getWord(%scale,0) SPC getWord(%scale,0) SPC %space;
|
||||
}
|
||||
else if (%plyr.packSet == 6 || %plyr.packSet == 7) {
|
||||
%mCenter = "0 0 -0.5";
|
||||
%pad = pad(%item.surfacePt SPC %item.surfaceNrm SPC %item.surfaceNrm2,%scale,%mCenter);
|
||||
%scale = getWords(%pad,0,2);
|
||||
%item.surfacePt = getWords(%pad,3,5);
|
||||
%rot = getWords(%pad,6,9);
|
||||
if (%plyr.packSet == 7) {
|
||||
%scale = vectorMultiply(%scale,1.845 SPC 2 SPC 1.744); // Update dfunctions.cs if changed!
|
||||
%scaleIsSet = 1;
|
||||
%item.surfacePt = vectorAdd(%item.surfacePt,vectorScale(%item.surfaceNrm3,0.5));
|
||||
%rot = rotAdd(%rot,"1 0 0" SPC $Pi);
|
||||
%dataBlock = "DeployedWoodSpine";
|
||||
}
|
||||
}
|
||||
|
||||
if (!%scaleIsSet)
|
||||
%scale = vectorMultiply(%scale,1/4 SPC 1/3 SPC 2);
|
||||
|
||||
//Test pack -- make sure our structure is loaded
|
||||
exec("data/Game/Structures/SMLCabin.cs");
|
||||
build_SMLCabin(%plyr.client,%item.surfacePt,%plyr.client.team);
|
||||
|
||||
// play the deploy sound
|
||||
serverPlay3D(%item.deploySound, %deplObj.getTransform());
|
||||
|
||||
%plyr.setInventory("constructorDeployable",0,1);
|
||||
|
||||
return %deplObj;
|
||||
}
|
||||
|
||||
/////////////////////////////////////
|
||||
|
||||
function constructorDeployableImage::onMount(%data, %obj, %node) {
|
||||
%obj.hasSpine = true; // set for spinecheck
|
||||
%obj.packSet = 0;
|
||||
displayPowerFreq(%obj);
|
||||
}
|
||||
|
||||
function constructorDeployableImage::onUnmount(%data, %obj, %node) {
|
||||
%obj.hasSpine = "";
|
||||
%obj.packSet = 0;
|
||||
}
|
||||
//---------------------------------------------------------
|
||||
// Deployable Spine, Code by Mostlikely, Prettied by JackTL
|
||||
//---------------------------------------------------------
|
||||
|
||||
$TeamDeployableMax[constructorDeployable] = 1;
|
||||
|
||||
datablock ShapeBaseImageData(constructorDeployableImage) {
|
||||
mass = 1;
|
||||
emap = true;
|
||||
shapeFile = "ammo_plasma.dts";
|
||||
item = constructorDeployable;
|
||||
mountPoint = 1;
|
||||
offset = "0 -0.2 -0.55";
|
||||
deployed = DeployedSpine;
|
||||
heatSignature = 0;
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateTransitionOnTriggerUp[1] = "Idle";
|
||||
|
||||
isLarge = false;
|
||||
maxDepSlope = 360;
|
||||
deploySound = ItemPickupSound;
|
||||
|
||||
minDeployDis = 0.1;
|
||||
maxDeployDis = 50.0;
|
||||
};
|
||||
|
||||
datablock ItemData(constructorDeployable) {
|
||||
className = Pack;
|
||||
catagory = "Deployables";
|
||||
shapeFile = "stackable1s.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 1;
|
||||
rotate = true;
|
||||
image = "constructorDeployableImage";
|
||||
pickUpName = "a light support beam pack";
|
||||
heatSignature = 0;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
function constructorDeployableImage::testObjectTooClose(%item) {
|
||||
return "";
|
||||
}
|
||||
|
||||
function constructorDeployableImage::testNoTerrainFound(%item) {
|
||||
// don't check this for non-Landspike turret deployables
|
||||
}
|
||||
|
||||
function constructorDeployable::onPickup(%this, %obj, %shape, %amount) {
|
||||
// created to prevent console errors
|
||||
}
|
||||
|
||||
function constructorDeployableImage::onDeploy(%item, %plyr, %slot) {
|
||||
//Object
|
||||
%className = "StaticShape";
|
||||
|
||||
%grounded = 0;
|
||||
if (%item.surface.getClassName() $= TerrainBlock)
|
||||
%grounded = 1;
|
||||
|
||||
%playerVector = vectorNormalize(-1 * getWord(%plyr.getEyeVector(),1) SPC getWord(%plyr.getEyeVector(),0) SPC "0");
|
||||
|
||||
if (%item.surfaceinher == 0) {
|
||||
if (vAbs(floorVec(%item.surfaceNrm,100)) $= "0 0 1")
|
||||
%item.surfaceNrm2 = %playerVector;
|
||||
else
|
||||
%item.surfaceNrm2 = vectorNormalize(vectorCross(%item.surfaceNrm,"0 0 1"));
|
||||
}
|
||||
|
||||
%item.surfaceNrm3 = vectorCross(%item.surfaceNrm,%item.surfaceNrm2);
|
||||
|
||||
%rot = fullRot(%item.surfaceNrm,%item.surfaceNrm2);
|
||||
%scale = getWords($packSetting["spine",%plyr.packSet],0,2);
|
||||
%dataBlock = %item.deployed;
|
||||
|
||||
if (%plyr.packSet == 5) {
|
||||
%space = rayDist(%item.surfacePt SPC %item.surfaceNrm,%scale,$AllObjMask);
|
||||
if (%space != getWord(%scale,1))
|
||||
%type = true;
|
||||
%scale = getWord(%scale,0) SPC getWord(%scale,0) SPC %space;
|
||||
}
|
||||
else if (%plyr.packSet == 6 || %plyr.packSet == 7) {
|
||||
%mCenter = "0 0 -0.5";
|
||||
%pad = pad(%item.surfacePt SPC %item.surfaceNrm SPC %item.surfaceNrm2,%scale,%mCenter);
|
||||
%scale = getWords(%pad,0,2);
|
||||
%item.surfacePt = getWords(%pad,3,5);
|
||||
%rot = getWords(%pad,6,9);
|
||||
if (%plyr.packSet == 7) {
|
||||
%scale = vectorMultiply(%scale,1.845 SPC 2 SPC 1.744); // Update dfunctions.cs if changed!
|
||||
%scaleIsSet = 1;
|
||||
%item.surfacePt = vectorAdd(%item.surfacePt,vectorScale(%item.surfaceNrm3,0.5));
|
||||
%rot = rotAdd(%rot,"1 0 0" SPC $Pi);
|
||||
%dataBlock = "DeployedWoodSpine";
|
||||
}
|
||||
}
|
||||
|
||||
if (!%scaleIsSet)
|
||||
%scale = vectorMultiply(%scale,1/4 SPC 1/3 SPC 2);
|
||||
|
||||
//Test pack -- make sure our structure is loaded
|
||||
exec("data/Game/Structures/SMLCabin.cs");
|
||||
build_SMLCabin(%plyr.client,%item.surfacePt,%plyr.client.team);
|
||||
|
||||
// play the deploy sound
|
||||
serverPlay3D(%item.deploySound, %deplObj.getTransform());
|
||||
|
||||
%plyr.setInventory("constructorDeployable",0,1);
|
||||
|
||||
return %deplObj;
|
||||
}
|
||||
|
||||
/////////////////////////////////////
|
||||
|
||||
function constructorDeployableImage::onMount(%data, %obj, %node) {
|
||||
%obj.hasSpine = true; // set for spinecheck
|
||||
%obj.packSet = 0;
|
||||
displayPowerFreq(%obj);
|
||||
}
|
||||
|
||||
function constructorDeployableImage::onUnmount(%data, %obj, %node) {
|
||||
%obj.hasSpine = "";
|
||||
%obj.packSet = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,314 +1,314 @@
|
|||
//--------------------------------------------------------------------------
|
||||
// C4
|
||||
// Used only in Search & Destroy gameMode
|
||||
// When deployed (must be deploying on an objective) a timer is started
|
||||
// When the timer runs out, objective goes boom and offence wins
|
||||
// But the bomb can be defused by defence.
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Projectile
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// shapebase datablocks
|
||||
datablock ShapeBaseImageData(C4Image)
|
||||
{
|
||||
shapeFile = "pack_upgrade_satchel.dts";
|
||||
item = C4Charge;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
emap = true;
|
||||
};
|
||||
|
||||
datablock ItemData(C4Charge)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Packs";
|
||||
image = C4Image;
|
||||
shapeFile = "pack_upgrade_satchel.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
rotate = true;
|
||||
pickUpName = "a C4";
|
||||
|
||||
computeCRC = true;
|
||||
};
|
||||
|
||||
datablock StaticShapeData(C4Deployed) : StaticShapeDamageProfile
|
||||
{
|
||||
shapeFile = "pack_upgrade_satchel.dts";
|
||||
explosion = SatchelMainExplosion;
|
||||
underwaterExplosion = UnderwaterSatchelMainExplosion;
|
||||
armDelay = 2500;
|
||||
maxDamage = 0.6;
|
||||
|
||||
disabledLevel = 0.5;
|
||||
destroyedLevel = 0.6;
|
||||
dynamicType = $TypeMasks::StaticShapeObjectType;
|
||||
renderWhenDestroyed = false;
|
||||
|
||||
kickBackStrength = 4000;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
function C4::onUse(%this, %obj)
|
||||
{
|
||||
%item = new Item() {
|
||||
dataBlock = SatchelChargeTossed;
|
||||
rotation = "0 0 1 " @ (getRandom() * 360);
|
||||
};
|
||||
MissionCleanup.add(%item);
|
||||
// take pack out of inventory and unmount image
|
||||
%obj.decInventory(SatchelCharge, 1);
|
||||
%obj.throwObject(%item);
|
||||
%item.sourceObject = %obj;
|
||||
|
||||
// z0dd - ZOD, 5/16/02. Schedule a check to see if the satchel is at rest but not stuck to anything
|
||||
%item.checkCount = 0;
|
||||
%item.velocCheck = %item.getDataBlock().schedule(1000, "checkVelocity", %item);
|
||||
}
|
||||
|
||||
function initArmSatchelCharge(%satchel)
|
||||
{
|
||||
// "deet deet deet" sound
|
||||
%satchel.playAudio(1, SatchelChargeActivateSound);
|
||||
// also need to play "antenna extending" animation
|
||||
%satchel.playThread(0, "deploy");
|
||||
%satchel.playThread(1, "activate");
|
||||
|
||||
// delay the actual arming until after sound is done playing
|
||||
schedule( 2200, 0, "armSatchelCharge", %satchel );
|
||||
}
|
||||
|
||||
function armSatchelCharge(%satchel)
|
||||
{
|
||||
%satchel.armed = true;
|
||||
commandToClient( %satchel.sourceObject.client, 'setSatchelArmed' );
|
||||
}
|
||||
|
||||
function detonateSatchelCharge(%player)
|
||||
{
|
||||
%satchelCharge = %player.thrownChargeId;
|
||||
// can't detonate the satchel charge if it isn't armed
|
||||
if(!%satchelCharge.armed)
|
||||
return;
|
||||
|
||||
//error("Detonating satchel charge #" @ %satchelCharge @ " for player #" @ %player);
|
||||
|
||||
if(%satchelCharge.getDamageState() !$= Destroyed)
|
||||
{
|
||||
%satchelCharge.setDamageState(Destroyed);
|
||||
%satchelCharge.blowup();
|
||||
}
|
||||
|
||||
// Clear the player's HUD:
|
||||
%player.client.clearBackpackIcon();
|
||||
}
|
||||
|
||||
function SatchelChargeThrown::onEnterLiquid(%data, %obj, %coverage, %type)
|
||||
{
|
||||
// lava types
|
||||
if(%type >=4 && %type <= 6)
|
||||
{
|
||||
if(%obj.getDamageState() !$= "Destroyed")
|
||||
{
|
||||
%obj.armed = true;
|
||||
detonateSatchelCharge(%obj.sourceObject);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// quickSand
|
||||
if(%type == 7)
|
||||
if(isObject(%obj.sourceObject))
|
||||
%obj.sourceObject.thrownChargeId = 0;
|
||||
|
||||
Parent::onEnterLiquid(%data, %obj, %coverage, %type);
|
||||
}
|
||||
|
||||
function SatchelChargeImage::onMount(%data, %obj, %node)
|
||||
{
|
||||
%obj.thrownChargeId = 0;
|
||||
}
|
||||
|
||||
function SatchelChargeImage::onUnmount(%data, %obj, %node)
|
||||
{
|
||||
}
|
||||
|
||||
function SatchelChargeThrown::onDestroyed(%this, %object, %lastState)
|
||||
{
|
||||
if(%object.kaboom)
|
||||
return;
|
||||
else
|
||||
{
|
||||
%object.kaboom = true;
|
||||
|
||||
// the "thwart" flag is set if the charge is destroyed with weapons rather
|
||||
// than detonated. A less damaging explosion, but visually the same scale.
|
||||
if(%object.thwart)
|
||||
{
|
||||
messageClient(%object.sourceObject.client, 'msgSatchelChargeDetonate', "\c2Satchel charge destroyed.");
|
||||
%dmgRadius = 15; // z0dd - ZOD, 9/27/02. Was 10
|
||||
%dmgMod = 0.35; // z0dd - ZOD, 9/27/02. Was 0.3
|
||||
%expImpulse = 2000; // z0dd - ZOD, 9/27/02. Was 1000
|
||||
%dmgType = $DamageType::Explosion;
|
||||
}
|
||||
else
|
||||
{
|
||||
messageClient(%object.sourceObject.client, 'msgSatchelChargeDetonate', "\c2Satchel charge detonated!");
|
||||
%dmgRadius = 25; // z0dd - ZOD, 9/27/02. Was 20
|
||||
%dmgMod = 1.15; // z0dd - ZOD, 9/27/02. Was 1.0
|
||||
%expImpulse = 5000; // z0dd - ZOD, 9/27/02. Was 2500
|
||||
%dmgType = $DamageType::SatchelCharge;
|
||||
}
|
||||
|
||||
%object.blowingUp = true;
|
||||
RadiusExplosion(%object, %object.getPosition(), %dmgRadius, %dmgMod, %expImpulse, %object.sourceObject, %dmgType);
|
||||
|
||||
%object.schedule(1000, "delete");
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// z0dd - ZOD, 4/25/02. Satchel bug fix. Prior to fix, clients couldn't pick up
|
||||
// packs when satchel was destroyed from dmg
|
||||
if(isObject(%object.sourceObject))
|
||||
%object.sourceObject.thrownChargeId = 0;
|
||||
// --------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
function SatchelChargeThrown::onCollision(%data,%obj,%col)
|
||||
{
|
||||
// Do nothing...
|
||||
}
|
||||
|
||||
function SatchelChargeThrown::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType)
|
||||
{
|
||||
if (!%object.blowingUp)
|
||||
{
|
||||
%targetObject.damaged += %amount;
|
||||
|
||||
if(%targetObject.damaged >= %targetObject.getDataBlock().maxDamage &&
|
||||
%targetObject.getDamageState() !$= Destroyed)
|
||||
{
|
||||
%targetObject.thwart = true;
|
||||
%targetObject.setDamageState(Destroyed);
|
||||
%targetObject.blowup();
|
||||
|
||||
// clear the player's HUD:
|
||||
%targetObject.sourceObject.client.clearBackPackIcon();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function SatchelCharge::onPickup(%this, %obj, %shape, %amount)
|
||||
{
|
||||
// created to prevent console errors
|
||||
}
|
||||
|
||||
//**************************************************************
|
||||
// STICKY SATCHEL FUNCTIONS: z0dd - ZOD, 5/16/02
|
||||
//**************************************************************
|
||||
|
||||
function SatchelChargeTossed::onEnterLiquid(%data, %obj, %coverage, %type)
|
||||
{
|
||||
// If it lands in lava or quicksand, delete it
|
||||
if(%type >=4 && %type <= 7)
|
||||
{
|
||||
cancel(%obj.velocCheck);
|
||||
if(isObject(%obj.sourceObject))
|
||||
%obj.sourceObject.thrownChargeId = 0;
|
||||
|
||||
%obj.sourceObject.client.clearBackPackIcon();
|
||||
%obj.schedule(100, "delete");
|
||||
}
|
||||
else
|
||||
cancel(%obj.velocCheck);
|
||||
}
|
||||
|
||||
function SatchelChargeTossed::onLeaveLiquid(%data, %obj, %type)
|
||||
{
|
||||
// On the off chance it passes through to air, reschedule the velocity check
|
||||
%obj.checkCount = 0;
|
||||
%obj.velocCheck = %obj.getDataBlock().schedule(1000, "checkVelocity", %obj);
|
||||
}
|
||||
|
||||
function SatchelChargeTossed::onCollision(%data, %obj, %col)
|
||||
{
|
||||
// Lets keep thing from floating mid air, the check velocity should handle it afterwards
|
||||
if(%col.getType() & ($TypeMasks::PlayerObjectType | $TypeMasks::VehicleObjectType | $TypeMasks::TurretObjectType))
|
||||
{
|
||||
%vec = (-1.0 + getRandom() * 2.0) SPC (-1.0 + getRandom() * 2.0) SPC getRandom();
|
||||
%vec = vectorScale(%vec, 15);
|
||||
%pos = %col.getWorldBoxCenter();
|
||||
%obj.applyImpulse(%pos, %vec);
|
||||
}
|
||||
}
|
||||
|
||||
function SatchelChargeTossed::checkVelocity(%data, %item)
|
||||
{
|
||||
%item.checkCount++;
|
||||
if(VectorLen(%item.getVelocity()) < 0.1)
|
||||
{
|
||||
// Satchel has come to rest but not activated, probably on a
|
||||
// staticshape (station, gen, etc) lets force activation
|
||||
cancel(%item.velocCheck);
|
||||
activateSatchel(posFromTransform(%item.getTransform()), rotFromTransform(%item.getTransform()), %item.sourceObject);
|
||||
%item.schedule(100, "delete");
|
||||
}
|
||||
else if(%item.checkCount >= 6)
|
||||
{
|
||||
// satchel's still moving but it's been checked several times,
|
||||
// probably thrown off face of earth, delete it
|
||||
cancel(%item.velocCheck);
|
||||
if(isObject(%item.sourceObject))
|
||||
%item.sourceObject.thrownChargeId = 0;
|
||||
|
||||
%item.sourceObject.client.clearBackPackIcon();
|
||||
%item.schedule(100, "delete");
|
||||
}
|
||||
else
|
||||
{
|
||||
// check back in a little while
|
||||
%item.velocCheck = %data.schedule(1000, "checkVelocity", %item);
|
||||
}
|
||||
}
|
||||
|
||||
function SatchelChargeTossed::onStickyCollision(%data, %obj)
|
||||
{
|
||||
// We have sticky! Lets setup for the actual charge
|
||||
cancel(%obj.velocCheck);
|
||||
%pos = %obj.getLastStickyPos();
|
||||
%norm = %obj.getLastStickyNormal();
|
||||
%intAngle = getTerrainAngle(%norm);
|
||||
%rotAxis = vectorNormalize(vectorCross(%norm, "0 0 1"));
|
||||
if (getWord(%norm, 2) == 1 || getWord(%norm, 2) == -1)
|
||||
%rotAxis = vectorNormalize(vectorCross(%norm, "0 1 0"));
|
||||
|
||||
%rot = %rotAxis @ " " @ %intAngle;
|
||||
activateSatchel(%pos, %rot, %obj.sourceObject);
|
||||
%obj.schedule(50, "delete");
|
||||
}
|
||||
|
||||
function activateSatchel(%pos, %rot, %source)
|
||||
{
|
||||
// Create the charge and schedule arming
|
||||
%satchel = new StaticShape() {
|
||||
dataBlock = SatchelChargeThrown;
|
||||
sourceObject = %source;
|
||||
position = %pos;
|
||||
rotation = %rot;
|
||||
};
|
||||
MissionCleanup.add(%satchel);
|
||||
%source.thrownChargeId = %satchel;
|
||||
%satchel.armed = false;
|
||||
%satchel.damaged = 0.0;
|
||||
%satchel.thwart = false;
|
||||
|
||||
// arm itself 2.5 seconds after creation
|
||||
schedule(%satchel.getDatablock().armDelay, %satchel, "initArmSatchelCharge", %satchel);
|
||||
messageClient(%source.client, 'MsgSatchelChargePlaced', "\c2Satchel charge deployed.");
|
||||
}
|
||||
//--------------------------------------------------------------------------
|
||||
// C4
|
||||
// Used only in Search & Destroy gameMode
|
||||
// When deployed (must be deploying on an objective) a timer is started
|
||||
// When the timer runs out, objective goes boom and offence wins
|
||||
// But the bomb can be defused by defence.
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Projectile
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// shapebase datablocks
|
||||
datablock ShapeBaseImageData(C4Image)
|
||||
{
|
||||
shapeFile = "pack_upgrade_satchel.dts";
|
||||
item = C4Charge;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
emap = true;
|
||||
};
|
||||
|
||||
datablock ItemData(C4Charge)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Packs";
|
||||
image = C4Image;
|
||||
shapeFile = "pack_upgrade_satchel.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
rotate = true;
|
||||
pickUpName = "a C4";
|
||||
|
||||
computeCRC = true;
|
||||
};
|
||||
|
||||
datablock StaticShapeData(C4Deployed) : StaticShapeDamageProfile
|
||||
{
|
||||
shapeFile = "pack_upgrade_satchel.dts";
|
||||
explosion = SatchelMainExplosion;
|
||||
underwaterExplosion = UnderwaterSatchelMainExplosion;
|
||||
armDelay = 2500;
|
||||
maxDamage = 0.6;
|
||||
|
||||
disabledLevel = 0.5;
|
||||
destroyedLevel = 0.6;
|
||||
dynamicType = $TypeMasks::StaticShapeObjectType;
|
||||
renderWhenDestroyed = false;
|
||||
|
||||
kickBackStrength = 4000;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
function C4::onUse(%this, %obj)
|
||||
{
|
||||
%item = new Item() {
|
||||
dataBlock = SatchelChargeTossed;
|
||||
rotation = "0 0 1 " @ (getRandom() * 360);
|
||||
};
|
||||
MissionCleanup.add(%item);
|
||||
// take pack out of inventory and unmount image
|
||||
%obj.decInventory(SatchelCharge, 1);
|
||||
%obj.throwObject(%item);
|
||||
%item.sourceObject = %obj;
|
||||
|
||||
// z0dd - ZOD, 5/16/02. Schedule a check to see if the satchel is at rest but not stuck to anything
|
||||
%item.checkCount = 0;
|
||||
%item.velocCheck = %item.getDataBlock().schedule(1000, "checkVelocity", %item);
|
||||
}
|
||||
|
||||
function initArmSatchelCharge(%satchel)
|
||||
{
|
||||
// "deet deet deet" sound
|
||||
%satchel.playAudio(1, SatchelChargeActivateSound);
|
||||
// also need to play "antenna extending" animation
|
||||
%satchel.playThread(0, "deploy");
|
||||
%satchel.playThread(1, "activate");
|
||||
|
||||
// delay the actual arming until after sound is done playing
|
||||
schedule( 2200, 0, "armSatchelCharge", %satchel );
|
||||
}
|
||||
|
||||
function armSatchelCharge(%satchel)
|
||||
{
|
||||
%satchel.armed = true;
|
||||
commandToClient( %satchel.sourceObject.client, 'setSatchelArmed' );
|
||||
}
|
||||
|
||||
function detonateSatchelCharge(%player)
|
||||
{
|
||||
%satchelCharge = %player.thrownChargeId;
|
||||
// can't detonate the satchel charge if it isn't armed
|
||||
if(!%satchelCharge.armed)
|
||||
return;
|
||||
|
||||
//error("Detonating satchel charge #" @ %satchelCharge @ " for player #" @ %player);
|
||||
|
||||
if(%satchelCharge.getDamageState() !$= Destroyed)
|
||||
{
|
||||
%satchelCharge.setDamageState(Destroyed);
|
||||
%satchelCharge.blowup();
|
||||
}
|
||||
|
||||
// Clear the player's HUD:
|
||||
%player.client.clearBackpackIcon();
|
||||
}
|
||||
|
||||
function SatchelChargeThrown::onEnterLiquid(%data, %obj, %coverage, %type)
|
||||
{
|
||||
// lava types
|
||||
if(%type >=4 && %type <= 6)
|
||||
{
|
||||
if(%obj.getDamageState() !$= "Destroyed")
|
||||
{
|
||||
%obj.armed = true;
|
||||
detonateSatchelCharge(%obj.sourceObject);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// quickSand
|
||||
if(%type == 7)
|
||||
if(isObject(%obj.sourceObject))
|
||||
%obj.sourceObject.thrownChargeId = 0;
|
||||
|
||||
Parent::onEnterLiquid(%data, %obj, %coverage, %type);
|
||||
}
|
||||
|
||||
function SatchelChargeImage::onMount(%data, %obj, %node)
|
||||
{
|
||||
%obj.thrownChargeId = 0;
|
||||
}
|
||||
|
||||
function SatchelChargeImage::onUnmount(%data, %obj, %node)
|
||||
{
|
||||
}
|
||||
|
||||
function SatchelChargeThrown::onDestroyed(%this, %object, %lastState)
|
||||
{
|
||||
if(%object.kaboom)
|
||||
return;
|
||||
else
|
||||
{
|
||||
%object.kaboom = true;
|
||||
|
||||
// the "thwart" flag is set if the charge is destroyed with weapons rather
|
||||
// than detonated. A less damaging explosion, but visually the same scale.
|
||||
if(%object.thwart)
|
||||
{
|
||||
messageClient(%object.sourceObject.client, 'msgSatchelChargeDetonate', "\c2Satchel charge destroyed.");
|
||||
%dmgRadius = 15; // z0dd - ZOD, 9/27/02. Was 10
|
||||
%dmgMod = 0.35; // z0dd - ZOD, 9/27/02. Was 0.3
|
||||
%expImpulse = 2000; // z0dd - ZOD, 9/27/02. Was 1000
|
||||
%dmgType = $DamageType::Explosion;
|
||||
}
|
||||
else
|
||||
{
|
||||
messageClient(%object.sourceObject.client, 'msgSatchelChargeDetonate', "\c2Satchel charge detonated!");
|
||||
%dmgRadius = 25; // z0dd - ZOD, 9/27/02. Was 20
|
||||
%dmgMod = 1.15; // z0dd - ZOD, 9/27/02. Was 1.0
|
||||
%expImpulse = 5000; // z0dd - ZOD, 9/27/02. Was 2500
|
||||
%dmgType = $DamageType::SatchelCharge;
|
||||
}
|
||||
|
||||
%object.blowingUp = true;
|
||||
RadiusExplosion(%object, %object.getPosition(), %dmgRadius, %dmgMod, %expImpulse, %object.sourceObject, %dmgType);
|
||||
|
||||
%object.schedule(1000, "delete");
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// z0dd - ZOD, 4/25/02. Satchel bug fix. Prior to fix, clients couldn't pick up
|
||||
// packs when satchel was destroyed from dmg
|
||||
if(isObject(%object.sourceObject))
|
||||
%object.sourceObject.thrownChargeId = 0;
|
||||
// --------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
function SatchelChargeThrown::onCollision(%data,%obj,%col)
|
||||
{
|
||||
// Do nothing...
|
||||
}
|
||||
|
||||
function SatchelChargeThrown::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType)
|
||||
{
|
||||
if (!%object.blowingUp)
|
||||
{
|
||||
%targetObject.damaged += %amount;
|
||||
|
||||
if(%targetObject.damaged >= %targetObject.getDataBlock().maxDamage &&
|
||||
%targetObject.getDamageState() !$= Destroyed)
|
||||
{
|
||||
%targetObject.thwart = true;
|
||||
%targetObject.setDamageState(Destroyed);
|
||||
%targetObject.blowup();
|
||||
|
||||
// clear the player's HUD:
|
||||
%targetObject.sourceObject.client.clearBackPackIcon();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function SatchelCharge::onPickup(%this, %obj, %shape, %amount)
|
||||
{
|
||||
// created to prevent console errors
|
||||
}
|
||||
|
||||
//**************************************************************
|
||||
// STICKY SATCHEL FUNCTIONS: z0dd - ZOD, 5/16/02
|
||||
//**************************************************************
|
||||
|
||||
function SatchelChargeTossed::onEnterLiquid(%data, %obj, %coverage, %type)
|
||||
{
|
||||
// If it lands in lava or quicksand, delete it
|
||||
if(%type >=4 && %type <= 7)
|
||||
{
|
||||
cancel(%obj.velocCheck);
|
||||
if(isObject(%obj.sourceObject))
|
||||
%obj.sourceObject.thrownChargeId = 0;
|
||||
|
||||
%obj.sourceObject.client.clearBackPackIcon();
|
||||
%obj.schedule(100, "delete");
|
||||
}
|
||||
else
|
||||
cancel(%obj.velocCheck);
|
||||
}
|
||||
|
||||
function SatchelChargeTossed::onLeaveLiquid(%data, %obj, %type)
|
||||
{
|
||||
// On the off chance it passes through to air, reschedule the velocity check
|
||||
%obj.checkCount = 0;
|
||||
%obj.velocCheck = %obj.getDataBlock().schedule(1000, "checkVelocity", %obj);
|
||||
}
|
||||
|
||||
function SatchelChargeTossed::onCollision(%data, %obj, %col)
|
||||
{
|
||||
// Lets keep thing from floating mid air, the check velocity should handle it afterwards
|
||||
if(%col.getType() & ($TypeMasks::PlayerObjectType | $TypeMasks::VehicleObjectType | $TypeMasks::TurretObjectType))
|
||||
{
|
||||
%vec = (-1.0 + getRandom() * 2.0) SPC (-1.0 + getRandom() * 2.0) SPC getRandom();
|
||||
%vec = vectorScale(%vec, 15);
|
||||
%pos = %col.getWorldBoxCenter();
|
||||
%obj.applyImpulse(%pos, %vec);
|
||||
}
|
||||
}
|
||||
|
||||
function SatchelChargeTossed::checkVelocity(%data, %item)
|
||||
{
|
||||
%item.checkCount++;
|
||||
if(VectorLen(%item.getVelocity()) < 0.1)
|
||||
{
|
||||
// Satchel has come to rest but not activated, probably on a
|
||||
// staticshape (station, gen, etc) lets force activation
|
||||
cancel(%item.velocCheck);
|
||||
activateSatchel(posFromTransform(%item.getTransform()), rotFromTransform(%item.getTransform()), %item.sourceObject);
|
||||
%item.schedule(100, "delete");
|
||||
}
|
||||
else if(%item.checkCount >= 6)
|
||||
{
|
||||
// satchel's still moving but it's been checked several times,
|
||||
// probably thrown off face of earth, delete it
|
||||
cancel(%item.velocCheck);
|
||||
if(isObject(%item.sourceObject))
|
||||
%item.sourceObject.thrownChargeId = 0;
|
||||
|
||||
%item.sourceObject.client.clearBackPackIcon();
|
||||
%item.schedule(100, "delete");
|
||||
}
|
||||
else
|
||||
{
|
||||
// check back in a little while
|
||||
%item.velocCheck = %data.schedule(1000, "checkVelocity", %item);
|
||||
}
|
||||
}
|
||||
|
||||
function SatchelChargeTossed::onStickyCollision(%data, %obj)
|
||||
{
|
||||
// We have sticky! Lets setup for the actual charge
|
||||
cancel(%obj.velocCheck);
|
||||
%pos = %obj.getLastStickyPos();
|
||||
%norm = %obj.getLastStickyNormal();
|
||||
%intAngle = getTerrainAngle(%norm);
|
||||
%rotAxis = vectorNormalize(vectorCross(%norm, "0 0 1"));
|
||||
if (getWord(%norm, 2) == 1 || getWord(%norm, 2) == -1)
|
||||
%rotAxis = vectorNormalize(vectorCross(%norm, "0 1 0"));
|
||||
|
||||
%rot = %rotAxis @ " " @ %intAngle;
|
||||
activateSatchel(%pos, %rot, %obj.sourceObject);
|
||||
%obj.schedule(50, "delete");
|
||||
}
|
||||
|
||||
function activateSatchel(%pos, %rot, %source)
|
||||
{
|
||||
// Create the charge and schedule arming
|
||||
%satchel = new StaticShape() {
|
||||
dataBlock = SatchelChargeThrown;
|
||||
sourceObject = %source;
|
||||
position = %pos;
|
||||
rotation = %rot;
|
||||
};
|
||||
MissionCleanup.add(%satchel);
|
||||
%source.thrownChargeId = %satchel;
|
||||
%satchel.armed = false;
|
||||
%satchel.damaged = 0.0;
|
||||
%satchel.thwart = false;
|
||||
|
||||
// arm itself 2.5 seconds after creation
|
||||
schedule(%satchel.getDatablock().armDelay, %satchel, "initArmSatchelCharge", %satchel);
|
||||
messageClient(%source.client, 'MsgSatchelChargePlaced', "\c2Satchel charge deployed.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,166 +1,166 @@
|
|||
// ------------------------------------------------------------------
|
||||
// CLOAKING PACK
|
||||
//
|
||||
// When activated, this pack cloaks the user from all visual detection
|
||||
// by other players and cameras. This is a local effect only (someone standing
|
||||
// next to the cloaked player will still be visible). Motion sensors will
|
||||
// still detect a (moving) cloaked player.
|
||||
//
|
||||
// When not activated, the pack creates a localized passive sensor dampening
|
||||
// field. The user will not be visible to any non-motion-detecting sensor.
|
||||
//
|
||||
//Only light armors may equip with this item.
|
||||
|
||||
datablock EffectProfile(CloakingPackActivateEffect)
|
||||
{
|
||||
effectname = "packs/cloak_on";
|
||||
minDistance = 2.5;
|
||||
maxDistance = 2.5;
|
||||
};
|
||||
|
||||
datablock AudioProfile(CloakingPackActivateSound)
|
||||
{
|
||||
filename = "fx/packs/cloak_on.wav";
|
||||
description = CloseLooping3d;
|
||||
preload = true;
|
||||
effect = CloakingPackActivateEffect;
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(CloakingPackImage)
|
||||
{
|
||||
shapeFile = "pack_upgrade_cloaking.dts";
|
||||
item = CloakingPack;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
|
||||
usesEnergy = true;
|
||||
minEnergy = 3;
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateSequence[1] = "fire";
|
||||
stateSound[1] = CloakingPackActivateSound;
|
||||
stateEnergyDrain[1] = 11.75; // z0dd - ZOD, 4/25/02. Improve cloak pack. Was 12
|
||||
stateTransitionOnTriggerUp[1] = "Deactivate";
|
||||
stateTransitionOnNoAmmo[1] = "Deactivate";
|
||||
|
||||
stateName[2] = "Deactivate";
|
||||
stateScript[2] = "onDeactivate";
|
||||
stateTransitionOnTimeout[2] = "Idle";
|
||||
};
|
||||
|
||||
datablock ItemData(CloakingPack)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Packs";
|
||||
shapeFile = "pack_upgrade_cloaking.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
rotate = true;
|
||||
image = "CloakingPackImage";
|
||||
pickUpName = "a cloaking pack";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
function CloakingPackImage::onMount(%data, %obj, %node)
|
||||
{
|
||||
// player is sensor-invisible while wearing pack (except to motion sensors)
|
||||
%obj.setPassiveJammed(true);
|
||||
}
|
||||
|
||||
function CloakingPackImage::onUnmount(%data, %obj, %node)
|
||||
{
|
||||
%obj.setPassiveJammed(false);
|
||||
%obj.setCloaked(false);
|
||||
%obj.setImageTrigger(%node, false);
|
||||
}
|
||||
|
||||
// make player completely invisible to all players/sensors (except motion)
|
||||
function CloakingPackImage::onActivate(%data, %obj, %slot)
|
||||
{
|
||||
if(%obj.reCloak !$= "")
|
||||
{
|
||||
Cancel(%obj.reCloak);
|
||||
%obj.reCloak = "";
|
||||
}
|
||||
|
||||
if(%obj.client.armor $= "Light")
|
||||
{
|
||||
// can the player currently cloak (function returns "true" or reason for failure)?
|
||||
if(%obj.canCloak() $= "true")
|
||||
{
|
||||
messageClient(%obj.client, 'MsgCloakingPackOn', '\c2Cloaking pack on.');
|
||||
%obj.setCloaked(true);
|
||||
// z0dd - ZOD, 9/29/02. Removed T2 demo code from here
|
||||
commandToClient( %obj.client, 'setCloakIconOn' );
|
||||
}
|
||||
else
|
||||
{
|
||||
// notify player that they cannot cloak
|
||||
messageClient(%obj.client, 'MsgCloakingPackFailed', '\c2Jamming field prevents cloaking.');
|
||||
%obj.setImageTrigger(%slot, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// hopefully avoid some loopholes
|
||||
messageClient(%obj.client, 'MsgCloakingPackInvalid', '\c2Cloaking available for light armors only.');
|
||||
%obj.setImageTrigger(%slot, false);
|
||||
}
|
||||
}
|
||||
|
||||
function CloakingPackImage::onDeactivate(%data, %obj, %slot)
|
||||
{
|
||||
if(%obj.reCloak !$= "")
|
||||
{
|
||||
Cancel(%obj.reCloak);
|
||||
%obj.reCloak = "";
|
||||
}
|
||||
|
||||
// if pack is not on then dont bother...
|
||||
if(%obj.getImageState($BackpackSlot) $= "activate")
|
||||
messageClient(%obj.client, 'MsgCloakingPackOff', '\c2Cloaking pack off.');
|
||||
|
||||
%obj.setCloaked(false);
|
||||
%obj.setImageTrigger(%slot, false);
|
||||
// z0dd - ZOD, 9/29/02. Removed T2 demo code from here
|
||||
commandToClient( %obj.client, 'setCloakIconOff' );
|
||||
}
|
||||
|
||||
function CloakingPack::onPickup(%this, %obj, %shape, %amount)
|
||||
{
|
||||
// created to prevent console errors
|
||||
}
|
||||
|
||||
function ShapeBaseData::onForceUncloak(%this, %obj, %reason)
|
||||
{
|
||||
// dummy
|
||||
}
|
||||
|
||||
function Armor::onForceUncloak(%this, %obj, %reason)
|
||||
{
|
||||
%pack = %obj.getMountedImage($BackpackSlot);
|
||||
if((%pack <= 0) || (%pack.item !$= "CloakingPack"))
|
||||
return;
|
||||
|
||||
if(%obj.getImageState($BackpackSlot) $= "activate")
|
||||
{
|
||||
// cancel recloak thread
|
||||
if(%obj.reCloak !$= "")
|
||||
{
|
||||
Cancel(%obj.reCloak);
|
||||
%obj.reCloak = "";
|
||||
}
|
||||
|
||||
messageClient(%obj.client, 'MsgCloakingPackOff', '\c2Cloaking pack off. Jammed.');
|
||||
%obj.setCloaked(false);
|
||||
%obj.setImageTrigger($BackpackSlot, false);
|
||||
}
|
||||
// ------------------------------------------------------------------
|
||||
// CLOAKING PACK
|
||||
//
|
||||
// When activated, this pack cloaks the user from all visual detection
|
||||
// by other players and cameras. This is a local effect only (someone standing
|
||||
// next to the cloaked player will still be visible). Motion sensors will
|
||||
// still detect a (moving) cloaked player.
|
||||
//
|
||||
// When not activated, the pack creates a localized passive sensor dampening
|
||||
// field. The user will not be visible to any non-motion-detecting sensor.
|
||||
//
|
||||
//Only light armors may equip with this item.
|
||||
|
||||
datablock EffectProfile(CloakingPackActivateEffect)
|
||||
{
|
||||
effectname = "packs/cloak_on";
|
||||
minDistance = 2.5;
|
||||
maxDistance = 2.5;
|
||||
};
|
||||
|
||||
datablock AudioProfile(CloakingPackActivateSound)
|
||||
{
|
||||
filename = "fx/packs/cloak_on.wav";
|
||||
description = CloseLooping3d;
|
||||
preload = true;
|
||||
effect = CloakingPackActivateEffect;
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(CloakingPackImage)
|
||||
{
|
||||
shapeFile = "pack_upgrade_cloaking.dts";
|
||||
item = CloakingPack;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
|
||||
usesEnergy = true;
|
||||
minEnergy = 3;
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateSequence[1] = "fire";
|
||||
stateSound[1] = CloakingPackActivateSound;
|
||||
stateEnergyDrain[1] = 11.75; // z0dd - ZOD, 4/25/02. Improve cloak pack. Was 12
|
||||
stateTransitionOnTriggerUp[1] = "Deactivate";
|
||||
stateTransitionOnNoAmmo[1] = "Deactivate";
|
||||
|
||||
stateName[2] = "Deactivate";
|
||||
stateScript[2] = "onDeactivate";
|
||||
stateTransitionOnTimeout[2] = "Idle";
|
||||
};
|
||||
|
||||
datablock ItemData(CloakingPack)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Packs";
|
||||
shapeFile = "pack_upgrade_cloaking.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
rotate = true;
|
||||
image = "CloakingPackImage";
|
||||
pickUpName = "a cloaking pack";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
function CloakingPackImage::onMount(%data, %obj, %node)
|
||||
{
|
||||
// player is sensor-invisible while wearing pack (except to motion sensors)
|
||||
%obj.setPassiveJammed(true);
|
||||
}
|
||||
|
||||
function CloakingPackImage::onUnmount(%data, %obj, %node)
|
||||
{
|
||||
%obj.setPassiveJammed(false);
|
||||
%obj.setCloaked(false);
|
||||
%obj.setImageTrigger(%node, false);
|
||||
}
|
||||
|
||||
// make player completely invisible to all players/sensors (except motion)
|
||||
function CloakingPackImage::onActivate(%data, %obj, %slot)
|
||||
{
|
||||
if(%obj.reCloak !$= "")
|
||||
{
|
||||
Cancel(%obj.reCloak);
|
||||
%obj.reCloak = "";
|
||||
}
|
||||
|
||||
if(%obj.client.armor $= "Light")
|
||||
{
|
||||
// can the player currently cloak (function returns "true" or reason for failure)?
|
||||
if(%obj.canCloak() $= "true")
|
||||
{
|
||||
messageClient(%obj.client, 'MsgCloakingPackOn', '\c2Cloaking pack on.');
|
||||
%obj.setCloaked(true);
|
||||
// z0dd - ZOD, 9/29/02. Removed T2 demo code from here
|
||||
commandToClient( %obj.client, 'setCloakIconOn' );
|
||||
}
|
||||
else
|
||||
{
|
||||
// notify player that they cannot cloak
|
||||
messageClient(%obj.client, 'MsgCloakingPackFailed', '\c2Jamming field prevents cloaking.');
|
||||
%obj.setImageTrigger(%slot, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// hopefully avoid some loopholes
|
||||
messageClient(%obj.client, 'MsgCloakingPackInvalid', '\c2Cloaking available for light armors only.');
|
||||
%obj.setImageTrigger(%slot, false);
|
||||
}
|
||||
}
|
||||
|
||||
function CloakingPackImage::onDeactivate(%data, %obj, %slot)
|
||||
{
|
||||
if(%obj.reCloak !$= "")
|
||||
{
|
||||
Cancel(%obj.reCloak);
|
||||
%obj.reCloak = "";
|
||||
}
|
||||
|
||||
// if pack is not on then dont bother...
|
||||
if(%obj.getImageState($BackpackSlot) $= "activate")
|
||||
messageClient(%obj.client, 'MsgCloakingPackOff', '\c2Cloaking pack off.');
|
||||
|
||||
%obj.setCloaked(false);
|
||||
%obj.setImageTrigger(%slot, false);
|
||||
// z0dd - ZOD, 9/29/02. Removed T2 demo code from here
|
||||
commandToClient( %obj.client, 'setCloakIconOff' );
|
||||
}
|
||||
|
||||
function CloakingPack::onPickup(%this, %obj, %shape, %amount)
|
||||
{
|
||||
// created to prevent console errors
|
||||
}
|
||||
|
||||
function ShapeBaseData::onForceUncloak(%this, %obj, %reason)
|
||||
{
|
||||
// dummy
|
||||
}
|
||||
|
||||
function Armor::onForceUncloak(%this, %obj, %reason)
|
||||
{
|
||||
%pack = %obj.getMountedImage($BackpackSlot);
|
||||
if((%pack <= 0) || (%pack.item !$= "CloakingPack"))
|
||||
return;
|
||||
|
||||
if(%obj.getImageState($BackpackSlot) $= "activate")
|
||||
{
|
||||
// cancel recloak thread
|
||||
if(%obj.reCloak !$= "")
|
||||
{
|
||||
Cancel(%obj.reCloak);
|
||||
%obj.reCloak = "";
|
||||
}
|
||||
|
||||
messageClient(%obj.client, 'MsgCloakingPackOff', '\c2Cloaking pack off. Jammed.');
|
||||
%obj.setCloaked(false);
|
||||
%obj.setImageTrigger($BackpackSlot, false);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,65 +1,65 @@
|
|||
//--------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
datablock ShapeBaseImageData(MissileBarrelPackImage)
|
||||
{
|
||||
mass = 10; // z0dd - ZOD, 7/17/02. Lower mass due to higher gravity. Was 15.
|
||||
|
||||
className = TurretPack;
|
||||
|
||||
shapeFile = "pack_barrel_missile.dts";
|
||||
item = MissileBarrelPack;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
turretBarrel = "MissileBarrelLarge";
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateTransitionOnTriggerUp[1] = "Deactivate";
|
||||
|
||||
stateName[2] = "Deactivate";
|
||||
stateScript[2] = "onDeactivate";
|
||||
stateTransitionOnTimeOut[2] = "Idle";
|
||||
|
||||
isLarge = true;
|
||||
};
|
||||
|
||||
datablock ItemData(MissileBarrelPack)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Packs";
|
||||
shapeFile = "pack_barrel_missile.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
rotate = true;
|
||||
image = "MissileBarrelPackImage";
|
||||
pickUpName = "a missile barrel pack";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
//MissileBarrelPackImage.turretBarrel = "MissileBarrelLarge";
|
||||
|
||||
function MissileBarrelPackImage::onActivate(%data, %obj, %slot)
|
||||
{
|
||||
checkTurretMount(%data, %obj, %slot);
|
||||
}
|
||||
|
||||
function MissileBarrelPackImage::onDeactivate(%data, %obj, %slot)
|
||||
{
|
||||
%obj.setImageTrigger($BackpackSlot, false);
|
||||
}
|
||||
|
||||
function MissileBarrelPack::onPickup(%this, %obj, %shape, %amount)
|
||||
{
|
||||
// created to prevent console errors
|
||||
//--------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
datablock ShapeBaseImageData(MissileBarrelPackImage)
|
||||
{
|
||||
mass = 10; // z0dd - ZOD, 7/17/02. Lower mass due to higher gravity. Was 15.
|
||||
|
||||
className = TurretPack;
|
||||
|
||||
shapeFile = "pack_barrel_missile.dts";
|
||||
item = MissileBarrelPack;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
turretBarrel = "MissileBarrelLarge";
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateTransitionOnTriggerUp[1] = "Deactivate";
|
||||
|
||||
stateName[2] = "Deactivate";
|
||||
stateScript[2] = "onDeactivate";
|
||||
stateTransitionOnTimeOut[2] = "Idle";
|
||||
|
||||
isLarge = true;
|
||||
};
|
||||
|
||||
datablock ItemData(MissileBarrelPack)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Packs";
|
||||
shapeFile = "pack_barrel_missile.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
rotate = true;
|
||||
image = "MissileBarrelPackImage";
|
||||
pickUpName = "a missile barrel pack";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
//MissileBarrelPackImage.turretBarrel = "MissileBarrelLarge";
|
||||
|
||||
function MissileBarrelPackImage::onActivate(%data, %obj, %slot)
|
||||
{
|
||||
checkTurretMount(%data, %obj, %slot);
|
||||
}
|
||||
|
||||
function MissileBarrelPackImage::onDeactivate(%data, %obj, %slot)
|
||||
{
|
||||
%obj.setImageTrigger($BackpackSlot, false);
|
||||
}
|
||||
|
||||
function MissileBarrelPack::onPickup(%this, %obj, %shape, %amount)
|
||||
{
|
||||
// created to prevent console errors
|
||||
}
|
||||
|
|
@ -1,63 +1,63 @@
|
|||
//--------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
datablock ShapeBaseImageData(MortarBarrelPackImage)
|
||||
{
|
||||
mass = 10; // z0dd - ZOD, 7/17/02. Lower mass due to higher gravity. Was 15.
|
||||
|
||||
className = TurretPack;
|
||||
|
||||
shapeFile = "pack_barrel_mortar.dts";
|
||||
item = MortarBarrelPack;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
turretBarrel = "MortarBarrelLarge";
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateTransitionOnTriggerUp[1] = "Deactivate";
|
||||
|
||||
stateName[2] = "Deactivate";
|
||||
stateScript[2] = "onDeactivate";
|
||||
stateTransitionOnTimeOut[2] = "Idle";
|
||||
|
||||
isLarge = true;
|
||||
};
|
||||
|
||||
datablock ItemData(MortarBarrelPack)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Packs";
|
||||
shapeFile = "pack_barrel_mortar.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
rotate = true;
|
||||
image = "MortarBarrelPackImage";
|
||||
pickUpName = "a mortar barrel pack";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
function MortarBarrelPackImage::onActivate(%data, %obj, %slot)
|
||||
{
|
||||
checkTurretMount(%data, %obj, %slot);
|
||||
}
|
||||
|
||||
function MortarBarrelPackImage::onDeactivate(%data, %obj, %slot)
|
||||
{
|
||||
%obj.setImageTrigger($BackpackSlot, false);
|
||||
}
|
||||
|
||||
function MortarBarrelPack::onPickup(%this, %obj, %shape, %amount)
|
||||
{
|
||||
// created to prevent console errors
|
||||
//--------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
datablock ShapeBaseImageData(MortarBarrelPackImage)
|
||||
{
|
||||
mass = 10; // z0dd - ZOD, 7/17/02. Lower mass due to higher gravity. Was 15.
|
||||
|
||||
className = TurretPack;
|
||||
|
||||
shapeFile = "pack_barrel_mortar.dts";
|
||||
item = MortarBarrelPack;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
turretBarrel = "MortarBarrelLarge";
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateTransitionOnTriggerUp[1] = "Deactivate";
|
||||
|
||||
stateName[2] = "Deactivate";
|
||||
stateScript[2] = "onDeactivate";
|
||||
stateTransitionOnTimeOut[2] = "Idle";
|
||||
|
||||
isLarge = true;
|
||||
};
|
||||
|
||||
datablock ItemData(MortarBarrelPack)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Packs";
|
||||
shapeFile = "pack_barrel_mortar.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
rotate = true;
|
||||
image = "MortarBarrelPackImage";
|
||||
pickUpName = "a mortar barrel pack";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
function MortarBarrelPackImage::onActivate(%data, %obj, %slot)
|
||||
{
|
||||
checkTurretMount(%data, %obj, %slot);
|
||||
}
|
||||
|
||||
function MortarBarrelPackImage::onDeactivate(%data, %obj, %slot)
|
||||
{
|
||||
%obj.setImageTrigger($BackpackSlot, false);
|
||||
}
|
||||
|
||||
function MortarBarrelPack::onPickup(%this, %obj, %shape, %amount)
|
||||
{
|
||||
// created to prevent console errors
|
||||
}
|
||||
|
|
@ -1,61 +1,61 @@
|
|||
//--------------------------------------------------------------------------
|
||||
//
|
||||
// Plasma barrel pack
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
datablock ShapeBaseImageData(PlasmaBarrelPackImage)
|
||||
{
|
||||
mass = 10; // z0dd - ZOD, 7/17/02. Lower mass due to higher gravity. Was 15.
|
||||
|
||||
shapeFile = "pack_barrel_fusion.dts";
|
||||
item = PlasmaBarrelPack;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
turretBarrel = "PlasmaBarrelLarge";
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateTransitionOnTriggerUp[1] = "Deactivate";
|
||||
|
||||
stateName[2] = "Deactivate";
|
||||
stateScript[2] = "onDeactivate";
|
||||
stateTransitionOnTimeOut[2] = "Idle";
|
||||
|
||||
isLarge = true;
|
||||
};
|
||||
|
||||
datablock ItemData(PlasmaBarrelPack)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Packs";
|
||||
shapeFile = "pack_barrel_fusion.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
rotate = true;
|
||||
image = "PlasmaBarrelPackImage";
|
||||
pickUpName = "a plasma barrel pack";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
function PlasmaBarrelPackImage::onActivate(%data, %obj, %slot)
|
||||
{
|
||||
checkTurretMount(%data, %obj, %slot);
|
||||
}
|
||||
|
||||
function PlasmaBarrelPackImage::onDeactivate(%data, %obj, %slot)
|
||||
{
|
||||
%obj.setImageTrigger($BackpackSlot, false);
|
||||
}
|
||||
|
||||
function PlasmaBarrelPack::onPickup(%this, %obj, %shape, %amount)
|
||||
{
|
||||
// created to prevent console errors
|
||||
//--------------------------------------------------------------------------
|
||||
//
|
||||
// Plasma barrel pack
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
datablock ShapeBaseImageData(PlasmaBarrelPackImage)
|
||||
{
|
||||
mass = 10; // z0dd - ZOD, 7/17/02. Lower mass due to higher gravity. Was 15.
|
||||
|
||||
shapeFile = "pack_barrel_fusion.dts";
|
||||
item = PlasmaBarrelPack;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
turretBarrel = "PlasmaBarrelLarge";
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateTransitionOnTriggerUp[1] = "Deactivate";
|
||||
|
||||
stateName[2] = "Deactivate";
|
||||
stateScript[2] = "onDeactivate";
|
||||
stateTransitionOnTimeOut[2] = "Idle";
|
||||
|
||||
isLarge = true;
|
||||
};
|
||||
|
||||
datablock ItemData(PlasmaBarrelPack)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Packs";
|
||||
shapeFile = "pack_barrel_fusion.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
rotate = true;
|
||||
image = "PlasmaBarrelPackImage";
|
||||
pickUpName = "a plasma barrel pack";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
function PlasmaBarrelPackImage::onActivate(%data, %obj, %slot)
|
||||
{
|
||||
checkTurretMount(%data, %obj, %slot);
|
||||
}
|
||||
|
||||
function PlasmaBarrelPackImage::onDeactivate(%data, %obj, %slot)
|
||||
{
|
||||
%obj.setImageTrigger($BackpackSlot, false);
|
||||
}
|
||||
|
||||
function PlasmaBarrelPack::onPickup(%this, %obj, %shape, %amount)
|
||||
{
|
||||
// created to prevent console errors
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,146 +1,146 @@
|
|||
// ------------------------------------------------------------------
|
||||
// SENSOR JAMMER PACK
|
||||
//
|
||||
// When activated, the sensor jammer pack emits a sensor-jamming field of
|
||||
// 20m radius. Any players within this field are completely invisible to
|
||||
// all sensors, turrets and cameras.
|
||||
//
|
||||
// When not activated, the pack has no effect.
|
||||
//
|
||||
datablock EffectProfile(SensorJammerPackActivateEffect)
|
||||
{
|
||||
effectname = "packs/cloak_on";
|
||||
minDistance = 2.5;
|
||||
maxDistance = 2.5;
|
||||
};
|
||||
|
||||
datablock AudioProfile(SensorJammerActivateSound)
|
||||
{
|
||||
filename = "fx/packs/sensorjammerpack_on.wav";
|
||||
description = ClosestLooping3d;
|
||||
preload = true;
|
||||
effect = SensorJammerPackActivateEffect;
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(SensorJammerPackImage)
|
||||
{
|
||||
shapeFile = "pack_upgrade_sensorjammer.dts";
|
||||
item = SensorJammerPack;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
|
||||
usesEnergy = true;
|
||||
minEnergy = 3;
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateSequence[1] = "fire";
|
||||
stateSound[1] = SensorJammerActivateSound;
|
||||
stateEnergyDrain[1] = 10.5;
|
||||
stateTransitionOnTriggerUp[1] = "Deactivate";
|
||||
stateTransitionOnNoAmmo[1] = "Deactivate";
|
||||
|
||||
stateName[2] = "Deactivate";
|
||||
stateScript[2] = "onDeactivate";
|
||||
stateTransitionOnTimeout[2] = "Idle";
|
||||
};
|
||||
|
||||
datablock ItemData(SensorJammerPack)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Packs";
|
||||
shapeFile = "pack_upgrade_sensorjammer.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
rotate = true;
|
||||
image = "SensorJammerPackImage";
|
||||
pickUpName = "a sensor jammer pack";
|
||||
|
||||
computeCRC = true;
|
||||
};
|
||||
|
||||
datablock SensorData(JammerSensorObjectPassive)
|
||||
{
|
||||
// same detection info as 'PlayerObject' sensorData
|
||||
detects = true;
|
||||
detectsUsingLOS = true;
|
||||
detectsPassiveJammed = true;
|
||||
detectRadius = 2000;
|
||||
detectionPings = false;
|
||||
detectsFOVOnly = true;
|
||||
detectFOVPercent = 1.3;
|
||||
useObjectFOV = true;
|
||||
|
||||
jams = true;
|
||||
jamsOnlyGroup = true;
|
||||
jamsUsingLOS = true;
|
||||
jamRadius = 0;
|
||||
};
|
||||
|
||||
datablock SensorData(JammerSensorObjectActive)
|
||||
{
|
||||
// same detection info as 'PlayerObject' sensorData
|
||||
detects = true;
|
||||
detectsUsingLOS = true;
|
||||
detectsPassiveJammed = true;
|
||||
detectRadius = 2000;
|
||||
detectionPings = false;
|
||||
detectsFOVOnly = true;
|
||||
detectFOVPercent = 1.3;
|
||||
useObjectFOV = true;
|
||||
|
||||
jams = true;
|
||||
jamsOnlyGroup = true;
|
||||
jamsUsingLOS = true;
|
||||
jamRadius = 30;
|
||||
};
|
||||
|
||||
function SensorJammerPackImage::onMount(%data, %obj, %slot)
|
||||
{
|
||||
setTargetSensorData(%obj.client.target, JammerSensorObjectPassive);
|
||||
}
|
||||
|
||||
function SensorJammerPackImage::onUnmount(%data, %obj, %slot)
|
||||
{
|
||||
setTargetSensorData(%obj.client.target, PlayerSensor);
|
||||
%obj.setImageTrigger(%slot, false);
|
||||
}
|
||||
|
||||
function SensorJammerPackImage::onActivate(%data, %obj, %slot)
|
||||
{
|
||||
messageClient(%obj.client, 'MsgSensorJammerPackOn', '\c2Sensor jammer pack on.');
|
||||
setTargetSensorData(%obj.client.target, JammerSensorObjectActive);
|
||||
// z0dd - ZOD, 9/29/02. Removed T2 demo code from here
|
||||
commandToClient( %obj.client, 'setSenJamIconOn' );
|
||||
|
||||
%obj.setJammerFX( true );
|
||||
}
|
||||
|
||||
function SensorJammerPackImage::onDeactivate(%data, %obj, %slot)
|
||||
{
|
||||
messageClient(%obj.client, 'MsgSensorJammerPackOff', '\c2Sensor jammer pack off.');
|
||||
%obj.setImageTrigger(%slot, false);
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// z0dd - ZOD, 4/25/02. This function is actually getting called AFTER
|
||||
// ::onUnmount. We must check to see what the players current sensor data
|
||||
// is, then if it is NOT PlayerSensor, set to passive jam, bug fix.
|
||||
if(getTargetSensorData(%obj.client.target).getName() !$= "PlayerSensor")
|
||||
setTargetSensorData(%obj.client.target, JammerSensorObjectPassive);
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
// z0dd - ZOD, 9/29/02. Removed T2 demo code from here
|
||||
commandToClient( %obj.client, 'setSenJamIconOff' );
|
||||
|
||||
%obj.setJammerFX( false );
|
||||
}
|
||||
|
||||
function SensorJammerPack::onPickup(%this, %obj, %shape, %amount)
|
||||
{
|
||||
// created to prevent console errors
|
||||
}
|
||||
// ------------------------------------------------------------------
|
||||
// SENSOR JAMMER PACK
|
||||
//
|
||||
// When activated, the sensor jammer pack emits a sensor-jamming field of
|
||||
// 20m radius. Any players within this field are completely invisible to
|
||||
// all sensors, turrets and cameras.
|
||||
//
|
||||
// When not activated, the pack has no effect.
|
||||
//
|
||||
datablock EffectProfile(SensorJammerPackActivateEffect)
|
||||
{
|
||||
effectname = "packs/cloak_on";
|
||||
minDistance = 2.5;
|
||||
maxDistance = 2.5;
|
||||
};
|
||||
|
||||
datablock AudioProfile(SensorJammerActivateSound)
|
||||
{
|
||||
filename = "fx/packs/sensorjammerpack_on.wav";
|
||||
description = ClosestLooping3d;
|
||||
preload = true;
|
||||
effect = SensorJammerPackActivateEffect;
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(SensorJammerPackImage)
|
||||
{
|
||||
shapeFile = "pack_upgrade_sensorjammer.dts";
|
||||
item = SensorJammerPack;
|
||||
mountPoint = 1;
|
||||
offset = "0 0 0";
|
||||
|
||||
usesEnergy = true;
|
||||
minEnergy = 3;
|
||||
|
||||
stateName[0] = "Idle";
|
||||
stateTransitionOnTriggerDown[0] = "Activate";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateScript[1] = "onActivate";
|
||||
stateSequence[1] = "fire";
|
||||
stateSound[1] = SensorJammerActivateSound;
|
||||
stateEnergyDrain[1] = 10.5;
|
||||
stateTransitionOnTriggerUp[1] = "Deactivate";
|
||||
stateTransitionOnNoAmmo[1] = "Deactivate";
|
||||
|
||||
stateName[2] = "Deactivate";
|
||||
stateScript[2] = "onDeactivate";
|
||||
stateTransitionOnTimeout[2] = "Idle";
|
||||
};
|
||||
|
||||
datablock ItemData(SensorJammerPack)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Packs";
|
||||
shapeFile = "pack_upgrade_sensorjammer.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
rotate = true;
|
||||
image = "SensorJammerPackImage";
|
||||
pickUpName = "a sensor jammer pack";
|
||||
|
||||
computeCRC = true;
|
||||
};
|
||||
|
||||
datablock SensorData(JammerSensorObjectPassive)
|
||||
{
|
||||
// same detection info as 'PlayerObject' sensorData
|
||||
detects = true;
|
||||
detectsUsingLOS = true;
|
||||
detectsPassiveJammed = true;
|
||||
detectRadius = 2000;
|
||||
detectionPings = false;
|
||||
detectsFOVOnly = true;
|
||||
detectFOVPercent = 1.3;
|
||||
useObjectFOV = true;
|
||||
|
||||
jams = true;
|
||||
jamsOnlyGroup = true;
|
||||
jamsUsingLOS = true;
|
||||
jamRadius = 0;
|
||||
};
|
||||
|
||||
datablock SensorData(JammerSensorObjectActive)
|
||||
{
|
||||
// same detection info as 'PlayerObject' sensorData
|
||||
detects = true;
|
||||
detectsUsingLOS = true;
|
||||
detectsPassiveJammed = true;
|
||||
detectRadius = 2000;
|
||||
detectionPings = false;
|
||||
detectsFOVOnly = true;
|
||||
detectFOVPercent = 1.3;
|
||||
useObjectFOV = true;
|
||||
|
||||
jams = true;
|
||||
jamsOnlyGroup = true;
|
||||
jamsUsingLOS = true;
|
||||
jamRadius = 30;
|
||||
};
|
||||
|
||||
function SensorJammerPackImage::onMount(%data, %obj, %slot)
|
||||
{
|
||||
setTargetSensorData(%obj.client.target, JammerSensorObjectPassive);
|
||||
}
|
||||
|
||||
function SensorJammerPackImage::onUnmount(%data, %obj, %slot)
|
||||
{
|
||||
setTargetSensorData(%obj.client.target, PlayerSensor);
|
||||
%obj.setImageTrigger(%slot, false);
|
||||
}
|
||||
|
||||
function SensorJammerPackImage::onActivate(%data, %obj, %slot)
|
||||
{
|
||||
messageClient(%obj.client, 'MsgSensorJammerPackOn', '\c2Sensor jammer pack on.');
|
||||
setTargetSensorData(%obj.client.target, JammerSensorObjectActive);
|
||||
// z0dd - ZOD, 9/29/02. Removed T2 demo code from here
|
||||
commandToClient( %obj.client, 'setSenJamIconOn' );
|
||||
|
||||
%obj.setJammerFX( true );
|
||||
}
|
||||
|
||||
function SensorJammerPackImage::onDeactivate(%data, %obj, %slot)
|
||||
{
|
||||
messageClient(%obj.client, 'MsgSensorJammerPackOff', '\c2Sensor jammer pack off.');
|
||||
%obj.setImageTrigger(%slot, false);
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// z0dd - ZOD, 4/25/02. This function is actually getting called AFTER
|
||||
// ::onUnmount. We must check to see what the players current sensor data
|
||||
// is, then if it is NOT PlayerSensor, set to passive jam, bug fix.
|
||||
if(getTargetSensorData(%obj.client.target).getName() !$= "PlayerSensor")
|
||||
setTargetSensorData(%obj.client.target, JammerSensorObjectPassive);
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
// z0dd - ZOD, 9/29/02. Removed T2 demo code from here
|
||||
commandToClient( %obj.client, 'setSenJamIconOff' );
|
||||
|
||||
%obj.setJammerFX( false );
|
||||
}
|
||||
|
||||
function SensorJammerPack::onPickup(%this, %obj, %shape, %amount)
|
||||
{
|
||||
// created to prevent console errors
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue