mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Disable headbugfix for Handcuffed/Surrender,unconscious,water surface and log the situation locally and on server.
This commit is contained in:
parent
07845d5a89
commit
876a039e36
@ -37,6 +37,13 @@
|
||||
};
|
||||
}] call FUNC(addEventhandler);
|
||||
|
||||
|
||||
["HeadbugFixUsed", {
|
||||
PARAMS_2(_profileName,_animation);
|
||||
diag_log text format ["[ACE] Headbug Used: Name: %1, Animation: %2", _profileName, _animation];
|
||||
}] call FUNC(addEventHandler);
|
||||
|
||||
|
||||
//~~~~~Get Map Data~~~~~
|
||||
//Find MGRS zone and 100km grid for current map
|
||||
[] call FUNC(getMGRSdata);
|
||||
|
@ -10,21 +10,28 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
private ["_pos","_dir","_anim"];
|
||||
if (player != vehicle player || {(player getvariable ["ace_isUnconscious", false])}) exitWith {};
|
||||
|
||||
_anim = animationState ACE_player;
|
||||
["HeadbugFixUsed", [profileName, (animationState ACE_player)]] call FUNC(serverEvent);
|
||||
["HeadbugFixUsed", [profileName, (animationState ACE_player)]] call FUNC(localEvent);
|
||||
|
||||
if (ACE_player != vehicle ACE_player || { !([ACE_player, objNull, ["isNotSitting"]] call FUNC(canInteractWith)) } ) exitWith {false};
|
||||
|
||||
_pos = getposATL ACE_player;
|
||||
_dir = getDir ACE_player;
|
||||
|
||||
titleCut ["", "BLACK"];
|
||||
_pos = getposATL player;
|
||||
_dir = getDir player;
|
||||
_anim = animationState player;
|
||||
|
||||
// create invisible headbug fix vehicle
|
||||
_ACE_HeadbugFix = createVehicle ["ACE_Headbug_Fix", getposATL player, [], 0, "NONE"];
|
||||
_ACE_HeadbugFix = createVehicle ["ACE_Headbug_Fix", getposATL ACE_player, [], 0, "NONE"];
|
||||
_ACE_HeadbugFix setDir _dir;
|
||||
player moveInAny _ACE_HeadbugFix;
|
||||
ACE_player moveInAny _ACE_HeadbugFix;
|
||||
sleep 1.0;
|
||||
unassignVehicle player;
|
||||
player action ["Eject", vehicle player];
|
||||
unassignVehicle ACE_player;
|
||||
ACE_player action ["Eject", vehicle ACE_player];
|
||||
sleep 1.0;
|
||||
deleteVehicle _ACE_HeadbugFix;
|
||||
player setposATL _pos;
|
||||
player setDir _dir;
|
||||
ACE_player setposATL _pos;
|
||||
ACE_player setDir _dir;
|
||||
titleCut ["", "PLAIN"];
|
||||
|
||||
true
|
||||
|
Loading…
Reference in New Issue
Block a user