Open Kumpelinus opened 5 days ago
It seems to be just a wrong packet being sent (or not being sent) since other players can see you holding the items while you can't see them yourself.
I found a few more Issues with this as well.
I found a few more Issues with this as well.
- It also resets the xp in the client's xp bar. However it does not reset the xp stat on the server so you will get it back upon gaining xp again (So it is just visual).
- It removes you from your own tab-list which might indicate further problems (can't confirm that yet).
yea changing the lpayer skin requires "killing and respawning htem" client side which can break al ot of thing... we have to send all the packets including XP packets to make sure their state after respawn is the same as before respawn
The class selection itself resets your inventory. And the code
.observer::<flecs::OnSet, (
&Xp, // (0)
&UpgradedTo, // (1)
&Class, // (2)
&Team, // (3)
&MainBlockCount, // (4)
&mut PlayerInventory, // (5)
)>()
normally observes this and thus gives you the equipment you the equipment.
But since neither your team nor your class changes in the case of selecting the same class + team it does not trigger the apply_inventory
method and that leads to your inventory staying empty.
We could either:
I prefer the latter one since you can also add a error message very easily that way.
If you try to "switch" to the class that you already have (of your current team) it does not give you the kit. Instead it completely clears your inventory.