Compare commits
No commits in common. "c9cb24281b29bba5018f1cf34a76791724f9a633" and "f5cc26a048de1ddb5a3499a7187813721ff9f8db" have entirely different histories.
c9cb24281b
...
f5cc26a048
@ -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]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.3304863, 0)
|
||||
pixel_size = 0.002
|
||||
billboard = 1
|
||||
text = "asd"
|
||||
font_size = 64
|
||||
|
||||
@ -176,7 +176,7 @@ pub struct Game {
|
||||
player_counter: u16,
|
||||
pub self_id: Option<u16>,
|
||||
pub players: Vec<Player>,
|
||||
pub game_started: bool,
|
||||
game_started: bool,
|
||||
|
||||
pub current_map: Option<Gd<Map>>,
|
||||
pub world_ball: Option<Gd<Ball>>,
|
||||
@ -299,8 +299,6 @@ impl Game {
|
||||
}
|
||||
|
||||
pub fn finish_game(&mut self) {
|
||||
self.game_started = false;
|
||||
|
||||
for player in &mut self.players {
|
||||
if let Some(mut character) = player.character.take() {
|
||||
character.queue_free();
|
||||
@ -322,6 +320,7 @@ impl Game {
|
||||
ball.queue_free();
|
||||
}
|
||||
self.current_map.take();
|
||||
self.game_started = false;
|
||||
|
||||
self.run_deferred(|s| {
|
||||
if let Some(peer) = &mut NetworkManager::singleton().bind_mut().peer
|
||||
|
||||
@ -436,8 +436,8 @@ impl ICharacterBody3D for LocalPlayer {
|
||||
let input_direction = if self.locked {
|
||||
let input = Input::singleton();
|
||||
|
||||
if input.is_action_just_pressed("jump") {
|
||||
self.jump();
|
||||
if self.base().is_on_floor() && input.is_action_just_pressed("jump") {
|
||||
self.try_jump();
|
||||
}
|
||||
|
||||
Vector3::RIGHT * input.is_action_pressed("right") as u32 as f32
|
||||
@ -530,11 +530,7 @@ impl ICharacterBody3D for LocalPlayer {
|
||||
}
|
||||
|
||||
fn exit_tree(&mut self) {
|
||||
if let Some(game) = Game::singleton()
|
||||
&& !game.bind().game_started
|
||||
{
|
||||
self.set_lock(false);
|
||||
}
|
||||
self.set_lock(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -36,7 +36,6 @@ impl IHBoxContainer for SimpleScoreView {
|
||||
.on_goal()
|
||||
.connect_other(s, |s| s.update_goals());
|
||||
}
|
||||
s.update_goals();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user