mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
more common cleanup
This commit is contained in:
parent
c0fdd80ba4
commit
39786420fa
@ -1,25 +1,25 @@
|
|||||||
/*
|
/*
|
||||||
* Author: KoffeinFlummi
|
* Author: KoffeinFlummi
|
||||||
*
|
|
||||||
* Returns the Hadamard Product of two vectors.
|
* Returns the Hadamard Product of two vectors.
|
||||||
* (x hadamard y) = [x1*y1, x2*y2, x3*y3]
|
* (x hadamard y) = [x1*y1, x2*y2, x3*y3]
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Vector 1
|
* 0: Vector 1 <ARRAY>
|
||||||
* 1: Vector 2
|
* 1: Vector 2 <ARRAY>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Hadamard Product
|
* Hadamard Product <ARRAY>
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_vector1,_vector2);
|
params ["_vector1", "_vector2"];
|
||||||
|
|
||||||
private ["_newVector", "_i"];
|
|
||||||
|
|
||||||
|
private "_newVector";
|
||||||
_newVector = [];
|
_newVector = [];
|
||||||
|
|
||||||
for "_i" from 0 to (((count _vector1) min (count _vector2)) - 1) do {
|
for "_i" from 0 to ((count _vector1 min count _vector2) - 1) do {
|
||||||
_newVector pushBack ((_vector1 select _i) * (_vector2 select _i));
|
_newVector pushBack ((_vector1 select _i) * (_vector2 select _i));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,42 +1,49 @@
|
|||||||
/**
|
/*
|
||||||
* fnc_headbugfix.sqf
|
* Author: rocko
|
||||||
* @Descr: Fixes animation issues that may get you stuck
|
* Fixes animation issues that may get you stuck
|
||||||
* @Author: rocko
|
|
||||||
*
|
*
|
||||||
* @Arguments:
|
* Arguments:
|
||||||
* @Return: nil
|
* None
|
||||||
* @PublicAPI: true
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
|
*
|
||||||
|
* Note: Has to be spawned not called
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_pos","_dir","_anim"];
|
|
||||||
|
|
||||||
_anim = animationState ACE_player;
|
private ["_unit", "_anim", "_pos", "_dir", "_dummy"];
|
||||||
|
|
||||||
|
_unit = ACE_player;
|
||||||
|
_anim = animationState _unit;
|
||||||
|
|
||||||
["HeadbugFixUsed", [profileName, _anim]] call FUNC(serverEvent);
|
["HeadbugFixUsed", [profileName, _anim]] call FUNC(serverEvent);
|
||||||
["HeadbugFixUsed", [profileName, _anim]] call FUNC(localEvent);
|
["HeadbugFixUsed", [profileName, _anim]] call FUNC(localEvent);
|
||||||
|
|
||||||
if (ACE_player != vehicle ACE_player || { !([ACE_player, objNull, ["isNotSitting"]] call FUNC(canInteractWith)) } ) exitWith {false};
|
if (_unit != vehicle _unit || {!([_unit, objNull, ["isNotSitting"]] call FUNC(canInteractWith))}) exitWith {false};
|
||||||
|
|
||||||
_pos = getposATL ACE_player;
|
_pos = getPosATL _unit;
|
||||||
_dir = getDir ACE_player;
|
_dir = getDir _unit;
|
||||||
|
|
||||||
titleCut ["", "BLACK"];
|
titleCut ["", "BLACK"];
|
||||||
[ACE_Player, "headBugFix"] call FUNC(hideUnit);
|
[_unit, "headBugFix"] call FUNC(hideUnit);
|
||||||
|
|
||||||
// create invisible headbug fix vehicle
|
// create invisible headbug fix vehicle
|
||||||
_ACE_HeadbugFix = "ACE_Headbug_Fix" createVehicleLocal _pos;
|
_dummy = createVehicle ["ACE_Headbug_Fix", _pos, [], 0, "NONE"];
|
||||||
_ACE_HeadbugFix setDir _dir;
|
_dummy setDir _dir;
|
||||||
ACE_player moveInAny _ACE_HeadbugFix;
|
_unit moveInAny _dummy;
|
||||||
sleep 0.1;
|
sleep 0.1;
|
||||||
|
|
||||||
unassignVehicle ACE_player;
|
unassignVehicle _unit;
|
||||||
ACE_player action ["Eject", vehicle ACE_player];
|
_unit action ["Eject", vehicle _unit];
|
||||||
ACE_player setDir _dir;
|
_unit setDir _dir;
|
||||||
ACE_player setposATL _pos;
|
_unit setPosATL _pos;
|
||||||
sleep 1.0;
|
sleep 1.0;
|
||||||
|
|
||||||
deleteVehicle _ACE_HeadbugFix;
|
deleteVehicle _dummy;
|
||||||
|
|
||||||
[ACE_Player, "headBugFix"] call FUNC(unhideUnit);
|
[_unit, "headBugFix"] call FUNC(unhideUnit);
|
||||||
titleCut ["", "PLAIN"];
|
titleCut ["", "PLAIN"];
|
||||||
true
|
true
|
||||||
|
@ -14,10 +14,9 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_unit,_reason);
|
params ["_unit", "_reason"];
|
||||||
|
|
||||||
if (isNull _unit) exitWith {};
|
if (isNull _unit) exitWith {};
|
||||||
|
|
||||||
@ -29,6 +28,6 @@ if !(_reason in _setHiddenReasons) then {
|
|||||||
_unit setVariable [QGVAR(setHiddenReasons), _setHiddenReasons, true];
|
_unit setVariable [QGVAR(setHiddenReasons), _setHiddenReasons, true];
|
||||||
};
|
};
|
||||||
|
|
||||||
//if !(isObjectHidden _unit) then { (Uncomment when isObjectHidden hits stable branch)
|
if !(isObjectHidden _unit) then {
|
||||||
["hideObjectGlobal",[_unit,true]] call FUNC(serverEvent);
|
["hideObjectGlobal", [_unit, true]] call FUNC(serverEvent);
|
||||||
//};
|
};
|
||||||
|
@ -1,4 +1,15 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Check if given unit is in a transitional animation
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: A soldier <Object>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* <Bool>
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState (_this select 0) >> "looped") == 0
|
getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState (_this select 0) >> "looped") == 0
|
||||||
|
Loading…
Reference in New Issue
Block a user