I fixed it. If anyone wants some sort of slowdown after jump you could
use this, it will need tweaing to look right though, but it works and
you can change it to suit

you gotta add these members to C_SDKPlayer and CSDKPlayer

bool m_bHasJumped;
float m_fFrictionTime;
int m_iFriction;

at the includes in game_movement.cpp

#ifdef CLIENT_DLL
        #include "c_sdk_player.h"
#else
        #include "sdk_player.h"
#endif

whereever something uses sv_gravity.GetFloat() put this before it

#ifdef CLIENT_DLL
        C_SDKPlayer *pPlayer = ToSDKPlayer(player);
#else
        CSDKPlayer *pPlayer = ToSDKPlayer(player);
#endif

and replace sv_gravity.GetFloat() with pPlayer->m_iFriction

then in FullWalkMove()
this...
                if (player->GetGroundEntity() != NULL)
                {
                        WalkMove();
                }
                else
                {
                        AirMove();  // Take into account movement when in air.
                }

becomes...

#ifdef CLIENT_DLL
                        C_SDKPlayer *pPlayer = ToSDKPlayer(player);
                #else
                        CSDKPlayer *pPlayer = ToSDKPlayer(player);
                #endif
                if (player->GetGroundEntity() != NULL)
                {
                        if (pPlayer->m_bHasJumped)
                        {
                                pPlayer->m_fFrictionTime = gpGlobals->curtime;
                                pPlayer->m_bHasJumped = false;
                        }
                        if (pPlayer->m_fFrictionTime + 0.4 >= 
gpGlobals->curtime)
                        {
                                pPlayer->m_iFriction = 400;
                        }
                        else
                        {
                                pPlayer->m_iFriction = 4;
                        }
                        WalkMove();
                }
                else
                {
                        AirMove();  // Take into account movement when in air.
                        if (!pPlayer->m_bHasJumped)
                        {
                                pPlayer->m_fFrictionTime = 0;
                                pPlayer->m_bHasJumped = true;
                                pPlayer->m_iFriction = 4;
                        }

                }

I think thats it



--
**********************
Draco
Coder for Perfect Dark and Kreedz Climbing
http://perfectdark.game-mod.net

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

Reply via email to