Skip to content

Commit

Permalink
Fixes from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
3Mydlo3 committed Jan 9, 2024
1 parent fcf817b commit cea9498
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ params ["_group"];

private _nearestVehicle = [_group] call FUNC(getGroupNearestVehicle);

((leader _group) distance (_nearestVehicle)) < 500
((leader _group) distance (_nearestVehicle)) < VEHICLE_SEARCH_RADIUS
4 changes: 3 additions & 1 deletion addons/civilian_statemachine/functions/fnc_moveToVehicle.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ params ["_group"];
private _vehicle = [_group] call FUNC(getNearestVehicle);

if (isNull _vehicle) exitWith {};
//diag_log format ["[AFSK] [STATEMACHINE] %1 | %2", _group, _vehicle];

private _waypoint = _group addWaypoint [_vehicle, 0];
_waypoint waypointAttachVehicle _vehicle;
_waypoint setWaypointType "GETIN";

TRACE_2("Group %1 getting in a vehicle %2", _group, _vehicle);
2 changes: 2 additions & 0 deletions addons/civilian_statemachine/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
#endif

#include "\z\afsk\addons\main\script_macros.hpp"

#define VEHICLE_SEARCH_RADIUS 500

0 comments on commit cea9498

Please sign in to comment.