Commit Graph

193 Commits

Author SHA1 Message Date
Imbris
01df87bdb4 Address/cleanup a couple TODOs, mainly comment improvements 2023-06-04 12:58:16 -04:00
Imbris
b8af76deff Remove potential for client to delete its own entity.
Also:
* Fix some clippy warnings
* Remove unused clippy allow
* Document semantics of `DeletedEntities`
2023-06-04 12:58:16 -04:00
Imbris
65efa779b5 Steps towards properly synchronizing when a client exits in-game to
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.
2023-06-04 12:58:16 -04:00
Imbris
62abed1eec Replace u64 with Uid in some places and add/modify some comments 2023-06-04 12:58:16 -04:00
Imbris
c60f994c7f Some random changes and a fmt 2023-06-04 12:58:16 -04:00
Imbris
f11baed9fa Adapting various things to the new interface, fixing compilation errors,
and progressing on half done things. Also, added a few TODO comments.
2023-06-04 12:58:16 -04:00
Imbris
4094887997 Rename UidAllocator to IdMaps everywhere, also rename lookup_entity to
uid_entity.

Also made more progress on changes in common/src/uid.rs

(does not compile so don't know if all rebase quirks resolved)
2023-06-04 12:58:16 -04:00
Imbris
35922866a8 Start refactoring UidAllocator to contain mappings for different Id
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.
2023-06-04 12:58:16 -04:00
Imbris
3277d18265 Rename retrieve_entity_internal to lookup_entity 2023-06-04 12:58:16 -04:00
Imbris
ea725fffde Cleanup UidAllocator and Uid a bit:
* Remove unnecessary Marker/MarkAllocator trait implementations.
* Delete excess functions
* Change some methods to take Uid instead of u64
2023-06-04 12:58:15 -04:00
Isse
a884e0e058 Various rtsim related stuff 2023-06-03 22:14:18 +00:00
Joshua Barretto
ec3a7d1898 Make items vanish after 5 minutes 2023-06-01 14:51:19 +01:00
flo666
17e4af3c48 BlockKind::ArtSnow
replace BlockKind::Snow with BlockKind::Misc
2023-05-13 09:32:19 -04:00
jshipsey
da3c2369e5 initial setup 2023-05-13 09:30:13 -04:00
Marcel Märtens
3a19669d53 use workspace dependencies to make our life easier maintaining them :) 2023-05-10 18:16:25 +02:00
Isse
6674cce2cc intercat with sprites on ships 2023-05-09 19:43:09 +02:00
Marcel Märtens
054f4f9453 update veloren deps 2023-05-04 11:58:43 +02:00
Isse
ab4076518f Add multiloot 2023-04-23 19:17:39 +00:00
Sam
e819cd2309 Updated hashbrown, removed some to_owned calls in handling recently unequipped items 2023-04-19 18:43:40 -04:00
Joshua Barretto
a835ce7e26 Better starting site choices 2023-04-13 18:32:21 +01:00
Joshua Barretto
edcc2f1870 Overhauled chat message representation to allow for more exhaustive localisation 2023-04-11 15:46:36 +01:00
Joshua Barretto
3e0f5295c0 Added CharacterActivity, made NPCs look at the player when speaking to them 2023-04-09 19:25:57 +01:00
Joshua Barretto
364255c7fe Allowed rtsim NPCs to greet nearby actors 2023-04-09 19:25:55 +01:00
Sam
0966753699 Added repair recipes 2023-04-06 10:54:48 -04:00
Joshua Barretto
acec45b756 Initial implementation of starting site choice 2023-03-31 14:24:14 +01:00
Isse
1298fc792b Merge branch 'ProfessionalHobbyist/configurable_day_night_length' into 'master'
Add setting to control length of day/night cycle for servers. ("Fix" for https://gitlab.com/veloren/veloren/-/issues/1798)

See merge request veloren/veloren!3836
2023-03-23 16:33:39 +00:00
Sophia Waggoner
264e4a53f8 cargo clippy + fmt 2023-03-22 05:49:54 -07:00
Sophia Waggoner
7e4ea483e0 Add a ServerConstants to Client and Server structs and sync on register. 2023-03-21 20:28:08 -07:00
Sam
9875008efa Added stance component that persists even after sheathing weapon (does not yet work with M1 replacement). 2023-03-21 19:29:34 -04:00
Sam
89aa934c3c Initial work 2023-03-11 16:45:10 -05:00
Ellen Sun
74cb514094 move client commands to voxygen + add Admin to be shared with client for permissions + unit test for alphabetical server command 2023-01-27 20:31:56 -05:00
IsseW
7296843923 simple bridges 2022-11-30 15:13:52 +01:00
Marcel Märtens
2812729b78 cargo clippy lifetimes 2022-11-28 15:19:57 +01:00
Marcel Märtens
0fe0192a2d get rid of string replacements in template strings 2022-09-29 17:33:53 +02:00
Marcel Märtens
a0ef3be9ac remove hardcoded localisation from client 2022-09-27 13:46:12 +02:00
Joshua Yanovski
57ea753bff Merge branch 'sharp/parallel-ingame' into 'master'
Parallelize ingame messages.

See merge request veloren/veloren!3627
2022-09-21 19:44:40 +00:00
Joshua Yanovski
1c14ec7ee1 Parallelize ingame messages. 2022-09-21 10:25:57 -07:00
Joshua Yanovski
67231aff90 Remove persistence loading error from SkillSet.
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.
2022-09-21 09:29:25 -07:00
Imbris
1b48a3008c Merge branch 'Couls/TestBed' into 'master'
Extend item pickup UI to group members

Closes #1402

See merge request veloren/veloren!3521
2022-09-20 22:13:50 +00:00
Couls
4a4c061b55 Extend item pickup UI to group members 2022-09-20 22:13:50 +00:00
Joshua Yanovski
2c15d0af56 Reduce overhead of messaging systems. 2022-09-14 21:04:53 -07:00
Joshua Yanovski
986d104faa Update Rust toolchain. 2022-09-08 15:43:53 -07:00
Joshua Yanovski
f5aee1d2a7 Allow mods/admins to log in when server is full.
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.
2022-09-06 21:42:31 -07:00
Imbris
334937568e Add an entity view distance setting that allows limiting the distance
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.
2022-08-25 23:24:43 -04:00
flo
e882e62c08 seachapel 2022-08-24 21:50:53 +00:00
Joshua Barretto
52bd7b2485 Added automod 2022-08-11 11:09:52 +01:00
IsseW
87821d5c1d force update counter 2022-08-09 19:22:09 +02:00
Isse
0471e78f41 spectate mode :D 2022-08-09 18:43:13 +02:00
Imbris
d5b59c2bb7 Convert away from IdvStorage to mixture of VecStorage and DenseVecStorage 2022-08-08 00:38:20 -04:00
tygyh
120ee6b6c0 Fix typos 2022-07-15 18:59:37 +02:00