View Single Post
bullet28
Member
Join Date: Apr 2012
Old 04-08-2020 , 01:36   Re: [L4D/L4D2] Heal Refuse
Reply With Quote #3

Quote:
Originally Posted by Silvers View Post
Restore previous flags, don't overwrite with something different
In fact this is real flags of 'give' command. I'm doing that way because I had very strange rare bug on my servers when every players was able to use 'give' console command. this bug remained working until the server reboot, so I come to conclusion that in some way one giveItem function copied flags before another instance of this function have not restored FCVAR_CHEAT flag. So every next call of this function was restoring 'broken' flags. I know that srcds is one-threaded and maybe it's sounds like bullshit, but after I changed my giveItem function to use this static flags this bug never happened again. However, I will do as you said for the public version of this plugin.

Quote:
Originally Posted by Silvers View Post
You're also leaking entities
Wow.. never knew that RemovePlayerItem isn't removing entity.. going to fix it in 10 plugins where I used this function

Quote:
Originally Posted by Silvers View Post
CreateTimer(0.1, OnTimerCheckIfInterrupted, GetClientUserId(healer));
Done.

Quote:
Originally Posted by Silvers View Post
Also maybe add a longer timer for bots, it's not possible to stop them otherwise.
I didn't get how longer timer will help to stop bots, they will continue to try heal until you have low health.. It's not really meant to support bots, they for sure has some behavior tree and we can't change their logic. At least I don't know any clear way to do this. If we block weapon switch for bots it's not a good decision as they probably will want to heal someone else, who won't to refuse healing (for example). I tried to do so and they started to repeatedly shoving me, it's shaking screen and stopping movement speed, very boring.. So I have blocked their weapon switch and shove for 10 sec, it's not ideal but at least you has a chance now to switch their attention to the shootout..

Thank you for help!

Last edited by bullet28; 04-08-2020 at 02:23.
bullet28 is offline