mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-12 01:05:54 +00:00
Fix for weapon switching
This commit is contained in:
parent
898c15183b
commit
9e04056800
5 changed files with 83 additions and 3 deletions
|
|
@ -138,7 +138,14 @@ public partial class GameManager : Node2D
|
|||
var weapon = _player.CreateChild<Weapon>(WeaponTemplate);
|
||||
weapon.WeaponData = startingItem.WeaponData;
|
||||
|
||||
_player.EquippedWeapon ??= weapon;
|
||||
_player.AddWeapon(weapon);
|
||||
|
||||
if (_player.EquippedWeapon == null)
|
||||
{
|
||||
_player.EquipWeapon(weapon);
|
||||
}
|
||||
|
||||
//_player.EquippedWeapon ??= weapon;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue