Compare commits

...

2 Commits

Author SHA1 Message Date
Jacob Schmidt
4c9c2bd755 Merge branch 'master' of https://gitea.innovativedevsolutions.org/IDSolutions/client
All checks were successful
Build / Build (push) Successful in 27s
2025-05-25 12:36:37 -05:00
Jacob Schmidt
0cbe027b3b Fix: Correct typo in cargo damage handler
This commit corrects a typo in the cargo damage handler within `fnc_makeCargo.sqf`. The event handler name was misspelled as "Dammaged" instead of "Damaged". This has been corrected to ensure the event handler functions as intended. Additionally, the hint message displayed when cargo is severely damaged also had the same typo, which has been corrected.
2025-05-25 12:36:33 -05:00

View File

@ -27,13 +27,13 @@ if (_taskID == "") exitWith { diag_log "ERROR: No task ID provided for cargo"; }
SETPVAR(_cargo,assignedTask,_taskID); SETPVAR(_cargo,assignedTask,_taskID);
GVAR(allCargo) pushBack _cargo; GVAR(allCargo) pushBack _cargo;
_cargo addEventHandler ["Damaged", { _cargo addEventHandler ["Dammaged", {
params ["_unit", "_hitSelection", "_damage", "_hitPartIndex", "_hitPoint", "_shooter", "_projectile"]; params ["_unit", "_hitSelection", "_damage", "_hitPartIndex", "_hitPoint", "_shooter", "_projectile"];
if (damage _unit >= 0.7) then { if (damage _unit >= 0.7) then {
private _taskID = GETVAR(_unit,assignedTask,""); private _taskID = GETVAR(_unit,assignedTask,"");
if (_taskID isNotEqualTo "") then { if (_taskID isNotEqualTo "") then {
hint format ["Warning: Cargo severely damaged! Task: %1", _taskID]; hint format ["Warning: Cargo severely dammaged! Task: %1", _taskID];
}; };
}; };
}]; }];