Compare commits

...

2 Commits

Author SHA1 Message Date
6545f54cfc Disable walk effects when dead 2026-07-25 21:21:42 +03:00
02c39f01dc Fix warnings 2026-07-25 21:20:59 +03:00
5 changed files with 5 additions and 6 deletions

View File

@ -210,7 +210,6 @@ pub struct Game {
pub current_map: Option<Gd<Map>>, pub current_map: Option<Gd<Map>>,
pub world_ball: Option<Gd<Ball>>, pub world_ball: Option<Gd<Ball>>,
since_last_sync: f64,
pub goals: HashMap<u8, u16>, pub goals: HashMap<u8, u16>,

View File

@ -1,7 +1,6 @@
use std::{ use std::{
collections::VecDeque,
net::SocketAddr, net::SocketAddr,
time::{Duration, Instant, SystemTime, UNIX_EPOCH}, time::{Duration, SystemTime, UNIX_EPOCH},
}; };
use godot::{ use godot::{

View File

@ -411,7 +411,7 @@ impl ICharacterBody3D for LocalPlayer {
scoreboard.set_visible(Input::singleton().is_action_pressed("scoreboard")); scoreboard.set_visible(Input::singleton().is_action_pressed("scoreboard"));
} }
if self.movement_dir.length_squared() > 0. && self.base().is_on_floor() { if self.movement_dir.length_squared() > 0. && self.base().is_on_floor() && !self.is_dead {
if let Some(effects) = &mut self.effects { if let Some(effects) = &mut self.effects {
effects.bind_mut().walk(); effects.bind_mut().walk();
} }

View File

@ -269,6 +269,7 @@ impl ICharacterBody3D for RemotePlayer {
if self.movement_dir.length_squared() > 0. if self.movement_dir.length_squared() > 0.
&& self.base().is_on_floor() && self.base().is_on_floor()
&& !self.is_dead
&& let Some(effects) = &mut self.effects && let Some(effects) = &mut self.effects
{ {
effects.bind_mut().walk(); effects.bind_mut().walk();

View File

@ -7,9 +7,9 @@ use godot::{
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use crate::{ use crate::{
game_manager::{Game, GameOption}, game_manager::Game,
net::util::{cast_ray, shotgun_ray}, net::util::{cast_ray, shotgun_ray},
player::{DamageSource, IPlayer, ball::Ball, shootable::Shootable}, player::{DamageSource, shootable::Shootable},
}; };
pub trait Weapon { pub trait Weapon {