mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
def05b9cf1
* Optimize and cleanup interactEH function * Add missing fences and improve formatting * Improve cutDownFence function * Remove unused sound files and cleanup * Multi-line condition and fix examples * Increase PFH delay and use distanceSqr
33 lines
808 B
Plaintext
33 lines
808 B
Plaintext
/*
|
|
* Author: PabstMirror
|
|
* Checks if object is a fence. Should work on any fence type, even when (typeOf == "").
|
|
* Call is fairly expensive because of string checking.
|
|
*
|
|
* Arguments:
|
|
* 0: Object to test <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Is fence <BOOL>
|
|
*
|
|
* Example:
|
|
* [cursorObject] call ace_logistics_wirecutter_fnc_isFence
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_object"];
|
|
TRACE_1("Checking if fence",_object);
|
|
|
|
private _typeOf = typeOf _object;
|
|
|
|
private _returnValue = if (_typeOf != "") then {
|
|
// Check for isFence entry since we have valid typeOf
|
|
1 == getNumber (configFile >> "CfgVehicles" >> _typeOf >> QGVAR(isFence));
|
|
} else {
|
|
// Check the p3d name against list (in script_component.hpp)
|
|
(getModelInfo _object select 0) in FENCE_P3DS;
|
|
};
|
|
|
|
_returnValue
|