Tremulous Forum

Mods => Modding Center => Topic started by: Studlut on January 19, 2007, 12:31:47 am

Title: Client side hit detection
Post by: Studlut 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.
Title: Client side hit detection
Post by: Odin on January 19, 2007, 03:38:38 am
Unlagged.
Title: Client side hit detection
Post by: kevlarman 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).
Title: Client side hit detection
Post by: Risujin 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.
Title: Client side hit detection
Post by: kevlarman 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.
Title: Client side hit detection
Post by: Risujin 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.
Title: Client side hit detection
Post by: vcxzet on January 20, 2007, 10:30:49 pm
granger spit looks ugly with it
Title: Client side hit detection
Post by: Odin on January 21, 2007, 02:57:21 am
vcxzet: SO DOES UR FACE LOL
Title: Client side hit detection
Post by: vcxzet 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