mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
incendiary and cookoff improvements
This commit is contained in:
@ -53,4 +53,16 @@ class CfgVehicles {
|
|||||||
class O_MBT_02_cannon_F: O_MBT_02_base_F {
|
class O_MBT_02_cannon_F: O_MBT_02_base_F {
|
||||||
GVAR(turret)[] = {QGVAR(Turret_MBT_02),{0,-1,0}};
|
GVAR(turret)[] = {QGVAR(Turret_MBT_02),{0,-1,0}};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class MRAP_01_base_F: Car_F {
|
||||||
|
GVAR(engineSmokeOffset)[] = {0,-4,2};
|
||||||
|
};
|
||||||
|
|
||||||
|
class MRAP_02_base_F: Car_F {
|
||||||
|
GVAR(engineSmokeOffset)[] = {0,-4,2};
|
||||||
|
};
|
||||||
|
|
||||||
|
class MRAP_03_base_F: Car_F {
|
||||||
|
GVAR(engineSmokeOffset)[] = {0,-4,2};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -24,11 +24,17 @@ if (local _vehicle) then {
|
|||||||
[QGVAR(engineFire), _vehicle] call CBA_fnc_remoteEvent;
|
[QGVAR(engineFire), _vehicle] call CBA_fnc_remoteEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private _offset = getArray (_vehicle call CBA_fnc_getObjectConfig >> QGVAR(engineSmokeOffset));
|
||||||
|
|
||||||
|
if (_offset isEqualTo []) then {
|
||||||
|
_offset = [0,-2,2];
|
||||||
|
};
|
||||||
|
|
||||||
private _position = [
|
private _position = [
|
||||||
0,
|
0,
|
||||||
(boundingBoxReal _vehicle select 1 select 1) - 4,
|
(boundingBoxReal _vehicle select 1 select 1),
|
||||||
(boundingBoxReal _vehicle select 0 select 2) + 2
|
(boundingBoxReal _vehicle select 0 select 2)
|
||||||
];
|
] vectorAdd _offset;
|
||||||
|
|
||||||
private _smoke = "#particlesource" createVehicleLocal [0,0,0];
|
private _smoke = "#particlesource" createVehicleLocal [0,0,0];
|
||||||
_smoke setParticleClass "ObjectDestructionSmoke1_2Smallx";
|
_smoke setParticleClass "ObjectDestructionSmoke1_2Smallx";
|
||||||
|
@ -70,7 +70,7 @@ if (_simulationType == "tank") exitWith {
|
|||||||
_vehicle call FUNC(cookOff);
|
_vehicle call FUNC(cookOff);
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
if (_hitpoint in ["hitbody", "hitturret", "#structural"] && {_newDamage > 0.6 + random 0.3}) then {
|
if (_hitpoint in ["hithull", "hitturret", "#structural"] && {_newDamage > 0.6 + random 0.3}) then {
|
||||||
_vehicle call FUNC(cookOff);
|
_vehicle call FUNC(cookOff);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -144,7 +144,7 @@ if (isServer) then {
|
|||||||
//systemChat format ["burn: %1", _x];
|
//systemChat format ["burn: %1", _x];
|
||||||
|
|
||||||
// --- destroy nearby static weapons and ammo boxes
|
// --- destroy nearby static weapons and ammo boxes
|
||||||
if (_x isKindOf "StaticWeapon" || {_x isKindOf "ReammoBox_F"}) then {
|
if (_x isKindOf "StaticWeapon" || {_x isKindOf "ReammoBox_F"} || {_x isKindOf "ACE_RepairItem_Base"}) then {
|
||||||
_x setDamage 1;
|
_x setDamage 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -158,11 +158,39 @@ if (isServer) then {
|
|||||||
};
|
};
|
||||||
} forEach (_position nearObjects EFFECT_SIZE);
|
} forEach (_position nearObjects EFFECT_SIZE);
|
||||||
|
|
||||||
// --- burn car engine
|
// --- damage local vehicle
|
||||||
private _vehicle = _position nearestObject "Car";
|
private _vehicle = _position nearestObject "Car";
|
||||||
if (!local _vehicle || {_vehicle isKindOf "Wheeled_APC_F"}) exitWith {};
|
|
||||||
|
|
||||||
private _engineSelection = getText (_vehicle call CBA_fnc_getObjectConfig >> "HitPoints" >> "HitEngine" >> "name");
|
if (!local _vehicle) exitWith {};
|
||||||
|
|
||||||
|
private _config = _vehicle call CBA_fnc_getObjectConfig;
|
||||||
|
|
||||||
|
// --- burn tyres
|
||||||
|
private _fnc_isWheelHitPoint = {
|
||||||
|
params ["_selectionName"];
|
||||||
|
|
||||||
|
_selectionName select [0, 6] == "wheel_" && {
|
||||||
|
_selectionName select [count _selectionName - 9] == "_steering"
|
||||||
|
} // return
|
||||||
|
};
|
||||||
|
|
||||||
|
{
|
||||||
|
private _wheelSelection = getText (_config >> "HitPoints" >> _x >> "name");
|
||||||
|
|
||||||
|
// wheels must use a selection named "wheel_X_Y_steering"
|
||||||
|
if (_wheelSelection call _fnc_isWheelHitPoint) then {
|
||||||
|
private _wheelPosition = _vehicle modelToWorld (_vehicle selectionPosition _wheelSelection);
|
||||||
|
|
||||||
|
if (_position distance _wheelPosition < EFFECT_SIZE * 2) then {
|
||||||
|
_vehicle setHit [_wheelSelection, 1];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach (getAllHitPointsDamage _vehicle param [0, []]);
|
||||||
|
|
||||||
|
// --- burn car engine
|
||||||
|
if (_vehicle isKindOf "Wheeled_APC_F") exitWith {};
|
||||||
|
|
||||||
|
private _engineSelection = getText (_config >> "HitPoints" >> "HitEngine" >> "name");
|
||||||
private _enginePosition = _vehicle modelToWorld (_vehicle selectionPosition _engineSelection);
|
private _enginePosition = _vehicle modelToWorld (_vehicle selectionPosition _engineSelection);
|
||||||
|
|
||||||
if (_position distance _enginePosition < EFFECT_SIZE * 2) then {
|
if (_position distance _enginePosition < EFFECT_SIZE * 2) then {
|
||||||
|
@ -318,7 +318,7 @@ class CfgVehicles {
|
|||||||
mapSize = 0.7;
|
mapSize = 0.7;
|
||||||
accuracy = 0.2;
|
accuracy = 0.2;
|
||||||
vehicleClass = "ACE_Logistics_Items";
|
vehicleClass = "ACE_Logistics_Items";
|
||||||
destrType = "DesturctNo";
|
destrType = "DestructBuilding";
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_Track: ACE_RepairItem_Base {
|
class ACE_Track: ACE_RepairItem_Base {
|
||||||
|
Reference in New Issue
Block a user