Fix goals showing for incorrect player

This commit is contained in:
Sofia 2026-07-30 00:42:14 +03:00
parent 1743491f40
commit 9e4db39b21

View File

@ -687,6 +687,7 @@ impl Game {
if let Some(map) = &mut self.current_map {
let mut ball = map.bind_mut().spawn_ball(transform, velocity, player_id);
if let Some(ball) = &mut ball {
ball.bind_mut().dropper = player_id;
self.world_ball = Some(ball.clone());
ball.signals()
.on_ball_pickup()
@ -753,7 +754,7 @@ impl Game {
self.run_deferred(move |s| {
if let Some(mut chat) = Chat::singleton() {
chat.bind_mut()
.new_message(ChatMessage::Goal(0, teams.clone()));
.new_message(ChatMessage::Goal(scorer, teams.clone()));
}
s.signals().on_goal().emit();