Ah, my mistake.

I see what you meant, I put in your code and it seems to solve a majority of
the problem.

Though, for some reason it still 'feels' different than from HL2DM, the lift
in HL2DM is much smoother still.

I have applied the fix to the Base SDK code to isolate anything we might
have changed with the movement code that could be affecting it.

The easiest way for me to describe it, within HL2DM, if you pay close
attention to the lift, the lift will not appear to jitter up and down.

In the base SDK with the fix, the lift appears to jitters up and down very
slightly. Are there any other optimizations/fixes that have been applied?

Thanks.

- voogru.

-----Original Message-----
From: Jay Stelly [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 27, 2006 10:24 PM
To: [email protected]
Subject: RE: [hlcoders] Jerky Movement when player is on moving
lift/elevator.

When you say, "In hl2dm, it's smooth regardless of the "smoothstairs"
setting." It sounds like you misunderstand what I'm trying to say.

HL2DM is running the code from episode 1 that I pasted below.
smoothstairs is already disabled when you're on an elevator in HL2DM -
so testing HL2DM isn't going to prove whether this change is the fix or
not - you have to test a mod based on the current SDK code release.


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Spencer 'voogru' MacDonald
> Sent: Tuesday, June 27, 2006 7:07 PM
> To: [email protected]
> Subject: RE: [hlcoders] Jerky Movement when player is on
> moving lift/elevator.
>
> That only masks the problem apparently. In hl2dm, it's smooth
> regardless of the "smoothstairs" setting.
>
> -----Original Message-----
> From: Jay Stelly [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 27, 2006 9:30 PM
> To: [email protected]
> Subject: RE: [hlcoders] Jerky Movement when player is on
> moving lift/elevator.
>
> I'm not sure if it's the issue or not, but I remember a bug
> like this in episode 1.  If it's the same issue, then setting
> smoothstairs to zero will fix it (but cause other problems).
> If that's the case then you need to add some logic to disable
> stair smoothing when the player is on an elevator.
>
> Here's the code from ep1
> baseplayer_shared.cpp:
>
> static ConVar smoothstairs( "smoothstairs", "1",
> FCVAR_REPLICATED, "Smooth player eye z coordinate when
> traversing stairs." );
>
> //------------------------------------------------------------
> ----------
> -------
> // Handle view smoothing when going up or down stairs
> //------------------------------------------------------------
> ----------
> -------
> void CBasePlayer::SmoothViewOnStairs( Vector& eyeOrigin ) {
>       CBaseEntity *pGroundEntity = GetGroundEntity();
>       float flCurrentPlayerZ = GetLocalOrigin().z;
>       float flCurrentPlayerViewOffsetZ = GetViewOffset().z;
>
>       // Smooth out stair step ups
>       // NOTE: Don't want to do this when the ground entity
> is moving the player
>       if ( ( pGroundEntity != NULL &&
> pGroundEntity->GetMoveType() == MOVETYPE_NONE ) && (
> flCurrentPlayerZ != m_flOldPlayerZ ) &&
> smoothstairs.GetBool() &&
>                m_flOldPlayerViewOffsetZ == flCurrentPlayerViewOffsetZ
> )
>       {
>               int dir = ( flCurrentPlayerZ > m_flOldPlayerZ ) ? 1 :
> -1;
>
>               float steptime = gpGlobals->frametime;
>               if (steptime < 0)
>               {
>                       steptime = 0;
>               }
>
>               m_flOldPlayerZ += steptime * 150 * dir;
>
>               const float stepSize = 18.0f;
>
>               if ( dir > 0 )
>               {
>                       if (m_flOldPlayerZ > flCurrentPlayerZ)
>                       {
>                               m_flOldPlayerZ = flCurrentPlayerZ;
>                       }
>                       if (flCurrentPlayerZ - m_flOldPlayerZ >
> stepSize)
>                       {
>                               m_flOldPlayerZ = flCurrentPlayerZ -
> stepSize;
>                       }
>               }
>               else
>               {
>                       if (m_flOldPlayerZ < flCurrentPlayerZ)
>                       {
>                               m_flOldPlayerZ = flCurrentPlayerZ;
>                       }
>                       if (flCurrentPlayerZ - m_flOldPlayerZ <
> -stepSize)
>                       {
>                               m_flOldPlayerZ = flCurrentPlayerZ +
> stepSize;
>                       }
>               }
>
>               eyeOrigin[2] += m_flOldPlayerZ - flCurrentPlayerZ;
>       }
>       else
>       {
>               m_flOldPlayerZ = flCurrentPlayerZ;
>               m_flOldPlayerViewOffsetZ = flCurrentPlayerViewOffsetZ;
>       }
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Teddy
> > Sent: Tuesday, June 27, 2006 6:11 PM
> > To: [email protected]
> > Subject: Re: [hlcoders] Jerky Movement when player is on moving
> > lift/elevator.
> >
> > No, but i would give up my first born for it.
> >
> > Seriously, i've been trying to fix this for a while now, very
> > frustrating
> >
> > On 6/28/06, Spencer 'voogru' MacDonald <[EMAIL PROTECTED]> wrote:
> > > This is a multi-part message in MIME format.
> > > --
> > > [ Picked text/plain from multipart/alternative ] Hello,
> > >
> > >
> > >
> > > There is apparently a bug with the SDK, that when you are
> > on say, a lift or
> > > an elevator, your movement becomes jerky when the lift is
> in motion.
> > > At first I thought it was a problem with some custom
> > movement code, so I got
> > > the base SDK and tried the same map with a lift.
> > >
> > >
> > >
> > > But no dice, same weird jerky movement issue.
> > >
> > >
> > >
> > > So, I fired up HL2DM, same map with a lift, smooth as a
> > babies bottom, I
> > > then got the base HL2DM code, tried it, same jerky movement,
> > >
> > > and then CS:S, same jerky movement.
> > >
> > >
> > >
> > > So it appears that valve has applied some fixes to the
> > HL2DM code, which I
> > > have missed out on. Does anyone know how to fix this
> jerky movement?
> > >
> > >
> > >
> > > Thanks.
> > >
> > >
> > >
> > > - voogru.
> > >
> > >
> > >
> > >
> > >
> > > --
> > >
> > >
> > > _______________________________________________
> > > To unsubscribe, edit your list preferences, or view the
> > list archives, please visit:
> > > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >
> > >
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the
> list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list
> archives, please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list
> archives, please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

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




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

Reply via email to