return to the character screeen. And other related improvements.
* Uid now optional when removing an entity from IdMaps since that Uid
may have been transferred to the new entity created when the client
exits "in-game".
* Added notes about making sure to update the CharacterId mapping when
changing the `kind` field of `Presence`.
* Add a parameter to `delete_entity_recorded` that indicates whether it
is being called from `handle_exit_ingame` and that provides the `Uid`
that was removed from the entity so that we can more explicitly and
correctly handle that case.
* We now add the Uid of the client to the deleted entities list when it
exits "ingame". (still need to rework code so that the client doesn't
delete its own entity).
* Improved integration of possession code with ForceUpdate logic.
* Don't remove `Presence` component from old entity in possession so
that deleting that entity will properly handle updating the
CharacterId unmapping (if the old entity isn't going to be deleted we
still remove the `Presence` component so that it doesn't keep terrain
loaded).
* Added a couple TODOs on existing tangential things I noticed.
types.
* Add new `IdMaps` type that contains mappings to Entity from Uid, CharacterId, and
RtsimEntity.
* Add PresenceKind::LoadingCharacter variant for when the CharacterId
has not actually been confirmed to exist and belong to the logged in
client. Switches to the regular PresenceKind::Character once the
character is loaded from the database and that is used to update the
entity.
* Start refactoring `delete_entity_recorded` to check for CharacterId
and RtsimEntity values that may need to be removed from the map (just
very start, not near complete).
* Other misc tweaks.
This is needed (for now) in order to parallelize ingame_chat, because
one of the handled messages updates this value on the server. It turns
out that the value is not actually used on the server, only the client,
so this was mostly a matter of threading this back to the correct place.
Additionally, we took the opportunity to modify the UI to not log you
into the game until your character was confirmed to be loaded, which
was a todo item that lets us simplify some error handling logic and
remove stuff from global state.
As a side effect, this moves the initial game server sync message into
the login code, since that's the first place we can check for admin
permissions and we want to avoid sending large messages to users who are
not authenticated (especially if the player cap has been reached;
previously, the player cap check limited the damage that could be done
by unauthenticated players).
Some fallout from this is that we don't synchronize the Player component
anymore, which had some minor effects on voxygen. This update also
breaks Torvus, since Client::new now expects the username and password
to be provided from the getgo--an accompanying MR will be submitted to
fix it.
entities are synced from and displayed in.
NOTE: Syncing entities work at the granularity regions which are
multi-chunk squares but the display of entities in voxygen is limited in
a circle with the radiues of the supplied distance.
Additional details and changes:
* Added `ViewDistances` struct in `common` that contains separate
terrain and entity view distances (the entity view distance will be
clamped by the terrain view distance in uses of this).
* View distance requests from the client to the server now use this
type.
* When requesting the character or spectate state the client now passes
its desired view distances. This is exposed as a new parameter on
`Client::request_character`/`Client::request_spectate`. And the client
no longer needs to send a view distance request after entering these
states. This also allows us to avoid needing to initialize `Presence`
with a default view distance value on the server.
* Removed `DerefFlaggedStorage` from `Presence` and `RegionSubscription` since the
change tracking isn't used for these components.
* Add sliders in voxygen graphics and network tabs for this new setting.
Show the clamped value as well as the selected value next to the
slider.
* Rename existing "Entities View Distance" slider (which AFAIK controls
the distance at which different LOD levels apply to figures) to
"Entities Detail Distance" so we can use the former name for this new
slider.