Raised This Month: $7 Target: $400
 1% 

[L4D/2] TankDoorFix


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Plugin ID:
3866
Plugin Version:
1.4
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    20 
    Plugin Description:
    Attempts to fix the bug in which doors do not break although the tank is punching at them.
    Old 08-31-2013 , 16:23   [L4D/2] TankDoorFix
    Reply With Quote #1

    This is a quickfix which will hopefully prevent doors from ever surviving a tank punch again.
    This uses sdkhooks.

    In case the door doesn't want to break when the tank punches right at it, this will destroy the door manually.
    Only bug I've encountered is that the door doesn't get blasted away, it just falls into pieces.
    If this plugin circumvents the door bug, a message is shown to the tank, which is also written to the logfile. In that case it would be nice of you to notify me because it is kind of impossible to reproduce.

    Changes in 1.4:

    -Added version cvar

    Changes in 1.3:

    -Fixed http://forums.alliedmods.net/showpos...0&postcount=15

    Changes in 1.2:

    -Fixed foolishly missing verification in timer tick

    Changes in 1.1:

    -Fixed L4D support
    -Added check for compatibility
    -Adjusted TakeDamage call to match the damage amount and the damage type of the usual tank punch against the door
    Attached Files
    File Type: sp Get Plugin or Get Source (tankdoorfix.sp - 2748 views - 4.0 KB)

    Last edited by Dr. Greg House; 11-19-2013 at 03:25.
    Dr. Greg House is offline
    disawar1
    AlliedModders Donor
    Join Date: Aug 2011
    Location: Russian
    Old 08-31-2013 , 23:06   Re: [L4D/2] TankDoorFix
    Reply With Quote #2

    Hi there. Nice plugin. Some players asked me write this fix few days ago but you are ahead of me . Here is my request. Could you add l4d support? people in need!

    EDIT:

    Oooops! What about safe room doors? change this code
    PHP Code:
    if(StrEqual(entName"prop_door_rotating")) 
    to
    PHP Code:
    if(StrContains(entName"prop_door_rotating") != -1
    __________________

    Last edited by disawar1; 09-01-2013 at 00:01.
    disawar1 is offline
    Dr. Greg House
    Professional Troll,
    Part-Time Asshole
    Join Date: Jun 2010
    Old 09-01-2013 , 12:32   Re: [L4D/2] TankDoorFix
    Reply With Quote #3

    Quote:
    Originally Posted by disawar1 View Post
    [...]Could you add l4d support?[...]
    Well the title says it supports L4D as well. Although untested, I don't see why it shouldn't work.

    Quote:
    Originally Posted by disawar1 View Post
    [...]Oooops! What about safe room doors? change this code
    PHP Code:
    if(StrEqual(entName"prop_door_rotating")) 
    to
    PHP Code:
    if(StrContains(entName"prop_door_rotating") != -1
    Honestly, I don't quite get that. What about them? And why would I change this line?

    Last edited by Dr. Greg House; 09-01-2013 at 12:33.
    Dr. Greg House is offline
    disawar1
    AlliedModders Donor
    Join Date: Aug 2011
    Location: Russian
    Old 09-01-2013 , 13:07   Re: [L4D/2] TankDoorFix
    Reply With Quote #4

    There is one reason why it shouldn't work. m_zombieClass prop returns 5 for tank in l4d not 8.
    Your plugin checks only ordinary hinged doors (prop_door_rotating) safe room use special variant of prop_door_rotating (prop_door_rotating_checkpoint) so players still can blocks tank in start/end safe areas. If you make my changes plugin will be checks both type of doors and support l4d.

    You can use following code to check l4d/l4d2 tank if you want.
    PHP Code:
    bool:IsPlayerTank(client)
    {
        return 
    GetEntProp(clientProp_Send"m_zombieClass") == (IsLeft4Dead() ? 8);
    }

    bool:IsLeft4Dead()
    {
        static 
    iGame = -1;

        if (
    iGame == -1){

            
    decl String:sGameFolder[32];
            
    GetGameFolderName(sGameFolder32);
            
    iGame StrEqual(sGameFolder"left4dead");
        }

        return 
    iGame;

    __________________

    Last edited by disawar1; 09-01-2013 at 13:20.
    disawar1 is offline
    Dr. Greg House
    Professional Troll,
    Part-Time Asshole
    Join Date: Jun 2010
    Old 09-01-2013 , 13:20   Re: [L4D/2] TankDoorFix
    Reply With Quote #5

    Quote:
    Originally Posted by disawar1 View Post
    [...]Your plugin checks only ordinary hinged doors (prop_door_rotating) safe room use special variant of prop_door_rotating (prop_door_rotating_checkpoint) so players still can blocks tank in start/end safe areas. If you make my changes plugin will be checks both type of doors and support l4d.[...]
    My plugin's purpose is to fix a bug. I am not going to add any game features, especially not any game-breaking stuff. That door is made out of reinforced steel and if the tank is really foolishly enough to let himself get lured into the end safe area (this cannot work for start safe areas because you cannot close the door and a tank does not spawn until the round started/door is opened) the player has just, well, lost.
    I will fix the l4d issue though.

    Last edited by Dr. Greg House; 09-01-2013 at 13:32.
    Dr. Greg House is offline
    disawar1
    AlliedModders Donor
    Join Date: Aug 2011
    Location: Russian
    Old 09-01-2013 , 14:32   Re: [L4D/2] TankDoorFix
    Reply With Quote #6

    Then you should make a note PLUGIN SUPPORT ONLY VERSUS or make gamemode check because in Co-Op you can close the safe room door. That's what I'm talking about.
    __________________

    Last edited by disawar1; 09-01-2013 at 14:35.
    disawar1 is offline
    Dr. Greg House
    Professional Troll,
    Part-Time Asshole
    Join Date: Jun 2010
    Old 09-01-2013 , 15:31   Re: [L4D/2] TankDoorFix
    Reply With Quote #7

    Still, it is intended to be able to lock the tank inside. Actually locking the ai tank in there is much more difficult because if the ai chases you and decides to not throw a rock it will ALWAYS use the shortest way. Since you'd have to go around the tank in that case there would be always losses.
    So whoever decides to go back to the saferoom to lock an ai tank inside is obviously using one of the worst ways possible to kill a tank.
    Whether this plugin is a bugfix only or not is not up for discussion. oO
    I'm actually against gameplay modifiers in general because it is random to the people that join and you do not know completely what modifications have been made, let alone keep them all in mind if in the rarest case there is some information upon joining the server.
    It is like you'd insist the ghost fly plugin developer to let SI fly even after they've spawned.

    Last edited by Dr. Greg House; 09-01-2013 at 15:33.
    Dr. Greg House is offline
    disawar1
    AlliedModders Donor
    Join Date: Aug 2011
    Location: Russian
    Old 09-01-2013 , 16:27   Re: [L4D/2] TankDoorFix
    Reply With Quote #8

    Left 4 Dead: Blocking Safe Room Door
    I can stop the discussion and attach Co-Op version, I was just hoping that you pay attention on players request that I got.
    __________________
    disawar1 is offline
    Dr. Greg House
    Professional Troll,
    Part-Time Asshole
    Join Date: Jun 2010
    Old 09-01-2013 , 16:39   Re: [L4D/2] TankDoorFix
    Reply With Quote #9

    You could have told me right away that this particular "workaround" for ai tanks exists.
    I'd actually go ahead and try a different approach: Check for the ai tank, the abusive player and the saferoom door. Then either make the door disappear or teleport that person.
    However I would not do that in a non-competitive mode because in coop it is up to the players to decide when to use exploits or not. At this point they might as well use cheats to kill the tank or prevent it from spawning. So fixing this doesn't fix the actual issue at hand.

    What I could add to the plugin is to optionally prevent the saferoom door at the start from closing again as it works in versus.
    But honestly this should be part of a different plugin. But wth I'll do it anyway. Come by tomorrow I'll post the new plugin.

    Last edited by Dr. Greg House; 09-01-2013 at 16:41.
    Dr. Greg House is offline
    disawar1
    AlliedModders Donor
    Join Date: Aug 2011
    Location: Russian
    Old 09-01-2013 , 17:00   Re: [L4D/2] TankDoorFix
    Reply With Quote #10

    Perhaps my poor English forced us to spend time on this discussing. Anyway thanks.
    p.s you forgot change plugin version to "1.1"
    __________________
    disawar1 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 05:01.


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