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