Fixed incorrect grid check

This commit is contained in:
Joshua Barretto 2020-12-05 18:30:07 +00:00
parent b37be14b86
commit 52f2bccf2f
2 changed files with 2 additions and 2 deletions

View File

@ -247,7 +247,7 @@ impl Client {
if rgba.size() != map_size.map(|e| e as i32) {
return Err(Error::Other("Server sent a bad world map image".into()));
}
if rgba.size() != map_size.map(|e| e as i32) {
if alt.size() != map_size.map(|e| e as i32) {
return Err(Error::Other("Server sent a bad altitude map.".into()));
}
let [west, east] = world_map.horizons;

View File

@ -5,7 +5,7 @@ use vek::*;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Grid<T> {
cells: Vec<T>,
size: Vec2<i32>,
size: Vec2<i32>, // TODO: use u32
}
impl<T> Grid<T> {