Trooper Dan, on 12 January 2019 - 05:55 PM, said:
I don't know and probably won't be able to help. However, if you post the code you are using to change those values, maybe I will have a helpful suggestion. I'm assuming you are talking about changes to those values caused by your own code and not changes in the vanilla game.
Thank you very much for your interest. I'm at a point where I'm conviced my code is bug-less

and it has something to do with underlying code - I hope I'm wrong. I'll try to outline the central aspects of my code:
So, the idea of this MP gamemode is simple: First to 30 wins. For every kill you are behind the leader, you get 5 bonus max hp:
state regulatemaxhealth
getplayer[THISACTOR].frag tempone
getplayer[THISACTOR].fraggedself temptwo
subvarvar tempone temptwo //actual amount of kills
setvarvar tempthree maxscore //maxscore is leading player's score and is working correctly
subvarvar tempthree tempone //Difference between your score and the leader's
mulvar tempthree 5
addvar tempthree 100
setplayer[THISACTOR].max_player_health tempthree // It's actually not this line that causes the desync
ends
If I kill my opponent, he lies dead on the ground and has now 0/105 hp. When he respawns he gets 105/105 and we have a desync. If I suicide and has yet to spawn I'm on 0/105. However, when I respawn there's no desync. So I have to be killed by an opponent, before the desync happens on a respawn (and it happens every time).
I have no code in EVENT_RESETPLAYER or anything alike. Neither do I have code on killing blows, respawns or anything like that. If I remove the last line in the above state, I get no desync, but then I lose the main part of the mod.