Page 1 of 1

[kovarex] [1.1.19] Track signal has wrong rotation after first placement by non-host player in multiplayer game

Posted: Sat Jan 30, 2021 3:08 pm
by wakjah
Steps to reproduce:

- Go into multiplayer game
- Either as host or non-host, place the attached blueprint (from editor mode, with bots, or by hand)
- The remainder of the steps should be performed as a player that is NOT the host
- Press Q over the chain signal
- Right click and remove the chain signal
- Press R so that the signal will be re-placed in the same place as the original, opposite to the regular rail signal
- Click to place the chain signal in the exact same place as it started

Expected behaviour:

- Signal is placed in the same place, with the same orientation, as when it started

Observed behaviour:

- Signal is placed with the wrong orientation
- If you repeat the remove and re-add of the signal, it will place in the correct orientation
- If you remove and replace the regular signal, the incorrect behaviour can be reproduced again


bug.png
bug.png (423.94 KiB) Viewed 3083 times

Re: [kovarex] [1.1.19] Track signal has wrong rotation after first placement by non-host player in multiplayer game

Posted: Wed Feb 03, 2021 10:28 pm
by kovarex
Hello, and thanks for the report.
I couldn't reproduce behaviour that could be qualified as a bug.
When I build the signal with the corret direction, it builds as expected.
You might not be aware, that you can actually select the signal orientation by pressing R. If there are more ways the signal could be connected, the R moves between them.

Re: [kovarex] [1.1.19] Track signal has wrong rotation after first placement by non-host player in multiplayer game

Posted: Thu Feb 04, 2021 12:12 am
by wakjah
Thanks for your reply.

Did you perform this test in multiplayer, as a non-host player? In our testing, if you do it as the host, the bug is not reproduced, but any player that is non-host encounters the bug.

I am well aware that pressing R switches between orientations - in fact, the reproduction of the bug relies on it.

When you remove the signal, the placement preview initially shows it in the opposite orientation to its original position. Some amended steps to be more precise:

- Press Q over the chain signal
- The preview now shows a chain signal that will be placed in the opposite orientation to the original
- Right click and remove the chain signal
- The preview still shows that placing a signal now will be result in one placed in the opposite orientation to the original
- Press R so that the signal will be re-placed in the same place as the original, on the same rail as the regular rail signal

Re: [kovarex] [1.1.19] Track signal has wrong rotation after first placement by non-host player in multiplayer game

Posted: Thu Feb 04, 2021 2:35 am
by kovarex
I somehow managed to miss the being client part, sorry for that.
I was able to reproduce it now, so I will take a look on it tomorrow.

Re: [kovarex] [1.1.19] Track signal has wrong rotation after first placement by non-host player in multiplayer game

Posted: Thu Feb 04, 2021 1:36 pm
by kovarex
Ok, fixed for the next release.

The problem was, that the code that was selecting the signal direction was using the "game state" builder logic instead of the "latency state" builder logic for choosing direction, which caused inconsistencies when being built over signal that still existed in the game state, but was removed in the latency state.

Re: [kovarex] [1.1.19] Track signal has wrong rotation after first placement by non-host player in multiplayer game

Posted: Thu Feb 04, 2021 3:39 pm
by wakjah
Thanks, you guys are awesome