From e71af2826247d797ec47e67c8a2b6a0463bababc Mon Sep 17 00:00:00 2001 From: RezecNoble Date: Tue, 8 Oct 2024 20:32:07 -0400 Subject: [PATCH 1/2] GCW Space Battle Fix --- .../systems/gcw/space/battle_spawner.java | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/sku.0/sys.server/compiled/game/script/systems/gcw/space/battle_spawner.java b/sku.0/sys.server/compiled/game/script/systems/gcw/space/battle_spawner.java index 9a66e6e12..5ce53d150 100755 --- a/sku.0/sys.server/compiled/game/script/systems/gcw/space/battle_spawner.java +++ b/sku.0/sys.server/compiled/game/script/systems/gcw/space/battle_spawner.java @@ -81,7 +81,7 @@ public class battle_spawner extends script.base_class { public float customPveBattleModifier = DEFAULT_PVE_TOKEN_MULTIPLIER; public float customPvpBattleModifier = DEFAULT_PVP_TOKEN_MULTIPLIER; public float customPvePointModifier = DEFAULT_PVE_POINT_MULTIPLIER; - public float customPvpPointModifier = DEFAULT_PVE_POINT_MULTIPLIER; + public float customPvpPointModifier = DEFAULT_PVP_POINT_MULTIPLIER; public float customWinTokenModifier = DEFAULT_WIN_TOKEN_MULTIPLIER; public float customLossTokenModifier = DEFAULT_WIN_TOKEN_MULTIPLIER; public float customWinPointModifier = DEFAULT_WIN_POINT_MULTIPLIER; @@ -127,6 +127,20 @@ public class battle_spawner extends script.base_class { if(battleIsActive(self)) return SCRIPT_CONTINUE; location spaceLocation = getLocation(self); + // double check and despawn old ships + obj_id old_attackingShip = getObjIdObjVar(self, "attackingShip"); + obj_id old_defendingShip = getObjIdObjVar(self, "defendingShip"); + if(isValidId(old_attackingShip)) + { + detachAllScripts(old_attackingShip); + destroyObjectHyperspace(old_attackingShip); + } + if(isValidId(old_defendingShip)) + { + detachAllScripts(old_defendingShip); + destroyObjectHyperspace(old_defendingShip); + } + spaceLog( "In startSpaceGCWBattle... beginning battle creation."); obj_id controller = params.getObjId("controller"); removeObjVar(controller, "space_gcw." + spaceLocation.area + ".nextBattleStart"); @@ -708,6 +722,12 @@ public class battle_spawner extends script.base_class { detachAllScripts(attackingShip); destroyObjectHyperspace(attackingShip); } + + if(isValidId(defendingShip)){ + detachAllScripts(defendingShip); + spaceLog( "In cleanup... despawning defending capital ship..."); + destroyObjectHyperspace(defendingShip); + } // set obj vars on controller for next battle obj_id controller = params.getObjId("controller"); From 18baed6b0f37ee04bfff879c05cfe1bc1821f3dd Mon Sep 17 00:00:00 2001 From: RezecNoble Date: Tue, 8 Oct 2024 20:39:08 -0400 Subject: [PATCH 2/2] GCW Space Battle Fix --- .../compiled/game/script/systems/gcw/space/battle_spawner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sku.0/sys.server/compiled/game/script/systems/gcw/space/battle_spawner.java b/sku.0/sys.server/compiled/game/script/systems/gcw/space/battle_spawner.java index 5ce53d150..d21a02457 100755 --- a/sku.0/sys.server/compiled/game/script/systems/gcw/space/battle_spawner.java +++ b/sku.0/sys.server/compiled/game/script/systems/gcw/space/battle_spawner.java @@ -83,7 +83,7 @@ public class battle_spawner extends script.base_class { public float customPvePointModifier = DEFAULT_PVE_POINT_MULTIPLIER; public float customPvpPointModifier = DEFAULT_PVP_POINT_MULTIPLIER; public float customWinTokenModifier = DEFAULT_WIN_TOKEN_MULTIPLIER; - public float customLossTokenModifier = DEFAULT_WIN_TOKEN_MULTIPLIER; + public float customLossTokenModifier = DEFAULT_LOSS_TOKEN_MULTIPLIER; public float customWinPointModifier = DEFAULT_WIN_POINT_MULTIPLIER; public float customLossPointModifier = DEFAULT_LOSS_POINT_MULTIPLIER; public int pobPlayerCeiling = DEFAULT_POB_PLAYER_CEILING;