mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
sync rallypoint marker on jip
This commit is contained in:
parent
18be5276a9
commit
d68cc8f40e
@ -30,45 +30,43 @@ 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'; [ARR_2(_this select 0,'')] call FUNC(initRallypoint));
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; [ARR_3(_this select 0,'',west)] call FUNC(initRallypoint));
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Rallypoint_East {
|
||||
class ADDON {
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; [ARR_2(_this select 0,'')] call FUNC(initRallypoint));
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; [ARR_3(_this select 0,'',east)] call FUNC(initRallypoint));
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Rallypoint_Independent {
|
||||
class ADDON {
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; [ARR_2(_this select 0,'')] call FUNC(initRallypoint));
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; [ARR_3(_this select 0,'',independent)] call FUNC(initRallypoint));
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Rallypoint_West_Base {
|
||||
class ADDON {
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; [ARR_2(_this select 0,'respawn_west')] call FUNC(initRallypoint));
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; [ARR_3(_this select 0,'respawn_west',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'; [ARR_2(_this select 0,'respawn_east')] call FUNC(initRallypoint));
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; [ARR_3(_this select 0,'respawn_east',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'; [ARR_2(_this select 0,'respawn_guerrila')] call FUNC(initRallypoint));
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; [ARR_3(_this select 0,'respawn_guerrila',independent)] call FUNC(initRallypoint)); //respawn_civilian
|
||||
};
|
||||
};
|
||||
|
||||
//respawn_civilian
|
||||
};
|
||||
|
||||
// auto assign rallypoint leader
|
||||
class Extended_InitPost_EventHandlers {
|
||||
// auto assign rallypoint leader
|
||||
class CAManBase {
|
||||
class ADDON {
|
||||
serverInit = QUOTE(_this call FUNC(handleInitPostServer));
|
||||
|
@ -27,25 +27,31 @@ _name = typeOf _rallypoint;
|
||||
|
||||
// init visible marker
|
||||
if (hasInterface) then {
|
||||
private ["_marker", "_type"];
|
||||
// fix init having wrong position, vars etc.
|
||||
[_rallypoint, _respawnMarker, _side, _name] spawn {
|
||||
_rallypoint = _this select 0;
|
||||
_respawnMarker = _this select 1;
|
||||
_side = _this select 2;
|
||||
_name = _this select 3;
|
||||
|
||||
_marker = format ["ACE_Marker_%1", _name];
|
||||
_marker = format ["ACE_Marker_%1", _name];
|
||||
|
||||
// exit if it already exist
|
||||
if (_marker in allMapMarkers) exitWith {};
|
||||
// exit if it already exist
|
||||
if (_marker in allMapMarkers) exitWith {};
|
||||
|
||||
_marker = createMarkerLocal [_marker, getPosASL _rallypoint];
|
||||
_type = ["selector_selectedFriendly", "selector_selectedEnemy"] select (_respawnMarker == "");
|
||||
_marker = createMarkerLocal [_marker, getPosASL _rallypoint];
|
||||
_type = ["selector_selectedFriendly", "selector_selectedEnemy"] select (_respawnMarker == "");
|
||||
|
||||
_marker setMarkerTypeLocal _type;
|
||||
_marker setMarkerAlphaLocal ([0,1] select (_side == playerSide)); // playerSide to guarantee init
|
||||
_marker setMarkerTypeLocal _type;
|
||||
_marker setMarkerAlphaLocal ([0,1] select (_side == playerSide)); // playerSide to guarantee init
|
||||
|
||||
private "_markerDate";
|
||||
_markerDate = _rallypoint getVariable [QGVAR(markerDate), ""];
|
||||
private "_markerDate";
|
||||
_markerDate = _rallypoint getVariable [QGVAR(markerDate), ""];
|
||||
|
||||
_marker setMarkerTextLocal _markerDate;
|
||||
_marker setMarkerTextLocal _markerDate;
|
||||
|
||||
_rallypoint setVariable [QGVAR(marker), _marker];
|
||||
_rallypoint setVariable [QGVAR(marker), _marker];
|
||||
};
|
||||
};
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
@ -46,7 +46,7 @@ _this spawn {
|
||||
|
||||
_rallypoint setVariable [QGVAR(markerDate), format ["%1:%2", date select 3, date select 4], true];
|
||||
|
||||
["rallypointMoved", [_rallypoint, _side]] call EFUNC(common,globalEvent);
|
||||
["rallypointMoved", [_rallypoint, _side, _position]] call EFUNC(common,globalEvent);
|
||||
|
||||
[localize "STR_ACE_Respawn_Deployed"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
@ -1,10 +1,11 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_rallypoint", "_side"];
|
||||
private ["_rallypoint", "_side", "_position"];
|
||||
|
||||
_rallypoint = _this select 0;
|
||||
_side = _this select 1;
|
||||
_position = _this select 2;
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
@ -13,5 +14,5 @@ private ["_marker", "_markerDate"];
|
||||
_marker = _rallypoint getVariable [QGVAR(marker), ""];
|
||||
_markerDate = _rallypoint getVariable [QGVAR(markerDate), ""];
|
||||
|
||||
_marker setMarkerPosLocal getPosASL _rallypoint;
|
||||
_marker setMarkerPosLocal _position;
|
||||
_marker setMarkerTextLocal _markerDate;
|
||||
|
Loading…
Reference in New Issue
Block a user