This happens because your client thinks you're around the corner, so it displays you as such. On the server, however, you aren't *really* around the corner yet. It's not our beloved hitbox bug.
Not quite that. The server may also think you are around the corner, but the guy who shot doesn't. Lag compensation kicks in and he hits you, even being on the other side of the wall. This is a problem with hl, can't be fixed and won't be fixed, since removing lag compensation would screw up internet play.
Not true. What the guy sees has nothing to do with anything. When you fire a bullet, the server checks the backlog to see when you fired the bullet and if there was an enemy in the trajectory when you fired it. If the server says you're around the corner, but the guy sees you and fires at you, he might be firing at thin air. It's kind of the same problem, but on the attacker's side. Everything depends on where the server thinks you are. This is why people with a low cl_updaterate have problems...if you're only getting an update 10x a second, your client is interpreting everything in between which often accounts for jumpyness - because NS moves so quickly (fades, skulks, lerks)
Disagree. The way the HL Lag comp works is TOTALLY based on what he sees. If, in your enemy's screen, you are still in view and he shoots you, then, even if you "see" that you are around the corner, you will still receive damage. This is also related to the fifty-foot bite problem. If in your screen the skulk looks to be 5 feet away when he bites you, but in the skulk's screen you appear to be directly in front of him when he bites you, the bite will register, regardless the distance.
Disagree. Your reasoning would seem to favor people who have laggy connections. i.e. I see him, i shoot him, he dies....when that player could be across the map. (hyperbole, of course) There is a slight lag (read latency) between when you press the button and when you actually bite. (cl_lw 0 and click to see what i mean) Since the client predicts quite a bit (if youre running at 100fps, usually about 60-85 frames of that 100 are prediction) radical changes in direction take a second to come up on the client. When a skulk is in close combat with a marine, he is usually moving...quickly...radically changing direction. Your client can't possibly predict a radical change in direction, so your client could be predicting that the skulk is 8 feet away, when on the skulk's screen (and in the server) he is right next to you, chomping away. This works conversely as well. Have you ever bit a jper who was flying by, and you see blood fly everywhere, but he doesnt get hurt? It happens. The blood flying everywhere is the clientside prediction (oh, he bit him, he was in front of the bite...show blood) On the server the jper is beyond the bite, so he takes no damage. It is true to some extent that the client matters. When the server checks the backlog, it looks to see if the client is looking at where the enemy is, and if the trajectory of the bullet matches. So yes - strictly speaking if you're looking at where the enemy is, you'll hit him regardless. You are right in that regard. However - the point I'm making is that you really aren't looking at him. You're looking at where your client thinks he is. (which may not be where the server thinks he is) When the server checks the backlog, it checks to see if you were looking at where he was, not where your client thought he was. The server really doesn't know anything about what your client is predicting. It is also worth noting that while most gameservers run at well over 100fps, NS is complicated, and must track a lot at once. NS servers realistically run at 30-60 fps usually. On top of that a vanilla NS server will only let you pull 30 frames per second of data from it, forcing your client to predict 70 frames if you're running 100 fps. Hope I've been helpful.
(my apologies for dragging this off topic...but it really wasn't on topic to begin with so...)
It's not the client who does lag compensation, it's the server. Let me explain:
1- The server keeps a record of all player positions up to half a second after the moment (position history). So players with more than 500ms pings don't receive lag compensation.
2- Client tells server "I'm shooting, looking at X,Y,Z."
3- Server gets the ping and looks back in the position history. That way it can tell where the client was and where he was shooting. Also, it can know if the client was actually shooting someone.
4- Based on that and on random numbers which generate bullet spread, the server either thinks "You hit player A. Player A takes damage accordingly." and the client receives blood effects where the bullets hit or the server thinks "You didn't hit anything." and nothing happens. That's why blood effects sometimes come out from nowhere.
5- I'm not sure but I think melee attacks aren't affected by lag compensation. That may be one of the reasons it's difficult to hit marines sometimes. But I'm not sure.
6- Of course, if you die before the server receives the info that you shot, it is ignored. That's why on half-life it isn't possible to kill and be killed by the same player if he's using hitscan weapons. In this sense, low-pingers are favoured.
7- Since bullet spread is random, sometimes you may think you hit, but the server says you didn't. That's when no bullet decal or blood effect is drawn. Bullet decals are client-side, blood effects are server-side. So if you see blood, it means you DID hit. No bullets decals are drawn on player models, so sparks shouldn't too. Flayra removed them from players on beta 4 I think.
8- Missing aliens that seems to have been hit may be an effect of Lag compensation failure or the weird shotgun spread (Check Tyr^Nemesis's shotgun sprite on the customization forum). The 2nd possibility seems to be the more likely one.
Hope that makes things clear.
Edit: Btw try playing with cl_lc 0 and see how you have to shoot already of players to hit. Lag compensation avoids forcing you to do that. The other var you spoke of, cl_lw enables or disables client-side prediction, like you said. It enables you to see what you are doing from a server-side view. However, everything you see happened (PING) millisseconds(sp?) ago. So you'd still need lag compensation to hit. I don't know how it works on this case, though.
<!--QuoteBegin-VB Phat+Jul 25 2004, 12:26 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (VB Phat @ Jul 25 2004, 12:26 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Also is there a list of the the impulses for the chat commands? <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd--> <a href='http://www.unknownworlds.com/forums/index.php?showtopic=27019' target='_blank'>Here.</a>
Now let's talk about lag-hacking. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
Remember when the new netcode first came out and people would make a bind to stop their network connection for a split second so they could snipe super-easily in TFC?
There are still things people to to cause problems. Things like purposely making themselves lag when near enemies so that they appear to warp while HL's network code makes things nice and smooth on their screen.
Of course, it's still probably the best general-condition netcode around.
Comments
(my apologies for dragging this off topic...but it really wasn't on topic to begin with so...)
1- The server keeps a record of all player positions up to half a second after the moment (position history). So players with more than 500ms pings don't receive lag compensation.
2- Client tells server "I'm shooting, looking at X,Y,Z."
3- Server gets the ping and looks back in the position history. That way it can tell where the client was and where he was shooting. Also, it can know if the client was actually shooting someone.
4- Based on that and on random numbers which generate bullet spread, the server either thinks "You hit player A. Player A takes damage accordingly." and the client receives blood effects where the bullets hit or the server thinks "You didn't hit anything." and nothing happens. That's why blood effects sometimes come out from nowhere.
5- I'm not sure but I think melee attacks aren't affected by lag compensation. That may be one of the reasons it's difficult to hit marines sometimes. But I'm not sure.
6- Of course, if you die before the server receives the info that you shot, it is ignored. That's why on half-life it isn't possible to kill and be killed by the same player if he's using hitscan weapons. In this sense, low-pingers are favoured.
7- Since bullet spread is random, sometimes you may think you hit, but the server says you didn't. That's when no bullet decal or blood effect is drawn. Bullet decals are client-side, blood effects are server-side. So if you see blood, it means you DID hit. No bullets decals are drawn on player models, so sparks shouldn't too. Flayra removed them from players on beta 4 I think.
8- Missing aliens that seems to have been hit may be an effect of Lag compensation failure or the weird shotgun spread (Check Tyr^Nemesis's shotgun sprite on the customization forum). The 2nd possibility seems to be the more likely one.
Hope that makes things clear.
Edit: Btw try playing with cl_lc 0 and see how you have to shoot already of players to hit. Lag compensation avoids forcing you to do that. The other var you spoke of, cl_lw enables or disables client-side prediction, like you said. It enables you to see what you are doing from a server-side view. However, everything you see happened (PING) millisseconds(sp?) ago. So you'd still need lag compensation to hit. I don't know how it works on this case, though.
1) Player shoots at spot A
2) Server checks to see if anyone was at spot A __ ms ago (your ping)
3) If someone was there, hit is registered. If not, it isnt.
<a href='http://www.unknownworlds.com/forums/index.php?showtopic=27019' target='_blank'>Here.</a>
Remember when the new netcode first came out and people would make a bind to stop their network connection for a split second so they could snipe super-easily in TFC?
There are still things people to to cause problems. Things like purposely making themselves lag when near enemies so that they appear to warp while HL's network code makes things nice and smooth on their screen.
Of course, it's still probably the best general-condition netcode around.