File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ impl PlayerListener for ParticipantStatListener {
126
126
_current_match : & mut Match ,
127
127
context : & mut Self :: Context
128
128
) {
129
- context. stats . game_playtime += get_u64_time_millis ( ) - context. joined_party_at . unwrap ( ) ;
129
+ context. stats . game_playtime += get_u64_time_millis ( ) . saturating_sub ( context. joined_party_at . unwrap ( ) ) ;
130
130
}
131
131
132
132
async fn on_core_leak (
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ impl SocketRouter {
161
161
}
162
162
163
163
async fn on_player_death ( & mut self , mut data : PlayerDeathData ) -> Result < ( ) , SocketError > {
164
- debug ! ( "Player death! {}" , data. victim. name. clone( ) ) ;
164
+ // debug!("Player death! {}", data.victim.name.clone());
165
165
let mut current_match = unwrap_helper:: return_default!( self . server. get_match( ) . await , Err ( SocketError :: InvalidMatchState ) ) ;
166
166
if current_match. get_state ( ) != MatchState :: InProgress {
167
167
return Err ( SocketError :: InvalidMatchState ) ;
@@ -532,9 +532,6 @@ impl SocketRouter {
532
532
533
533
async fn on_wool_place ( & mut self , data : WoolDropData ) -> Result < ( ) , SocketError > {
534
534
let mut current_match = unwrap_helper:: return_default!( self . server. get_match( ) . await , Err ( SocketError :: InvalidMatchState ) ) ;
535
- if current_match. get_state ( ) != MatchState :: InProgress {
536
- return Err ( SocketError :: InvalidMatchState ) ;
537
- } ;
538
535
539
536
let mut participant = current_match. participants . get ( & data. player_id ) . unwrap ( ) . clone ( ) ;
540
537
for participant_listener in self . participant_listeners . iter ( ) {
You can’t perform that action at this time.
0 commit comments