mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 15:33:29 +00:00
Fixed leak global vars from convert client pos and extract role functions
This commit is contained in:
@@ -19,11 +19,15 @@
|
|||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params["_latitude", "_longitude", "_altitude"];
|
params [
|
||||||
|
["_latitude", 0, [0]],
|
||||||
|
["_longitude", 0, [0]],
|
||||||
|
["_altitude", 0, [0]]
|
||||||
|
];
|
||||||
|
|
||||||
_position = [_latitude, _longitude, _altitude];
|
private _position = [_latitude, _longitude, _altitude];
|
||||||
|
|
||||||
_realLocation = null;
|
private _realLocation = [0, 0, _altitude];
|
||||||
|
|
||||||
switch (toLower worldName) do {
|
switch (toLower worldName) do {
|
||||||
case "altis": {
|
case "altis": {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ switch (str _side) do {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_unit_type = _unit call BIS_fnc_objectType;
|
private _unit_type = _unit call BIS_fnc_objectType;
|
||||||
|
|
||||||
if ((_unit_type select 0) == "Soldier") then {
|
if ((_unit_type select 0) == "Soldier") then {
|
||||||
switch (_unit_type select 1) do {
|
switch (_unit_type select 1) do {
|
||||||
@@ -71,7 +71,7 @@ if ((_unit_type select 0) == "Soldier") then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if ((typeOf (vehicle _unit) != typeOf _unit) or ((_unit_type select 0) == "Vehicle")) then {
|
if ((typeOf (vehicle _unit) != typeOf _unit) or ((_unit_type select 0) == "Vehicle")) then {
|
||||||
_vehicle_type = (vehicle _unit) call BIS_fnc_objectType select 1;
|
private _vehicle_type = (vehicle _unit) call BIS_fnc_objectType select 1;
|
||||||
switch (_vehicle_type) do {
|
switch (_vehicle_type) do {
|
||||||
case "Car": {
|
case "Car": {
|
||||||
_type = "G-U-C-I-M";
|
_type = "G-U-C-I-M";
|
||||||
@@ -111,10 +111,10 @@ if ((typeOf (vehicle _unit) != typeOf _unit) or ((_unit_type select 0) == "Vehic
|
|||||||
|
|
||||||
_role = "a-" + _affiliation + "-" + _type;
|
_role = "a-" + _affiliation + "-" + _type;
|
||||||
|
|
||||||
armatak_attribute_marker_type = _unit getVariable "armatak_attribute_marker_type";
|
private _markerTypeOverride = _unit getVariable ["armatak_attribute_marker_type", ""];
|
||||||
|
|
||||||
if (!isNil "armatak_attribute_marker_type" or armatak_attribute_marker_type != '') then {
|
if (_markerTypeOverride isNotEqualTo "") then {
|
||||||
_role = armatak_attribute_marker_type;
|
_role = _markerTypeOverride;
|
||||||
};
|
};
|
||||||
|
|
||||||
_role
|
_role
|
||||||
|
|||||||
Reference in New Issue
Block a user