mirror of
https://github.com/Nereziel/cs2-WeaponPaints.git
synced 2026-02-18 10:43:22 +00:00
Update WeaponAction.cs
This commit is contained in:
@@ -337,7 +337,7 @@ namespace WeaponPaints
|
||||
}
|
||||
}
|
||||
|
||||
internal void RefreshKnife(CCSPlayerController? player, bool force = false)
|
||||
internal void RefreshKnife(CCSPlayerController? player)
|
||||
{
|
||||
if (player == null || !player.IsValid || player.PlayerPawn?.Value == null || (LifeState_t)player.LifeState != LifeState_t.LIFE_ALIVE)
|
||||
return;
|
||||
@@ -358,7 +358,10 @@ namespace WeaponPaints
|
||||
|
||||
if (weapon.Value.DesignerName.Contains("knife") || weaponData?.GearSlot == gear_slot_t.GEAR_SLOT_KNIFE)
|
||||
{
|
||||
player.RemoveItemByDesignerName(weapon.Value.DesignerName, weapon.Value.Entity?.EntityInstance.IsValid ?? false);
|
||||
player.RemoveItemByDesignerName(weapon.Value.DesignerName, false);
|
||||
if (weapon.Value.Entity != null && weapon.Value.Entity.EntityInstance.IsValid)
|
||||
weapon.Value.Remove();
|
||||
|
||||
AddTimer(0.2f, () => GiveKnifeToPlayer(player));
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user