Update changelog, cargo fmt

This commit is contained in:
Imbris 2022-08-20 18:55:03 -04:00
parent 7439d09708
commit ce8b8b6f12
3 changed files with 13 additions and 10 deletions

View File

@ -17,11 +17,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Use fluent for translations
- First tab on Login screen triggers username focus
- Certain NPCs will now attack when alone with victim
- /kill_npcs no longer leaves drops behind and also has bug causing it to not destroy entities
fixed.
### Removed
### Fixed
- Fixed crash due to zooming out very far
- Client properly knows trade was cancelled when exiting to the character screen (and no longer
tries to display the trade window when rejoining)
- Cancel trades for an entity when it is deleted (note this doesn't effect trades between players
since their entities are not removed).
## [0.13.0] - 2022-07-23

View File

@ -1,8 +1,7 @@
use super::Event;
use crate::{
client::Client, metrics::PlayerMetrics,
persistence::character_updater::CharacterUpdater, presence::Presence, state_ext::StateExt,
BattleModeBuffer, Server,
client::Client, metrics::PlayerMetrics, persistence::character_updater::CharacterUpdater,
presence::Presence, state_ext::StateExt, BattleModeBuffer, Server,
};
use common::{
comp,
@ -31,8 +30,9 @@ pub fn handle_exit_ingame(server: &mut Server, entity: EcsEntity) {
// Note: If other `ServerEvent`s are referring to this entity they will be
// disrupted.
// Since we remove `Uid` below, any trades won't be cancelled by `delete_entity_recorded`. So
// we cancel the trade here. (maybe the trade key could be switched from `Uid` to `Entity`)
// Since we remove `Uid` below, any trades won't be cancelled by
// `delete_entity_recorded`. So we cancel the trade here. (maybe the trade
// key could be switched from `Uid` to `Entity`)
super::cancel_trades_for(state, entity);
let maybe_admin = state.ecs().write_storage::<comp::Admin>().remove(entity);

View File

@ -1172,11 +1172,8 @@ impl Server {
where
S: Into<ServerMsg>,
{
if let Some(client) = self.state
.ecs()
.read_storage::<Client>()
.get(entity) {
client.send_fallible(msg);
if let Some(client) = self.state.ecs().read_storage::<Client>().get(entity) {
client.send_fallible(msg);
}
}