Raised This Month: $91 Target: $400
 22% 

[L4D] Infected No Block On Ladder


Post New Thread Reply   
 
Thread Tools Display Modes
Uncle Jessie
Member
Join Date: May 2016
Location: Prison
Old 10-16-2019 , 02:23   Re: [L4D] Infected No Block On Ladder
Reply With Quote #11

Quote:
Originally Posted by Silvers View Post
haha author Silvers. Yeah that's pretty much exactly what I was thinking. Well done! Haven't tested so I hope it works but I don't see why not. Thanks

Edit: the only thing is why are you checking for tank? That would be team 3 (infected): GetEntProp(client, Prop_Send, "m_zombieClass") != 8.

Also not sure about the multiple hooks/unhooks, I don't know how SDKHooks handles that. Maybe a global bool MAXPLAYERS+1 to check when it's hooked / unhooked. I guess theres multiple ways to tackle this would need to test.
Just tested on the tank at that moment.
Just want use this only for the tank for now.


This should look better and there is still no more than 50 lines)
Spoiler
Uncle Jessie is offline
Sunyata
Member
Join Date: Nov 2017
Old 10-18-2019 , 09:42   Re: [L4D] Infected No Block On Ladder
Reply With Quote #12

@Uncle Jessie,

Just tested out both your latest versions of 'cant block Tank on ladder' scripts from post 9 & 11, and it's not working as intended. I tried both your plugins for the normal ladder and the cradle (safety) ladder using myself to block the tops of each type of ladder (see linked screenshots for those ladder types). Mr Tanky just remains at bottom of ladder and wont attempt to climb, unless of course I move off of the ladder.

I've only tested this out on a two maps on my Windows L4D1 server. If you decide to update your scripts again, I'll be more than happy to test them out for you.

https://www.dropbox.com/s/rovba0zr37...adder.jpg?dl=0
https://www.dropbox.com/s/6431i6sb82...adder.jpg?dl=0
Sunyata is offline
finishlast
Junior Member
Join Date: Nov 2018
Old 10-18-2019 , 11:38   Re: [L4D] Infected No Block On Ladder
Reply With Quote #13

Quote:
Originally Posted by Sunyata View Post
@Uncle Jessie,

Mr Tanky just remains at bottom of ladder and wont attempt to climb, unless of course I move off of the ladder.
Looking through the source code it is not altering the behavior of bot tanks at all, it is just manipulating the m_CollisionGroup to make it possible to climb up no matter if someone is blocking it or not.

I guess the blocking you mention is more like a AI stuck situation that is caused by you sitting on the ladder.

It may be possible to find out stuck situations of tanks at ladders though and then mb teleport the tank a bit somewhere to make the ai work again.

But that is not the innitial intention of this plugin.
finishlast is offline
Uncle Jessie
Member
Join Date: May 2016
Location: Prison
Old 10-18-2019 , 18:42   Re: [L4D] Infected No Block On Ladder
Reply With Quote #14

Quote:
Originally Posted by Sunyata View Post
@Uncle Jessie,

Just tested out both your latest versions of 'cant block Tank on ladder' scripts from post 9 & 11, and it's not working as intended. I tried both your plugins for the normal ladder and the cradle (safety) ladder using myself to block the tops of each type of ladder (see linked screenshots for those ladder types). Mr Tanky just remains at bottom of ladder and wont attempt to climb, unless of course I move off of the ladder.

I've only tested this out on a two maps on my Windows L4D1 server. If you decide to update your scripts again, I'll be more than happy to test them out for you.

https://www.dropbox.com/s/rovba0zr37...adder.jpg?dl=0
https://www.dropbox.com/s/6431i6sb82...adder.jpg?dl=0

There is the fix when tank already climb on the ladder and you trying to block him or something like that
You can try, just replace this line if you on L4D1
Code:
if (!IsClientInGame(client) || GetClientTeam(client) != 3 || GetEntProp(client, Prop_Send, "m_zombieClass") != 8)
to
Code:
 if (!IsClientInGame(client) || GetClientTeam(client) != 3 || GetEntProp(client, Prop_Send, "m_zombieClass") != 5)
nothing with AI stuff like finishlast said, but it's interesting idea
Uncle Jessie is offline
Sunyata
Member
Join Date: Nov 2017
Old 10-19-2019 , 06:12   Re: [L4D] Infected No Block On Ladder
Reply With Quote #15

