Suggestion
#1
Looking through the blacklist pages I've noticed quite a few "knife hacks." I'm going to split up a few statements so it's easier to consider and reply to each piece.

I know that it is possible for the client to send shots directly to an entity's co-ordinates. This is how knife hacks work.

I know that where an entity is facing is derived using pitch and yaw calculations.

I'm almost positive that, if the development team were to switch it up by having the client send a shot request to the server, you would eliminate the possibility of knife hacks and what I consider wall hacks (being able to shoot through walls).

The suggestion is to have the server process the request and calculate the bullet path on it's own using the player's position, pitch and yaw.

I'm about 99% certain that this information is all "spot-on." Please correct me if I'm wrong.
Thanks given by:
#2
A wallhack is where you see the hitbox of your enemy through walls so you know where they are. There may be a second type that lets you shoot through walls, but in most cases where I have been shot through walls, its been attributable to lag.

I think you have a pretty good idea though.
Thanks given by:
#3
Actually, I was *cough*testing*cough* some... modifications in the code -- the knife has a "range" associated with it. Though theoretically you could make it so it sends line-shots, it'd be much easier to change the one line of code defining the "range" of the knife.

The current value is 3. I'm pretty sure it's not just me, but I think the knife range is low (so low I originally thought the knife used some sort of bounding box collision so you have to be colliding with the other player). I can objectively say upping this value to 4 would be a good idea for the next release (unless everyone like the shorter-than-arms-length-range :P )

Oh, and, while I was "testing" the knife range value I found out servers with cheat detection will ban you for "abnormal client behavior" if you knife people from across ac_douze :P
Thanks given by:
#4
I have a feeling why this isn't in the source is due to either A) Lazy devs or B) Reluctance to increase the demand put on the server.
Thanks given by:
#5
What if the server is experiencing problems and or is just a crappy server? Would that effect the shot? Seems to me like it would be too much for a server too handle what with it already having to deal with lag, custom maps, and all the clients.
Lol like three posts within a minute. Hahaha
Thanks given by:
#6
Could easily remove the comment on the aforementioned line regarding what that line and the value in that line represent, for one. Maybe also make it a char instead of an int (harder to read/modify/255 max)
Thanks given by:
#7
It's just a suggestion =P

As far as the demand put on the servers, from what I saw of the calculations, it shouldn't load it down too much.

And Felix, I really don't want to go too far into how it works (no need to encourage more people to do it) but in a nutshell the shot is sent from the player's vector to the target's vector directly. It doesn't take into account the knife range because it's as if the attack is being made from right next to them.
Thanks given by:
#8
Basically, there are two big problems with this suggestion.
1) The server would have to do collision detection, which also means it would have to keep the entire map in memory (okay, not really a problem, but see here :P although he upgraded in the meantime)
2) We'd introduce the bazillion lag-related problems we currently avoid thanks to the fat-client, thin-server model. Currently, you can play okay-ish with 500ms latency. If the server took care of hit-detection, 500ms would be catastrophic, since in the server's understanding, in the "server's time" the guy could already be far away from you, thus you wouldn't hit him even though in "your time", you did. To prevent that, we'd need to track all player positions and buffer them, then choose the right one for every shot event based on the lag of everyone involved. However, that could add more possibilities to cheat by influencing your ping, and so on.

Also...
(29 Mar 12, 06:33AM)Felix-The-Ghost Wrote: Oh, and, while I was "testing" the knife range value I found out servers with cheat detection will ban you for "abnormal client behavior" if you knife people from across ac_douze :P
which is about the closest we can get to preventing such cheats. And blacklisting the cheaters, of course.
Thanks given by:
#9
(29 Mar 12, 06:46AM)Terran Wrote: And Felix, I really don't want to go too far into how it works (no need to encourage more people to do it) but in a nutshell the shot is sent from the player's vector to the target's vector directly. It doesn't take into account the knife range because it's as if the attack is being made from right next to them.

Terran Wrote:I'm about 99% certain that this information is all "spot-on." Please correct me if I'm wrong.

It's pretty easy to change the aforementioned "range" value '3' to "33333333" or whatever range you want. I haven't said what line or what file or even what the code actually calls it. Anyone determined to change this would have no problem finding it though.

Thanks given by:
#10
There would be some problems as it is kinda hidden with a lack of comments (in 1104 sources)
Thanks given by:
#11
I was referring to 1104 source :/
Thanks given by:
#12
And I didn't say it would be very difficult. Just that there might be a hitch in finding it.
Thanks given by: