Commit 31b85f3
authored
[Savestates] Attempt at fixing velocity being reset on loadstate (#244)
One tick after a loadstate, the velocity of the player will be reset for
one tick, which desyncs the rest of the TAS.
I was able to trace the issue back to the NetHandlerPlayServer, where
the player is processed. If the player is not added to the chunk on the
server side, a collision check with the nearest block would fail (kinda
like walking into unloaded chunks) and the velocity would be reset to 0,
which would then get sent to the client.
To fix this, I add the player to yet another chunk variable. Hopefully
this will not bite me in the futureFile tree
1 file changed
+2
-2
lines changed- src/main/java/com/minecrafttas/tasmod/savestates/handlers
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| |||
239 | 240 | | |
240 | 241 | | |
241 | 242 | | |
242 | | - | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| |||
0 commit comments