Antilag, optimizedpredictions, and hitboxes

Discussion for Bani's Tournament Mod

Moderators: Forum moderators, developers

Post Reply
Slayer
Posts: 31
Joined: Sun Jun 27, 2004 10:34 am

Antilag, optimizedpredictions, and hitboxes

Post by Slayer »

Is there any documentation on how etpro antilag differs from etmain antilag?

What does optimize predictions do? When i turn it off i seem to get "sticky" when I am close to other players, why is that? I never had this problem before the cvar was introduced.

And last but not least, why am I getting headshots when I am aiming bad? Example: headshot on someones chest or arms, and once even in the behind.
syn.Slay
#syndrom
User avatar
zinx
Posts: 267
Joined: Fri Jan 16, 2004 12:37 pm
Location: US
Contact:

Post by zinx »

You should get "sticky" even with optimized prediction on, really; that's been there since etmain. Basically the netcode snaps player origins to an integer value to save bandwidth, so the client doesn't know _exactly_ where other players are.

Optimized prediction just avoids running Pmove when it isn't needed - when the server's idea of where you are and where you think you were at that point isn't too different. This is a major framerate boost most of the time, especially if you have a high ping.

As for the antilag:
etmain:
  • stores client position every client frame, only holds 10 frames (thus, you will get 10 frames - of the person you're shooting at - compensated, which means a very small amount if they're getting 125fps)
  • does not antilag headshots, knife hits, or some mg42s
  • does not handle the 50ms of lag introduced by g_smoothclients 1
etpro:
  • stores up to 800ms of history, per server frame (so, bullets get tested against what the server told you was there, and you get up to 800ms compensated for)
  • antilags headshots and knife hits, and all mg42s
  • handles the 50ms of lag introduced by g_smoothclients 1
In both cases, the server calculates the shot as soon as it recieves the packet, and does not go back and undo what has been done. This means someone with a lower ping will always have the advantage - if you have a lower ping, you'll always hit first if you actually hit first. If you have a higher ping, they might be able to get a few in on you before your packets reach the server.

etpro also has antiwarp (which is something completely different from antilag), to prevent players from excessively hard to hit, and to prevent more serious things like walking over landmines without triggering them, or swimming through the tunnels on oasis without drowning.
Zinx Verituse http://zinx.xmms.org/
User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

Post by ouroboro »

excellent info, thanx zinx :)

perhaps you would speak about this: http://bani.anime.net/banimod/forums/vi ... php?t=5579

i'm very curious if this is true or not
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

zinx wrote:You should get "sticky" even with optimized prediction on, really; that's been there since etmain. Basically the netcode snaps player origins to an integer value to save bandwidth, so the client doesn't know _exactly_ where other players are.
most of the 'players warping through you' effect is caused by smoothclients. I'm not sure if that is related to what you or Slayer were refering to, but snapping should be less than 2 units, which is pretty minor compared to the 20+ that smoothclients introduces every time player decelerates or changes direction.
As for the antilag:
etmain:
  • stores client position every client frame, only holds 10 frames (thus, you will get 10 frames - of the person you're shooting at - compensated, which means a very small amount if they're getting 125fps)
  • does not antilag headshots, knife hits, or some mg42s
  • does not handle the 50ms of lag introduced by g_smoothclients 1
To be pedantic, HS actually did get antilagged in etmain, since client positions were never restored after the historical trace was done (there was code to do it, but it never ran). RTCW fails to antilag headshots at all (because it correctly restored the players position after a historical trace, and didn't do one for headshot detection). There are are a few other things that make headshots wrong in etmain antilag though, because not all of the information used (crouch/prone state, view angles) comes from the history.

ETMain also has some completely bogus stuff that is supposed to prevent you from being shot around corners, which not only doesn't work, but also can cause shots that should hit to miss. It probably had even more bogosity that I'm not remembering ATM.

Slayer:
If you are relying on hitsounds to tell you when you got a headshot, beware that the sound only plays after a round trip to the server. So unless your ping is really low, even if you were aiming correctly when you fired, you could be way off by the time the sound gets to you. There is also a 100ms delay between when you press the button and when the weapon actually fires (this is intentional in the code, and completely outside of ping/antilag).

b_realhead also has a significant impact on where you should aim...
send lawyers, guns and money
Slayer
Posts: 31
Joined: Sun Jun 27, 2004 10:34 am

Post by Slayer »

this is some very awesome feedback, though I am confused when you guys start talking about tracing back and how some of the other technical aspects work.

is b_realhead a client side cvar? i have no knowledge of it....

What I gather from what you guys are saying, is that the ETPro version of antilag is far superior and optimized predictions are a good thing in all cases?

I have noticed recently that some bullets are not registering (firing at a teammate standing still) and I think it may be because im using b_antilag 2. But i dont remember it being that flawed :(



Can you guys answer this: Why am I getting body shots on the player models head? Is the body hitbox that large and the head floats in front of it?

Another curiosity of mine. I witnessed a field op go over 2 landmines and live, how did they accomplish that?
syn.Slay
#syndrom
User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

Post by ouroboro »

b_realhead is serverside. do

/pb_cvarval b_realhead

to see if a server has it enabled
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

Post by bani »

Slayer wrote:Can you guys answer this: Why am I getting body shots on the player models head? Is the body hitbox that large and the head floats in front of it?
because etmain's headbox placement is completely bogus.

etpro with b_realhead should get it almost always perfect.
Slayer
Posts: 31
Joined: Sun Jun 27, 2004 10:34 am

Post by Slayer »

What is changed with b_realhead

is the body hitbox not present at head level?
syn.Slay
#syndrom
User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

Post by ouroboro »

reyalP put together a nice page showing the old hitboxes and their crappiness. i forget the URL but he will probably post it here now.

as for b_realhead, it rules. if u have rcon on a server, do this:

/rcon config none // to clear anything your league config has locked
/rcon b_realhead 256 // to show the b_realhead box
/rcon g_smoothclients 0 // to stop the box from lagging WAY behind the player

then run around with a friend and see how the headbox basically is always wherever the model's head is, unlike etmain where it was usually anywhere but. (it still lags behind a bit when you do the above commands, but i believe the box that is drawn is only a representation of the actual box --bani?)
wipeout
Posts: 56
Joined: Tue Jan 11, 2005 5:12 am

Post by wipeout »

ouroboro wrote:reyalP put together a nice page showing the old hitboxes and their crappiness. i forget the URL but he will probably post it here now.
http://www.et-center.com/?page=articles&id=43
User avatar
-shaky-
Posts: 3
Joined: Mon Mar 14, 2005 1:12 am

Post by -shaky- »

Are there any benefits of having g_smoothclients 1?
Post Reply