Browse Source

Fix build.

mobile_hacks
Andrey Akhmichin 5 years ago
parent
commit
22a953d3c6
  1. 12
      cl_dll/hud.cpp
  2. 2
      cl_dll/hud.h
  3. 8
      dlls/effects.cpp
  4. 8
      dlls/h_export.cpp
  5. 5
      dlls/player.cpp
  6. 2
      dlls/scientist.cpp
  7. 4
      dlls/singleplay_gamerules.cpp

12
cl_dll/hud.cpp

@ -209,27 +209,27 @@ void CHud::Init( void )
if( HUD_IsGame( "biglolly" ) ) if( HUD_IsGame( "biglolly" ) )
{ {
g_iModType = MOD_BIGLOLLY; g_iModType = MOD_BIGLOLLY;
g_iHudColor = PINKISH; g_iHudColor = RGB_PINKISH;
} }
else if( HUD_IsGame( "bshift" ) ) else if( HUD_IsGame( "bshift" ) )
{ {
g_iModType = MOD_BSHIFT; g_iModType = MOD_BSHIFT;
g_iHudColor = BLUISH; g_iHudColor = RGB_BLUISH;
} }
else if( HUD_IsGame( "halfsecret" ) ) else if( HUD_IsGame( "halfsecret" ) )
{ {
g_iModType = MOD_HALFSECRET; g_iModType = MOD_HALFSECRET;
g_iHudColor = YELLOWISH; g_iHudColor = RGB_YELLOWISH;
} }
else if( HUD_IsGame( "sewerbeta" ) ) else if( HUD_IsGame( "sewerbeta" ) )
{ {
g_iModType = MOD_SEWERBETA; g_iModType = MOD_SEWER_BETA;
g_iHudColor = WHITISH; g_iHudColor = RGB_WHITISH;
} }
else else
{ {
g_iModType = MOD_VALVE; g_iModType = MOD_VALVE;
g_iHudColor = YELLOWISH; g_iHudColor = RGB_YELLOWISH;
} }
#endif // MOBILE_HACKS #endif // MOBILE_HACKS

2
cl_dll/hud.h

@ -686,4 +686,6 @@ extern int g_iUser2;
extern int g_iUser3; extern int g_iUser3;
extern int g_iHudColor; extern int g_iHudColor;
int HUD_IsGame( const char *game );
#endif #endif

8
dlls/effects.cpp

@ -365,9 +365,9 @@ public:
void Zap( const Vector &vecSrc, const Vector &vecDest ); void Zap( const Vector &vecSrc, const Vector &vecDest );
void EXPORT StrikeUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ); void EXPORT StrikeUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
void EXPORT ToggleUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ); void EXPORT ToggleUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
#if 0 #ifdef MOBILE_HACKS
static CLightning *LightningCreate( const char *pSpriteName, int width ); static CLightning *LightningCreate( const char *pSpriteName, int width );
#endif #endif // MOBILE_HACKS
inline BOOL ServerSide( void ) inline BOOL ServerSide( void )
{ {
if( m_life == 0 && !( pev->spawnflags & SF_BEAM_RING ) ) if( m_life == 0 && !( pev->spawnflags & SF_BEAM_RING ) )
@ -914,7 +914,7 @@ void CLightning::BeamUpdateVars( void )
SetFlags( BEAM_FSHADEOUT ); SetFlags( BEAM_FSHADEOUT );
} }
#if 0 #ifdef MOBILE_HACKS
CLightning *CLightning::LightningCreate( const char *pSpriteName, int width ) CLightning *CLightning::LightningCreate( const char *pSpriteName, int width )
{ {
// Create a new entity with CLightning private data // Create a new entity with CLightning private data
@ -927,7 +927,7 @@ CLightning *CLightning::LightningCreate( const char *pSpriteName, int width )
return pBeam; return pBeam;
} }
#endif #endif // MOBILE_HACKS
LINK_ENTITY_TO_CLASS( env_laser, CLaser ) LINK_ENTITY_TO_CLASS( env_laser, CLaser )

8
dlls/h_export.cpp

