Just a quick update. Found the appropriate value to use.

Change gpGlobals->frametime in this line:
speed = (float)yawSpeed * gpGlobals->frametime * 10;
to 0.035.

It produces the correct [30fps mark] for when half-life was first launched.

Or simply:
speed = (float)yawSpeed * 0.35;

Now monsters turn at the correct speed, regardless of the server's
framerate! Wonderful!

-Sniper


----- Original Message -----
From: "Sniper" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 09, 2002 8:10 PM
Subject: Re: [hlcoders] Monster YAW Speeds/Turn Rate


> I found out the problem. Their turn rate is based on the server's
framerate,
> yet it doesn't seem to be correct for higher end machines. Since Half-Life
> was launched when today's low-end machines were high-end, it makes sense
> that the math for a monster's yaw speed wouldn't be correct.
>
> This line right here is the problem (in CBaseMonster::ChangeYaw ):
> speed = (float)yawSpeed * gpGlobals->frametime * 10;
>
> The turn rate for monsters shouldn't adjust to the server's framerate
> ever... off the top of my head. It wouldn't make sense. I'm not sure if
this
> was updated in newer SDKs, but I'm going to replace frametime with the
> frametime of a game running at 30fps. I'll see how it works out.
>
> -Sniper
> ----- Original Message -----
> From: "Caleb 'Ghoul' Delnay" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, November 09, 2002 5:56 PM
> Subject: Re: [hlcoders] Monster YAW Speeds/Turn Rate
>
>
> > No idea what your talking about.  It all looks fine to me.
> >
> >
> > Caleb 'Ghoul' Delnay
> > Project Leader: Kill Or Be Killed
> > http://www.llamanade.net/kobk/
> >
> > ----- Original Message -----
> > From: "Sniper" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, November 09, 2002 11:24 AM
> > Subject: [hlcoders] Monster YAW Speeds/Turn Rate
> >
> >
> > > There seems to be some sort of problem with a monster's turn rate (yaw
> > > speed)... On higher end machines/servers, I noticed monsters can react
> > very
> > > quickly, yet turning to face their enemy results in an extremely slow
> turn
> > > rate.
> > >
> > > I'm wondering if a monster's yaw speed is somehow related to the
> server's
> > > framerate... similar to Bots and their running speed (earlier version
> > bots).
> > >
> > > On my low end machine, a pentium 2 233mhz with 160mb of ram (yes,
> > half-life
> > > runs perfectly fine), monsters would have much more realistic looking
> turn
> > > rates. On my high end machine, an AMD AthlonXP 2400+ GeForce4 ti4600
and
> > > 512mb ram, monsters turn slow.
> > >
> > > Any help would be appreciated... Rather confusing. Faster Sven Co-op
> > servers
> > > let players strafe around monsters with ease.
> > >
> > > -Sniper
> > >
> > > _______________________________________________
> > > 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