Skip to content

Commit

Permalink
Fix civilianKilledMsg
Browse files Browse the repository at this point in the history
  • Loading branch information
3Mydlo3 committed Mar 14, 2024
1 parent 0e970ae commit e012a48
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions addons/civilian/functions/fnc_civilianKilledMsg.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ if (_timeOfDeath isEqualType 0) then {
_timeOfDeath = [_timeOfDeath] call BIS_fnc_timeToString;
};

if (isNull _nearestTown) then {
_nearestTown = [_deadCivilian] call EFUNC(common,getNearestCityLocation);
private _nearestCity = if (isNull _nearestTown) then {
[_deadCivilian] call EFUNC(common,getNearestCity)
} else {
[_nearestTown] call FUNC(getCityByLocation)
};

private _msg = "";
private _nearestCityArea = _nearestTown getVariable QGVAR(cityArea);
private _nearestCityArea = _nearestCity getVariable QGVAR(cityArea);
private _isInCity = (position _deadCivilian) inArea _nearestCityArea;

// Check if distance is greater than 250 m. If so then change output a bit to represent that.
Expand Down

0 comments on commit e012a48

Please sign in to comment.