Forbid throwing telegrenade with ball

This commit is contained in:
Sofia 2026-07-27 22:57:44 +03:00
parent a0ce60c238
commit b738271d75

View File

@ -275,6 +275,12 @@ impl<T: IPlayer + ICharacterBody3D + WithBaseField> PlayerCommon for T {
return false;
}
if let Some(weapon) = self.get_weapon()
&& weapon.dyn_bind().get_type() == WeaponType::Ball
{
return false;
}
self.run_deferred(move |s| {
if let Some(game) = &mut Game::singleton()
&& let Some(origin) = s.get_camera_origin()