Add debug information for spectator count.
This commit is contained in:
parent
285987210b
commit
d8a33d1c10
@ -77,6 +77,10 @@ impl Session {
|
||||
|
||||
pub fn spectators(&self) -> usize
|
||||
{
|
||||
println!("{}", self.connections.len());
|
||||
for conn in &self.connections {
|
||||
print!("{} ", *conn);
|
||||
} println!("");
|
||||
self.connections.len()
|
||||
}
|
||||
}
|
||||
|
@ -1032,7 +1032,7 @@ fn generate_game_state(app:&App, session:&Session) -> protocol::PacketGameStateR
|
||||
|
||||
response.dawn_online = session.p_dawn.connections.len() > 0;
|
||||
response.dusk_online = session.p_dusk.connections.len() > 0;
|
||||
response.spectators = session.connections.len() as u32;
|
||||
response.spectators = session.spectators() as u32;
|
||||
|
||||
// Get history
|
||||
response.history = session.game.history.clone();
|
||||
|
Loading…
x
Reference in New Issue
Block a user