1. CBasePlayer::m_flMaxspeed is going to overwrite
CMoveData::m_flClientMaxSpeed, so modify the one in the player instead.
2. engine->GetClientConVarValue

Regards,

Paul

On Mon, Jul 28, 2008 at 9:23 PM, Henry Chang <[EMAIL PROTECTED]> wrote:

>
> hi new to the list! Been trying to code on my own for a little bit but
> couldn't find any information anywhere on these couple things, so decided to
> try this list as my last resort! Anyway couple things I've been stumped on
>
> 1) m_flClientMaxSpeed in the CMoveData class is being modified
> automatically somewhere and I can't find by whom. I'm setting up a system
> where each player has some value, 1-5, stored in C_HL2MP_Player, which acts
> as a movement speed modifier. I'm able to send console commands to change
> this value ingame, and I've got methods which are correctly using these
> modifiers and applying them to m_flClientMaxSpeed, and everything works
> perfectly. However, when I switch window focus out of the game and then
> return focus to the game, devmsg is showing that m_flClientMaxSpeed is being
> automatically changed to 150 no matter what. Any ideas where this is
> happening?
>
> 2) Also, I am completely stumped how to read a cvar from the client so that
> I can apply the command to that client. I'm
> working from the CHL2MP_Player::Spawn class and after some digging
> apparently I can use the cookie int from engine->StartQueryCvarValue
> to grab the info from StartQueryCvarValue, but I can't get to the
> method. How are other people accessing cvars? Right now anything I want to
> read serverside from the client, I'm doing something like
> CON_COMMAND(mycvar, "description")
> {
>    CHL2MP_Player *pPlayer = ToHL2MPPlayer( UTIL_GetCommandClient() );
>    pPlayer->SetCvarValue( value );
> };
> And even then, I'm unable to use engine->Cmd_Argv(i) because of a compiler
> error complaining that Cmd_Argv is not in engine. Help with either problem
> would be very much appreciated!
>
> Thanks
>
> _________________________________________________________________
> Stay in touch when you're away with Windows Live Messenger.
>
> http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_messenger2_072008
> _______________________________________________
> 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