mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-07 11:06:11 -10:00
A respawned player's equipment is heard again from empty
PlayerList.respawn builds a new ServerPlayer whose lastEquipmentItems starts empty, so its first detectEquipmentUpdates reports every worn item. The last-heard equipment is cleared at the respawn. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
1 parent
89ca25c574
commit
2341454826
1 file changed
+5
@@ -3164,6 +3164,11 @@ impl Game<'_> {
|
||||
// count) falls instead of staying up for a player who is gone.
|
||||
self.guest_container_closed(host, conn);
|
||||
host.hub.close_container(conn);
|
||||
// PlayerList.respawn builds a new `ServerPlayer`, whose `lastEquipmentItems` starts
|
||||
// empty: the mods hear each worn item again from empty (`native_players_equipment`).
|
||||
if let Some(play) = host.play.get_mut(&conn) {
|
||||
play.equipment_heard = None;
|
||||
}
|
||||
// PlayerList.respawn: a server's player comes back in its respawn
|
||||
// point's level: the Overworld, where the world spawn and beds are,
|
||||
// or another one's anchor or forced point, which its block resolves
|
||||
|
||||
Reference in new issue
Block a user