From 2940d1f83cc521b9f89835f57f263709f7dfe3b2 Mon Sep 17 00:00:00 2001 From: commy2 Date: Wed, 15 Apr 2015 03:10:17 +0200 Subject: [PATCH] base rallypoints create a respawn marker if none is present in the mission --- addons/respawn/CfgEventHandlers.hpp | 14 ++++++++------ addons/respawn/functions/fnc_initRallypoint.sqf | 7 ++++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/addons/respawn/CfgEventHandlers.hpp b/addons/respawn/CfgEventHandlers.hpp index 7b00950931..9ff7a2bae8 100644 --- a/addons/respawn/CfgEventHandlers.hpp +++ b/addons/respawn/CfgEventHandlers.hpp @@ -23,37 +23,39 @@ class Extended_Respawn_EventHandlers { class Extended_Init_EventHandlers { class ACE_Rallypoint_West { class ADDON { - init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; _this call FUNC(initRallypoint)); + init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; [ARR_2(_this select 0,'')] call FUNC(initRallypoint)); }; }; class ACE_Rallypoint_East { class ADDON { - init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; _this call FUNC(initRallypoint)); + init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; [ARR_2(_this select 0,'')] call FUNC(initRallypoint)); }; }; class ACE_Rallypoint_Independent { class ADDON { - init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; _this call FUNC(initRallypoint)); + init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; [ARR_2(_this select 0,'')] call FUNC(initRallypoint)); }; }; class ACE_Rallypoint_West_Base { class ADDON { - init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; _this call FUNC(initRallypoint)); + init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; [ARR_2(_this select 0,'respawn_west')] call FUNC(initRallypoint)); }; }; class ACE_Rallypoint_East_Base { class ADDON { - init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; _this call FUNC(initRallypoint)); + init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; [ARR_2(_this select 0,'respawn_east')] call FUNC(initRallypoint)); }; }; class ACE_Rallypoint_Independent_Base { class ADDON { - init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; _this call FUNC(initRallypoint)); + init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; [ARR_2(_this select 0,'respawn_guerrila')] call FUNC(initRallypoint)); }; }; + + //respawn_civilian }; diff --git a/addons/respawn/functions/fnc_initRallypoint.sqf b/addons/respawn/functions/fnc_initRallypoint.sqf index cb4d55146f..c266026e11 100644 --- a/addons/respawn/functions/fnc_initRallypoint.sqf +++ b/addons/respawn/functions/fnc_initRallypoint.sqf @@ -16,9 +16,10 @@ #include "script_component.hpp" -private ["_rallypoint", "_name"]; +private ["_rallypoint", "_respawnMarker", "_name"]; _rallypoint = _this select 0; +_respawnMarker = _this select 1; if (!local _rallypoint) exitWith {}; @@ -31,3 +32,7 @@ if (isNil _name) then { deleteVehicle _rallypoint; diag_log text "[ACE] Respawn: ERROR Multiple Rallypoints of same type."; }; + +if (isServer && {_respawnMarker != ""} && {!(_respawnMarker in allMapMarkers)}) then { + createMarker [_respawnMarker, _rallypoint]; +};