Author Topic: Client side hit detection  (Read 7551 times)

Studlut

  • Posts: 33
  • Turrets: +0/-0
Client side hit detection
« on: January 19, 2007, 12:31:47 am »
I know that this might not be considered a mod, but it would be nice if there could be people monitering hackers, if we could have client side hit detection.  The aim being to get rid of the annoying delay between a shot being fired and the shot hitting.

I know that people could take advantage of this.  But it would definently increase the gaming experience if you knew you could trust the people you're playing with.

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
Client side hit detection
« Reply #1 on: January 19, 2007, 03:38:38 am »
Unlagged.

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Client side hit detection
« Reply #2 on: January 20, 2007, 06:23:49 pm »
client side hittests are extremely stupid in an open source game (they're stupid in closed source games too btw), and as odin mentioned, there's a better solution (one that has been in svn since revision 866): every client command comes with a time that matches up to the server time, normally the server would just ignore it, but with some code based on unlagged (a q3 mod by Niel "Haste" Toronto), the server instead rewinds time to the time the shot was taken, checks if it hit anything, then puts everything back before anyone notices (though this only applies to hitscan weapons).
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

Risujin

  • Posts: 739
  • Turrets: +33/-13
    • http://risujin.org
Client side hit detection
« Reply #3 on: January 20, 2007, 06:42:10 pm »
Quote from: "kevlarman"
the server instead rewinds time to the time the shot was taken, checks if it hit anything, then puts everything back before anyone notices (though this only applies to hitscan weapons).

You're sure this only applies to hitscan weapons?

Although it presents some problems, this should be done for melee attacks too. The position of everyone but the attacker should be rewound to the attack time and then the attack should be calculated.

Another question, does unlagged rewind the attacker for hitscans? It shouldn't.

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Client side hit detection
« Reply #4 on: January 20, 2007, 08:26:07 pm »
Quote from: "Risujin"
Quote from: "kevlarman"
the server instead rewinds time to the time the shot was taken, checks if it hit anything, then puts everything back before anyone notices (though this only applies to hitscan weapons).

You're sure this only applies to hitscan weapons?

Although it presents some problems, this should be done for melee attacks too. The position of everyone but the attacker should be rewound to the attack time and then the attack should be calculated.

Another question, does unlagged rewind the attacker for hitscans? It shouldn't.
it doesn't rewind the attacker, and melee attacks _are_ hitscan, and they are rewound (exception: basi grab, that would be way too ugly) most of the time, the client renders you in your predicted position, which causes issues when your real position is blocked: you actually end up attacking behind your attacker and missing, the solution tjw came up with was to not rewind any clients when you're blocked by something.
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

Risujin

  • Posts: 739
  • Turrets: +33/-13
    • http://risujin.org
Client side hit detection
« Reply #5 on: January 20, 2007, 10:24:06 pm »
Quote from: "kevlarman"
it doesn't rewind the attacker, and melee attacks _are_ hitscan, and they are rewound (exception: basi grab, that would be way too ugly) most of the time, the client renders you in your predicted position, which causes issues when your real position is blocked: you actually end up attacking behind your attacker and missing, the solution tjw came up with was to not rewind any clients when you're blocked by something.

Ok, thanks for explaining that to me. TJW did a really nice job with unlagged.

vcxzet

  • Guest
Client side hit detection
« Reply #6 on: January 20, 2007, 10:30:49 pm »
granger spit looks ugly with it

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
Client side hit detection
« Reply #7 on: January 21, 2007, 02:57:21 am »
vcxzet: SO DOES UR FACE LOL

vcxzet

  • Guest
Client side hit detection
« Reply #8 on: January 21, 2007, 09:51:00 am »
Quote from: "Odin"
vcxzet: SO DOES UR FACE LOL

eh?
cg_projectilenudge 1 g_alienstage 2
evolve to granger spit