[L4D1/2] Thirdpersonshoulder Block
My first plugin. :3
This plugin will kick clients who use the "thirdpersonshoulder" command to engage in thirdperson in Left 4 Dead or Left 4 Dead 2.
While VALVe has tried to patch this in an earlier update (making the thirdpersonshoulder command having no effect in competitive gamemodes), there is still a way around to use it with a custom *.vkp addon.
This is bad, because there are numerous ways how thirdpersonshoulder can be used to gain advantages in Versus and similar gamemodes, so to say, cheat.
Using thirdpersonshoulder, it is possible to look around corners without exposing yourself, generally being able to see what is around and behind you all the time, letting you defend yourself a lot more efficiently, and in the worst case, manipulating the thirdperson camera position. It is possible to look on the map from above, spotting hunters on rooftops before they initiate their highpounce, looking around in the map searching for items without even going there, and even look straight through walls and shooting infected behind it, pretty much wallhack. It is also possible to bypass the fog/rain on the Hard Rain campaign for example that normally stops snipers from shooting targets at a far range.
To prevent stuff like this:
- Kicks clients on the survivor and infected team who have c_thirdpersonshoulder set to 1, which is a side-effect of using the thirdpersonshoulder command.
- Clients are informed in the kick message how to change the cvar to be able to rejoin the server (in the case of the start of a competitive match for example).
- All other players in the server will be notified if a client is kicked and why.
It is possible to land back in firstperson without the c_thirdpersonshoulder being set back to 0, for example when you die. Such a client will still be kicked when he joins the server, but he can fix the cvar once and will be able to play without problems afterwards.
Unfortunately there is no other way to check for thirdperson, and there is no easy way anymore for servers to execute commands on clients (such as resetting the cvar for the client).
Just the version cvar so far.
- l4d_tpsblock_version - Version of the Thirdpersonshoulder Block plugin
Special thanks to ProdigySim, psychonic and CanadaRox for helping me with all my coding questions.
Also thanks to Mr. Zero, whose plugins' code I took a look at a few times to learn some things. The same applies for ProdigySim's and CandaRox's plugins. ;)
September 11, 2011 (1.3)
* Code optimizations
July 31, 2011 (1.2)
* Minor change of the kick notification message.
June 19th, 2011 (1.1)
* Truncated the version cvar.
June 19th, 2011 (1.0)
* Initial release.