Fix fresh spawns running on login

Vanilla commit:

cbb1b7ab90
This commit is contained in:
ebayShopper
2017-12-02 17:27:41 -05:00
parent fa0dfd4c47
commit 973247950e
3 changed files with 11 additions and 1 deletions

View File

@@ -83,6 +83,7 @@
[FIXED] Floating loot positions in hotel (Land_HouseB_Tenement)
[FIXED] Updates to humanity and player stats after a skin change not always saving in hive (server_getDiff)
[FIXED] Bad vehicle type crew error for RHIB2Turret on A2OA main menu intro scene
[FIXED] Fresh spawns running on login if they died while running
[NOTE] Fixes below were included in hotfix 1.0.6.1A (March 10th 2017) and are now in the default files.
[FIXED] Fixed food and drink going down 10x faster from melee and other "working" actions.

View File

@@ -1063,7 +1063,7 @@ class FSM
"//_state = player getVariable[""state"",[]];" \n
"_currentWpn = """";" \n
"_currentAnim = """";" \n
"if ((!isNil ""_state"") AND {(count _state > 1)}) then {" \n
"if (!isNil '_state' && {count _state > 1} && {_state select 1 != 'reset'}) then {" \n
" //Reload players state" \n
" _currentWpn = _state select 0;" \n
" _currentAnim = _state select 1;" \n
@@ -1074,6 +1074,12 @@ class FSM
"} else {" \n
" _currentWpn = ""Makarov"";" \n
" _currentAnim = ""aidlpercmstpsraswpstdnon_player_idlesteady02"";" \n
" //Prevent fresh spawns running on login when they died running, switchMove does not stop it" \n
" disableUserInput true;" \n
" player playActionNow 'Stop';" \n
" disableUserInput false;" \n
" disableUserInput true;" \n
" disableUserInput false;" \n
"};" \n
"" \n
"reload player;" \n

View File

@@ -205,6 +205,9 @@ if (_randomSpot) then {
diag_log format["%1: Error, failed to find a suitable spawn spot for player. area:%2",__FILE__, _mkr];
};
_worldspace = [0,_position];
//Fresh spawn, clear animationState so anim from last sync does not play on login
_state = ["","reset"];
};
//record player pos locally for server checking