Fix ranks, and uniform/vest drop

This commit is contained in:
PabstMirror 2015-03-20 20:47:34 -05:00
parent 52623f71b8
commit 22483ce22e
3 changed files with 6 additions and 5 deletions

View File

@ -49,7 +49,7 @@ if (!_doNotDropAmmo) then {
};
if (isNull _holder) then {
_dropPos = _target modelToWorld [0, 0.75, 0];
_dropPos = _target modelToWorld [0.333, 0.75, 0];
_dropPos set [2, ((getPosASL _target) select 2)];
// _holder = createVehicle ["WeaponHolderSimulated", _dropPos, [], 0, "CAN_COLLIDE"];
_holder = createVehicle [DISARM_CONTAINER, _dropPos, [], 0, "CAN_COLLIDE"];
@ -240,16 +240,16 @@ systemChat format ["PFEh start %1", time];
[_caller, _target, "Debug: Vest Not Empty"] call FUNC(eventTargetFinish);
};
if (_needToRemoveVest) then {
removeVest _target;
_holder addItemCargoGlobal [(vest _target), 1];
removeVest _target;
};
if (_needToRemoveUniform && {!((uniformItems _target) isEqualTo [])}) exitWith {
_holder setVariable [QGVAR(holderInUse), false];
[_caller, _target, "Debug: Uniform Not Empty"] call FUNC(eventTargetFinish);
};
if (_needToRemoveUniform) then {
removeUniform _target;
_holder addItemCargoGlobal [(uniform _target), 1];
removeUniform _target;
};
_holder setVariable [QGVAR(holderInUse), false];

View File

@ -79,7 +79,7 @@ GVAR(disarmTarget) = _target;
_rankPicture = _display displayCtrl 1203;
//Show rank and name (just like BIS's inventory)
_rankIndex = ["PRIVATE", "CORPORAL", "SERGEANT", "LIEUTENANT", "CAPTAIN", "MAJOR", "COLONEL"] find (rank _target);
_rankIndex = ((["PRIVATE", "CORPORAL", "SERGEANT", "LIEUTENANT", "CAPTAIN", "MAJOR", "COLONEL"] find (rank _target)) + 1);
_rankPicture ctrlSetText (TEXTURES_RANKS select _rankIndex);
_playerName ctrlSetText ([GVAR(disarmTarget)] call EFUNC(common,getName));

View File

@ -104,7 +104,8 @@ class GVAR(remoteInventory) {
h = H_PART(1);
colorText[] = {1,1,1,0.7};
colorActive[] = {1,1,1,1};
tooltip = "$str_disp_close";
tooltip = "$STR_DISP_OPT_CLOSE";
onButtonClick = "closeDialog 0";
};
class ExternalContainerBackground: RscPicture {
colorText[] = {1,1,1,0.1};