Still restrict other weapons in guntoss (#349)

This commit is contained in:
Isaac
2024-12-26 22:15:16 -08:00
committed by GitHub

View File

@@ -244,10 +244,10 @@ public class GunToss(BasePlugin plugin, ILastRequestManager manager,
public override bool PreventEquip(CCSPlayerController player, public override bool PreventEquip(CCSPlayerController player,
CCSWeaponBaseVData weapon) { CCSWeaponBaseVData weapon) {
if (weapon.Name != "weapon_deagle") return false;
if (State != LRState.ACTIVE) return false; if (State != LRState.ACTIVE) return false;
if (player.Slot != Prisoner.Slot && player.Slot != Guard.Slot) { if (player.Slot != Prisoner.Slot && player.Slot != Guard.Slot) {
if (weapon.Name != "weapon_deagle") return false;
var guardGunDist = guardWeapon == null ? var guardGunDist = guardWeapon == null ?
float.MaxValue : float.MaxValue :
guardWeapon.AbsOrigin!.DistanceSquared( guardWeapon.AbsOrigin!.DistanceSquared(