Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

radikal ausmisten bei patrol #160

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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/patrol/functions/fnc_sm_business.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ private _bus_patrol = [
{ _this call FUNC(sm_business_state_patrol_enter) },
{ _this call FUNC(sm_business_state_patrol_exit) },
QUOTE(bus_patrol)
] call EFUNC(cba_statemachine,addState);;
] call EFUNC(cba_statemachine,addState);


// TRANSITIONS patrol:
Expand Down
21 changes: 9 additions & 12 deletions addons/patrol/functions/fnc_sm_business_state_patrol_enter.sqf
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
#include "..\script_component.hpp"

if (_this == leader _this) then {
private _leader = leader _this;

_this stop false;
_this call EFUNC(activities,forceEmotionSpeed);
_this doFollow _leader;

if (_this == _leader) then {
private _grp = group _this;
(units _grp) doFollow (leader _this);
[_this, _this, 400 - (random 300), [3,6], [0,2,10]] call FUNC(taskPatrol);
_grp setSpeedMode "LIMITED";

{ // TODO why am I doing this, and if yes, why only here and not when entering other states?
_x setSpeedMode "LIMITED";
_x forceSpeed -1;
_x stop false; // should not be necessary
_x playMoveNow "AmovPercMstpSnonWnonDnon";
_x enableDynamicSimulation true;
false
} count (units _grp);
_this call EFUNC(activities,forceEmotionSpeed);
[_this, _this, 400 - (random 300), [3,6], [0,2,10]] call FUNC(taskPatrol);
};