Update weapon rotation on shoot correctly

This commit is contained in:
Sofia 2026-08-03 15:45:48 +03:00
parent f2d168a814
commit 31b7a053e6

View File

@ -202,6 +202,10 @@ impl IPlayer for LocalPlayer {
fn try_shoot(&mut self, to: Vector3, deal_damage: bool) -> bool {
if self.try_shoot_common(to, deal_damage) {
if let Some(weapon) = &mut self.weapon {
weapon.set_position(-Vector3::FORWARD);
weapon.set_rotation(Vector3::RIGHT * 0.5);
}
if let Some(game) = &mut Game::singleton()
&& let Some(recorder) = game.bind_mut().recorder()
{