Merge branch 'master' into release

This commit is contained in:
Glowbal 2015-07-27 08:41:00 +02:00
commit d0adb6c317
3 changed files with 48 additions and 31 deletions

View File

@ -12,7 +12,7 @@
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson)) #define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
private ["_caller", "_unit","_vehicle", "_loadcar", "_loadhelicopter", "_loadtank"]; private ["_caller", "_unit","_vehicle", "_loadcar", "_loadhelicopter", "_loadtank","_loadboat"];
_caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param; _caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
_unit = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param; _unit = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
_vehicle = ObjNull; _vehicle = ObjNull;
@ -30,6 +30,11 @@ if (_unit distance _loadcar <= 10) then {
_loadtank = nearestObject [_unit, "tank"]; _loadtank = nearestObject [_unit, "tank"];
if (_unit distance _loadtank <= 10) then { if (_unit distance _loadtank <= 10) then {
_vehicle = _loadtank; _vehicle = _loadtank;
} else {
_loadboat = nearestObject [_unit, "ship"];
if (_unit distance _loadboat <= 10) then {
_vehicle = _loadboat;
};
}; };
}; };
}; };

View File

@ -10,16 +10,28 @@
#include "script_component.hpp" #include "script_component.hpp"
private ["_unit","_vehicle","_caller","_handle","_loaded"]; private ["_unit","_vehicle","_caller","_handle","_loaded","_slotsOpen"];
_unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param; _unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
_vehicle = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param; _vehicle = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
_caller = [_this, 2, ObjNull,[ObjNull]] call BIS_fnc_Param; _caller = [_this, 2, ObjNull,[ObjNull]] call BIS_fnc_Param;
_slotsOpen = false;
if (!alive _unit) then { if (!alive _unit) then {
_unit = [_unit,_caller] call FUNC(makeCopyOfBody); _unit = [_unit,_caller] call FUNC(makeCopyOfBody);
}; };
if (_vehicle emptyPositions "cargo" > 0) then {
_unit moveInCargo _vehicle; _unit moveInCargo _vehicle;
_slotsOpen = true;
} else {
if (_vehicle emptyPositions "gunner" > 0) then {
_unit moveInGunner _vehicle;
_slotsOpen = true;
};
};
if (_slotsOpen) then {
_loaded = _vehicle getvariable [QGVAR(loaded_persons),[]]; _loaded = _vehicle getvariable [QGVAR(loaded_persons),[]];
_loaded pushback _unit; _loaded pushback _unit;
_vehicle setvariable [QGVAR(loaded_persons),_loaded,true]; _vehicle setvariable [QGVAR(loaded_persons),_loaded,true];
@ -42,3 +54,4 @@ if (!([_unit] call FUNC(isAwake))) then {
}; };
}; };
};

View File

@ -175,7 +175,14 @@ class CfgWeapons
lockedTargetSound[] = {"",0,1}; lockedTargetSound[] = {"",0,1};
}; };
class rhsusf_opscore_01; class rhsusf_ach_helmet_ocp;
class rhsusf_opscore_01: rhsusf_ach_helmet_ocp {
ace_hearing_protection = 0.50;
ace_hearing_lowerVolume = 0.60;
};
class rhsusf_opscore_01_tan: rhsusf_opscore_01 {};
class rhsusf_opscore_03_ocp: rhsusf_opscore_01 {};
class rhsusf_cvc_helmet: rhsusf_opscore_01 { class rhsusf_cvc_helmet: rhsusf_opscore_01 {
ace_hearing_protection = 1; ace_hearing_protection = 1;
ace_hearing_lowerVolume = 0.80; ace_hearing_lowerVolume = 0.80;
@ -202,12 +209,4 @@ class CfgWeapons
ace_hearing_protection = 1; ace_hearing_protection = 1;
ace_hearing_lowerVolume = 0.80; ace_hearing_lowerVolume = 0.80;
}; };
class rhsusf_ach_helmet_ocp;
class rhsusf_opscore_01: rhsusf_ach_helmet_ocp {
ace_hearing_protection = 0.50;
ace_hearing_lowerVolume = 0.60;
};
class rhsusf_opscore_01_tan: rhsusf_opscore_01 {};
class rhsusf_opscore_03_ocp: rhsusf_opscore_01 {};
}; };