ACE3/addons/common/functions/fnc_fixCollision.sqf
Phyma ffaa195fe5 Conform function headers to coding guidelines (#5255)
* Fixed headers to work with silentspike python script

* Fixed rest of the files

* Fixed ace-team
2017-06-08 15:31:51 +02:00

26 lines
603 B
Plaintext

/*
* Author: commy2
* Attempt to fix PhysX collisions causing unreasonable impact forces and damage.
*
* Arguments:
* Object <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob] call ace_common_fnc_fixCollision
*
* Public: No
*/
#include "script_component.hpp"
// allowDamage requires local object
if (!local _this) exitWith {};
// prevent collision damage
[_this, "blockDamage", "fixCollision", true] call FUNC(statusEffect_set);
// re-allow damage after 2 seconds
[{[_this, "blockDamage", "fixCollision", false] call FUNC(statusEffect_set);}, _this, 2] call CBA_fnc_waitAndExecute;