on role function, added default role and improved vehicle role handling

This commit is contained in:
Valmo Trindade
2025-01-31 05:02:36 -03:00
parent 0191bb77ac
commit b12b634efa

View File

@@ -26,9 +26,10 @@ switch (side _unit) do {
};
};
_unit_type = _unit call BIS_fnc_objectType select 1;
_unit_type = _unit call BIS_fnc_objectType;
switch (_unit_type) do {
if ((_unit_type select 0) == "Soldier") then {
switch (_unit_type select 1) do {
case "AT": {
_type = "G-U-C-F-R";
};
@@ -66,8 +67,9 @@ switch (_unit_type) do {
_type = "G-U-C-I";
};
};
};
if (typeOf (vehicle _unit) != typeOf _unit) then {
if ((typeOf (vehicle _unit) != typeOf _unit) or ((_unit_type select 0) == "Vehicle")) then {
_vehicle_type = (vehicle _unit) call BIS_fnc_objectType select 1;
switch (_vehicle_type) do {
case "Car": {
@@ -100,7 +102,9 @@ if (typeOf (vehicle _unit) != typeOf _unit) then {
case "WheeledAPC": {
_type = "G-U-C-I-Z";
};
default {};
default {
_type = "G-U-C-I";
};
};
};