AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D/2] TankDoorFix (https://forums.alliedmods.net/showthread.php?t=225087)

Dr. Greg House 08-31-2013 16:23

[L4D/2] TankDoorFix
 
1 Attachment(s)
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

disawar1 08-31-2013 23:06

Re: [L4D/2] TankDoorFix
 
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


Dr. Greg House 09-01-2013 12:32

Re: [L4D/2] TankDoorFix
 
Quote:

Originally Posted by disawar1 (Post 2025879)
[...]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 (Post 2025879)
[...]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?

disawar1 09-01-2013 13:07

Re: [L4D/2] TankDoorFix
 
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;



Dr. Greg House 09-01-2013 13:20

Re: [L4D/2] TankDoorFix
 
Quote:

Originally Posted by disawar1 (Post 2026353)
[...]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.

disawar1 09-01-2013 14:32

Re: [L4D/2] TankDoorFix
 
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.

Dr. Greg House 09-01-2013 15:31

Re: [L4D/2] TankDoorFix
 
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.

disawar1 09-01-2013 16:27

Re: [L4D/2] TankDoorFix
 
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.

Dr. Greg House 09-01-2013 16:39

Re: [L4D/2] TankDoorFix
 
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.

disawar1 09-01-2013 17:00

Re: [L4D/2] TankDoorFix
 
Perhaps my poor English forced us to spend time on this discussing. Anyway thanks.
p.s you forgot change plugin version to "1.1" :)


All times are GMT -4. The time now is 23:17.

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