* Players who die in single-player mode without respawning should not be marked as Dead on the SSC server.
* In my tests, only the SSC server receives a non-zero `respawnTimer`. Therefore, this may be a client-side bug.
closed: #3151
If the player has requested world data before sending the spawn player packet, they should be at state 3, otherwise they should be at state 1 for skipping it. Just check based on that instead.
- The player will only finish the handshake once they spawn their player, a normal client would always do this eventually.
- They cannot chat, even if they request world data but just not spawn their player.
- Other clients will not be notified of their join/leave in both cases (dont request WD or do but dont spawn)
- And most importantly, they do not show on the in game player list but still show on the server console /playing cmd.
During connection, we receive a `SyncLoadout` packet before the
`ContinueConnecting2` packet, meaning we have not yet created a
`PlayerData` for this player.
We needed to modify `NetItem` to know that these new inventory now
exist.
`PlayerData` can now re/store these items, and properly sync them. It
also now knows of the player's currently selected index, and how to sync
it.
Previously, we checked if the target player was null, before checking if
their ID was out of bounds, so the check was moved to be first.
We now check if the buff being applied is within bounds.
We introduce `AddPlayerBuffWhitelist` to replace `WhitelistBuffMaxTime`,
which allows us to specify a maximum amount of ticks a buff can be
applied to another player for, and if it can be applied without the
target being in PvP. If a buff is not within this array, it is *not*
allowed to be applied by other players.
When rejecting from `OnPlayerBuff`, we send a `PlayerBuff` instead of
`PlayerAddBuff`, to sync the current buffs of the target, without
syncing the rejected one.
This would cause all `PlayerAddBuff` packets to always be rejected,
causing desync, and general annoyance, as it meant any PvP items that
applied buffs never worked.