AAO25.com

Assist => Feedback & Suggestions => Topic started by: Spanky on Friday, October 10, 2014, 13:58:58 PM

Title: Spawn Spam (Grenade Check)
Post by: Spanky on Friday, October 10, 2014, 13:58:58 PM
Here's some code snips I found for detecting spawn spam in Crusade's various mods:

Code: [Select]
function RecordFireThrow (Pawn P, Weapon W)
{
local ThrowWeapon DisableGren;

if (!LegalWeaponAction(P,W))
{
AGP_Weapon(W).ClientTempLowerWeapon(False);
doWarning("Pawn Killing", P);
  }

if ( (SpamProtectTime <= 0) || (Level.Game.TimeLimit * 60 - Level.GRI.RemainingTime >= SpamProtectTime) )
  {
    return;
  }

  foreach Level.DynamicActors(Class'ThrowWeapon',DisableGren)
  {
    if ( (DisableGren.Instigator == None) || (DisableGren.Instigator.PlayerReplicationInfo == None) ||  !DisableGren._bLostSpoon || (DisableGren._fDamage == 0) )
    {
      continue;
    }
else
{
      DisableGren._bLostSpoon = False;
      DisableGren._fDamage = 0.0;
      DisableGren._fEffectDuration = 0.0;
        DoWarning("Grenade Thrown at spawn", p);
    }
  }
}

Then in the .ini for this (this was in an early version of HackHunter) is this:
SpamProtectTime=15
Title: Re: Spawn Spam (Grenade Check)
Post by: ~=W!CK!D=~ on Friday, October 10, 2014, 14:05:18 PM
Hack hunter was a great tool back in the day
Title: Re: Spawn Spam (Grenade Check)
Post by: ELiZ on Friday, October 10, 2014, 14:08:23 PM
I can see similar code in ExploitEnder.
The above code is definite for Grenades, are 203's treated as grenades in AA?
Title: Re: Spawn Spam (Grenade Check)
Post by: ELiZ on Friday, October 10, 2014, 14:28:46 PM
This might be a function that might be used to detect Early 203(or GP).
Code: [Select]
Function Spamprotect()
{
local Projectile DisableProj;

foreach Level.DynamicActors(Class'Projectile',DisableProj)
{
if ( (DisableProj.Instigator == None) || (DisableProj.Instigator.PlayerReplicationInfo == None) || (DisableProj.Damage == 0) )
{
continue;
}
else
{
DisableProj.Damaage = 0.0;
DoWarning("203 Shot at spawn", p);
}
}
}

Not tested the code, but I think it might work without much change.
Might have to check class of the projectile to be accurate. But if we merge the two, we should be able to add an optional(Server Owner) spawn protection.

So question is if we should add it, and what punishment, at the moment it just makes the projectile and grenade to cause no injury.
Title: Re: Spawn Spam (Grenade Check)
Post by: Spanky on Friday, October 10, 2014, 14:37:50 PM
I say make the protection for all nades except smoke. Maybe even gunfire too (if possible), each one configurable to a different time would be nice.

Grenades, incendiaries and 203s aren't needed for a while but in smaller maps, guns and smokes can be used pretty quickly. Same for RPG/BDM, especially on breachable maps.

As far as punishing, maybe just a warning to the user and a console message and disabling of the item. Global admin messages for all users shouldn't be used, it distracts from gameplay.
Title: Re: Spawn Spam (Grenade Check)
Post by: Jared on Friday, October 10, 2014, 16:40:55 PM
I think a nice slap would work :D
Title: Re: Spawn Spam (Grenade Check)
Post by: bollie on Friday, October 10, 2014, 17:19:10 PM
also for gunfire Spanky? What should we do than if you face enemy in first seconds? look the enemy to death lol
Title: Re: Spawn Spam (Grenade Check)
Post by: Spanky on Friday, October 10, 2014, 19:59:11 PM
There's maps like Bridge where a lot of people spam bullets much sooner than it's possible to see enemy. Each map would have to be configured but that could be a server owner's option. Let the owner choose the spam time.
Title: Re: Spawn Spam (Grenade Check)
Post by: bollie on Saturday, October 11, 2014, 03:20:40 AM
There's maps like Bridge where a lot of people spam bullets much sooner than it's possible to see enemy. Each map would have to be configured but that could be a server owner's option. Let the owner choose the spam time.

Yeah ok that sounds like a plan