EpochModTeam / Epoch

Epoch Survival Game Mode for ARMA 3
http://epochmod.com/
Other
91 stars 82 forks source link

SERVER_VARS not persistent through a revive (I think) #963

Closed morgoth0 closed 6 years ago

morgoth0 commented 6 years ago

Have been informed of an issue where a player's jammer respawn does not work after a player has been revived once. Not in a position to log on and test but it looks from the code that this is true and caused by the non-transfer of SERVER_VARS from the old (dead) player object to the revived one. Am I correct?

If so, the fix would be to change EPOCH_server_revivePlayer.sqf in the following ways:

Line 16 from, private ["_loadout","_CorpseCrypto","_PlayerCrypto","_attachments","_cIndex","_class","_currwh","_deleteprimary","_deletesecondary","_dir","_droppedPrimary","_droppedSecondary","_droppedWeapons","_equipped","_group","_location","_newPlyr","_playerGroup","_playerUID","_token","_type","_vars","_wMags","_wMagsArray","_weapon","_wh","_kIndex","_reviver","_reviverCStats","_reviverKarma","_reviverKarmaAdj"]; to private ["_loadout","_CorpseCrypto","_PlayerCrypto","_attachments","_cIndex","_class","_currwh","_deleteprimary","_deletesecondary","_dir","_droppedPrimary","_droppedSecondary","_droppedWeapons","_equipped","_group","_location","_newPlyr","_playerGroup","_playerUID","_token","_type","_vars","_wMags","_wMagsArray","_weapon","_wh","_kIndex","_reviver","_reviverCStats","_reviverKarma","_reviverKarmaAdj","server_vars"]; Add the following at line 129: ` // Restore SERVER_VARS

            _server_vars = _player getVariable["SERVER_VARS", []];

            _newPlyr setVariable ["SERVER_VARS", _server_vars]; 

`

Will test later today when I can. Cheers, Grahame.

Ignatz-HeMan commented 6 years ago

Makes sense!

Ignatz-HeMan commented 6 years ago

You could also just try: _newPlyr setVariable ["SERVER_VARS",_player getVariable ["SERVER_VARS",[]]]; Then there is no need to change the private array

morgoth0 commented 6 years ago

I will verify that today.

Apologies, pretty sure both old and new solutions work but I have been busy adding functionality (and clearing the last glitches) on my new server.

I also will have the ACE3 stuff for review soon - pretty much up and running. Will all be keyed off whether ACE3 mod is installed (in the same way the loot and vehicle spawn code checks on the presence of the CUP mods). In order to properly work people will also need to install a new EpochACE mod (which I will upload to Steam) that simply adds the extra body parts ACE needs to the base Epoch character models. All is looking pretty good to go at the moment but I do need to do some extra testing to ensure that it is bulletproof (the code not the players ;) )

Cheers again, Grahame

On Tue, Dec 19, 2017 at 1:02 PM, He-Man notifications@github.com wrote:

You could also just try: _newPlyr setVariable ["SERVER_VARS",_player getVariable ["SERVER_VARS",[]]]; Then there is no need to change the private array

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/EpochModTeam/Epoch/issues/963#issuecomment-352838543, or mute the thread https://github.com/notifications/unsubscribe-auth/APeaq1M76ZwDoOas5OHQ_X-2SDdYoJVTks5tB_pRgaJpZM4REu7w .

Ignatz-HeMan commented 6 years ago

https://github.com/EpochModTeam/Epoch/compare/097102c1aa3c...ad36d1633557