@ -79,10 +79,10 @@ extern "C" void DLLEXPORT EXPORT2 GiveFnptrsToDll( enginefuncs_t *pengfuncsFromE
g_iModType = MOD_HALFSECRET; g_iModType = MOD_HALFSECRET;
} }
else if( FStrEq( szGameFolder, "borderlands" ) else if( FStrEq( szGameFolder, "borderlands" )
|| if( FStrEq( szGameFolder, "caseclosed" ) || FStrEq( szGameFolder, "caseclosed" )
|| if( FStrEq( szGameFolder, "vendetta" ) ) || FStrEq( szGameFolder, "vendetta" ) )
{ {
g_ModType = MOD_HEVSUIT; g_iModType = MOD_HEVSUIT;
} }
else if( FStrEq( szGameFolder, "induction" ) ) else if( FStrEq( szGameFolder, "induction" ) )
{ {
@ -94,7 +94,7 @@ extern "C" void DLLEXPORT EXPORT2 GiveFnptrsToDll( enginefuncs_t *pengfuncsFromE
} }
else if( FStrEq( szGameFolder, "sewerbeta" ) ) else if( FStrEq( szGameFolder, "sewerbeta" ) )
{ {
g_iModType = MOD_SEWERBETA; g_iModType = MOD_SEWER_BETA;
} }
else if( FStrEq( szGameFolder, "tot" ) ) else if( FStrEq( szGameFolder, "tot" ) )
{ {

5
dlls/player.cpp

@ -3463,14 +3463,15 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse )
gEvilImpulse101 = TRUE; gEvilImpulse101 = TRUE;
GiveNamedItem( "item_suit" ); GiveNamedItem( "item_suit" );
#ifdef MOBILE_HACKS #ifdef MOBILE_HACKS
if( g_iModType == BSHIFT ) if( g_iModType == MOD_BSHIFT )
{ {
GiveNamedItem( "item_armorvest" ); GiveNamedItem( "item_armorvest" );
GiveNamedItem( "item_helmet" ); GiveNamedItem( "item_helmet" );
} }
else else
GiveNamedItem( "item_battery" ); GiveNamedItem( "item_battery" );
if( g_iModType == INDUCTION )
if( g_iModType == MOD_INDUCTION )
GiveNamedItem( "item_flashlight" ); GiveNamedItem( "item_flashlight" );
#else // MOBILE_HACKS #else // MOBILE_HACKS
GiveNamedItem( "item_battery" ); GiveNamedItem( "item_battery" );

2
dlls/scientist.cpp

@ -61,7 +61,7 @@ enum
//======================================================= //=======================================================
LINK_ENTITY_TO_CLASS( monster_scientist, CScientist ) LINK_ENTITY_TO_CLASS( monster_scientist, CScientist )
#ifdef MOBILE_HACKS #ifdef MOBILE_HACKS
LINK_ENTITY_TO_CLASS( monster_rosenberg, CScientist ) // LINK_ENTITY_TO_CLASS( monster_rosenberg, CScientist )
extern "C" EXPORT void monster_rosenberg( entvars_t *pev ) extern "C" EXPORT void monster_rosenberg( entvars_t *pev )
{ {
if( g_iModType == MOD_BSHIFT ) if( g_iModType == MOD_BSHIFT )

4
dlls/singleplay_gamerules.cpp

@ -127,8 +127,8 @@ float CHalfLifeRules::FlPlayerFallDamage( CBasePlayer *pPlayer )
void CHalfLifeRules::PlayerSpawn( CBasePlayer *pPlayer ) void CHalfLifeRules::PlayerSpawn( CBasePlayer *pPlayer )
{ {
#ifdef MOBILE_HACKS #ifdef MOBILE_HACKS
if( g_iModType == HEVSUIT if( g_iModType == MOD_HEVSUIT
|| g_iModType == SEWERBETA ) || g_iModType == MOD_SEWER_BETA )
pPlayer->GiveNamedItem( "item_suit" ); pPlayer->GiveNamedItem( "item_suit" );
#endif // MOBILE_HACKS #endif // MOBILE_HACKS
} }

Loading…
Cancel
Save