mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
remove static fix from vmedical component
This commit is contained in:
parent
8a8bc6a336
commit
2ac52fb430
@ -10,34 +10,4 @@ GVAR(SELECTIONS) = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"];
|
||||
call FUNC(parseConfigForInjuries);
|
||||
GVAR(STATE_MACHINE) = (configFile >> "ACE_Medical_StateMachine") call FUNC(createStateMachine);
|
||||
|
||||
//Hack for #3168 (units in static weapons do not take any damage):
|
||||
//doing a manual pre-load with a small distance seems to fix the LOD problems with handle damage not returning full results
|
||||
GVAR(fixedStatics) = [];
|
||||
private _fixStatic = {
|
||||
params ["_vehicle"];
|
||||
private _vehType = typeOf _vehicle;
|
||||
TRACE_2("",_vehicle,_vehType);
|
||||
if (!(_vehType in GVAR(fixedStatics))) then {
|
||||
GVAR(fixedStatics) pushBack _vehType;
|
||||
TRACE_1("starting preload",_vehType);
|
||||
[{
|
||||
1 preloadObject (_this select 0);
|
||||
}, {
|
||||
TRACE_1("preload done",_this);
|
||||
}, [_vehType]] call CBA_fnc_waitUntilAndExecute;
|
||||
};
|
||||
};
|
||||
["StaticWeapon", "init", _fixStatic] call CBA_fnc_addClassEventHandler;
|
||||
["Car", "init", _fixStatic] call CBA_fnc_addClassEventHandler;
|
||||
addMissionEventHandler ["Loaded",{
|
||||
{
|
||||
TRACE_1("starting preload (save load)",_x);
|
||||
[{
|
||||
1 preloadObject (_this select 0);
|
||||
}, {
|
||||
TRACE_1("preload done",_this);
|
||||
}, [_x]] call CBA_fnc_waitUntilAndExecute;
|
||||
} forEach GVAR(fixedStatics);
|
||||
}];
|
||||
|
||||
ADDON = true;
|
||||
|
@ -41,47 +41,3 @@
|
||||
];
|
||||
}] call CBA_fnc_waitUntilAndExecute;
|
||||
#endif
|
||||
|
||||
// Hack for #3168 (units in static weapons do not take any damage):
|
||||
// Doing a manual pre-load with a small distance seems to fix the LOD problems
|
||||
// with handle damage not returning full results.
|
||||
GVAR(fixedStatics) = [];
|
||||
|
||||
private _fnc_fixStatic = {
|
||||
params ["_vehicle"];
|
||||
|
||||
private _type = typeOf _vehicle;
|
||||
TRACE_2("",_vehicle,_type);
|
||||
|
||||
if !(_type in GVAR(fixedStatics)) then {
|
||||
GVAR(fixedStatics) pushBack _type;
|
||||
|
||||
ACE_LOGINFO_1("Starting preload for ""%1""",_type);
|
||||
[{
|
||||
1 preloadObject _this;
|
||||
}, {
|
||||
ACE_LOGINFO_1("Preload done for ""%1""",_this);
|
||||
}, _type] call CBA_fnc_waitUntilAndExecute;
|
||||
};
|
||||
};
|
||||
|
||||
["StaticWeapon", "init", _fnc_fixStatic, nil, nil, true] call CBA_fnc_addClassEventHandler;
|
||||
["Car", "init", _fnc_fixStatic, nil, nil, true] call CBA_fnc_addClassEventHandler;
|
||||
|
||||
addMissionEventHandler ["Loaded", {
|
||||
{
|
||||
ACE_LOGINFO_1("Starting preload for ""%1""",_x);
|
||||
[{
|
||||
1 preloadObject _this;
|
||||
}, {
|
||||
ACE_LOGINFO_1("Preload done for ""%1""",_this);
|
||||
}, _x] call CBA_fnc_waitUntilAndExecute;
|
||||
} forEach GVAR(fixedStatics);
|
||||
}];
|
||||
|
||||
#define BLAH __FILE__
|
||||
diag_log BLAH;
|
||||
|
||||
diag_log 127;
|
||||
|
||||
diag_log __FILE__;
|
||||
|
@ -4,6 +4,30 @@ ADDON = false;
|
||||
|
||||
#include "XEH_PREP.hpp"
|
||||
|
||||
// Hack for #3168 (units in static weapons do not take any damage):
|
||||
// Doing a manual pre-load with a small distance seems to fix the LOD problems
|
||||
// with handle damage not returning full results.
|
||||
GVAR(fixedStatics) = [];
|
||||
|
||||
private _fnc_fixStatic = {
|
||||
params ["_vehicle"];
|
||||
private _type = typeOf _vehicle;
|
||||
|
||||
if !(_type in GVAR(fixedStatics)) then {
|
||||
GVAR(fixedStatics) pushBack _type;
|
||||
PRELOAD_CLASS(_type);
|
||||
};
|
||||
};
|
||||
|
||||
["StaticWeapon", "init", _fnc_fixStatic] call CBA_fnc_addClassEventHandler;
|
||||
["Car", "init", _fnc_fixStatic] call CBA_fnc_addClassEventHandler;
|
||||
|
||||
addMissionEventHandler ["Loaded", {
|
||||
{
|
||||
PRELOAD_CLASS(_x);
|
||||
} forEach GVAR(fixedStatics);
|
||||
}];
|
||||
|
||||
// HitScream
|
||||
GVAR(HitScreamNamespace) = [] call CBA_fnc_createNamespace;
|
||||
GVAR(HitScreamNamespace) setVariable ["#default", "Male08ENG"];
|
||||
|
@ -27,3 +27,11 @@
|
||||
|
||||
#define EMPTY_SOUND {"A3\Sounds_F\dummysound.wss",1,1}
|
||||
#define NAMESPACE_NULL locationNull
|
||||
|
||||
#define PRELOAD_CLASS(class) \
|
||||
LOG_1("Starting preload for ""%1""",class);\
|
||||
[{\
|
||||
1 preloadObject _this;\
|
||||
}, {\
|
||||
LOG_1("Preload done for ""%1""",_this);\
|
||||
}, class] call CBA_fnc_waitUntilAndExecute
|
||||
|
Loading…
Reference in New Issue
Block a user