Vdauphin / HeartsAndMinds

:heart::brain: 1.24.2 is out! 🎉
http://vdauphin.github.io/HeartsAndMinds/
107 stars 65 forks source link

When players join sometimes a player in-game teleport to the joining player's position #1627

Closed deBearN closed 1 month ago

deBearN commented 1 month ago

How it works Player A joins the game for the first time,spawns in the starting spawn, go to position A disconnects Player B joins the game for the first time,spawns in the starting spawn, go to position B stays there Player A joins the game again, spawns in the starting spawn, Player B teleports to position A with the equipment, injuries the player A had

i couldn't figure out how it works precisely

the following pastebin is the game RPT with Hearts and mind log enabled, from the moment i Bear joined (player B) and P.Siqueira (player A) joins, the moment he SPAWNS not when he's on the slot screen, i teleported to the position he left previously keeping his full equipment and injuries, while he spawns as if it's his first time spawning

we use the same individual slots, i'm the comms guy and he's the demo guy, the only thing is we're next to eachother in the slotlist, this also happened to several other players with other players

https://pastebin.com/dGDwMwqR

this started after i updated the mission from [1.23.6] to [v1.24.1], we were playing this campaign with no problems previous to this, after the update this started happening, Player share the slot parameters was off, when updated it kept off, and i try turning it on and off again, with both options having the same problem

Vdauphin commented 1 month ago

Hello,

Can you fill the issue template? Also add:

[format ["_this %1 _data %2", _this, _data], __FILE__, [false, btc_debug_log, false]] call btc_debug_fnc_message;

in deserializeState_s.sqf after the private _data = btc_slots_serialized getOrDefault [_key, []]; line

Cheers

deBearN commented 1 month ago

Arma 3 Version: 2.16.151824 (stable) CBA Version: 3.17.1 (stable) ACE3 Version: 3.17.1 (stable) Hearts and minds Version: 1.24.1 (stable)

Mods:

- CBA_A3
- ace
- Unit's Modpack (there's tons of packed mods but they didn't gave that problem prior to updating to H&M 1.24.1)

Description: When a player is joining the server with other players already in, there's a chance either the joining player (Player A) or one of the Players already on the server (Player B) will get a different equipment based on the equipment either one of them or a third different player left in the last session or the last moments

For Player A they can either join without the equipment they had previously either in a previous session or a few moments earlier (in case of re-logging to fix a issue or download a missing mod) having instead the Default equipment (the starting equipment we give the role through the editor) or a different person Equipment usually someone who isn't present

For Player B there's a chance they will be teleported to the Player A last position before they disconnected, and Player B will have Player A's Equipment and injuries while in that place, losing their previous load out, it seems that when Player A joins, the script that is supposed to be assigned to them are being assigned to someone else, depending on the session the person having the problem can be pre-determined, i'm trying to figure out what conditions allow a specific person to become Player B through-out the session, oddly enough this only happens IF they're near said player last spot when that happened, if we're out Kilometers away in a mission, that won't happend, and all of this only happend if Player A spawns with the Editor defined Loadout

Steps to reproduce:

Add mission file: https://drive.google.com/file/d/17Rzy5u9vubnpNTO2N-rFf13SDc9Ct3qm/view?usp=sharing H&M Pbo.zip

RPT log file: https://gist.github.com/deBearN/a9d3456552dc01160439bbf7f4d081f0

The players having this issue in this .RPT session are Simas, Deyvid, Segadas (in this case i think Deyvid caused one but didn't suffered it)

My next step in figuring this out will be by replacing all files with the newest version again trying it out and if it doesn't work then clearing our save file to see if it'll be fixed, because everytime this happened instead of the script selecting the right player and giving them the loadout and pos it either had another player named in it's place or it displayed this NULL-object,[1.12372,2.24743]] which kinda makes me think it's our save-file any help is welcomed, i'm aware i didn't test it without our mods because i think it'll probably be fine, this is more so to see if you could help us, but i will do try it without a modpack, if you find anyway of guiding us to fixing this issue we would be thankful

Vdauphin commented 1 month ago

Hello, Thank you for filling the ticket You are running the 1.23.2 please update to the last release

Also this bug has been fix in 1.23.2 : https://github.com/Vdauphin/HeartsAndMinds/pull/1499 But for unknown reason this change is not in your .pbo so this should explain your current report Cheers

deBearN commented 1 month ago

thank you will try, i did try to update it by just replacing all files in the pbo with the latest one, i probably f'd up my bad