Skip to content

Commit

Permalink
fixing spawn dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
nomisum committed Jan 2, 2019
1 parent 36539d8 commit 377e7d6
Show file tree
Hide file tree
Showing 3 changed files with 521 additions and 501 deletions.
48 changes: 32 additions & 16 deletions BC_setup/functions/client/fn_chooseSpawn.sqf
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
#include "\z\ace\addons\main\script_component.hpp"
#include "..\..\..\missionMacros.h"

[
"teleportClickOpf",
"onMapSingleClick",
{
debugLog("opfor lead clicked on map");
try {
if (_pos call BC_setup_fnc_isOnWater) exitWith {};
["teleportClickOpf", "onMapSingleClick"] call BIS_fnc_removeStackedEventHandler;
[_pos] remoteExec ["BC_setup_fnc_publishOpforTeleportTarget", [0,-2] select isDedicated];
playSound ['click', true];
["Preparing Spawn..."] call EFUNC(common,displayTextStructured);
} catch {
hint str _exception;
};
}
] call BIS_fnc_addStackedEventHandler;
player linkitem 'itemMap';
player setVariable ["BC_choosingSpawn", true];
closeDialog 0;

private _handle = addMissionEventHandler ["MapSingleClick", {
params ["_units", "_pos", "_alt", "_shift"];

if ([_pos] call BC_setup_fnc_isOnWater) exitWith {};
[_pos] remoteExec ["BC_setup_fnc_publishOpforTeleportTarget", [0,-2] select isDedicated];
playSound ['click', true];
["Preparing Spawn..."] call EFUNC(common,displayTextStructured);

removeMissionEventhandler ["MapSingleClick", _thisEventHandler];
player setVariable ["BC_choosingSpawn", false];
}];


if (DEBUG_MODE) then {
Expand All @@ -27,3 +26,20 @@ if (DEBUG_MODE) then {
["teleportClickOpf", "onMapSingleClick"] call BIS_fnc_removeStackedEventHandler;
};
};


/*
addMissionEventHandler ["MapSingleClick", {
params ["_units", "_pos", "_alt", "_shift"];
if (_pos call BC_setup_fnc_isOnWater) exitWith {};
["teleportClickOpf", "onMapSingleClick"] call BIS_fnc_removeStackedEventHandler;
[_pos] remoteExec ["BC_setup_fnc_publishOpforTeleportTarget", [0,-2] select isDedicated];
playSound ['click', true];
["Preparing Spawn..."] call EFUNC(common,displayTextStructured);
}];
*/
Loading

0 comments on commit 377e7d6

Please sign in to comment.