Skip to content

Commit

Permalink
fix for eradicating spawn pad, tweak replay
Browse files Browse the repository at this point in the history
  • Loading branch information
nomisum committed Mar 13, 2016
1 parent fb5a822 commit 4c63e08
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
2 changes: 1 addition & 1 deletion GRAD_replay/recording/recording.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
7 changes: 7 additions & 0 deletions init.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
18 changes: 17 additions & 1 deletion server/spawnBluforHQ.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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"; */
Expand Down
4 changes: 2 additions & 2 deletions spawn/gui/_dialogs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4c63e08

Please sign in to comment.