mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
add animation state tracking
todo make use of animation state via login fsm
This commit is contained in:
parent
f7c71e1d5a
commit
178c844f66
@ -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}};
|
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}};
|
defaultbackpackItems[] = {}; // {{"Medikit",1},{"FAK",10},{{"hgun_P07_F","","","",{"16Rnd_9x21_Mag",16},{},""},1}};
|
||||||
defaultassignedItems[] = {}; // {"Rangefinder","","","",{},{},""}
|
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.
|
// 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.
|
disableAutoRefuel = "true"; // Removes auto refuel from all buildings at server startup.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*%FSM<COMPILE "C:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\FSMEditor\scriptedFSM.cfg, Epoch Login">*/
|
/*%FSM<COMPILE "F:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\FSMEditor\scriptedFSM.cfg, Epoch Login">*/
|
||||||
/*%FSM<HEAD>*/
|
/*%FSM<HEAD>*/
|
||||||
/*
|
/*
|
||||||
item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"};
|
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};
|
link94[] = {83,16};
|
||||||
link95[] = {83,22};
|
link95[] = {83,22};
|
||||||
link96[] = {84,31};
|
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};
|
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,959,-1728,-744,192,3,595};
|
window[] = {2,-1,-1,-1,-1,949,182,1166,182,3,595};
|
||||||
*//*%FSM</HEAD>*/
|
*//*%FSM</HEAD>*/
|
||||||
class FSM
|
class FSM
|
||||||
{
|
{
|
||||||
@ -1397,6 +1397,7 @@ class FSM
|
|||||||
"Epoch_my_Group = _C_SET deleteAt 0;" \n
|
"Epoch_my_Group = _C_SET deleteAt 0;" \n
|
||||||
"_communityStats = _C_SET deleteAt 0;" \n
|
"_communityStats = _C_SET deleteAt 0;" \n
|
||||||
"_hitpoints = _C_SET deleteAt 0;" \n
|
"_hitpoints = _C_SET deleteAt 0;" \n
|
||||||
|
"_animationState = _C_SET deleteAt 0; // todo do something with _animationState" \n
|
||||||
"" \n
|
"" \n
|
||||||
"_extraPayload = _C_SET deleteAt 0;" \n
|
"_extraPayload = _C_SET deleteAt 0;" \n
|
||||||
"" \n
|
"" \n
|
||||||
@ -1444,4 +1445,4 @@ class FSM
|
|||||||
"Reject_without_B",
|
"Reject_without_B",
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
/*%FSM</COMPILE>*/
|
/*%FSM</COMPILE>*/
|
@ -63,6 +63,7 @@ if (!isNull _player) then {
|
|||||||
_assignedItems = [_serverSettingsConfig, "defaultassignedItems", ["","","","",[],[],""]] call EPOCH_fnc_returnConfigEntry; // ["Rangefinder","","","",[],[],""]
|
_assignedItems = [_serverSettingsConfig, "defaultassignedItems", ["","","","",[],[],""]] call EPOCH_fnc_returnConfigEntry; // ["Rangefinder","","","",[],[],""]
|
||||||
_linkedItems = [_serverSettingsConfig, "defaultlinkedItems", ["ItemMap","","EpochRadio0","","",""]] call EPOCH_fnc_returnConfigEntry; // ["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
|
_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
|
_currentWeapon = [_serverSettingsConfig, "defaultSelectedWeapon", ""] call EPOCH_fnc_returnConfigEntry; // class of selected weapon
|
||||||
|
_defaultAnimationState = [_serverSettingsConfig, "defaultAnimationState", ""] call EPOCH_fnc_returnConfigEntry; // class of selected weapon
|
||||||
|
|
||||||
_loadout = [
|
_loadout = [
|
||||||
_primaryWeapon,
|
_primaryWeapon,
|
||||||
@ -78,7 +79,7 @@ if (!isNull _player) then {
|
|||||||
];
|
];
|
||||||
|
|
||||||
// default data, if "Player" data format is changed update this array!
|
// 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 data does not validate against default or is too short, override with default data.
|
||||||
if !(_playerData isEqualTypeParams _defaultData) then {
|
if !(_playerData isEqualTypeParams _defaultData) then {
|
||||||
@ -207,22 +208,23 @@ if (!isNull _player) then {
|
|||||||
|
|
||||||
// set player loadout
|
// set player loadout
|
||||||
if (_schemaVersion >= 1.0) then {
|
if (_schemaVersion >= 1.0) then {
|
||||||
_playerData params ["","","_apperance","","","_loadout"];
|
_playerData params ["","","_appearance","","","_loadout"];
|
||||||
// get current weapon to send to param for selectWeapon
|
// 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];
|
// _newPlyr setUnitLoadout [_loadout, false];
|
||||||
|
|
||||||
// Workaround for Client / Server synchronizing issue in SetUnitLoadout
|
// Workaround for Client / Server synchronizing issue in SetUnitLoadout
|
||||||
[_newPlyr,_loadout] call Epoch_server_SetUnitLoadout;
|
[_newPlyr,_loadout] call Epoch_server_SetUnitLoadout;
|
||||||
|
|
||||||
diag_log format["DEBUG: loaded player %1 with new schema Version %2", _newPlyr, _schemaVersion];
|
diag_log format["DEBUG: loaded player %1 with new schema Version %2", _newPlyr, _schemaVersion];
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Legacy code start
|
// Legacy code start
|
||||||
// Apperance + Weapons
|
// Apperance + Weapons
|
||||||
_playerData params ["","","_apperance","","","_weaponsAndItems","_linkedItems","_normalMagazines","_itemsInContainers","_weaponsInContainers"];
|
_playerData params ["","","_appearance","","","_weaponsAndItems","_linkedItems","_normalMagazines","_itemsInContainers","_weaponsInContainers"];
|
||||||
// load Apperance
|
// load Apperance
|
||||||
_apperance params ["_goggles","_headgear","_vest","_backpack","_uniform"];
|
_appearance params ["_goggles","_headgear","_vest","_backpack","_uniform"];
|
||||||
|
|
||||||
// old data format for 0.5 and prior.
|
// old data format for 0.5 and prior.
|
||||||
// Load Apperance START
|
// Load Apperance START
|
||||||
@ -364,7 +366,7 @@ if (!isNull _player) then {
|
|||||||
_newPlyr setVariable["SETUP", true, true];
|
_newPlyr setVariable["SETUP", true, true];
|
||||||
|
|
||||||
// Send message to player so they can take over the new body.
|
// 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]);
|
// diag_log str([_playerNetID, _playerUID, _player, [_newPlyr, (_player isEqualTo _newPlyr), _vars, _currentWeapon, loadAbs _newPlyr, _playerGroup, _canBeRevived, [],_playerGroupArray, _communityStats, _hitpoints], _fsmHandle]);
|
||||||
|
|
||||||
// revive test
|
// revive test
|
||||||
|
@ -87,7 +87,7 @@ if (_allowSave) then{
|
|||||||
_medical = [getBleedingRemaining _player, 0, getOxygenRemaining _player, damage _player, _hitpoints];
|
_medical = [getBleedingRemaining _player, 0, getOxygenRemaining _player, damage _player, _hitpoints];
|
||||||
|
|
||||||
// appearance now handled with getUnitLoadout, typeof is still needed to determine players class.
|
// 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
|
// new save format
|
||||||
_loadout = getUnitLoadout _player;
|
_loadout = getUnitLoadout _player;
|
||||||
|
Loading…
Reference in New Issue
Block a user