mirror of
https://github.com/zyllian/classics.git
synced 2025-01-18 03:32:41 -08:00
message the server when the level has saved
This commit is contained in:
parent
c3313626be
commit
76b8339048
1 changed files with 8 additions and 0 deletions
|
@ -167,6 +167,14 @@ async fn handle_ticks(data: Arc<RwLock<ServerData>>) {
|
||||||
.await
|
.await
|
||||||
.expect("failed to autosave level");
|
.expect("failed to autosave level");
|
||||||
last_auto_save = std::time::Instant::now();
|
last_auto_save = std::time::Instant::now();
|
||||||
|
|
||||||
|
let packet = ServerPacket::Message {
|
||||||
|
player_id: -1,
|
||||||
|
message: "Server has saved!".to_string(),
|
||||||
|
};
|
||||||
|
for player in &mut data.players {
|
||||||
|
player.packets_to_send.push(packet.clone());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue