mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
parent
e2b8998d4b
commit
e1b83b8172
@ -125,4 +125,25 @@ call FUNC(parseConfigForInjuries);
|
||||
GVAR(HITPOINTS) = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
|
||||
GVAR(SELECTIONS) = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"];
|
||||
|
||||
//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 EFUNC(common,waitUntilAndExecute);
|
||||
};
|
||||
};
|
||||
["StaticWeapon", "init", _fixStatic] call CBA_fnc_addClassEventHandler;
|
||||
["Car", "init", _fixStatic] call CBA_fnc_addClassEventHandler;
|
||||
|
||||
|
||||
ADDON = true;
|
||||
|
Loading…
Reference in New Issue
Block a user