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
|
|
|
*
|
2015-09-20 14:56:35 +00:00
|
|
|
* Public: No
|
2015-03-17 10:44:41 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
// allowDamage requires local object
|
|
|
|
if (!local _this) exitWith {};
|
|
|
|
|
|
|
|
// prevent collision damage, @todo allowDamage API
|
|
|
|
_this allowDamage false;
|
|
|
|
|
|
|
|
// re-allow damage after 2 seconds
|
|
|
|
[{_this allowDamage true}, _this, 2, 0] call EFUNC(common,waitAndExecute);
|