Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
13e3ba3
Reworked fire module
johnb432 Jan 26, 2024
623ce0b
Merge branch 'master' into fire-refactor
johnb432 Jan 26, 2024
ccb09e6
Update fnc_burn.sqf
johnb432 Feb 3, 2024
41bd5bf
Fire deals more damage
johnb432 Feb 5, 2024
e2f94af
Merge branch 'master' into fire-refactor
johnb432 Feb 5, 2024
8f3a1e9
Update fnc_burnEffects.sqf
johnb432 Feb 5, 2024
7586048
Merged main
johnb432 Feb 6, 2024
a35864c
Minor tweaks
johnb432 Feb 6, 2024
b5dfe0a
Removed outdated comment
johnb432 Feb 12, 2024
70b21f6
Minor cleanup
johnb432 Feb 12, 2024
eb02fd7
Use eyePos for better position
johnb432 Feb 13, 2024
a9dde6d
Merge branch 'master' into fire-refactor
johnb432 Mar 24, 2024
1aaaa37
Update fnc_burnSimulation.sqf
johnb432 Mar 26, 2024
c0344ee
Merge branch 'master' into fire-refactor
johnb432 Apr 1, 2024
2af0da4
Fixed headers, made fire simulation local
johnb432 Apr 1, 2024
4f51eed
Merge branch 'master' into fire-refactor
johnb432 Apr 4, 2024
2bf85c0
Medical damage fix for dead units, cleanup
johnb432 Apr 10, 2024
02539ef
Merge branch 'master' into fire-refactor
johnb432 Apr 19, 2024
201366c
Merge branch 'master' into fire-refactor
johnb432 May 26, 2024
4b3d283
Update XEH_PREP.hpp
johnb432 May 26, 2024
9546ca2
Update fnc_cookOffEffect.sqf
johnb432 May 26, 2024
48f3d19
Update compats
johnb432 Jun 2, 2024
a93c0b4
Added TRACE macros
johnb432 Jun 2, 2024
0f24464
Minor tweaks
johnb432 Jun 2, 2024
acc9e09
Merge branch 'master' into fire-refactor
johnb432 Jun 2, 2024
94acbf2
Update initSettings.inc.sqf
johnb432 Jun 2, 2024
de652d5
Update comment to bring up to standard
johnb432 Jun 5, 2024
dcbefb2
Merge branch 'master' into fire-refactor
johnb432 Jun 5, 2024
8c3dacc
Update fnc_cookOffServer.sqf
johnb432 Jun 5, 2024
209d3ff
Update XEH_postInit.sqf
johnb432 Jun 6, 2024
a4968b5
Minor tweaks and cleanup
johnb432 Jun 6, 2024
303136a
More cleanup
johnb432 Jun 11, 2024
7b6ffe5
Merge branch 'master' into fire-refactor
johnb432 Jun 16, 2024
d17e003
Enforce code
johnb432 Jun 17, 2024
fb42389
comment grammar
LinkIsGrim Jun 20, 2024
4c50f53
Correct comment
johnb432 Jun 20, 2024
cb7ea45
Merge branch 'master' into fire-refactor
johnb432 Jun 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/cookoff/functions/fnc_cookOff.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ if (_smokeDelayEnabled) then {
_vehicle setVariable [QGVAR(nextFlame), _time + (MIN_TIME_BETWEEN_FLAMES max random MAX_TIME_BETWEEN_FLAMES)];

{
[QEGVAR(fire,burn), [_x, _intensity * 1.5, _instigator]] call CBA_fnc_globalEvent;
[QEGVAR(fire,burn), [_x, _intensity * 1.5, _instigator], _x] call CBA_fnc_targetEvent;
} forEach crew _vehicle
};

Expand Down
6 changes: 3 additions & 3 deletions addons/fire/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
PREP(burn);
PREP(isBurning);
PREP(isPlant);
PREP(burnEffects);
PREP(burnIndicator);
PREP(burnReaction);
PREP(burnSimulation);
PREP(fireManagerPFH);

PREP(isBurning);
PREP(medical_progress);
PREP(medical_success);
PREP(medical_canPatDown);
42 changes: 25 additions & 17 deletions addons/fire/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,38 +1,46 @@
#include "script_component.hpp"

[QGVAR(burn), FUNC(burn)] call CBA_fnc_addEventHandler;
[QGVAR(burn), LINKFUNC(burn)] call CBA_fnc_addEventHandler;
[QGVAR(burnEffects), LINKFUNC(burnEffects)] call CBA_fnc_addEventHandler;
[QGVAR(burnSimulation), LINKFUNC(burnSimulation)] call CBA_fnc_addEventHandler;

// Only play sound if enabled in settings
[QGVAR(playScream), {
if (!GVAR(enableScreams)) exitWith {};

params ["_scream", "_source"];
// only play sound if enabled in settings
if (GVAR(enableScreams)) then {
_source say3D _scream;
};

_source say3D _scream;
}] call CBA_fnc_addEventHandler;

["ace_settingsInitialized", {
TRACE_1("settingsInit", GVAR(enabled));
if (!GVAR(enabled)) exitWith {};
if (isServer) then {
["CBA_settingsInitialized", {
TRACE_1("settingsInit", GVAR(enabled));

if (!GVAR(enabled)) exitWith {};

GVAR(fireSources) = createHashMap;

if (isServer) then {
[QGVAR(addFireSource), {
params ["_source", "_radius", "_intensity", "_key", ["_condition", { true }], ["_conditionArgs", []]];
params ["_source", "_radius", "_intensity", "_key", ["_condition", {true}], ["_conditionArgs", []]];

private _fireLogic = createVehicle ["ACE_LogicDummy", [0, 0, 0], [], 0, "NONE"];

if (_source isEqualType objNull) then {
_fireLogic attachTo [_source];
} else {
_fireLogic setPosASL _source;
};

[GVAR(fireSources), _key, [_fireLogic, _radius, _intensity, _condition, _conditionArgs]] call CBA_fnc_hashSet;
GVAR(fireSources) set [_key, [_fireLogic, _radius, _intensity, _condition, _conditionArgs]];
}] call CBA_fnc_addEventHandler;

[QGVAR(removeFireSource), {
params ["_key"];
[GVAR(fireSources), _key] call CBA_fnc_hashRem;
}] call CBA_fnc_addEventHandler;

[{ _this call FUNC(fireManagerPFH) }, FIRE_MANAGER_PFH_DELAY, []] call CBA_fnc_addPerFrameHandler;
GVAR(fireSources) = [[], nil] call CBA_fnc_hashCreate;
};
}] call CBA_fnc_addEventHandler;
GVAR(fireSources) deleteAt _key;
}] call CBA_fnc_addEventHandler;

[LINKFUNC(fireManagerPFH), FIRE_MANAGER_PFH_DELAY, []] call CBA_fnc_addPerFrameHandler;
}] call CBA_fnc_addEventHandler;
};
2 changes: 0 additions & 2 deletions addons/fire/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ PREP_RECOMPILE_END;

#include "initSettings.inc.sqf"

GVAR(burningPlants) = [];

ADDON = true;
Loading