From 1c9094af4f5b1a64982cb1033f419a56421e2ee3 Mon Sep 17 00:00:00 2001 From: Shane Handley Date: Sat, 11 Jan 2020 13:08:33 +0900 Subject: [PATCH] Remove emission of an audio event from stats sys This was accidentally left in by me during some testing of server emission of SFX events to all clients. There was no effect on gameplay since we dont emit a sound for this event yet, but it should not be here. The audio event is correctly handled elsewhere by each client. --- common/src/sys/stats.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/common/src/sys/stats.rs b/common/src/sys/stats.rs index f8aa9e281b..f4ac03e576 100644 --- a/common/src/sys/stats.rs +++ b/common/src/sys/stats.rs @@ -1,6 +1,6 @@ use crate::{ comp::{HealthSource, Stats}, - event::{EventBus, ServerEvent, SfxEvent, SfxEventItem}, + event::{EventBus, ServerEvent}, state::DeltaTime, }; use specs::{Entities, Join, Read, System, WriteStorage}; @@ -13,14 +13,10 @@ impl<'a> System<'a> for Sys { Entities<'a>, Read<'a, DeltaTime>, Read<'a, EventBus>, - Read<'a, EventBus>, WriteStorage<'a, Stats>, ); - fn run( - &mut self, - (entities, dt, server_event_bus, audio_event_bus, mut stats): Self::SystemData, - ) { + fn run(&mut self, (entities, dt, server_event_bus, mut stats): Self::SystemData) { let mut server_event_emitter = server_event_bus.emitter(); // Increment last change timer @@ -58,10 +54,6 @@ impl<'a> System<'a> for Sys { stat.level.change_by(1); } - audio_event_bus - .emitter() - .emit(SfxEventItem::at_player_position(SfxEvent::LevelUp)); - stat.update_max_hp(); stat.health .set_to(stat.health.maximum(), HealthSource::LevelUp)