Raised This Month: $32 Target: $400
 8% 

[TF2] Pyro Airblast Glitch Fix


Post New Thread Reply   
 
Thread Tools Display Modes
Author
FoxMulder
Senior Member
Join Date: Jan 2009
Location: Orlando, FL
Plugin ID:
1693
Plugin Version:
1.0.3
Plugin Category:
Server Management
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    2 
    Plugin Description:
    Prevents players from lagging other players by using the Pyro Airblast glitch.
    Unapprover:
    Reason for Unapproving:
    Fixed by Valve update.
    Old 05-29-2010 , 15:28   [TF2] Pyro Airblast Glitch Fix
    Reply With Quote #1

    What does this plugin do?
    Prevents players from lagging other players by using the Pyro Airblast glitch.
    I created this because I get very laggy whenever a player performs this glitch (FPS drop)

    How does a player "activate" the glitch?
    1. Go Pyro with normal Flamethrower
    2. Hold down Primary Fire and QUICKLY press Alt Fire (air blast)
    3. If you see your ammo go down but don't see the flame particle then the glitch occurred.
    Convars:
    sm_airblast_glitchfix_version Shows current version
    sm_airblast_glitchfix_enable <0/1> Enable Airblast Glitch Fix

    How it works:
    It uses the OnPreThink hook to detect an attempted glitch and if the glitch is found then it just "disables" Primary Fire button.

    Video of the Glitch:
    http://www.youtube.com/watch?v=KLe7kr_yw18

    NOTE:
    Requires SDKHooks: http://forums.alliedmods.net/showthread.php?t=106748

    Updates:
    1.0.1
    -added check of current weapon to make sure that it is the Flamethrower
    1.0.2
    -corrected late load detection
    1.0.3
    -Removed weapon check on Pyro as it was unnecessary
    -Corrected cvar to sm_airblast_glitchfix_version instead of airblast_glitchfix_version

    Simple Detection
    PHP Code:
    public OnPreThink(client)
    {
        if(!
    GetConVarInt(c_Enabled))
            return;
        
        if(
    TF2_GetPlayerClass(client) != TFClass_Pyro)
            return;
        
        new 
    iButtons GetClientButtons(client);
        
        
    //Glitch detected
        
    if(prevButtonAttack2[client] && iButtons IN_ATTACK && !(iButtons IN_ATTACK2))
        {
            
    iButtons &= ~IN_ATTACK;
            
    SetEntProp(clientProp_Data"m_nButtons"iButtons);
            
    //PrintToChat(client, "Glitch detected!");
        
    }
        
        if(
    iButtons IN_ATTACK && iButtons IN_ATTACK2)
            
    prevButtonAttack2[client] = true;
        
        if(!(
    iButtons IN_ATTACK2))
            
    prevButtonAttack2[client] = false;

    Attached Files
    File Type: smx airblast_glitchfix.smx (3.4 KB, 502 views)
    File Type: sp Get Plugin or Get Source (airblast_glitchfix.sp - 563 views - 2.8 KB)
    __________________

    Last edited by FoxMulder; 06-02-2010 at 19:39. Reason: New version 1.0.3
    FoxMulder is offline
    Jamster
    Veteran Member
    Join Date: Jun 2008
    Old 05-29-2010 , 15:35   Re: [TF2] Pyro Airblast Glitch Fix
    Reply With Quote #2

    Great fix dude, thanks.
    Jamster is offline
    KyleS
    SourceMod Plugin Approver
    Join Date: Jul 2009
    Location: Segmentation Fault.
    Old 05-29-2010 , 15:38   Re: [TF2] Pyro Airblast Glitch Fix
    Reply With Quote #3

    Thanks FoxMulder
    KyleS is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 05-29-2010 , 18:36   Re: [TF2] Pyro Airblast Glitch Fix
    Reply With Quote #4

    @FoxMulder

    Some of your lateload logic is bugged.

    The way it's currently coded will add a new hook on each client at each mapchange.

    The AskPluginLoad2 forward alone does not mean the plugin was lateloaded. The 'late' bool (that you named isAfterMapLoaded) passed through it will tell that. Also, you're not resetting your lateLoaded global after hooking, which causes that logic to then re-run every time configs are executed.
    psychonic is offline
    noodleboy347
    AlliedModders Donor
    Join Date: Mar 2009
    Old 05-29-2010 , 19:14   Re: [TF2] Pyro Airblast Glitch Fix
    Reply With Quote #5

    This is extremely helpful, thanks. Is there also a way to fix players going into civilian mode as Soldier?
    noodleboy347 is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 05-29-2010 , 20:36   Re: [TF2] Pyro Airblast Glitch Fix
    Reply With Quote #6

    I would have assumed they had fixed this. :/
    __________________

    DontWannaName is offline
    FoxMulder
    Senior Member
    Join Date: Jan 2009
    Location: Orlando, FL
    Old 05-29-2010 , 21:41   Re: [TF2] Pyro Airblast Glitch Fix
    Reply With Quote #7

    Quote:
    Originally Posted by psychonic View Post
    @FoxMulder

    Some of your lateload logic is bugged.

    The way it's currently coded will add a new hook on each client at each mapchange.

    The AskPluginLoad2 forward alone does not mean the plugin was lateloaded. The 'late' bool (that you named isAfterMapLoaded) passed through it will tell that. Also, you're not resetting your lateLoaded global after hooking, which causes that logic to then re-run every time configs are executed.
    Your right. Silly me .
    -Updated plugin with correct late load detection
    __________________
    FoxMulder is offline
    FoxMulder
    Senior Member
    Join Date: Jan 2009
    Location: Orlando, FL
    Old 05-29-2010 , 21:45   Re: [TF2] Pyro Airblast Glitch Fix
    Reply With Quote #8

    Quote:
    Originally Posted by noodleboy347 View Post
    This is extremely helpful, thanks. Is there also a way to fix players going into civilian mode as Soldier?
    Umm let me research that I haven't seen this happen.

    Edit: Well I looked into it and really it's no big deal whereas the Pyro glitch causes other players to lag we'll just wait for Valve to fix that one
    __________________

    Last edited by FoxMulder; 05-30-2010 at 00:17.
    FoxMulder is offline
    Kevin_b_er
    SourceMod Donor
    Join Date: Feb 2009
    Old 05-30-2010 , 13:38   Re: [TF2] Pyro Airblast Glitch Fix
    Reply With Quote #9

    Impressive.

    You're taking cue from an switch from attack1 to attack2 without delay. Did you find that even a small delay prevented the glitch?
    __________________

    Last edited by Kevin_b_er; 05-30-2010 at 13:44.
    Kevin_b_er is offline
    FoxMulder
    Senior Member
    Join Date: Jan 2009
    Location: Orlando, FL
    Old 05-30-2010 , 15:11   Re: [TF2] Pyro Airblast Glitch Fix
    Reply With Quote #10

    Quote:
    Originally Posted by Kevin_b_er View Post
    Impressive.

    You're taking cue from an switch from attack1 to attack2 without delay. Did you find that even a small delay prevented the glitch?
    I'd like to find a script that'll fire attack2 faster than I can click to make sure that the plugin is "foolproof". Also the plugin uses a PreThink hook which should be plenty fast to detect the glitch.
    __________________
    FoxMulder is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 12:15.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode