diff --git a/Server_Install_Pack/@epochhive/epochconfig.hpp b/Server_Install_Pack/@epochhive/epochconfig.hpp index e83f2310..976147ea 100644 --- a/Server_Install_Pack/@epochhive/epochconfig.hpp +++ b/Server_Install_Pack/@epochhive/epochconfig.hpp @@ -46,7 +46,7 @@ defaultuniformItems[] = {}; // {{"FAK",1},{"30Rnd_65x39_caseless_mag",2, defaultvestItems[] = {}; // {{"30Rnd_65x39_caseless_mag",3,30},{"16Rnd_9x21_Mag",2,16},{"SmokeShell",1,1},{"SmokeShellGreen",1,1},{"SmokeShellBlue",1,1},{"SmokeShellOrange",1,1},{"Chemlight_green",1,1}}; defaultbackpackItems[] = {}; // {{"Medikit",1},{"FAK",10},{{"hgun_P07_F","","","",{"16Rnd_9x21_Mag",16},{},""},1}}; defaultassignedItems[] = {}; // {"Rangefinder","","","",{},{},""} -defaultlinkedItems[] = {"ItemMap","","EpochRadio0","","",""}; // {"ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGoggles"}; +defaultlinkedItems[] = {"ItemMap","","EpochRadio0","","",""}; // {"ItemMap","ItemGPS","EpochRadio0","ItemCompass","ItemWatch","NVG_EPOCH"}; // vehicles - Max vehicle slots is calculated from per vehicle limits below. Warning! Higher the number lower the performance. disableAutoRefuel = "true"; // Removes auto refuel from all buildings at server startup. diff --git a/Sources/epoch_code/System/player_login.fsm b/Sources/epoch_code/System/player_login.fsm index 73dd5d43..9a18eee8 100644 --- a/Sources/epoch_code/System/player_login.fsm +++ b/Sources/epoch_code/System/player_login.fsm @@ -1,4 +1,4 @@ -/*%FSM*/ +/*%FSM*/ /*%FSM*/ /* item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; @@ -183,8 +183,8 @@ link93[] = {82,76}; link94[] = {83,16}; link95[] = {83,22}; link96[] = {84,31}; -globals[] = {0.000000,0,0,0,0,640,480,1,247,6316128,1,-618.033569,546.485168,2139.147705,423.870514,573,844,1}; -window[] = {2,-1,-1,-1,-1,959,-1728,-744,192,3,595}; +globals[] = {0.000000,0,0,0,0,640,480,1,247,6316128,1,-274.133728,202.585022,1414.458496,684.095581,577,884,1}; +window[] = {2,-1,-1,-1,-1,949,182,1166,182,3,595}; *//*%FSM*/ class FSM { @@ -1397,6 +1397,7 @@ class FSM "Epoch_my_Group = _C_SET deleteAt 0;" \n "_communityStats = _C_SET deleteAt 0;" \n "_hitpoints = _C_SET deleteAt 0;" \n + "_animationState = _C_SET deleteAt 0; // todo do something with _animationState" \n "" \n "_extraPayload = _C_SET deleteAt 0;" \n "" \n @@ -1444,4 +1445,4 @@ class FSM "Reject_without_B", }; }; -/*%FSM*/ +/*%FSM*/ \ No newline at end of file diff --git a/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf b/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf index b612e016..d1483845 100644 --- a/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf +++ b/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf @@ -63,6 +63,7 @@ if (!isNull _player) then { _assignedItems = [_serverSettingsConfig, "defaultassignedItems", ["","","","",[],[],""]] call EPOCH_fnc_returnConfigEntry; // ["Rangefinder","","","",[],[],""] _linkedItems = [_serverSettingsConfig, "defaultlinkedItems", ["ItemMap","","EpochRadio0","","",""]] call EPOCH_fnc_returnConfigEntry; // ["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGoggles"] _currentWeapon = [_serverSettingsConfig, "defaultSelectedWeapon", ""] call EPOCH_fnc_returnConfigEntry; // class of selected weapon + _defaultAnimationState = [_serverSettingsConfig, "defaultAnimationState", ""] call EPOCH_fnc_returnConfigEntry; // class of selected weapon _loadout = [ _primaryWeapon, @@ -78,7 +79,7 @@ if (!isNull _player) then { ]; // default data, if "Player" data format is changed update this array! - _defaultData = [[0, [], _instanceID, 1.0], [0, 0, 1, 0, [0,0,0,0,0,0,0,0,0,0,0]], ["", "", "", "", _currentWeapon, _class], [], call EPOCH_defaultVars_SEPXVar, _loadout, [], [], [], [], "", true]; + _defaultData = [[0, [], _instanceID, 1.0], [0, 0, 1, 0, [0,0,0,0,0,0,0,0,0,0,0]], ["", "", "", _defaultAnimationState, _currentWeapon, _class], [], call EPOCH_defaultVars_SEPXVar, _loadout, [], [], [], [], "", true]; // If data does not validate against default or is too short, override with default data. if !(_playerData isEqualTypeParams _defaultData) then { @@ -207,22 +208,23 @@ if (!isNull _player) then { // set player loadout if (_schemaVersion >= 1.0) then { - _playerData params ["","","_apperance","","","_loadout"]; + _playerData params ["","","_appearance","","","_loadout"]; // get current weapon to send to param for selectWeapon - _currentWeapon = _apperance param [4,""]; + _currentAnimationState = _appearance param [3,""]; + _currentWeapon = _appearance param [4,""]; // _newPlyr setUnitLoadout [_loadout, false]; - + // Workaround for Client / Server synchronizing issue in SetUnitLoadout [_newPlyr,_loadout] call Epoch_server_SetUnitLoadout; - + diag_log format["DEBUG: loaded player %1 with new schema Version %2", _newPlyr, _schemaVersion]; } else { // Legacy code start // Apperance + Weapons - _playerData params ["","","_apperance","","","_weaponsAndItems","_linkedItems","_normalMagazines","_itemsInContainers","_weaponsInContainers"]; + _playerData params ["","","_appearance","","","_weaponsAndItems","_linkedItems","_normalMagazines","_itemsInContainers","_weaponsInContainers"]; // load Apperance - _apperance params ["_goggles","_headgear","_vest","_backpack","_uniform"]; + _appearance params ["_goggles","_headgear","_vest","_backpack","_uniform"]; // old data format for 0.5 and prior. // Load Apperance START @@ -364,7 +366,7 @@ if (!isNull _player) then { _newPlyr setVariable["SETUP", true, true]; // Send message to player so they can take over the new body. - [_playerNetID, _playerUID, [_newPlyr, _vars, _currentWeapon, loadAbs _newPlyr, _playerGroup, _canBeRevived, _newPlyr call EPOCH_server_setPToken,_playerGroupArray, _communityStats, _hitpoints], _fsmHandle, _player] call EPOCH_server_pushPlayer; + [_playerNetID, _playerUID, [_newPlyr, _vars, _currentWeapon, loadAbs _newPlyr, _playerGroup, _canBeRevived, _newPlyr call EPOCH_server_setPToken,_playerGroupArray, _communityStats, _hitpoints, _currentAnimationState], _fsmHandle, _player] call EPOCH_server_pushPlayer; // diag_log str([_playerNetID, _playerUID, _player, [_newPlyr, (_player isEqualTo _newPlyr), _vars, _currentWeapon, loadAbs _newPlyr, _playerGroup, _canBeRevived, [],_playerGroupArray, _communityStats, _hitpoints], _fsmHandle]); // revive test diff --git a/Sources/epoch_server/compile/epoch_player/EPOCH_server_savePlayer.sqf b/Sources/epoch_server/compile/epoch_player/EPOCH_server_savePlayer.sqf index 165db39a..f9a56215 100644 --- a/Sources/epoch_server/compile/epoch_player/EPOCH_server_savePlayer.sqf +++ b/Sources/epoch_server/compile/epoch_player/EPOCH_server_savePlayer.sqf @@ -87,7 +87,7 @@ if (_allowSave) then{ _medical = [getBleedingRemaining _player, 0, getOxygenRemaining _player, damage _player, _hitpoints]; // appearance now handled with getUnitLoadout, typeof is still needed to determine players class. - _appearance = ["", "", "", "", currentWeapon _player, typeOf _player]; + _appearance = ["", "", "", animationState _player, currentWeapon _player, typeOf _player]; // new save format _loadout = getUnitLoadout _player;