Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Filip Maciejewski <[email protected]>
  • Loading branch information
3Mydlo3 and veteran29 authored Jan 28, 2024
1 parent 7248bf1 commit 5b0cad9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion addons/civilian_statemachine/CivilianMovement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class CivilianMovement {
onStateLeaving = "";
class InVehicle {
targetState = "EnteredVehicle";
condition = "!((vehicle leader _this) isEqualTo (leader _this))";
condition = "(vehicle leader _this) isNotEqualTo (leader _this)";
onTransition = "";
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@
params ["_group"];

// Get all group vehicles
private _groupVehicles = [];
{
private _vehicle = _x getVariable [QGVAR(ownedVehicle), objNull];
if (!isNull _vehicle) then {
_groupVehicles pushBackUnique _vehicle;
};
} forEach (units _group);
private _groupVehicles = units _group apply {_x getVariable [QGVAR(ownedVehicle), objNull]} select {!isNull _x};
_groupVehicles arrayIntersect _groupVehicles // return

_groupVehicles

0 comments on commit 5b0cad9

Please sign in to comment.