mirror of
https://github.com/PhantomGamesDevelopment/TWM2.git
synced 2026-07-11 22:44:36 +00:00
Mid-December Updates
Next batch of updates, including the demon lord zombies, some function centralization, and datablock cleanup.
This commit is contained in:
parent
0954efcdc4
commit
f7095e8823
20 changed files with 1850 additions and 2045 deletions
|
|
@ -3,223 +3,6 @@ $TeamDeployableMax[ZSpawnDeployable] = 9999;
|
|||
// Zombie Spawn Point
|
||||
//---------------------------------------------------------
|
||||
|
||||
datablock AudioProfile(ZombieMoan)
|
||||
{
|
||||
filename = "fx/environment/growl3.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ZombieHOWL)
|
||||
{
|
||||
filename = "fx/environment/Yeti_Howl1.wav";
|
||||
description = AudioBomb3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
//USED IN FLAMETHROWER / NMM
|
||||
//DO NOT REMOVE: NEEDED HERE
|
||||
datablock ParticleData(NMMissileBaseParticle) {
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = -0.2;
|
||||
inheritedVelFactor = 0.0;
|
||||
|
||||
lifetimeMS = 800;
|
||||
lifetimeVarianceMS = 500;
|
||||
|
||||
useInvAlpha = false;
|
||||
spinRandomMin = -160.0;
|
||||
spinRandomMax = 160.0;
|
||||
|
||||
animateTexture = true;
|
||||
framesPerSec = 15;
|
||||
|
||||
textureName = "special/cloudflash";
|
||||
|
||||
colors[0] = "0.5 0.1 0.9 1.0";
|
||||
colors[1] = "0.5 0.1 0.9 1.0";
|
||||
colors[2] = "0.5 0.1 0.9 1.0";
|
||||
|
||||
sizes[0] = 2.5;
|
||||
sizes[1] = 2.7;
|
||||
sizes[2] = 3.0;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.7;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(NMMissileBaseEmitter) {
|
||||
ejectionPeriodMS = 10;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 1.5;
|
||||
velocityVariance = 0.3;
|
||||
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 30.0;
|
||||
|
||||
particles = "NMMissileBaseParticle";
|
||||
};
|
||||
|
||||
datablock ParticleData(ThrowerBaseParticle) {
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = -0.2;
|
||||
inheritedVelFactor = 0.0;
|
||||
|
||||
lifetimeMS = 800;
|
||||
lifetimeVarianceMS = 500;
|
||||
|
||||
useInvAlpha = false;
|
||||
spinRandomMin = -160.0;
|
||||
spinRandomMax = 160.0;
|
||||
|
||||
animateTexture = true;
|
||||
framesPerSec = 15;
|
||||
|
||||
textureName = "special/cloudflash";
|
||||
|
||||
colors[0] = "1.0 0.6 0.4 1.0";
|
||||
colors[1] = "1.0 0.5 0.2 1.0";
|
||||
colors[2] = "1.0 0.25 0.1 0.0";
|
||||
|
||||
sizes[0] = 0.5;
|
||||
sizes[1] = 0.7;
|
||||
sizes[2] = 1.0;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.7;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(ThrowerBaseEmitter) {
|
||||
ejectionPeriodMS = 10;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 1.5;
|
||||
velocityVariance = 0.3;
|
||||
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 30.0;
|
||||
|
||||
particles = "ThrowerBaseParticle";
|
||||
};
|
||||
//
|
||||
|
||||
datablock ParticleData(DemonFBSmokeParticle)
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 0.0;
|
||||
|
||||
lifetimeMS = 2500;
|
||||
lifetimeVarianceMS = 500;
|
||||
|
||||
textureName = "particleTest";
|
||||
|
||||
useInvAlpha = true;
|
||||
|
||||
spinRandomMin = -60.0;
|
||||
spinRandomMax = 60.0;
|
||||
|
||||
colors[0] = "0.5 0.5 0.5 0.5";
|
||||
colors[1] = "0.4 0.4 0.4 0.2";
|
||||
colors[2] = "0.3 0.3 0.3 0.0";
|
||||
sizes[0] = 0.5;
|
||||
sizes[1] = 1.75;
|
||||
sizes[2] = 3.0;
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(DemonFBSmokeEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 7;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 0.75; // A little oomph at the back end
|
||||
velocityVariance = 0.2;
|
||||
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 180.0;
|
||||
|
||||
particles = "DemonFBSmokeParticle";
|
||||
};
|
||||
|
||||
datablock GrenadeProjectileData(DemonFireball)
|
||||
{
|
||||
projectileShapeName = "plasmabolt.dts";
|
||||
emitterDelay = -1;
|
||||
directDamage = 0.0;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 0.4;
|
||||
damageRadius = 5.0; // z0dd - ZOD, 8/13/02. Was 20.0
|
||||
radiusDamageType = $DamageType::zombie;
|
||||
kickBackStrength = 1500;
|
||||
|
||||
explosion = "PlasmaBoltExplosion";
|
||||
underwaterExplosion = "PlasmaBoltExplosion";
|
||||
velInheritFactor = 0;
|
||||
splash = PlasmaSplash;
|
||||
depthTolerance = 100.0;
|
||||
|
||||
baseEmitter = DemonFBSmokeEmitter;
|
||||
bubbleEmitter = DemonFBSmokeEmitter;
|
||||
|
||||
grenadeElasticity = 0;
|
||||
grenadeFriction = 0.4;
|
||||
armingDelayMS = -1; // z0dd - ZOD, 4/14/02. Was 2000
|
||||
|
||||
gravityMod = 0.4; // z0dd - ZOD, 5/18/02. Make mortar projectile heavier, less floaty
|
||||
muzzleVelocity = 50.0; // z0dd - ZOD, 8/13/02. More velocity to compensate for higher gravity. Was 63.7
|
||||
drag = 0;
|
||||
sound = PlasmaProjectileSound;
|
||||
|
||||
hasLight = true;
|
||||
lightRadius = 10;
|
||||
lightColor = "1 0.75 0.25";
|
||||
|
||||
hasLightUnderwaterColor = true;
|
||||
underWaterLightColor = "1 0.75 0.25";
|
||||
};
|
||||
|
||||
datablock GrenadeProjectileData(DemonFlamingFireball) {
|
||||
projectileShapeName = "plasmabolt.dts";
|
||||
emitterDelay = -1;
|
||||
directDamage = 0.0;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 0.4;
|
||||
damageRadius = 5.0; // z0dd - ZOD, 8/13/02. Was 20.0
|
||||
radiusDamageType = $DamageType::Fire;
|
||||
kickBackStrength = 1500;
|
||||
|
||||
explosion = "PlasmaBoltExplosion";
|
||||
underwaterExplosion = "PlasmaBoltExplosion";
|
||||
velInheritFactor = 0;
|
||||
splash = PlasmaSplash;
|
||||
depthTolerance = 100.0;
|
||||
|
||||
baseEmitter = ThrowerBaseEmitter;
|
||||
bubbleEmitter = ThrowerBaseEmitter;
|
||||
|
||||
grenadeElasticity = 0;
|
||||
grenadeFriction = 0.4;
|
||||
armingDelayMS = -1; // z0dd - ZOD, 4/14/02. Was 2000
|
||||
|
||||
gravityMod = 0.4; // z0dd - ZOD, 5/18/02. Make mortar projectile heavier, less floaty
|
||||
muzzleVelocity = 50.0; // z0dd - ZOD, 8/13/02. More velocity to compensate for higher gravity. Was 63.7
|
||||
drag = 0;
|
||||
sound = PlasmaProjectileSound;
|
||||
|
||||
hasLight = true;
|
||||
lightRadius = 10;
|
||||
lightColor = "1 0.75 0.25";
|
||||
|
||||
hasLightUnderwaterColor = true;
|
||||
underWaterLightColor = "1 0.75 0.25";
|
||||
};
|
||||
|
||||
datablock StaticShapeData(DeployedZSpawnBase) : StaticShapeDamageProfile {
|
||||
className = "lightbase";
|
||||
shapeFile = "pack_deploy_sensor_motion.dts";
|
||||
|
|
@ -292,7 +75,9 @@ datablock ItemData(ZSpawnDeployable) {
|
|||
function ZSpawnDeployableImage::testObjectTooClose(%item) {
|
||||
return "";
|
||||
}
|
||||
|
||||
function ZSpawnDeployableImage::testNoTerrainFound(%item) {}
|
||||
|
||||
function ZSpawnDeployable::onPickup(%this, %obj, %shape, %amount) {}
|
||||
|
||||
function ZSpawnDeployableImage::onDeploy(%item, %plyr, %slot) {
|
||||
|
|
@ -300,10 +85,12 @@ function ZSpawnDeployableImage::onDeploy(%item, %plyr, %slot) {
|
|||
|
||||
%playerVector = vectorNormalize(-1 * getWord(%plyr.getEyeVector(),1) SPC getWord(%plyr.getEyeVector(),0) SPC "0");
|
||||
|
||||
if (vAbs(floorVec(%item.surfaceNrm,100)) $= "0 0 1")
|
||||
if (vAbs(floorVec(%item.surfaceNrm,100)) $= "0 0 1") {
|
||||
%item.surfaceNrm2 = %playerVector;
|
||||
else
|
||||
}
|
||||
else {
|
||||
%item.surfaceNrm2 = vectorNormalize(vectorCross(%item.surfaceNrm,"0 0 -1"));
|
||||
}
|
||||
|
||||
%rot = fullRot(%item.surfaceNrm,%item.surfaceNrm2);
|
||||
|
||||
|
|
@ -315,8 +102,9 @@ function ZSpawnDeployableImage::onDeploy(%item, %plyr, %slot) {
|
|||
%deplObj.setTransform(%item.surfacePt SPC %rot);
|
||||
|
||||
// set the recharge rate right away
|
||||
if (%deplObj.getDatablock().rechargeRate)
|
||||
if (%deplObj.getDatablock().rechargeRate) {
|
||||
%deplObj.setRechargeRate(%deplObj.getDatablock().rechargeRate);
|
||||
}
|
||||
|
||||
// set team, owner, and handle
|
||||
%deplObj.team = %plyr.client.Team;
|
||||
|
|
@ -324,8 +112,9 @@ function ZSpawnDeployableImage::onDeploy(%item, %plyr, %slot) {
|
|||
%deplObj.light.lightBase = %deplObj;
|
||||
|
||||
// set the sensor group if it needs one
|
||||
if (%deplObj.getTarget() != -1)
|
||||
if (%deplObj.getTarget() != -1) {
|
||||
setTargetSensorGroup(%deplObj.getTarget(), %plyr.client.team);
|
||||
}
|
||||
|
||||
// place the deployable in the MissionCleanup/Deployables group (AI reasons)
|
||||
addToDeployGroup(%deplObj);
|
||||
|
|
@ -345,10 +134,10 @@ function ZSpawnDeployableImage::onDeploy(%item, %plyr, %slot) {
|
|||
%deplObj.playThread($AmbientThread,"ambient");
|
||||
|
||||
// take the deployable off the player's back and out of inventory
|
||||
if(!%plyr.client.isSuperAdmin) {
|
||||
%plyr.unmountImage(%slot);
|
||||
%plyr.decInventory(%item.item, 1);
|
||||
}
|
||||
if(!%plyr.client.isSuperAdmin) {
|
||||
%plyr.unmountImage(%slot);
|
||||
%plyr.decInventory(%item.item, 1);
|
||||
}
|
||||
|
||||
// set power frequency
|
||||
%deplObj.powerFreq = %plyr.powerFreq;
|
||||
|
|
@ -356,84 +145,92 @@ function ZSpawnDeployableImage::onDeploy(%item, %plyr, %slot) {
|
|||
// Power object
|
||||
checkPowerObject(%deplObj);
|
||||
|
||||
switch(%plyr.packset) {
|
||||
case 0:
|
||||
%deplobj.ZType = 1;
|
||||
case 1:
|
||||
%deplobj.ZType = 2;
|
||||
case 2:
|
||||
%deplobj.ZType = 3;
|
||||
%deplobj.numZ = 2;
|
||||
case 3:
|
||||
%deplobj.ZType = 4;
|
||||
case 4:
|
||||
%deplobj.ZType = 5;
|
||||
case 5:
|
||||
%deplobj.ZType = 6;
|
||||
case 6:
|
||||
%deplobj.ZType = 9;
|
||||
case 7:
|
||||
%deplobj.ZType = 11;
|
||||
case 8:
|
||||
%deplobj.ZType = 12;
|
||||
case 9:
|
||||
%deplobj.ZType = 13;
|
||||
case 10:
|
||||
%deplobj.ZType = 14;
|
||||
case 11:
|
||||
%deplobj.ZType = 15;
|
||||
case 12:
|
||||
%deplobj.ZType = 16;
|
||||
case 13:
|
||||
%deplobj.ZType = 17;
|
||||
}
|
||||
switch(%plyr.packset) {
|
||||
case 0:
|
||||
%deplobj.ZType = 1;
|
||||
case 1:
|
||||
%deplobj.ZType = 2;
|
||||
case 2:
|
||||
%deplobj.ZType = 3;
|
||||
%deplobj.numZ = 2;
|
||||
case 3:
|
||||
%deplobj.ZType = 4;
|
||||
case 4:
|
||||
%deplobj.ZType = 5;
|
||||
case 5:
|
||||
%deplobj.ZType = 6;
|
||||
case 6:
|
||||
%deplobj.ZType = 9;
|
||||
case 7:
|
||||
%deplobj.ZType = 11;
|
||||
case 8:
|
||||
%deplobj.ZType = 12;
|
||||
case 9:
|
||||
%deplobj.ZType = 13;
|
||||
case 10:
|
||||
%deplobj.ZType = 14;
|
||||
case 11:
|
||||
%deplobj.ZType = 15;
|
||||
case 12:
|
||||
%deplobj.ZType = 16;
|
||||
case 13:
|
||||
%deplobj.ZType = 17;
|
||||
}
|
||||
%deplobj.spawnTypeSet = %plyr.expertset;
|
||||
|
||||
return %deplObj;
|
||||
}
|
||||
|
||||
function DeployedZSpawnBase::onDestroyed(%this,%obj,%prevState) {
|
||||
if (%obj.isRemoved)
|
||||
if (%obj.isRemoved) {
|
||||
return;
|
||||
}
|
||||
%obj.isRemoved = true;
|
||||
Parent::onDestroyed(%this,%obj,%prevState);
|
||||
$TeamDeployedCount[%obj.team, ZSpawnDeployable]--;
|
||||
remDSurface(%obj);
|
||||
%obj.schedule(500, "delete");
|
||||
if (%obj.ZCloop !$= "")
|
||||
Cancel(%obj.ZCLoop);
|
||||
if (%obj.ZCloop !$= "") {
|
||||
Cancel(%obj.ZCLoop);
|
||||
}
|
||||
}
|
||||
|
||||
function DeployedZSpawnBase::disassemble(%data,%plyr,%obj) {
|
||||
if (%obj.ZCloop !$= "")
|
||||
Cancel(%obj.ZCLoop);
|
||||
if (%obj.ZCloop !$= "") {
|
||||
Cancel(%obj.ZCLoop);
|
||||
}
|
||||
disassemble(%data,%plyr,%obj);
|
||||
}
|
||||
|
||||
function ZSpawnDeployableImage::onMount(%data, %obj, %node) {
|
||||
%obj.hasZSpawn = true;
|
||||
%obj.expertset = 0;
|
||||
%obj.hasZSpawn = true;
|
||||
%obj.expertset = 0;
|
||||
}
|
||||
|
||||
function ZSpawnDeployableImage::onUnmount(%data, %obj, %node) {
|
||||
%obj.hasZSpawn = "";
|
||||
%obj.hasZSpawn = "";
|
||||
}
|
||||
|
||||
function DeployedZSpawnBase::onGainPowerEnabled(%data,%obj) {
|
||||
if(%obj.spawnTypeSet == 1)
|
||||
%obj.numz = 0;
|
||||
if (%obj.ZCloop !$= "")
|
||||
Cancel(%obj.ZCLoop);
|
||||
%obj.ZCLoop = schedule(1000, 0, "ZcreateLoop", %obj);
|
||||
Parent::onGainPowerEnabled(%data,%obj);
|
||||
if(%obj.spawnTypeSet == 1) {
|
||||
%obj.numz = 0;
|
||||
}
|
||||
if (%obj.ZCloop !$= "") {
|
||||
Cancel(%obj.ZCLoop);
|
||||
}
|
||||
%obj.ZCLoop = schedule(1000, 0, "ZcreateLoop", %obj);
|
||||
Parent::onGainPowerEnabled(%data,%obj);
|
||||
}
|
||||
|
||||
function DeployedZSpawnBase::onLosePowerDisabled(%data,%obj) {
|
||||
if (%obj.ZCloop !$= "")
|
||||
Cancel(%obj.ZCLoop);
|
||||
Parent::onLosePowerDisabled(%data,%obj);
|
||||
if (%obj.ZCloop !$= "") {
|
||||
Cancel(%obj.ZCLoop);
|
||||
}
|
||||
Parent::onLosePowerDisabled(%data,%obj);
|
||||
}
|
||||
|
||||
//Phantom139: Personal note, rework this at some point using a built in datablock function and
|
||||
// a simtimer such that we can remove that eval statement.
|
||||
function ZcreateLoop(%obj) {
|
||||
if(isObject(%obj)) {
|
||||
if(%obj.timedout == 0){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue