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

Correcting Null Error & Adding an aid to avoid players losing stamina while WMO is active #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions BW_WalkableMovingObjects/fn_initWMO.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ if (isNil "WMO_noRoadway")then{WMO_noRoadway=[]}; //for objects that are not typ

0 spawn{
waitUntil {time > 1};
if !(isNil "babe_em_fnc_walkonstuff")then{
if !(isNil "babe_em_fnc_walkonstuff") then {
["EH_em_walkonstuff"] call babe_core_fnc_removeEH;
babe_em_help setposasl [0,0,0];
if !(isNil "babe_em_help") then {
babe_em_help setposasl [0,0,0];
};
};
WMO_noRoadway = WMO_noRoadway + ["NonSteerable_Parachute_F","Steerable_Parachute_F","B_Parachute_02_F","O_Parachute_02_F","I_Parachute_02_F"];
if !(isNull (configfile >> "CfgPatches" >> "acex_sitting"))then{
Expand Down
8 changes: 8 additions & 0 deletions BW_WalkableMovingObjects/fn_setPosi - Kopie.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ if !(WMO_Enabled) exitWith{if !(isNull BW_anker)then{[BW_anker,true] call BW_WMO

if !(vehicle player isEqualTo player)exitWith{if !(isNull BW_anker)then{[BW_anker,true] call BW_WMO_fnc_collision;BW_anker = objNull;}};

// Ace Fatigue recovery aid
if(!(isNil "ace_advanced_fatigue_anReserve")) then {
ace_advanced_fatigue_anReserve = ace_advanced_fatigue_anReserve + (ace_advanced_fatigue_recoveryFactor * 0.8);
if(ace_advanced_fatigue_anReserve >= 2300) then {
ace_advanced_fatigue_anReserve = 2300;
};
};

_line=(lineIntersectsSurfaces [getposworld player vectoradd [0,0,0],getposasl player vectoradd [0,0,-1.5],player,objNull,true,-1,"GEOM"])select {!isNull (_x select 3)};

if (count _line isEqualTo 0)exitWith{
Expand Down
8 changes: 8 additions & 0 deletions BW_WalkableMovingObjects/fn_setPosi.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ _obj = _upmost select 2;

if !([_obj]call BW_WMO_fnc_getsRoadway) exitWith {call BW_WMO_fnc_exit; BW_WMO_help setpos [0,0,0];};

// Ace Fatigue recovery aid
if(!(isNil "ace_advanced_fatigue_anReserve")) then {
ace_advanced_fatigue_anReserve = ace_advanced_fatigue_anReserve + (ace_advanced_fatigue_recoveryFactor * 0.8);
if(ace_advanced_fatigue_anReserve >= 2300) then {
ace_advanced_fatigue_anReserve = 2300;
};
};

_helperpos = _pos;
if(!isNull BW_anker)then{
_f = (_no vectorDotProduct (velocity BW_anker));
Expand Down