Merge In Main Server

The current version has many crashes for clients trying to connect to
the server. Reverting back to 3.8 main server.
This commit is contained in:
Robert Fritzen 2014-05-29 10:06:32 -05:00
parent 6864dee4f5
commit f950c4d026
23 changed files with 3858 additions and 514 deletions

View file

@ -33,7 +33,50 @@ $EditTool::PadModes[18] = "DeployedCrate12";
$EditTool::PadModes[19] = "DeployedDecoration6";
$EditTool::PadModes[20] = "DeployedDecoration16";
datablock ItemData(EditTool) {
datablock LinearFlareProjectileData(EditorBolt)
{
emitterDelay = -1;
directDamage = 0;
directDamageType = $DamageType::Default;
kickBackStrength = 0.0;
bubbleEmitTime = 1.0;
sound = PlasmaProjectileSound;
velInheritFactor = 0.5;
explosion = "BlasterExplosion";
splash = BlasterSplash;
grenadeElasticity = 0.998;
grenadeFriction = 0.0;
armingDelayMS = 500;
muzzleVelocity = 100.0;
drag = 0.05;
gravityMod = 0.0;
dryVelocity = 100.0;
wetVelocity = 80.0;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 6000;
lifetimeMS = 6000;
scale = "1 1 1";
numFlares = 48;
flareColor = "1 0 0";
flareModTexture = "special/shrikeBoltCross";
flareBaseTexture = "special/shrikeBolt";
};
datablock ItemData(EditTool)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_disc.dts";
@ -45,7 +88,8 @@ datablock ItemData(EditTool) {
pickUpName = "a Editing Tool";
};
datablock ShapeBaseImageData(EditGunImage) {
datablock ShapeBaseImageData(EditGunImage)
{
className = WeaponImage;
shapeFile = "weapon_disc.dts";
item = EditTool;
@ -54,8 +98,9 @@ datablock ShapeBaseImageData(EditGunImage) {
usesEnergy = true;
minEnergy = 0.01;
//projectile = EditorBolt;
//projectileType = LinearFlareProjectile;
projectile = EditorBolt;
projectileType = LinearFlareProjectile;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
@ -100,37 +145,6 @@ datablock ShapeBaseImageData(EditGunImage) {
stateTransitionOnTimeout[6] = "Ready";
};
//Phantom139: I'll take a datablock over a function any-day...
function EditGunImage::onFire(%data, %obj, %slot) {
//RAYCAST
%vector = %obj.getMuzzleVector(%slot);
%mp = %obj.getMuzzlePoint(%slot);
%targetpos = vectoradd(%mp,vectorscale(%vector, 2500));
%targ = containerraycast(%mp, %targetpos, $typemasks::staticshapeobjecttype, %obj);
%targetObject = getword(%targ, 0);
if(%targetObject == 0) {
BottomPrint(%obj.client, "No Object Found", 2, 2);
return;
}
if (!Deployables.isMember(%targetObject)) {
messageclient(%obj.client, 'MsgClient', "\c2TextureTool: Error, Map Object Selected.");
return;
}
//APPLY EDITS
switch$(%obj.EditPMode) {
case 0:
EToolswaping(%targetObject, %obj, 0, %obj.EditSMode);
case 1:
EToolswaping(%targetObject, %obj, 1, %obj.EditSMode);
case 2:
EToolTurrets(%targetObject, %obj, %obj.EditSMode);
case 3:
EToolCloakandFade(%targetObject, %obj, %obj.EditSMode);
case 4:
EToolDeleting(%targetObject, %obj, %obj.EditSMode);
}
}
function EditGunImage::onMount(%this, %obj, %slot) {
Parent::onMount(%this, %obj, %slot);
DispEditorToolInfo(%obj);
@ -143,58 +157,59 @@ function EditGunImage::onMount(%this, %obj, %slot) {
%obj.UsingEditTool = true;
}
function EditGunImage::onunmount(%this,%obj,%slot) {
Parent::onUnmount(%this, %obj, %slot);
%obj.UsingEditTool = false;
function EditGunImage::onunmount(%this,%obj,%slot)
{
Parent::onUnmount(%this, %obj, %slot);
%obj.UsingEditTool = false;
}
function DispEditorToolInfo(%obj) {
switch(%obj.EditPMode) {
case 0:
%primary = "Pad Swapping";
switch(%obj.EditSMode) {
case 0:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: Blue Pad - [LSB] - MSB<spop>", 5, 3);
case 1:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: LSB - [MSB] - Walkway<spop>", 5, 3);
case 2:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: MSB - [Walkway] - Medium Floor <spop>", 5, 3);
case 3:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: Walkway - [Medium Floor] - Dark Pad<spop>", 5, 3);
case 4:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: Medium Floor - [Dark Pad] - V-Pad<spop>", 5, 3);
case 5:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: Dark Pad - [V-Pad] - C.1 Backpack<spop>", 5, 3);
case 6:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: V-Pad - [C.1 Backpack] - C.2 Small Containment<spop>", 5, 3);
case 7:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.1 Backpack - [C.2 Small Containment] - C.3 Large Containment<spop>", 5, 3);
case 8:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.2 Small Containment - [C.3 Large Containment] - C.4 Compressor<spop>", 5, 3);
case 9:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.3 Large Containment - [C.4 Compressor] - C.5 Tubes<spop>", 5, 3);
case 10:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.4 Compressor - [C.5 Tubes] - C.6 Quantium Bat.<spop>", 5, 3);
case 11:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.5 Tubes - [C.6 Quantium Bat.] - C.7 Proton Acc.<spop>", 5, 3);
case 12:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.6 Quantium Bat. - [C.7 Proton Acc.] - C.8 Cargo Crate<spop>", 5, 3);
case 13:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.7 Proton Acc. - [C.8 Cargo Crate] - C.9 Mag Cooler<spop>", 5, 3);
case 14:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.8 Cargo Crate - [C.9 Mag Cooler] - C.10 Recycle Unit<spop>", 5, 3);
case 15:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.9 Mag Cooler - [C.10 Recycle Unit] - C.11 Fuel Canister<spop>", 5, 3);
case 16:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.10 Recycle Unit - [C.11 Fuel Canister] - C.12 Wooden Box<spop>", 5, 3);
case 17:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.11 Fuel Canister - [C.12 Wooden Box] - C.13 Plasma Router<spop>", 5, 3);
case 18:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.12 Wooden Box - [C.13 Plasma Router] - Statue Base<spop>", 5, 3);
case 19:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.13 Plasma Router - [Statue Base] - Blue Pad<spop>", 5, 3);
case 20:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: Statue Base - [Blue Pad] - LSB<spop>", 5, 3);
switch(%obj.EditPMode) {
case 0:
%primary = "Pad Swapping";
switch(%obj.EditSMode) {
case 0:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: Blue Pad - [LSB] - MSB<spop>", 5, 3);
case 1:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: LSB - [MSB] - Walkway<spop>", 5, 3);
case 2:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: MSB - [Walkway] - Medium Floor <spop>", 5, 3);
case 3:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: Walkway - [Medium Floor] - Dark Pad<spop>", 5, 3);
case 4:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: Medium Floor - [Dark Pad] - V-Pad<spop>", 5, 3);
case 5:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: Dark Pad - [V-Pad] - C.1 Backpack<spop>", 5, 3);
case 6:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: V-Pad - [C.1 Backpack] - C.2 Small Containment<spop>", 5, 3);
case 7:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.1 Backpack - [C.2 Small Containment] - C.3 Large Containment<spop>", 5, 3);
case 8:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.2 Small Containment - [C.3 Large Containment] - C.4 Compressor<spop>", 5, 3);
case 9:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.3 Large Containment - [C.4 Compressor] - C.5 Tubes<spop>", 5, 3);
case 10:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.4 Compressor - [C.5 Tubes] - C.6 Quantium Bat.<spop>", 5, 3);
case 11:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.5 Tubes - [C.6 Quantium Bat.] - C.7 Proton Acc.<spop>", 5, 3);
case 12:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.6 Quantium Bat. - [C.7 Proton Acc.] - C.8 Cargo Crate<spop>", 5, 3);
case 13:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.7 Proton Acc. - [C.8 Cargo Crate] - C.9 Mag Cooler<spop>", 5, 3);
case 14:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.8 Cargo Crate - [C.9 Mag Cooler] - C.10 Recycle Unit<spop>", 5, 3);
case 15:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.9 Mag Cooler - [C.10 Recycle Unit] - C.11 Fuel Canister<spop>", 5, 3);
case 16:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.10 Recycle Unit - [C.11 Fuel Canister] - C.12 Wooden Box<spop>", 5, 3);
case 17:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.11 Fuel Canister - [C.12 Wooden Box] - C.13 Plasma Router<spop>", 5, 3);
case 18:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.12 Wooden Box - [C.13 Plasma Router] - Statue Base<spop>", 5, 3);
case 19:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: C.13 Plasma Router - [Statue Base] - Blue Pad<spop>", 5, 3);
case 20:
commandToClient( %obj.client, 'BottomPrint', "<spush><font:Tempus Sans ITC:20>[{Manipulator Tool}] - Phantom139 \n Mine: [Pad Swap] - FF Swap - Barrel Swap - Cloak/Fade - Delete Objects \n <font:Tempus Sans ITC:18> Grenade: Statue Base - [Blue Pad] - LSB<spop>", 5, 3);
}
case 1:
%primary = "Force-Field Swapping";
@ -278,44 +293,57 @@ function DispEditorToolInfo(%obj) {
}
function ChangeEditGunMode(%this, %data, %PriSec) { //This Is Easier To use
if(%PriSec == 1) { //Primary
if (!(getSimTime() > (%this.mineModeTime + 100))) {
return;
if(%PriSec == 1) { //Primary
if (!(getSimTime() > (%this.mineModeTime + 100)))
return;
%this.mineModeTime = getSimTime();
%this.EditPMode++;
%this.EditSMode = 0; //Reset Secondary Mode TO Prevent Errors
if (%this.EditPMode > 4) {
%this.EditPMode = 0;
}
DispEditorToolInfo(%this);
return;
}
else { //Secondary
if (!(getSimTime() > (%this.grenadeModeTime + 100)))
return;
%this.grenadeModeTime = getSimTime();
%this.EditSMode++;
//Check Primaries
if(%this.EditPMode == 0 && %this.EditSMode > 20) {
%this.EditSMode = 0;
}
else if(%this.EditPMode == 1 && %this.EditSMode > 20) {
%this.EditSMode = 0;
}
else if(%this.EditPMode == 2 && %this.EditSMode > 4) {
%this.EditSMode = 0;
}
else if(%this.EditPMode == 3 && %this.EditSMode > 3) {
%this.EditSMode = 0;
}
else if(%this.EditPMode == 4 && %this.EditSMode > 1) {
%this.EditSMode = 0;
}
DispEditorToolInfo(%this);
return;
}
}
function EditorBolt::onCollision(%data,%projectile,%targetObject,%modifier,%position,%normal) {
switch$(%projectile.sourceObject.EditPMode) {
case 0:
EToolswaping(%targetObject,%projectile.sourceObject,0,%projectile.sourceObject.EditSMode);
case 1:
EToolswaping(%targetObject,%projectile.sourceObject,1,%projectile.sourceObject.EditSMode);
case 2:
EToolTurrets(%targetObject,%projectile.sourceObject,%projectile.sourceObject.EditSMode);
case 3:
EToolCloakandFade(%targetObject,%projectile.sourceObject,%projectile.sourceObject.EditSMode);
case 4:
EToolDeleting(%targetObject,%projectile.sourceObject,%projectile.sourceObject.EditSMode);
}
%this.mineModeTime = getSimTime();
%this.EditPMode++;
%this.EditSMode = 0; //Reset Secondary Mode TO Prevent Errors
if (%this.EditPMode > 4) {
%this.EditPMode = 0;
}
DispEditorToolInfo(%this);
return;
}
else { //Secondary
if (!(getSimTime() > (%this.grenadeModeTime + 100))) {
return;
}
%this.grenadeModeTime = getSimTime();
%this.EditSMode++;
//Check Primaries
if(%this.EditPMode == 0 && %this.EditSMode > 20) {
%this.EditSMode = 0;
}
else if(%this.EditPMode == 1 && %this.EditSMode > 20) {
%this.EditSMode = 0;
}
else if(%this.EditPMode == 2 && %this.EditSMode > 4) {
%this.EditSMode = 0;
}
else if(%this.EditPMode == 3 && %this.EditSMode > 3) {
%this.EditSMode = 0;
}
else if(%this.EditPMode == 4 && %this.EditSMode > 1) {
%this.EditSMode = 0;
}
DispEditorToolInfo(%this);
return;
}
}
//Editor Tool Functioning
@ -323,42 +351,42 @@ function ChangeEditGunMode(%this, %data, %PriSec) { //This Is Easier To use
//
//
function EToolDeleting(%tobj,%plyr,%Mode) {
%cl = %plyr.client;
if ( %tobj.ownerGUID != %cl.guid) {
if (!%cl.isadmin && !%cl.issuperadmin){
if (%tobj.ownerGUID !$=""){
messageclient(%cl, 'MsgClient', "\c2TextureTool: Error, You Do Not Own This Piece.");
return;
}
}
%cl=%plyr.client;
if ( %tobj.ownerGUID != %cl.guid){
if (!%cl.isadmin && !%cl.issuperadmin){
if (%tobj.ownerGUID !$=""){
messageclient(%cl, 'MsgClient', "\c2TextureTool: Error, You Do Not Own This Piece.");
return;
}
}
}
if (%tobj.squaresize !$="") {
messageclient(%cl, 'MsgClient', "\c2TextureTool: Error, Unknown Object Selected.");
return;
messageclient(%cl, 'MsgClient', "\c2TextureTool: Error, Unknown Object Selected.");
return;
}
if (!Deployables.isMember(%tobj)) {
messageclient(%cl, 'MsgClient', "\c2TextureTool: Error, Map Object Selected.");
return;
messageclient(%cl, 'MsgClient', "\c2TextureTool: Error, Map Object Selected.");
return;
}
switch(%Mode) {
case 0:
messageclient(%cl, 'MsgClient', "\c2TextureTool: Deleting Object.");
%tobj.getDataBlock().disassemble(%plyr, %tobj); //this found in constructionTool.cs
case 1:
messageclient(%cl, 'MsgClient', "\c2TextureTool: Cascade Deleting Object (All Conective Objects).");
cascade(%tobj,true);
case 0:
messageclient(%cl, 'MsgClient', "\c2TextureTool: Deleting Object.");
%tobj.getDataBlock().disassemble(%plyr, %tobj); //this found in constructionTool.cs
case 1:
messageclient(%cl, 'MsgClient', "\c2TextureTool: Cascade Deleting Object (All Conective Objects).");
cascade(%tobj,true);
}
}
//
function EToolCloakandFade(%tobj,%plyr,%Mode) {
%cl = %plyr.client;
if ( %tobj.ownerGUID != %cl.guid) {
if (!%cl.isadmin && !%cl.issuperadmin){
if (%tobj.ownerGUID !$=""){
messageclient(%cl, 'MsgClient', "\c2TextureTool: Error, You Do Not Own This Piece.");
return;
}
}
%cl=%plyr.client;
if ( %tobj.ownerGUID != %cl.guid){
if (!%cl.isadmin && !%cl.issuperadmin){
if (%tobj.ownerGUID !$=""){
messageclient(%cl, 'MsgClient', "\c2TextureTool: Error, You Do Not Own This Piece.");
return;
}
}
}
if (%tobj.squaresize !$="") {
messageclient(%cl, 'MsgClient', "\c2TextureTool: Error, Unknown Object Selected.");
@ -387,14 +415,14 @@ function EToolCloakandFade(%tobj,%plyr,%Mode) {
}
//
function EToolTurrets(%tobj,%plyr,%Mode) {
%cl = %plyr.client;
if ( %tobj.ownerGUID != %cl.guid) {
if (!%cl.isadmin && !%cl.issuperadmin){
if (%tobj.ownerGUID !$=""){
messageclient(%cl, 'MsgClient', "\c2TextureTool: Error, You Do Not Own This Piece.");
return;
}
}
%cl=%plyr.client;
if ( %tobj.ownerGUID != %cl.guid){
if (!%cl.isadmin && !%cl.issuperadmin){
if (%tobj.ownerGUID !$=""){
messageclient(%cl, 'MsgClient', "\c2TextureTool: Error, You Do Not Own This Piece.");
return;
}
}
}
if (%tobj.squaresize !$="") {
messageclient(%cl, 'MsgClient', "\c2TextureTool: Error, Unknown Object Selected.");

View file

@ -189,61 +189,63 @@ function BOVImage::onFire(%data, %obj, %node) {
}
function BOVhit::onCollision(%data, %projectile, %targetObject, %modifier, %position, %normal) {
if(%targetObject.isBoss) {
%targetObject.playShieldEffect("1 1 1");
MessageClient(%projectile.sourceObject.client, 'MsgDeflect', "The Boss Deflects The Swipe");
return;
}
if(%targetObject.rapierShield) {
MessageClient(%projectile.sourceObject.client, 'MsgDeflect', "The Target Is Immortal.");
return;
}
%source = %projectile.SourceObject;
%hitObj = %targetObject;
if(%targetObject.isBoss) {
%targetObject.playShieldEffect("1 1 1");
MessageClient(%projectile.sourceObject.client, 'MsgDeflect', "The Boss Deflects The Swipe");
return;
}
if(%targetObject.rapierShield) {
MessageClient(%projectile.sourceObject.client, 'MsgDeflect', "The Target Is Immortal.");
return;
}
%source = %projectile.SourceObject;
%hitObj = %targetObject;
%muzzlePos = %source.getMuzzlePoint(0);
%muzzleVec = %source.getMuzzleVector(0);
%muzzlePos = %source.getMuzzlePoint(0);
%muzzleVec = %source.getMuzzleVector(0);
// extra damage for head shot or less for close range shots
if(!(%hitObj.getType() & ($TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType)) && (%hitObj.getDataBlock().getClassName() $= "PlayerData")) {
if(%hitObj.getDataBlock().getClassName() $= "PlayerData") {
// Now we see if we hit from behind...
%forwardVec = %hitobj.getForwardVector();
%objDir2D = getWord(%forwardVec, 0) @ " " @ getWord(%forwardVec,1) @ " " @ "0.0";
%objPos = %hitObj.getPosition();
%dif = VectorSub(%objPos, %muzzlePos);
%dif = getWord(%dif, 0) @ " " @ getWord(%dif, 1) @ " 0";
%dif = VectorNormalize(%dif);
%dot = VectorDot(%dif, %objDir2D);
// 120 Deg angle test...
// 1.05 == 60 degrees in radians
if (%dot >= mCos(1.05)) {
// Rear hit
if(%source.isAlive()) {
// extra damage for head shot or less for close range shots
if(!(%hitObj.getType() & ($TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType)) &&
(%hitObj.getDataBlock().getClassName() $= "PlayerData")) {
if(%hitObj.getDataBlock().getClassName() $= "PlayerData") {
// Now we see if we hit from behind...
%forwardVec = %hitobj.getForwardVector();
%objDir2D = getWord(%forwardVec, 0) @ " " @ getWord(%forwardVec,1) @ " " @ "0.0";
%objPos = %hitObj.getPosition();
%dif = VectorSub(%objPos, %muzzlePos);
%dif = getWord(%dif, 0) @ " " @ getWord(%dif, 1) @ " 0";
%dif = VectorNormalize(%dif);
%dot = VectorDot(%dif, %objDir2D);
// 120 Deg angle test...
// 1.05 == 60 degrees in radians
if (%dot >= mCos(1.05)) {
// Rear hit
%source.applyRepair("0.45"); //we get a bonus repair for rear
if(%source.team == %hitObj.team && !$TeamDamage) {
ServerPlay3d(BOVHitSound, %targetObject.getPosition());
return; //stops shredding
}
%source.cannotuseBOV = 1;
if(!%hitObj.IsinvincibleC) {
DoBOVRearKill(%source, %hitObj, 0);
}
return;
}
if(%source.team == %hitObj.team && !$TeamDamage) {
ServerPlay3d(BOVHitSound, %targetObject.getPosition());
return; //stops shredding
}
%source.cannotuseBOV = 1;
if(!%hitObj.IsinvincibleC) {
DoBOVRearKill(%source, %hitObj, 0);
}
return;
}
}
ServerPlay3d(BOVHitSound, %targetObject.getPosition());
//The Blade Only Works On Players
%targetObject.damage(%projectile.sourceObject, %position, %data.directDamage, %data.directDamageType);
if(%source.isAlive()) {
%source.applyRepair("0.15"); //15%
}
if(%targetObject.client !$= "") { //a Player.. goodie
if(%targetObject.getState() $= "dead") {
MessageAll('MessageAll', "\c0"@%targetObject.client.namebase@" was stabbed by "@%source.client.namebase@"'s Sword.");
}
}
ServerPlay3d(BOVHitSound, %targetObject.getPosition());
//The Blade Only Works On Players
%targetObject.damage(%projectile.sourceObject, %position, %data.directDamage, %data.directDamageType);
if(isObject(%source) || %source.getState() !$= "dead") {
%source.applyRepair("0.15"); //15%
}
if(%targetObject.client !$= "") { //a Player.. goodie
if(%targetObject.getState() $= "dead") {
MessageAll('MessageAll', "\c0"@%targetObject.client.namebase@" was stabbed by "@%source.client.namebase@"'s Sword.");
}
}
}
}

View file

@ -44,6 +44,110 @@ datablock AudioProfile(ShockLanceMissSound)
//--------------------------------------------------------------------------
// Particle data
//--------------------------------------------------------------------------
datablock ParticleData(ShockParticle)
{
dragCoeffiecient = 0.0;
gravityCoefficient = -0.0;
inheritedVelFactor = 0.0;
lifetimeMS = 1000;
lifetimeVarianceMS = 0;
textureName = "particleTest";
useInvAlpha = false;
spinRandomMin = -100.0;
spinRandomMax = 100.0;
numParts = 50;
animateTexture = true;
framesPerSec = 26;
animTexName[00] = "special/Explosion/exp_0002";
animTexName[01] = "special/Explosion/exp_0004";
animTexName[02] = "special/Explosion/exp_0006";
animTexName[03] = "special/Explosion/exp_0008";
animTexName[04] = "special/Explosion/exp_0010";
animTexName[05] = "special/Explosion/exp_0012";
animTexName[06] = "special/Explosion/exp_0014";
animTexName[07] = "special/Explosion/exp_0016";
animTexName[08] = "special/Explosion/exp_0018";
animTexName[09] = "special/Explosion/exp_0020";
animTexName[10] = "special/Explosion/exp_0022";
animTexName[11] = "special/Explosion/exp_0024";
animTexName[12] = "special/Explosion/exp_0026";
animTexName[13] = "special/Explosion/exp_0028";
animTexName[14] = "special/Explosion/exp_0030";
animTexName[15] = "special/Explosion/exp_0032";
animTexName[16] = "special/Explosion/exp_0034";
animTexName[17] = "special/Explosion/exp_0036";
animTexName[18] = "special/Explosion/exp_0038";
animTexName[19] = "special/Explosion/exp_0040";
animTexName[20] = "special/Explosion/exp_0042";
animTexName[21] = "special/Explosion/exp_0044";
animTexName[22] = "special/Explosion/exp_0046";
animTexName[23] = "special/Explosion/exp_0048";
animTexName[24] = "special/Explosion/exp_0050";
animTexName[25] = "special/Explosion/exp_0052";
colors[0] = "0.5 0.5 1.0 1.0";
colors[1] = "0.5 0.5 1.0 0.5";
colors[2] = "0.25 0.25 1.0 0.0";
sizes[0] = 0.5;
sizes[1] = 0.5;
sizes[2] = 0.5;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(ShockParticleEmitter)
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 0.25;
velocityVariance = 0.0;
thetaMin = 0.0;
thetaMax = 30.0;
particles = "ShockParticle";
};
//--------------------------------------------------------------------------
// Shockwave
//--------------------------------------------------------------------------
datablock ShockwaveData( ShocklanceHit )
{
width = 0.5;
numSegments = 20;
numVertSegments = 1;
velocity = 0.25;
acceleration = 1.0;
lifetimeMS = 600;
height = 0.1;
verticalCurve = 0.5;
mapToTerrain = false;
renderBottom = false;
orientToNormal = true;
texture[0] = "special/shocklanceHit";
texture[1] = "special/gradient";
texWrap = 3.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
colors[0] = "1.0 1.0 1.0 1.0";
colors[1] = "1.0 1.0 1.0 0.5";
colors[2] = "1.0 1.0 1.0 0.0";
};
//--------------------------------------
// Projectile
@ -86,6 +190,43 @@ datablock ShockLanceProjectileData(BasicShocker)
emitter[0] = ShockParticleEmitter;
};
datablock ShockLanceProjectileData(GoLShocker) {
directDamage = 0.45;
radiusDamageType = $DamageType::ShockLance;
kickBackStrength = 2500;
velInheritFactor = 0;
sound = "";
zapDuration = 1.0;
impulse = 1800;
boltLength = 50.0;
extension = 50.0; // script variable indicating distance you can shock people from
lightningFreq = 25.0;
lightningDensity = 3.0;
lightningAmp = 0.25;
lightningWidth = 0.05;
shockwave = ShocklanceHit;
boltSpeed[0] = 2.0;
boltSpeed[1] = -0.5;
texWrap[0] = 1.5;
texWrap[1] = 1.5;
startWidth[0] = 0.3;
endWidth[0] = 0.6;
startWidth[1] = 0.3;
endWidth[1] = 0.6;
texture[0] = "special/shockLightning01";
texture[1] = "special/shockLightning02";
texture[2] = "special/shockLightning03";
texture[3] = "special/ELFBeam";
emitter[0] = ShockParticleEmitter;
};
datablock ShockLanceProjectileData(S3Shocker) {
directDamage = 0.50;
radiusDamageType = $DamageType::ShockLance;