mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
3feafc449f
* Add Flip and Push actions to Quad Bike * Add actions to karts and static weapons * Move magic number to macro * Ditch here is * Move condition to function
26 lines
620 B
Plaintext
26 lines
620 B
Plaintext
/*
|
|
* Author: Dystopian
|
|
* Checks if vehicle can be flipped.
|
|
*
|
|
* Arguments:
|
|
* 0: Vehicle <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Can Flip <BOOL>
|
|
*
|
|
* Example:
|
|
* [cursorObject] call ace_interaction_fnc_canFlip
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_vehicle"];
|
|
|
|
// most suitable mass for all vanilla, CUP and RHS statics ATM (ZU-23 suits, D-30 and M119 don't suit)
|
|
#define FLIP_MAX_STATICWEAPON_MASS 2000
|
|
|
|
1 < (vectorUp _vehicle) vectorDistance (surfaceNormal getPosATL _vehicle)
|
|
&& {0 == {alive _x} count crew _vehicle || {isAutonomous _vehicle}}
|
|
&& {getMass _vehicle <= FLIP_MAX_STATICWEAPON_MASS}
|