Fixed bug causing null or corrupt players/bots

This commit is contained in:
Tooze
2026-07-03 10:46:20 +00:00
committed by Ryan
parent fd0976e5d5
commit 9a872f763d
@@ -107,7 +107,7 @@ object PlayerRenderer {
if (offsetX < 0) {
offsetX += 32
}
val appearance = info.appearanceStamps[other.index and 0x800] != other.updateMasks.appearanceStamp
val appearance = info.appearanceStamps[other.index] != other.updateMasks.appearanceStamp
val update = appearance || other.updateMasks.isUpdateRequired || other.updateMasks.hasSynced()
buffer.putBits(1, if (update) 1 else 0)
buffer.putBits(5, offsetX)
@@ -117,7 +117,7 @@ object PlayerRenderer {
info.localPlayers.add(other)
if (update) {
if (appearance) {
info.appearanceStamps[other.index and 0x800] = other.updateMasks.appearanceStamp
info.appearanceStamps[other.index] = other.updateMasks.appearanceStamp
}
writeMaskUpdates(player, other, flags, appearance, true)
}