aboutsummaryrefslogtreecommitdiff
path: root/pixel-client
diff options
context:
space:
mode:
Diffstat (limited to 'pixel-client')
-rw-r--r--pixel-client/Cargo.toml24
-rw-r--r--pixel-client/src/config.rs2
-rw-r--r--pixel-client/src/game.rs2
-rw-r--r--pixel-client/src/main.rs6
-rw-r--r--pixel-client/src/menu/background.rs4
-rw-r--r--pixel-client/tools/Cargo.toml10
6 files changed, 24 insertions, 24 deletions
diff --git a/pixel-client/Cargo.toml b/pixel-client/Cargo.toml
index 4831f485..7f3810f9 100644
--- a/pixel-client/Cargo.toml
+++ b/pixel-client/Cargo.toml
@@ -9,18 +9,18 @@ hurrycurry-protocol = { path = "../server/protocol" }
hurrycurry-client-lib = { path = "../server/client-lib", default-features = false, features = [
"sync-network",
] }
-tungstenite = { version = "0.24.0", features = ["rustls-tls-native-roots"] }
-serde_json = "1.0.128"
-bincode = "2.0.0-rc.3"
-log = "0.4.22"
-env_logger = "0.11.5"
-anyhow = "1.0.89"
-clap = { version = "4.5.18", features = ["derive"] }
-rustls = { version = "0.23.13", features = ["ring"] }
-rand = "0.9.0-alpha.2"
-xdg = "2.5.2"
-toml = "0.8.19"
-serde = { version = "1.0.210", features = ["derive"] }
+tungstenite = { version = "0.26.2", features = ["rustls-tls-native-roots"] }
+serde_json = "1.0.140"
+bincode = "2.0.1"
+log = "0.4.27"
+env_logger = "0.11.8"
+anyhow = "1.0.98"
+clap = { version = "4.5.39", features = ["derive"] }
+rustls = { version = "0.23.27", features = ["ring"] }
+rand = "0.9.1"
+xdg = "3.0.0"
+toml = "0.8.22"
+serde = { version = "1.0.219", features = ["derive"] }
users = "0.11.0"
[features]
diff --git a/pixel-client/src/config.rs b/pixel-client/src/config.rs
index 4d50ae10..96028deb 100644
--- a/pixel-client/src/config.rs
+++ b/pixel-client/src/config.rs
@@ -30,7 +30,7 @@ pub struct Config {
impl Config {
pub fn path() -> Result<PathBuf> {
- Ok(xdg::BaseDirectories::with_prefix("pixelcurry")?.place_config_file("config.toml")?)
+ Ok(xdg::BaseDirectories::with_prefix("pixelcurry").place_config_file("config.toml")?)
}
pub fn load() -> Result<Self> {
let path = Self::path()?;
diff --git a/pixel-client/src/game.rs b/pixel-client/src/game.rs
index cfac7082..e299cf09 100644
--- a/pixel-client/src/game.rs
+++ b/pixel-client/src/game.rs
@@ -204,7 +204,7 @@ impl Game {
self.players_spatial_index.all(|p1, pos1| {
self.players_spatial_index.query(pos1, 2., |p2, _pos2| {
if p1 != p2 {
- if let [Some(a), Some(b)] = self.players.get_many_mut([&p1, &p2]) {
+ if let [Some(a), Some(b)] = self.players.get_disjoint_mut([&p1, &p2]) {
a.movement.collide(&mut b.movement, dt)
}
}
diff --git a/pixel-client/src/main.rs b/pixel-client/src/main.rs
index 1dd34e72..15c08632 100644
--- a/pixel-client/src/main.rs
+++ b/pixel-client/src/main.rs
@@ -15,27 +15,27 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-#![feature(map_many_mut, path_add_extension, iterator_try_collect)]
+#![feature(path_add_extension, iterator_try_collect)]
use anyhow::{anyhow, Result};
use clap::{Parser, Subcommand};
use config::Config;
use game::Game;
use hurrycurry_client_lib::network::sync::Network;
use hurrycurry_protocol::glam::Vec2;
-use strings::set_language;
use menu::{ingame::IngameMenu, main::MainMenu};
use profiler::ProfilerOverlay;
use render::Renderer;
use sdl2::{event::Event, keyboard::KeyboardState, mouse::MouseState, pixels::Color};
use std::time::{Duration, Instant};
+use strings::set_language;
pub mod config;
pub mod game;
pub mod helper;
-pub mod strings;
pub mod menu;
pub mod profiler;
pub mod render;
+pub mod strings;
pub mod tilemap;
pub mod ui;
diff --git a/pixel-client/src/menu/background.rs b/pixel-client/src/menu/background.rs
index 84ec3f34..13cb041d 100644
--- a/pixel-client/src/menu/background.rs
+++ b/pixel-client/src/menu/background.rs
@@ -23,7 +23,7 @@ use hurrycurry_protocol::{
glam::{IVec2, Vec2},
TileIndex,
};
-use rand::{random, seq::IndexedRandom, thread_rng};
+use rand::{random, rng, seq::IndexedRandom};
pub struct MenuBackground {
background: Vec2,
@@ -54,7 +54,7 @@ impl MenuBackground {
let p = Vec2::new(x as f32, y as f32);
let w = (-p.length() * 0.15).exp();
let k = ((random::<f32>() * w) * BUCKETS.len() as f32) as usize;
- if let Some(ti) = BUCKETS[k.min(BUCKETS.len())].choose(&mut thread_rng()) {
+ if let Some(ti) = BUCKETS[k.min(BUCKETS.len())].choose(&mut rng()) {
map.set(IVec2::new(x, y), Some(TileIndex(*ti)), [None; 4])
}
}
diff --git a/pixel-client/tools/Cargo.toml b/pixel-client/tools/Cargo.toml
index 075ec24f..f06d549c 100644
--- a/pixel-client/tools/Cargo.toml
+++ b/pixel-client/tools/Cargo.toml
@@ -4,9 +4,9 @@ version = "0.1.0"
edition = "2021"
[dependencies]
-image = "0.25.2"
-anyhow = "1.0.89"
-log = "0.4.22"
-env_logger = "0.11.5"
-clap = { version = "4.5.18", features = ["derive"] }
+image = "0.25.6"
+anyhow = "1.0.98"
+log = "0.4.27"
+env_logger = "0.11.8"
+clap = { version = "4.5.39", features = ["derive"] }
sdl2 = { version = "0.37.0", features = ["image"] }