Fix ball spawn order

This commit is contained in:
Sofia 2026-08-03 20:06:05 +03:00
parent 72c74bbedb
commit 55d6d236f9

View File

@ -153,13 +153,13 @@ impl Map {
{
let mut ball = ball_prefab.instantiate_as::<Ball>();
ball.bind_mut().dropper = player_id;
self.base_mut().add_child(&ball);
if let Some(transform) = transform {
ball.set_position(transform.location.into());
ball.set_rotation(transform.rotation.into());
} else {
ball.set_position(ball_spawner.get_position());
}
self.base_mut().add_child(&ball);
if let Some(velocity) = velocity {
ball.set_linear_velocity(velocity.into());
}