Closed lunatixxx closed 2 years ago
I'm really curious as to what you mean by rear vision... Steam is the easiest.
Check pm on alliedmodder.
Like a car rearview mirror to be more clear.
It's how the engine is done. Blocking entities behind players will have the side effect that if they move their camera, enemies will be invisible for a couple of frames and will then pop (since there is a delay between the server and the client)
Through some private messages yesterday, I realized what he was talking about, and it's unfortunately not something you can patch out or detect. There is a cheat for TF2 which has this feature as well, and there it's called "Spy Camera".
For those curious, it's a feature that renders what's behind you, imagine having two monitors, but the second monitor is small, is in the corner of your primary monitor and renders what's behind you.
You can't detect this server-side, you'd need a client side anti-cheat. You also can't patch this server-side without issues. The only way to prevent this feature from working, is by having an anti-wallhack plugin that prevents sending information of entities that are behind you. The issue with doing this, is that if you have high sensitivity or even some lag (ping), players will pop into existence as you turn around. Back when I had written my own anti-wallhack, I didn't block players behind you for this reason.
Also, this isn't an engine issue, regardless of how the engine works, cheat devs can always make this feature work. Sadly, I cannot detect this, and fixing this would cause issues that are worse.
But behind you can be far away if there is nothing that obscure the vision ? A wall, a door... Why the problem will be different with an anti-wh in term of efficiency? A player could move fast away from a wall in field of view of the other player and it could cause the same problem.
That's why we don't use any anti-wh plugin, and we use the built-in occlusion thing from csgo, which doesn't remove wh, but prevents cheaters from seeing people from very far away.
Which is a non solution, map are smalls so i doubt that they need to see from very far away.
The occlusion thingy in csgo does work. If you try to cheat in csgo, you'll see that you won't be able to see the enemies in wallhack when they're 30m+ away and there are a lot of walls between both of you.
I don't think there's such a feature in L4D2. You can try using one of the many anti-wh plugins that are still publicly available and try to see if it has any negative impact.
From a plugin POV, it is impossible to detect if a player is wallhacking, because what makes them able to wallhack is that the game sends all players' positions to the client so that weird bugs as the one we talked about earlier don't happen, as well as making the client able to process animations for example.
We can only try to limit wallhacking by not transmitting the other players unless they're close OR they could have a potential line of sight (to try to avoid the 'enemy popping' bug).
Developers have been trying to limit that for a long time, and most of the time, it's not really worth it. Lots of calculations have to be made (which slows down the server), and most of the time it's not worth it. I don't have enough time, knowledge and interest to develop a proper anti-wallhacking plugin that doesn't have big compromises.
(the plugin will just be shooting rays everywhere to try to see if an enemy can be seen OR if a ray lands near an enemy, indicating that due to lag compensation and ping, the enemy could be seen in a legit way by the client, and thus we should transmit the enemy)
L4D games have pretty open maps from what I can remember so this technique wouldn't be really useful for those games imo
Having moderators is often way more useful. Most wallhackers are pretty obvious about it. If they're not obvious, they're most of the time not a nuisance.
Even if smac version does a decent job the prediction is often too early, or in rare cases too late and you see appearing the player in front of you because of the complexity of maps i suppose. I doubt that it's worth these problems on L4D2, this game has a lot of sound clues anyway it's not like counter strike.
But anyway do you think that it will be possible to implement manually some sort of fog of war which will block visibility with the help of stripper source on various walls and props, so that will have the same effect of an anti wh ? And why developers are not doing that in the map development?
Sure, you could add some sort of fog and not transmit players behind it, that's what danger zone maps on csgo do, but for performance reasons
Why don't mappers do that? Well:
About that rear vision thing, actually smac is taking care of that already it seems. I did not see any problem with it in particular even when turning super fast my mouse
Vehicles that have transparent glasses are more problematic actually.
I was going to reply to this a few days ago, but ended up not doing so as other things came up in my life. Besides, I figured that since Azalty was explaining why this is a bad idea, that you'd understand why this won't be worked on. Especially as stated, this is an anti-wallhack issue. Instead you've taken this to another thread xD So I'm going to try to explain this again, why I won't work on this, why this is a bad idea, and some other things. And hopefully that will put this to rest. :)
Like I initially said Sadly, I cannot detect this, and fixing this would cause issues that are worse
and those issues specifically being: if you have high sensitivity or even some lag (ping), players will pop into existence as you turn around
.
Yes, you haven't noticed the popping, unfortunately, some players do, even at low pings they can notice it because they have high sensitivities. However, this scales with ping, the higher ping you have, the worse the problem gets. And this is reason enough not to work with this.
You mention that SMAC takes care of this, and sorry to break it to you, but SMAC blocks everything outside of 90 degrees of you. The reason why it's set to as high as 90 degrees is to limit the popping, and 90 degrees is already a LOT. And even with that, with some ping, you'll notice popping.
The reason why this gets worse with ping is simple, the server doesn't see where you are aiming; it sees where you were aiming some time ago, as determined by your latency (ping) to the server. The greater the latency, the more incorrect the server will be as to where you're aiming and what you can see, meaning it will block things out that you've already turned around to see. And the server cannot predict with any good accuracy where you're going to aim.
At best, you can increase the blocking distance by latency, and I actually tested this years ago... To avoid popping, it has to increase by a lot per ms of ping. And in my testing, it ended up disabling itself almost instantly... Making it practically useless.
Here's the thing, Lilac is used by a lot of communites, some more competitive than others. And I simply won't add features that can negatively affect other communities. One of the principles of Lilac is to affect legit players as little as possible; ideally, not at all. This means I won't add a feature that by design will affect legit players. And what you're asking for (patching rear vision) will do this, by design.
Now, there's a greater issue at play here, because a proper fix to all this is to write an anti-wallhack. Sure, an anti-wallhack won't fix the rear vision thing (not without affecting legit players), but we can still limit wallhacking in other areas...
Back when I ran my own TF2 servers, I did make an anti-wallhack that worked well with rare popping issues (with an exception, see below). And lag was minimal (I had some nice optimizations). And here's why I won't do it:
While I do know how to make an anti-wallhack, it would take a lot of time, and for all the reasons listed above:
I hope with this reply, you can finally see why this won't be worked on, why just blocking people behind you is a bad idea, and stop asking for this, it's not going to happen. Not because I don't want to, but because it's a bad idea. And I hope you now see why I haven't worked on an anti-wallhack.
Maybe I'll start the anti-wallhack stuff in the future, maybe... But as of right now, the answer is no.
I will suppose that it is something that you can not detect with convars, so how to detect or block it?
Basically they hook a little screen that show their back, even if they are not looking it. I guess we can blame the incompetence of Valve for this one...
I was able to get a part of code, where can i send you the password in private? https://pastebin.com/b0QjJYb9