Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::network::NetworkHandler;
use crate::player::{Player, PlayerId};

use core::events::{ClientEvent, ServerEvent};
use core::utils::logging::info;
use core::utils::sleep;
use core::world::World;
use std::collections::HashMap;
Expand Down Expand Up @@ -55,7 +56,7 @@ impl Game {
let tps = 1.0 / start.elapsed().as_secs_f64();

// TODO: make a struct for ServerStats
println!(
info!(
"mspt: {:.3}, tps: {:.1}, players: {}",
mspt,
tps,
Expand Down
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ mod player;

use crate::game::Game;

use core::utils::logging::info;
use std::io;

gflags::define! {
Expand All @@ -25,7 +26,7 @@ fn main() -> io::Result<()> {
gflags::parse();

if HELP.flag {
println!("{} {}", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION"));
info!("{} {}", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION"));
gflags::print_help_and_exit(0);
}

Expand Down