Shame on me. I forgot to put a topic in my previous mail. Please do
not answer to it.

Yahn,

What I want is the exact position of players from a local client point
of view : taking care of interpolation.

I mean :
- server tickcount = 100
--> player1 is in (0, 0, 0)
--> player2 is in (100,0, 0)

- while server tickcount is 100, maybe it is only 95 for player1. If I
go to player1 client side and ask for GetLocalOrigin of all players.
Maybe I will see:
--> player1 is in (0,0,0) coz it is local player and is using prediction
--> player2 is in (50,0,0) assuming player is moving only in x axis
with 10 units/tick velocity
But in reality, player1 is not seeing player2 in (50,0,0) coz I assume
he has a cl_interp equal to 2 ticks interval. If so he is seeing
player2 in (30, 0, 0).

Am I right or not ?

If not, where am I wrong ?
If I'm right, which function can I use to have (30,0,0) as a return
value for player2 ? and when ?
Do you mean I must call GetLocalOrigin() in RenderStart to have
interpolated position ?

[EMAIL PROTECTED]


--- Message from Yahn Bernier hereafter ----

Interpolate gets called with gpGlobals->curtime, but the IInterpolatedVars =
each define their "interpolation amount" (see the GetInterpolationAmount co=
de) since sometimes interp is just 1 tick in single player vs. cl_interp in=
 multiplayer.

If you always want the last networked position, you can ask for GetNetworkO=
rigin, otherwise, you'll get either the last networked if you ask during Po=
stDataUpdate/networking, or you'll get the interpolated position if you ask=
 during rendering.

Yahn

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
vesoftware.com] On Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, November 14, 2007 10:49 AM
To: [email protected]
Subject: Re: [hlcoders] Client side players's positions

For my purposes I've used pPlayer->EyePosition() when they're walking, and
I use the vehicles' GetNetworkOrigin() when they're driving or being
driven. Not sure if this is sufficient for your purposes.

> --
> [ Picked text/plain from multipart/alternative ]
> Hi,
>
> I would like to know how to get where players are located client side -->
> I mean from a player point of view.
> Using pPlayer->GetLocalOrigin() for non-local players will return the las=
t
> position sent by server.
> As there is interpolation (cl_interp), locations of non-local players tha=
t
> a local player is seeing is not the one returned by
> pPlayer->GetLocalOrigin().
> I went into OnRenderStart, then in InterpolateServerentities,
> ProcessInterpolatedList, Interpolate... but I really don't understand how
> it works. For example Interpolate is called with gpGlobals->curtime which
> is surprising. I was thinking it will be gpGlobals->curtime -
> cl_interp.GetFloat().
>
> I spent few hours on that and the question remains the same : how can I
> get locations of non-local players client side ? I'm sure Yahn or Mike ca=
n
> answer this question.
>
> Thank you in advance for your help.

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to