Code cleanup of Backpacks module

This commit is contained in:
jokoho48 2015-08-13 21:56:02 +02:00
parent 57d484d382
commit 5597b7e40c
3 changed files with 5 additions and 5 deletions

View File

@ -1,3 +1,3 @@
#include "script_component.hpp"
["backpackOpened", {_this call FUNC(backpackOpened)}] call EFUNC(common,addEventHandler);
["backpackOpened", DFUNC(backpackOpened)] call EFUNC(common,addEventHandler);

View File

@ -17,5 +17,6 @@ params ["_unit","_backpack"];
_target = objNull;
{
if (backpackContainer _x == _backpack) then {_target = _x; breakTo "main"};
} forEach nearestObjects [_unit, ["Man"],2];
} count nearestObjects [_unit, ["Man"], 5];
if (isNull _target) exitWith {ACE_Player};
_target

View File

@ -11,9 +11,8 @@
*/
#include "script_component.hpp"
private ["_backpack", "_config"];
_backpack = _this select 0;
private ["_config"];
params ["_backpack"];
if (typeName _backpack == "OBJECT") then {
_backpack = typeOf _backpack;