Update private tags

From
e69f8d5306

Moved dog files to the \dog\ folder and pzombie files to the \pzombie\
folder. Also removed some legacy files that are no longer used.

The actions\ and compile\ folders are fully up to date now
This commit is contained in:
ebaydayz
2016-03-30 14:55:45 -04:00
parent 30b29c541e
commit 77e760fe73
91 changed files with 543 additions and 690 deletions

View File

@@ -3,28 +3,36 @@ private ["_item","_pos","_nearByPile","_holder"];
//Radius to search for holder
#define PILE_SEARCH_RADIUS 2
//Location to offset the holder
#define PILE_PLAYER_OFFSET [0,0,0]
#define PILE_OFFSET [0,0,0]
_item = _this;
_holder = objNull;
//Lets get the location of the player in the world
_pos = player modeltoWorld PILE_PLAYER_OFFSET;
_pos = player modeltoWorld PILE_OFFSET;
//Check if a holder is close by the player.
_nearByPile= nearestObjects [_pos, ["WeaponHolder","WeaponHolderBase"],PILE_SEARCH_RADIUS];
if (count _nearByPile == 0) then {
//No weapon holders found in the radius, spawn a new one
_holder = createVehicle ["WeaponHolder", _pos, [], 0, "CAN_COLLIDE"];
} else {
//Found a near by weapon holder lets select it.
_holder = _nearByPile select 0;
//check to make sure the player can see the selected weapon holder.
_objects = lineIntersectsWith [(_holder modeltoWorld PILE_OFFSET), _pos, player, _holder, true];
//Can you see the current selected weapon holder
if ((count _objects) > 0) then {
//Unable to see the current selected weapon holder within the radius lets create a new one.
_holder = createVehicle ["WeaponHolder", _pos, [], 0, "CAN_COLLIDE"];
};
};
//Add the item to the newly created holder or to the new holder.
//Add the item to the holder or to the newly created holder.
_holder addMagazineCargoGlobal [_item,1];
//Make sure the holder spawns behind the physical location of the player
_holder setPosATL (player modeltoWorld PILE_PLAYER_OFFSET);
//Revel the item
player reveal _holder;