Remove uneeded stubs, will be inlined now

This commit is contained in:
a1batross 2016-10-10 18:52:07 +03:00
parent a89154a3b0
commit 6c3a5da19d
5 changed files with 10 additions and 38 deletions

View File

@ -157,17 +157,6 @@ void HUD_PlaybackEvent( int flags, const edict_t *pInvoker, unsigned short event
bparam1, bparam2 );
}
/*
=====================
HUD_SetMaxSpeed
=====================
*/
void HUD_SetMaxSpeed( const edict_t *ed, float speed )
{
}
/*
=====================
UTIL_WeaponTimeBase
@ -281,17 +270,3 @@ float UTIL_SharedRandomFloat( unsigned int seed, float low, float high )
return (low + offset * range );
}
}
/*
======================
stub_*
stub functions for such things as precaching. So we don't have to modify weapons code that
is compiled into both game and client .dlls.
======================
*/
int stub_PrecacheModel ( const char* s ) { return 0; }
int stub_PrecacheSound ( const char* s ) { return 0; }
const char *stub_NameForFunction ( unsigned int function ) { return "func"; }
void stub_SetModel ( edict_t *e, const char *m ) {}

View File

@ -877,11 +877,7 @@ void HUD_InitClientWeapons( void )
gpGlobals->time = gEngfuncs.GetClientTime();
// Fake functions
g_engfuncs.pfnPrecacheModel = stub_PrecacheModel;
g_engfuncs.pfnPrecacheSound = stub_PrecacheSound;
g_engfuncs.pfnNameForFunction = stub_NameForFunction;
g_engfuncs.pfnSetModel = stub_SetModel;
g_engfuncs.pfnSetClientMaxspeed = HUD_SetMaxSpeed;
//g_engfuncs.pfnSetClientMaxspeed = HUD_SetMaxSpeed;
// Handled locally
g_engfuncs.pfnPlaybackEvent = HUD_PlaybackEvent;

View File

@ -51,12 +51,7 @@ void HUD_SendWeaponAnim(int iAnim, int iWeaponId, int iBody, int iForce = 0 );
int HUD_GetWeapon( void );
void HUD_PlaySound( char *sound, float volume );
void HUD_PlaybackEvent( int flags, const struct edict_s *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );
void HUD_SetMaxSpeed( const struct edict_s *ed, float speed );
int stub_PrecacheModel( const char* s );
int stub_PrecacheSound( const char* s );
unsigned short stub_PrecacheEvent( int type, const char *s );
const char *stub_NameForFunction ( unsigned int function );
void stub_SetModel ( struct edict_s *e, const char *m );
//void HUD_SetMaxSpeed( const struct edict_s *ed, float speed );
int GetWeaponAccuracyFlags( int weaponid );
extern cvar_t *cl_lw;

View File

@ -27,10 +27,16 @@ extern enginefuncs_t g_engfuncs;
// The actual engine callbacks
#define GETPLAYERUSERID (*g_engfuncs.pfnGetPlayerUserId)
#define PRECACHE_GENERIC (*g_engfuncs.pfnPrecacheGeneric)
#ifdef CLIENT_DLL
inline int PRECACHE_MODEL( const char *s ) { return 0; }
inline int PRECACHE_SOUND( const char *s ) { return 0; }
#define SET_MODEL(x, y)
#else
#define PRECACHE_MODEL (*g_engfuncs.pfnPrecacheModel)
#define PRECACHE_SOUND (*g_engfuncs.pfnPrecacheSound)
#define PRECACHE_GENERIC (*g_engfuncs.pfnPrecacheGeneric)
#define SET_MODEL (*g_engfuncs.pfnSetModel)
#endif
#define MODEL_INDEX (*g_engfuncs.pfnModelIndex)
#define MODEL_FRAMES (*g_engfuncs.pfnModelFrames)
#define SET_SIZE (*g_engfuncs.pfnSetSize)

View File

@ -147,13 +147,13 @@ void CC4::PrimaryAttack(void)
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 1;
return;
}
g_engfuncs.pfnSetClientMaxspeed(ENT(m_pPlayer->pev), 1);
#endif
m_bStartedArming = true;
m_bBombPlacedAnimation = false;
m_fArmedTime = gpGlobals->time + 3;
SendWeaponAnim(C4_ARM, UseDecrement() != FALSE);
#ifndef CLIENT_DLL
g_engfuncs.pfnSetClientMaxspeed(ENT(m_pPlayer->pev), 1);
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
m_pPlayer->SetProgressBarTime(3);
#endif