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.
* Added `LootOwner` component used to indicate that an `ItemDrop` entity is owned by another entity
* A loot winner is now calculated after EXP allocation using the EXP per entity for weighted chance distribution
* Used existing Inventory Full overitem text to show "Owned by {player} for {seconds}secs" when a pickup fails due to a loot ownership check
* Updated agent code to take into account loot ownership when searching for `ItemDrop` targets to pick up
* Added `loot` ECS system to clear expired loot ownerships
Damage from a given individual or group only counts towards a kill for 10 minutes since that individual or group's last damage to the entity - after this period their damage contribution is removed. This avoids the list of damage contributors growing excessively large for an entity that does a lot of combat but never dies.
EXP sharing within groups is unchanged - the difference is simply that the input to this calculation may be less than 100% of the base EXP reward for the kill if other individuals or groups contributed damage.
The security model has been updated to reflect this change (for example,
moderators cannot revert a ban by an administrator). Ban history is
also now recorded in the ban file, and much more information about the
ban is stored (whitelists and administrators also have extra
information).
To support the new information without losing important information,
this commit also introduces a new migration path for editable settings
(both from legacy to the new format, and between versions). Examples
of how to do this correctly, and migrate to new versions of a settings
file, are in the settings/ subdirectory.
As part of this effort, editable settings have been revamped to
guarantee atomic saves (due to the increased amount of information in
each file), some latent bugs in networking were fixed, and server-cli
has been updated to go through StructOpt for both calls through TUI
and argv, greatly simplifying parsing logic.
- Add metrics for which branch of the compression heuristic was taken.
- Reduce the threshold for the heuristic.
- Deduplicate code for dealing with lazy messages.
- Make jpeg dependency only scoped to the compression benchmark.
- Remove commented code.