Quote:
Originally Posted by Uncle Jessie View Post
There is the fix when tank already climb on the ladder and you trying to block him or something like that
You can try, just replace this line if you on L4D1
Code:
if (!IsClientInGame(client) || GetClientTeam(client) != 3 || GetEntProp(client, Prop_Send, "m_zombieClass") != 8)
to
Code:
 if (!IsClientInGame(client) || GetClientTeam(client) != 3 || GetEntProp(client, Prop_Send, "m_zombieClass") != 5)
nothing with AI stuff like finishlast said, but it's interesting idea
Thanks for the suggestion Jessie.

Okay, Ive updated your last script with the new line of code. When the Tank climbs the ladder and a player then tries to block that ladder while Tanky is climbing it, the Tank will pass through the player and get to top of ladder no problem. However, the new code still stops the Tank from climbing the ladder if the player is already on it. So the original exploit is still there for players to take advantage of it. Your script would need some other code to deal with this latter exploit as well.
Sunyata is offline
Sunyata
Member
Join Date: Nov 2017
Old 10-19-2019 , 09:19   Re: [L4D] Infected No Block On Ladder
Reply With Quote #16

On further reflection, Jessie, if your script had a condition whereby for example, your plugin code was somehow disabled (allowing the Tank to get onto the ladder as per the vanilla game rule-set already does anyway) then regardless of if a player is already blocking the ladder or not - and once the Tank begins to climb the ladder - your script code could at that moment enable itself to allow the Tank to still climb the ladder and still pass through the player that is already on the ladder - as I had formerly mentioned in my last post.

TLDR: your plugin code could be disabled on round start, but as soon as the Tank started to climb a ladder, your plugin code gets enabled, then once the Tank passes through the player and gets to top of the ladder, the plugin code could then disable itself again. Then it's a case of just of repeating the same sequence over again for any other ladders that would be in the map with other Tanks elsewhere too.

I'm just throwing some ideas out here - just my two cents really, to perhaps help offer some other solution regarding the ongoing exploit with the player already on the ladder.
Sunyata is offline
Sunyata
Member
Join Date: Nov 2017
Old 10-22-2019 , 04:59   Re: [L4D] Infected No Block On Ladder
Reply With Quote #17

I did some further extensive tests with both the original author's plugin and Jessie's new one. The original plugin -while very good- only supports the official campaigns. Whereas Jessie's plugin will support all of the addon maps as well - which is much better as this code is far simpler and way more elegant imo.

But there's also a problem with the game code itself that I've only just found out about now - In the vanilla game (without plugins installed) the tank will stay at the bottom of any cradle and deep-well ladder when a player is blocking the tank anyway (see the 3 linked screenshots below for the 'deep-well' type ladder). So any player can always preempt a block on any tank on these kinds of ladders, so even with the new and old plugins installed as well, this particular issue wont get solved.

With the new plugin installed, there's generally no problem with the 'exposed' type ladders, as the tank will mostly climb pass any player blocking these anyway. But very occasionally, the tank still wont pass by the player and it will occasionally get stuck.

I did find a workaround solution for this 'stuck' issue, just by using the !freeze command on the tank, done purely as a test (see screenshot). Once the tank unfreezes, it automatically enters a 'strike' action mode and hits the player on the ladder, dislodging them so that they fall and hit the ground. So perhaps Jessie's plugin could be updated to include some kind of freeze/unfreeze code to get the tank to hit players while on these deep-well and cradle type ladders.

One other interesting idea I had would be to ignore having the tank pass the player on the ladder, and instead punish the player blocking the ladder, so when the tank attempts to first climb the ladder the player could be made to fall off it instead and end up incapped on the ground (as a punishment), that way the tank would always be able to climb every type of ladder regardless. And maybe have a chat or hint message warning those players not to block the tank, else they would suffer incapacitating themselves when the tank tries to climb.

Just another unworthy two cents of mine, that's not worth exploring

https://www.dropbox.com/s/o4n4eukoxv...r%202.jpg?dl=0
https://www.dropbox.com/s/3h9qwwy1h7...r%201.jpg?dl=0
https://www.dropbox.com/s/8iol0hlmuy...r%203.jpg?dl=0
Sunyata is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Brexit
Old 10-22-2019 , 05:37   Re: [L4D] Infected No Block On Ladder
Reply With Quote #18

This may help

https://forums.alliedmods.net/showthread.php?t=197815 (orignal thread)
https://github.com/SlidyBat/CollisionHook

I guess it's expensive to use but last resort.
__________________
Lux 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 08:02.


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