News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 6th Sep 2001, 02:47 AM   #1
The_Pixie
UnrealFortress coder
 
Join Date: Feb. 20th, 2001
Posts: 13
Flipping players

This is pretty hard to explain but I wonder if you've seen this as well...

Start up a network game or join a network server. Move up behind a friendly player that is walking forward and bump into him from behind. Just walkin into his back. On large open areas you will sometimes notice that the bumped player pops/flips away a distance (most of the time all the way to the distance wall or whatever is in the way) and back again.

This happens more often in games where you have different playerclasses with different groundspeed, but you can also see it in normal UT CTF.

Seen it? Any idea why it happens?

I've seen it happen lots of times in unrealfortress where you have a large range of different groundspeeds. Trying to backstab someone or infect an enemy can be pretty hard when the enemy flips/pops away like that.
The_Pixie is offline   Reply With Quote
Old 21st Sep 2001, 03:46 AM   #2
usaar33
Un1337
 
usaar33's Avatar
 
Join Date: Mar. 25th, 2000
Location: Unknown
Posts: 808
It is part of the unrealtournament netcode:

from playerpawn.replicatemove:

Quote:
ForEach AllActors(class'Pawn', P)
if ( (P != self) && (P.Velocity != vect(0,0,0)) && P.bBlockPlayers )
{
Dir = Normal(P.Location - Location);
if ( (Velocity Dot Dir > 0) && (P.Velocity Dot Dir > 0) )
{
// if other pawn moving away from player, push it away if its close
// since the client-side position is behind the server side position
if ( VSize(P.Location - Location) < P.CollisionRadius + CollisionRadius + NewMove.Delta * GroundSpeed )
P.MoveSmooth(P.Velocity * 0.5 * PlayerReplicationInfo.Ping);
}
}
Appearently, it doesn't work very well
Epic screwed up and forgot to divide ping by 1000 ;p
usaar33 is offline   Reply With Quote
Old 21st Sep 2001, 04:38 AM   #3
The_Pixie
UnrealFortress coder
 
Join Date: Feb. 20th, 2001
Posts: 13
Oh my... thanks, this must be it. Any good way to fix it?
The_Pixie is offline   Reply With Quote
Old 21st Sep 2001, 11:00 PM   #4
usaar33
Un1337
 
usaar33's Avatar
 
Join Date: Mar. 25th, 2000
Location: Unknown
Posts: 808
Talking ya

in a custom playerpawn (UnF has these already).
usaar33 is offline   Reply With Quote
Old 22nd Sep 2001, 11:56 AM   #5
The_Pixie
UnrealFortress coder
 
Join Date: Feb. 20th, 2001
Posts: 13
Yes, I'm in the UnF team, so I know where to put it, I just wondered if you knew how to fix it up code-wise. But I'll look into that part and see what can be done about it since It annoys me

Is it the value of PlayerReplicationInfo.Ping that is too high?

One funny thing... I mailed Tim about this a year ago or so, and this bug/effect came like news to him. He thought we had done something ourselves to the pawn movements. I always thought it was somewhere in the Pawn bump-events...never saw this one

You got the same code in ClientUpdatePosition. I wonder what will happen if this piece of code was commented away. Risk getting stuck inside another player in network games?

Thanks again usaar33, you rock.
The_Pixie is offline   Reply With Quote
Old 22nd Sep 2001, 06:25 PM   #6
usaar33
Un1337
 
usaar33's Avatar
 
Join Date: Mar. 25th, 2000
Location: Unknown
Posts: 808
simply divide ping by 1000 for a true ping.

It should be noted that Mongo feels, and I now agree with, that the 0.5 should not exist.

However, the code has a fundamental problem: if fixed, you will keep pushing the player in front and thus overrun your pos on the server (and be pushed back with clientupdateposition).

You may want to ensure that the player is only moved when the server updates the location of that player. (yes, it will be very hard to know when this occurs)
usaar33 is offline   Reply With Quote
Old 27th Sep 2001, 04:10 AM   #7
The_Pixie
UnrealFortress coder
 
Join Date: Feb. 20th, 2001
Posts: 13
I just tried this out. I do like this in replicatemove():

P.MoveSmooth(P.Velocity * (PlayerReplicationInfo.Ping/1000));

and tested it on my LAN. Seems to work perfect the few minutes I tried it out, but dividing the ping with that much will result in a close to zero velocity - the bumped player doesn't move at all. *shrugs* Seems to do the trick anyway, it's WAY easier to knife down the enemy now...
The_Pixie is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:20 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer