mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
don't drop if inside a vehicle
This commit is contained in:
parent
b736928259
commit
353feb6400
@ -1,4 +1,4 @@
|
||||
|
||||
PREP(throwWeapon);
|
||||
PREP(fallDown);
|
||||
PREP(getRandomAnimation);
|
||||
PREP(throwWeapon);
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: commy2
|
||||
* Makes the unit throw their currently selected weapon. Unit must be local.
|
||||
* Makes the unit throw their currently selected weapon.
|
||||
* Unit must be local and not inside a vehicle or attached to another object.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: unit <OBJECT>
|
||||
@ -20,7 +21,7 @@
|
||||
|
||||
params ["_unit"];
|
||||
private _weapon = currentWeapon _unit;
|
||||
if (_weapon isEqualTo "") exitWith {objNull};
|
||||
if (!isNull objectParent _unit || _weapon isEqualTo "") exitWith {objNull};
|
||||
|
||||
private _data = weaponsItems _unit select {_x select 0 == _weapon} select 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user