diff --git a/GRAD_replay/recording/recording.sqf b/GRAD_replay/recording/recording.sqf index 5efad6c2..dbd9364d 100644 --- a/GRAD_replay/recording/recording.sqf +++ b/GRAD_replay/recording/recording.sqf @@ -118,7 +118,7 @@ while{true} do }; }; - + if (_kindof == "c_unknown") exitWith {}; // current values: position, side, kindof single_current_values = [_unit,_side,_pos,_dir,_kindof,_veh,_hide]; diff --git a/init.sqf b/init.sqf index 2bc5e378..6ec2b30e 100644 --- a/init.sqf +++ b/init.sqf @@ -140,11 +140,18 @@ if (isServer) then { VEHICLE_ORDERED_EAST = [false,0]; publicVariable "VEHICLE_ORDERED_EAST"; + BUY_OPTION_BLUFOR = true; + publicVariable "BUY_OPTION_BLUFOR"; + BUY_OPTION_OPFOR = true; + publicVariable "BUY_OPTION_OPFOR"; + OPFOR_TELEPORTED = false; publicVariable "OPFOR_TELEPORTED"; BLUFOR_TELEPORTED = false; publicVariable "BLUFOR_TELEPORTED"; + + REPLAY_FINISHED = false; publicVariable "REPLAY_FINISHED"; diff --git a/server/spawnBluforHQ.sqf b/server/spawnBluforHQ.sqf index ffe7b94e..af10fb55 100644 --- a/server/spawnBluforHQ.sqf +++ b/server/spawnBluforHQ.sqf @@ -181,6 +181,15 @@ spawnBluforHQ = { usActionHelper = createVehicle ["Land_SatellitePhone_F", [(getPos _vehicle1 select 0) + 2, (getPos _vehicle1 select 1) - 1, 0.5], [], 0, "NONE"]; usActionHelper attachTo [_vehicle1, [0,-0.3,1.1]]; + /* listener to remove spawn pad and actionhelper, when its time */ + BUY_OPTION_BLUFOR = { + if (_this select 0) exitWith {}; + detach usActionHelper; + deleteVehicle usActionHelper; + hideObjectGlobal US_SPAWN_PAD; + }; + "BUY_OPTION_BLUFOR" addPublicVariableEventHandler BUY_OPTION_BLUFOR; + debugLog("blufor published target"); diag_log format ["creating blufor stuff on position: %1",US_VEHICLE_SPAWN]; @@ -220,7 +229,14 @@ spawnOpforHQ = { RUS_VEHICLE_SPAWN = getPos (_opforSpawnSuccess select 2); publicVariable "RUS_VEHICLE_SPAWN"; - + /* listener to remove spawn pad and actionhelper, when its time */ + BUY_OPTION_OPFOR = { + if (_this select 0) exitWith {}; + detach rusActionHelper; + deleteVehicle rusActionHelper; + hideObjectGlobal RUS_SPAWN_PAD; + }; + "BUY_OPTION_OPFOR" addPublicVariableEventHandler BUY_OPTION_OPFOR; /* OPFOR_TELEPORT_TARGET = getPos (_opforSpawnSuccess select 2); publicVariableServer "OPFOR_TELEPORT_TARGET"; */ diff --git a/spawn/gui/_dialogs.hpp b/spawn/gui/_dialogs.hpp index 596519f3..6bd5601f 100644 --- a/spawn/gui/_dialogs.hpp +++ b/spawn/gui/_dialogs.hpp @@ -557,7 +557,7 @@ class russianSupplyGUI colorText[] = {1,0.2,0.2,0.5}; colorBackground[] = {0,0,0,1}; tooltip = "WARNING: you cant undo this & you cant buy anymore."; - action = "deleteVehicle RUS_SPAWN_PAD; opfor_teamlead setVariable ['canBuy', false]; detach rusActionHelper; deleteVehicle rusActionHelper; closeDialog 0;"; + action = "BUY_OPTION_OPFOR = false; opfor_teamlead setVariable ['canBuy', false]; closeDialog 0;"; onMouseEnter = "(_this select 0) ctrlSetTextColor [1,0.2,0.2,1]"; onMouseExit = "(_this select 0) ctrlSetTextColor [1,0.2,0.2,0.5]"; period = 0; @@ -1139,7 +1139,7 @@ class USSupplyGUI colorText[] = {1,0.2,0.2,0.5}; colorBackground[] = {0,0,0,1}; tooltip = "WARNING: you cant undo this & you cant buy anymore."; - action = "deleteVehicle US_SPAWN_PAD; blufor_teamlead setVariable ['canBuy', false]; detach usActionHelper; deleteVehicle usActionHelper; closeDialog 0;"; + action = "BUY_OPTION_BLUFOR = false; blufor_teamlead setVariable ['canBuy', false]; closeDialog 0;"; onMouseEnter = "(_this select 0) ctrlSetTextColor [1,0.2,0.2,1]"; onMouseExit = "(_this select 0) ctrlSetTextColor [1,0.2,0.2,0.5]"; period = 0;