ACE3/addons/compat_sog/functions/fnc_handleBikeMinePlace.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

29 lines
570 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: veteran29
* Handle placement of bike mine object.
*
* Arguments:
* 0: Bike mine <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bikeMine] call ace_compat_sog_fnc_handleBikeMinePlace
*
* Public: No
*/
params ["_mine"];
if (!local _mine) exitWith {};
// change COM to have the bike upright like the placed mine
_mine setCenterOfMass [0,0, -0.5];
// prevent the object from swinging left and right
[{isTouchingGround _this}, {
_this setVelocity [0,0,0]
}, _mine, 3] call CBA_fnc_waitUntilAndExecute;