From 22483ce22e710bf3ae337b0da8d15bd82c409889 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 20 Mar 2015 20:47:34 -0500 Subject: [PATCH] Fix ranks, and uniform/vest drop --- addons/disarming/functions/fnc_disarmDropItems.sqf | 6 +++--- addons/disarming/functions/fnc_openDisarmDialog.sqf | 2 +- addons/disarming/gui_disarm.hpp | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/addons/disarming/functions/fnc_disarmDropItems.sqf b/addons/disarming/functions/fnc_disarmDropItems.sqf index cbed44be23..ab70b4b137 100644 --- a/addons/disarming/functions/fnc_disarmDropItems.sqf +++ b/addons/disarming/functions/fnc_disarmDropItems.sqf @@ -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]; diff --git a/addons/disarming/functions/fnc_openDisarmDialog.sqf b/addons/disarming/functions/fnc_openDisarmDialog.sqf index 9fc5fa2c21..44446dbee0 100644 --- a/addons/disarming/functions/fnc_openDisarmDialog.sqf +++ b/addons/disarming/functions/fnc_openDisarmDialog.sqf @@ -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)); diff --git a/addons/disarming/gui_disarm.hpp b/addons/disarming/gui_disarm.hpp index bb091b7459..775c325674 100644 --- a/addons/disarming/gui_disarm.hpp +++ b/addons/disarming/gui_disarm.hpp @@ -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};