generated from tipragot/rust
WIP: Add a selection of the spawnpoint for every players #108
|
@ -39,7 +39,7 @@ fn init_spawn_point(
|
||||||
.abs();
|
.abs();
|
||||||
|
|
||||||
if radius == 0 {
|
if radius == 0 {
|
||||||
panic!("Map radius must be greater than 0");
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let map_hashmap: HashMap<&TilePosition, Entity> = map.iter().map(|(e, p)| (p, e)).collect();
|
let map_hashmap: HashMap<&TilePosition, Entity> = map.iter().map(|(e, p)| (p, e)).collect();
|
||||||
|
|
|
@ -79,7 +79,7 @@ fn lobby_ui(
|
||||||
let index = *map_size as u16;
|
let index = *map_size as u16;
|
||||||
let nomber_of_players = all_players_query.iter().count() as u32;
|
let nomber_of_players = all_players_query.iter().count() as u32;
|
||||||
|
|
||||||
let radius = nomber_of_players as u16 * 2 * index;
|
let radius = nomber_of_players as u16 * 2 * (index+1);
|
||||||
|
|
||||||
// Start the game.
|
// Start the game.
|
||||||
for player in all_players_query.iter() {
|
for player in all_players_query.iter() {
|
||||||
|
|
Loading…
Reference in a new issue