2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-03-17 10:44:41 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
2015-09-20 14:56:35 +00:00
|
|
|
* Attempt to fix PhysX collisions causing unreasonable impact forces and damage.
|
2015-03-17 10:44:41 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2015-09-20 14:56:35 +00:00
|
|
|
* Object <OBJECT>
|
2015-03-17 10:44:41 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2015-09-20 14:56:35 +00:00
|
|
|
* None
|
2015-03-17 10:44:41 +00:00
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [bob] call ace_common_fnc_fixCollision
|
|
|
|
*
|
2015-09-20 14:56:35 +00:00
|
|
|
* Public: No
|
2015-03-17 10:44:41 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
// allowDamage requires local object
|
|
|
|
if (!local _this) exitWith {};
|
|
|
|
|
2016-01-13 00:18:12 +00:00
|
|
|
// prevent collision damage
|
|
|
|
[_this, "blockDamage", "fixCollision", true] call FUNC(statusEffect_set);
|
2015-03-17 10:44:41 +00:00
|
|
|
|
|
|
|
// re-allow damage after 2 seconds
|
2016-05-22 13:27:24 +00:00
|
|
|
[{[_this, "blockDamage", "fixCollision", false] call FUNC(statusEffect_set);}, _this, 2] call CBA_fnc_waitAndExecute;
|