2015-01-12 10:24:58 +00:00
|
|
|
/*
|
|
|
|
Name: ACE_Respawn_fnc_initRallypoint
|
|
|
|
|
|
|
|
Author(s):
|
|
|
|
commy2
|
|
|
|
|
|
|
|
Description:
|
|
|
|
init code for rally points
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
0: OBJECT - rally
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
VOID
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
2015-01-12 09:07:03 +00:00
|
|
|
|
2015-04-15 01:10:17 +00:00
|
|
|
private ["_rallypoint", "_respawnMarker", "_name"];
|
2015-01-12 09:07:03 +00:00
|
|
|
|
|
|
|
_rallypoint = _this select 0;
|
2015-04-15 01:10:17 +00:00
|
|
|
_respawnMarker = _this select 1;
|
2015-01-12 09:07:03 +00:00
|
|
|
|
|
|
|
if (!local _rallypoint) exitWith {};
|
|
|
|
|
|
|
|
_name = typeOf _rallypoint;
|
|
|
|
|
|
|
|
if (isNil _name) then {
|
2015-01-13 14:28:03 +00:00
|
|
|
missionNamespace setVariable [_name, _rallypoint];
|
|
|
|
publicVariable _name;
|
2015-01-12 09:07:03 +00:00
|
|
|
} else {
|
2015-01-13 14:28:03 +00:00
|
|
|
deleteVehicle _rallypoint;
|
|
|
|
diag_log text "[ACE] Respawn: ERROR Multiple Rallypoints of same type.";
|
2015-01-12 09:07:03 +00:00
|
|
|
};
|
2015-04-15 01:10:17 +00:00
|
|
|
|
|
|
|
if (isServer && {_respawnMarker != ""} && {!(_respawnMarker in allMapMarkers)}) then {
|
|
|
|
createMarker [_respawnMarker, _rallypoint];
|
|
|
|
};
|