Compare commits

..

No commits in common. "c9cb24281b29bba5018f1cf34a76791724f9a633" and "f5cc26a048de1ddb5a3499a7187813721ff9f8db" have entirely different histories.

4 changed files with 5 additions and 14 deletions

View File

@ -38,7 +38,4 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.8724979, -0.2644562)
[node name="name_label" type="Label3D" parent="." unique_id=142179925] [node name="name_label" type="Label3D" parent="." unique_id=142179925]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.3304863, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.3304863, 0)
pixel_size = 0.002
billboard = 1 billboard = 1
text = "asd"
font_size = 64

View File

@ -176,7 +176,7 @@ pub struct Game {
player_counter: u16, player_counter: u16,
pub self_id: Option<u16>, pub self_id: Option<u16>,
pub players: Vec<Player>, pub players: Vec<Player>,
pub game_started: bool, game_started: bool,
pub current_map: Option<Gd<Map>>, pub current_map: Option<Gd<Map>>,
pub world_ball: Option<Gd<Ball>>, pub world_ball: Option<Gd<Ball>>,
@ -299,8 +299,6 @@ impl Game {
} }
pub fn finish_game(&mut self) { pub fn finish_game(&mut self) {
self.game_started = false;
for player in &mut self.players { for player in &mut self.players {
if let Some(mut character) = player.character.take() { if let Some(mut character) = player.character.take() {
character.queue_free(); character.queue_free();
@ -322,6 +320,7 @@ impl Game {
ball.queue_free(); ball.queue_free();
} }
self.current_map.take(); self.current_map.take();
self.game_started = false;
self.run_deferred(|s| { self.run_deferred(|s| {
if let Some(peer) = &mut NetworkManager::singleton().bind_mut().peer if let Some(peer) = &mut NetworkManager::singleton().bind_mut().peer

View File

@ -436,8 +436,8 @@ impl ICharacterBody3D for LocalPlayer {
let input_direction = if self.locked { let input_direction = if self.locked {
let input = Input::singleton(); let input = Input::singleton();
if input.is_action_just_pressed("jump") { if self.base().is_on_floor() && input.is_action_just_pressed("jump") {
self.jump(); self.try_jump();
} }
Vector3::RIGHT * input.is_action_pressed("right") as u32 as f32 Vector3::RIGHT * input.is_action_pressed("right") as u32 as f32
@ -530,11 +530,7 @@ impl ICharacterBody3D for LocalPlayer {
} }
fn exit_tree(&mut self) { fn exit_tree(&mut self) {
if let Some(game) = Game::singleton() self.set_lock(false);
&& !game.bind().game_started
{
self.set_lock(false);
}
} }
} }

View File

@ -36,7 +36,6 @@ impl IHBoxContainer for SimpleScoreView {
.on_goal() .on_goal()
.connect_other(s, |s| s.update_goals()); .connect_other(s, |s| s.update_goals());
} }
s.update_goals();
}); });
} }
} }