mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-03-13 05:51:19 +00:00
Add mod-specific checks.
This commit is contained in:
parent
4d83bd54a1
commit
ff08b8e96d
@ -866,7 +866,11 @@ int CHudAmmo::Draw( float flTime )
|
||||
if( m_fFade > 0 )
|
||||
m_fFade -= ( (float)gHUD.m_flTimeDelta * 20.0f );
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
ScaleColors( r, g, b, a );
|
||||
|
||||
@ -894,7 +898,11 @@ int CHudAmmo::Draw( float flTime )
|
||||
|
||||
x += AmmoWidth / 2;
|
||||
|
||||
UnpackRGB( r,g,b, RGB_YELLOWISH );
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
// draw the | bar
|
||||
FillRGBA( x, y, iBarWidth, gHUD.m_iFontHeight, r, g, b, a );
|
||||
@ -964,7 +972,11 @@ int DrawBar( int x, int y, int width, int height, float f )
|
||||
width -= w;
|
||||
}
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
FillRGBA( x, y, width, height, r, g, b, 128 );
|
||||
|
||||
@ -1032,7 +1044,11 @@ int CHudAmmo::DrawWList( float flTime )
|
||||
{
|
||||
int iWidth;
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
if( iActiveSlot == i )
|
||||
a = 255;
|
||||
@ -1083,7 +1099,11 @@ int CHudAmmo::DrawWList( float flTime )
|
||||
if( !p || !p->iId )
|
||||
continue;
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
// if active, then we must have ammo.
|
||||
if( gpActiveSel == p )
|
||||
@ -1120,7 +1140,11 @@ int CHudAmmo::DrawWList( float flTime )
|
||||
else
|
||||
{
|
||||
// Draw Row of weapons.
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
for( int iPos = 0; iPos < MAX_WEAPON_POSITIONS; iPos++ )
|
||||
{
|
||||
@ -1131,7 +1155,11 @@ int CHudAmmo::DrawWList( float flTime )
|
||||
|
||||
if( gWR.HasAmmo( p ) )
|
||||
{
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
a = 128;
|
||||
}
|
||||
else
|
||||
|
@ -60,7 +60,11 @@ int CHudAmmoSecondary::Draw( float flTime )
|
||||
|
||||
// draw secondary ammo icons above normal ammo readout
|
||||
int a, x, y, r, g, b, AmmoWidth;
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
a = (int)Q_max( MIN_ALPHA, m_fFade );
|
||||
if( m_fFade > 0 )
|
||||
m_fFade -= ( (float)gHUD.m_flTimeDelta * 20.0f ); // slowly lower alpha to fade out icons
|
||||
|
@ -125,7 +125,11 @@ int HistoryResource::DrawAmmoHistory( float flTime )
|
||||
HSPRITE *spr = gWR.GetAmmoPicFromWeapon( rgAmmoHistory[i].iId, rcPic );
|
||||
|
||||
int r, g, b;
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
float scale = ( rgAmmoHistory[i].DisplayTime - flTime ) * 80;
|
||||
ScaleColors( r, g, b, Q_min( scale, 255 ) );
|
||||
|
||||
@ -152,7 +156,11 @@ int HistoryResource::DrawAmmoHistory( float flTime )
|
||||
return 1; // we don't know about the weapon yet, so don't draw anything
|
||||
|
||||
int r, g, b;
|
||||
UnpackRGB( r,g,b, RGB_YELLOWISH );
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
if( !gWR.HasAmmo( weap ) )
|
||||
UnpackRGB( r, g, b, RGB_REDISH ); // if the weapon doesn't have ammo, display it as red
|
||||
@ -174,7 +182,11 @@ int HistoryResource::DrawAmmoHistory( float flTime )
|
||||
|
||||
wrect_t rect = gHUD.GetSpriteRect( rgAmmoHistory[i].iId );
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
float scale = ( rgAmmoHistory[i].DisplayTime - flTime ) * 80;
|
||||
ScaleColors( r, g, b, Q_min( scale, 255 ) );
|
||||
|
||||
|
@ -80,7 +80,11 @@ int CHudBattery::Draw( float flTime )
|
||||
rc = *m_prc2;
|
||||
rc.top += m_iHeight * ( (float)( 100 - ( Q_min( 100, m_iBat ) ) ) * 0.01f ); // battery can go from 0 to 100 so * 0.01 goes from 0 to 1
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
if( !( gHUD.m_iWeaponBits & ( 1 << ( WEAPON_SUIT ) ) ) )
|
||||
return 1;
|
||||
|
@ -19,6 +19,7 @@
|
||||
#define CL_UTIL_H
|
||||
#include "exportdef.h"
|
||||
#include "cvardef.h"
|
||||
#include "moddef.h"
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
|
@ -112,7 +112,8 @@ int CHudFlashlight::Draw( float flTime )
|
||||
return 1;
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
if( !( gHUD.m_iWeaponBits & ( 1 << ( WEAPON_FLASHLIGHT ) ) ) )
|
||||
if( !( gHUD.m_iWeaponBits & ( 1 << ( WEAPON_SUIT ) ) )
|
||||
|| ( g_iModType == MOD_INDUCTION && !( gHUD.m_iWeaponBits & ( 1 << ( WEAPON_FLASHLIGHT ) ) ) ) )
|
||||
#else // MOBILE_HACKS
|
||||
if( !( gHUD.m_iWeaponBits & ( 1 << ( WEAPON_SUIT ) ) ) )
|
||||
#endif // MOBILE_HACKS
|
||||
@ -126,7 +127,11 @@ int CHudFlashlight::Draw( float flTime )
|
||||
if( m_flBat < 0.20f )
|
||||
UnpackRGB( r,g,b, RGB_REDISH );
|
||||
else
|
||||
UnpackRGB( r,g,b, RGB_YELLOWISH );
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
ScaleColors( r, g, b, a );
|
||||
|
||||
|
@ -166,7 +166,11 @@ void CHudHealth::GetPainColor( int &r, int &g, int &b )
|
||||
#else
|
||||
if( m_iHealth > 25 )
|
||||
{
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -232,7 +236,11 @@ int CHudHealth::Draw( float flTime )
|
||||
|
||||
int iHeight = gHUD.m_iFontHeight;
|
||||
int iWidth = HealthWidth / 10;
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
FillRGBA( x, y, iWidth, iHeight, r, g, b, a );
|
||||
}
|
||||
|
||||
@ -381,7 +389,11 @@ int CHudHealth::DrawDamage( float flTime )
|
||||
if( !m_bitsDamage )
|
||||
return 1;
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
a = (int)( fabs( sin( flTime * 2.0f ) ) * 256.0f );
|
||||
|
||||
|
@ -28,6 +28,11 @@
|
||||
#include "demo.h"
|
||||
#include "demo_api.h"
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
int g_iModType;
|
||||
int g_iHudColor;
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
cvar_t *hud_textmode;
|
||||
float g_hud_text_color[3];
|
||||
|
||||
@ -200,6 +205,34 @@ void CHud::Init( void )
|
||||
|
||||
m_pSpriteList = NULL;
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
if( HUD_IsGame( "biglolly" ) )
|
||||
{
|
||||
g_iModType = MOD_BIGLOLLY;
|
||||
g_iHudColor = PINKISH;
|
||||
}
|
||||
else if( HUD_IsGame( "bshift" ) )
|
||||
{
|
||||
g_iModType = MOD_BSHIFT;
|
||||
g_iHudColor = BLUISH;
|
||||
}
|
||||
else if( HUD_IsGame( "halfsecret" ) )
|
||||
{
|
||||
g_iModType = MOD_HALFSECRET;
|
||||
g_iHudColor = YELLOWISH;
|
||||
}
|
||||
else if( HUD_IsGame( "sewerbeta" ) )
|
||||
{
|
||||
g_iModType = MOD_SEWERBETA;
|
||||
g_iHudColor = WHITISH;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_iModType = MOD_VALVE;
|
||||
g_iHudColor = YELLOWISH;
|
||||
}
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
// Clear any old HUD list
|
||||
if( m_pHudList )
|
||||
{
|
||||
|
@ -684,4 +684,6 @@ extern int g_iTeamNumber;
|
||||
extern int g_iUser1;
|
||||
extern int g_iUser2;
|
||||
extern int g_iUser3;
|
||||
|
||||
extern int g_iHudColor;
|
||||
#endif
|
||||
|
@ -120,7 +120,11 @@ int CHud::MsgFunc_Concuss( const char *pszName, int iSize, void *pbuf )
|
||||
m_iConcussionEffect = READ_BYTE();
|
||||
if( m_iConcussionEffect )
|
||||
{
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor ); // Vit_amiN: fixed
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH ); // Vit_amiN: fixed
|
||||
#endif // MOBILE_HACKS
|
||||
this->m_StatusIcons.EnableIcon( "dmg_concuss", r, g, b );
|
||||
}
|
||||
else
|
||||
|
@ -1113,7 +1113,11 @@ void CHudSpectator::DrawOverviewEntities()
|
||||
|
||||
z = m_OverviewData.layersHeights[0] * zScale;
|
||||
// get yellow/brown HUD color
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( ir, ig, ib, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( ir, ig, ib, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
r = (float)ir / 255.0f;
|
||||
g = (float)ig / 255.0f;
|
||||
b = (float)ib / 255.0f;
|
||||
|
@ -53,7 +53,11 @@ int CHudTrain::Draw( float fTime )
|
||||
{
|
||||
int r, g, b, x, y;
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, g_iHudColor );
|
||||
#else // MOBILE_HACKS
|
||||
UnpackRGB( r, g, b, RGB_YELLOWISH );
|
||||
#endif // MOBILE_HACKS
|
||||
SPR_Set( m_hSprite, r, g, b );
|
||||
|
||||
// This should show up to the right and part way up the armor number
|
||||
|
@ -909,6 +909,11 @@ BOOL CAGrunt::FCanCheckAttacks( void )
|
||||
//=========================================================
|
||||
BOOL CAGrunt::CheckMeleeAttack1( float flDot, float flDist )
|
||||
{
|
||||
#ifdef MOBILE_HACKS
|
||||
if( g_iModType == MOD_AOM )
|
||||
return FALSE;
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
if( HasConditions( bits_COND_SEE_ENEMY ) && flDist <= AGRUNT_MELEE_DIST && flDot >= 0.6f && m_hEnemy != 0 )
|
||||
{
|
||||
return TRUE;
|
||||
@ -1108,7 +1113,11 @@ Schedule_t *CAGrunt::GetSchedule( void )
|
||||
return GetScheduleOfType( SCHED_RANGE_ATTACK1 );
|
||||
}
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
if( g_iModType != MOD_AOM && OccupySlot ( bits_SLOT_AGRUNT_CHASE ) )
|
||||
#else
|
||||
if( OccupySlot ( bits_SLOT_AGRUNT_CHASE ) )
|
||||
#endif
|
||||
{
|
||||
return GetScheduleOfType( SCHED_CHASE_ENEMY );
|
||||
}
|
||||
|
@ -1022,7 +1022,7 @@ void CMomentaryRotButton::KeyValue( KeyValueData *pkvd )
|
||||
{
|
||||
m_returnSpeed = atof( pkvd->szValue );
|
||||
#ifdef MOBILE_HACKS
|
||||
if( m_returnSpeed > 45.0f )
|
||||
if( g_iModType == MOD_REDEMPT && m_returnSpeed > 45.0f )
|
||||
m_returnSpeed = 45.0f;
|
||||
#endif // MOBILE_HACKS
|
||||
pkvd->fHandled = TRUE;
|
||||
|
@ -522,6 +522,11 @@ void CBaseMonster::BecomeDead( void )
|
||||
|
||||
BOOL CBaseMonster::ShouldGibMonster( int iGib )
|
||||
{
|
||||
#ifdef MOBILE_HACKS
|
||||
if( g_iModType == MOD_AOM )
|
||||
return FALSE;
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
if( ( iGib == GIB_NORMAL && pev->health < GIB_HEALTH_VALUE ) || ( iGib == GIB_ALWAYS ) )
|
||||
return TRUE;
|
||||
|
||||
|
@ -2287,7 +2287,12 @@ public:
|
||||
// BOOL m_fBeamsCleared;
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS( env_warpball, CWarpBall )
|
||||
// LINK_ENTITY_TO_CLASS( env_warpball, CWarpBall )
|
||||
extern "C" EXPORT void env_warpball( entvars_t *pev )
|
||||
{
|
||||
if( g_iModType == MOD_BSHIFT )
|
||||
GetClassPtr( (CWarpBall *)pev );
|
||||
}
|
||||
|
||||
TYPEDESCRIPTION CWarpBall::m_SaveData[] =
|
||||
{
|
||||
|
@ -95,6 +95,10 @@ typedef float vec_t; // needed before including progdefs.h
|
||||
// Shared header describing protocol between engine and DLLs
|
||||
#include "eiface.h"
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
#include "moddef.h"
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
// Shared header between the client DLL and the game DLLs
|
||||
#include "cdll_dll.h"
|
||||
#ifndef Q_min
|
||||
|
@ -668,11 +668,14 @@ void GameDLLInit( void )
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
// Absolute Redemption
|
||||
// Roy
|
||||
CVAR_REGISTER( &sk_roy_health1 );// {"sk_roy_health1","0"};
|
||||
CVAR_REGISTER( &sk_roy_health2 );// {"sk_roy_health2","0"};
|
||||
CVAR_REGISTER( &sk_roy_health3 );// {"sk_roy_health3","0"};
|
||||
#endif
|
||||
if( g_iModType == MOD_REDEMPT )
|
||||
{
|
||||
// Roy
|
||||
CVAR_REGISTER( &sk_roy_health1 );// {"sk_roy_health1","0"};
|
||||
CVAR_REGISTER( &sk_roy_health2 );// {"sk_roy_health2","0"};
|
||||
CVAR_REGISTER( &sk_roy_health3 );// {"sk_roy_health3","0"};
|
||||
}
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
// Scientist
|
||||
CVAR_REGISTER( &sk_scientist_health1 );// {"sk_scientist_health1","0"};
|
||||
|
@ -202,8 +202,11 @@ void CGameRules::RefreshSkillData ( void )
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
// Absolute Redeption
|
||||
// Roy
|
||||
gSkillData.royHealth = GetSkillCvar( "sk_roy_health" );
|
||||
if( g_iModType == MOD_REDEMPT )
|
||||
{
|
||||
// Roy
|
||||
gSkillData.royHealth = GetSkillCvar( "sk_roy_health" );
|
||||
}
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
// Scientist
|
||||
|
@ -29,6 +29,9 @@
|
||||
enginefuncs_t g_engfuncs;
|
||||
globalvars_t *gpGlobals;
|
||||
server_physics_api_t g_physfuncs;
|
||||
#ifdef MOBILE_HACKS
|
||||
int g_iModType;
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
@ -54,4 +57,52 @@ extern "C" void DLLEXPORT EXPORT2 GiveFnptrsToDll( enginefuncs_t *pengfuncsFromE
|
||||
{
|
||||
memcpy( &g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t) );
|
||||
gpGlobals = pGlobals;
|
||||
#ifdef MOBILE_HACKS
|
||||
char szGameFolder[64];
|
||||
|
||||
(*g_engfuncs.pfnGetGameDir)( szGameFolder );
|
||||
|
||||
if( FStrEq( szGameFolder, "aom" ) )
|
||||
{
|
||||
g_iModType = MOD_AOM;
|
||||
}
|
||||
else if( FStrEq( szGameFolder, "biglolly" ) )
|
||||
{
|
||||
g_iModType = MOD_BIGLOLLY;
|
||||
}
|
||||
else if( FStrEq( szGameFolder, "bshift" ) )
|
||||
{
|
||||
g_iModType = MOD_BSHIFT;
|
||||
}
|
||||
else if( FStrEq( szGameFolder, "halfsecret" ) )
|
||||
{
|
||||
g_iModType = MOD_HALFSECRET;
|
||||
}
|
||||
else if( FStrEq( szGameFolder, "borderlands" )
|
||||
|| if( FStrEq( szGameFolder, "caseclosed" )
|
||||
|| if( FStrEq( szGameFolder, "vendetta" ) )
|
||||
{
|
||||
g_ModType = MOD_HEVSUIT;
|
||||
}
|
||||
else if( FStrEq( szGameFolder, "induction" ) )
|
||||
{
|
||||
g_iModType = MOD_INDUCTION;
|
||||
}
|
||||
else if( FStrEq( szGameFolder, "redempt" ) )
|
||||
{
|
||||
g_iModType = MOD_REDEMPT;
|
||||
}
|
||||
else if( FStrEq( szGameFolder, "sewerbeta" ) )
|
||||
{
|
||||
g_iModType = MOD_SEWERBETA;
|
||||
}
|
||||
else if( FStrEq( szGameFolder, "tot" ) )
|
||||
{
|
||||
g_iModType = MOD_TOT;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_iModType = MOD_VALVE;
|
||||
}
|
||||
#endif // MOBILE_HACKS
|
||||
}
|
||||
|
@ -238,7 +238,13 @@ class CItemArmorVest : public CItem
|
||||
}
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS( item_armorvest, CItemArmorVest )
|
||||
// LINK_ENTITY_TO_CLASS( item_armorvest, CItemArmorVest )
|
||||
extern "C" EXPORT void item_armorvest( entvars_t *pev )
|
||||
{
|
||||
if( g_iModType == MOD_BSHIFT )
|
||||
GetClassPtr( (CItemArmorVest *)pev );
|
||||
}
|
||||
|
||||
|
||||
class CItemHelmet : public CItem
|
||||
{
|
||||
@ -272,7 +278,12 @@ class CItemHelmet : public CItem
|
||||
}
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS( item_helmet, CItemHelmet )
|
||||
// LINK_ENTITY_TO_CLASS( item_helmet, CItemHelmet )
|
||||
extern "C" EXPORT void item_helmet( entvars_t *pev )
|
||||
{
|
||||
if( g_iModType == MOD_BSHIFT )
|
||||
GetClassPtr( (CItemHelmet *)pev );
|
||||
}
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
class CItemBattery : public CItem
|
||||
@ -286,7 +297,12 @@ class CItemBattery : public CItem
|
||||
void Precache( void )
|
||||
{
|
||||
PRECACHE_MODEL( "models/w_battery.mdl" );
|
||||
PRECACHE_SOUND( "items/gunpickup2.wav" );
|
||||
#ifdef MOBILE_HACKS
|
||||
if( g_iModType == MOD_BIGLOLLY )
|
||||
PRECACHE_SOUND( "items/smallmedkit1.wav" );
|
||||
else
|
||||
#endif // MOBILE_HACKS
|
||||
PRECACHE_SOUND( "items/gunpickup2.wav" );
|
||||
}
|
||||
BOOL MyTouch( CBasePlayer *pPlayer )
|
||||
{
|
||||
@ -304,7 +320,13 @@ class CItemBattery : public CItem
|
||||
pPlayer->pev->armorvalue += gSkillData.batteryCapacity;
|
||||
pPlayer->pev->armorvalue = Q_min( pPlayer->pev->armorvalue, MAX_NORMAL_BATTERY );
|
||||
|
||||
EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM );
|
||||
#ifdef MOBILE_HACKS
|
||||
if( g_iModType == MOD_BIGLOLLY )
|
||||
EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/smallmedkit1.wav", 1, ATTN_NORM );
|
||||
else
|
||||
#endif // MOBILE_HACKS
|
||||
EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM );
|
||||
|
||||
|
||||
MESSAGE_BEGIN( MSG_ONE, gmsgItemPickup, NULL, pPlayer->pev );
|
||||
WRITE_STRING( STRING( pev->classname ) );
|
||||
@ -399,7 +421,12 @@ class CItemFlashlight : public CItem
|
||||
}
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS( item_flashlight, CItemFlashlight )
|
||||
// LINK_ENTITY_TO_CLASS( item_flashlight, CItemFlashlight )
|
||||
extern "C" EXPORT void item_flashlight( entvars_t *pev )
|
||||
{
|
||||
if( g_iModType == MOD_INDUCTION )
|
||||
GetClassPtr( (CItemFlashlight *)pev );
|
||||
}
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
class CItemLongJump : public CItem
|
||||
|
@ -2,6 +2,8 @@
|
||||
#ifndef MODDEF
|
||||
#define MODDEF
|
||||
|
||||
extern int g_iModType;
|
||||
|
||||
enum
|
||||
{
|
||||
MOD_VALVE, // Half-Life
|
||||
@ -11,7 +13,6 @@ enum
|
||||
MOD_HALFSECRET, // Half-Secret
|
||||
MOD_HEVSUIT, // Case Closed, Bloody Pizza: Vendetta, Borderlands
|
||||
MOD_INDUCTION, // Half-Life: Induction
|
||||
MOD_KLEINER // Kleiner's Adventures Demo
|
||||
MOD_REDEMPT, // Redemption/Absolute Redemption
|
||||
MOD_SEWER_BETA, // Sewer Beta
|
||||
MOD_TOT // Times of Troubles
|
||||
|
@ -3296,7 +3296,7 @@ void CBasePlayer::FlashlightTurnOn( void )
|
||||
}
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
if( (pev->weapons & ( 1 << WEAPON_FLASHLIGHT ) ) )
|
||||
if( (pev->weapons & ( 1 << WEAPON_SUIT ) ) || ( g_iModType == MOD_INDUCTION && (pev->weapons & ( 1 << WEAPON_FLASHLIGHT ) ) ) )
|
||||
#else // MOBILE_HACKS
|
||||
if( (pev->weapons & ( 1 << WEAPON_SUIT ) ) )
|
||||
#endif // MOBILE_HACKS
|
||||
@ -3463,9 +3463,13 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse )
|
||||
gEvilImpulse101 = TRUE;
|
||||
GiveNamedItem( "item_suit" );
|
||||
#ifdef MOBILE_HACKS
|
||||
GiveNamedItem( "item_armorvest" );
|
||||
GiveNamedItem( "item_helmet" );
|
||||
GiveNamedItem( "item_battery" );
|
||||
if( g_iModType == BSHIFT )
|
||||
{
|
||||
GiveNamedItem( "item_armorvest" );
|
||||
GiveNamedItem( "item_helmet" );
|
||||
}
|
||||
else
|
||||
GiveNamedItem( "item_battery" );
|
||||
#else // MOBILE_HACKS
|
||||
GiveNamedItem( "item_battery" );
|
||||
#endif // MOBILE_HACKS
|
||||
|
@ -58,7 +58,12 @@ public:
|
||||
void TalkInit( void );
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS( monster_roy, CRoy )
|
||||
// LINK_ENTITY_TO_CLASS( monster_roy, CRoy )
|
||||
extern "C" EXPORT void monster_roy( entvars_t *pev )
|
||||
{
|
||||
if( g_iModType == MOD_REDEMPT )
|
||||
GetClassPtr( (CRoy *)pev );
|
||||
}
|
||||
|
||||
//=========================================================
|
||||
// ALertSound - barney says "Freeze!"
|
||||
@ -446,7 +451,12 @@ void CDeadRoy::KeyValue( KeyValueData *pkvd )
|
||||
CBaseMonster::KeyValue( pkvd );
|
||||
}
|
||||
|
||||
LINK_ENTITY_TO_CLASS( monster_roy_dead, CDeadRoy )
|
||||
// LINK_ENTITY_TO_CLASS( monster_roy_dead, CDeadRoy )
|
||||
extern "C" EXPORT void monster_roy_dead( entvars_t *pev )
|
||||
{
|
||||
if( g_iModType == MOD_REDEMPT )
|
||||
GetClassPtr( (CDeadRoy *)pev );
|
||||
}
|
||||
|
||||
//=========================================================
|
||||
// ********** DeadRoy SPAWN **********
|
||||
|
@ -62,6 +62,11 @@ enum
|
||||
LINK_ENTITY_TO_CLASS( monster_scientist, CScientist )
|
||||
#ifdef MOBILE_HACKS
|
||||
LINK_ENTITY_TO_CLASS( monster_rosenberg, CScientist )
|
||||
extern "C" EXPORT void monster_rosenberg( entvars_t *pev )
|
||||
{
|
||||
if( g_iModType == MOD_BSHIFT )
|
||||
GetClassPtr( (CScientist *)pev );
|
||||
}
|
||||
#endif // MOBILE_HACKS
|
||||
|
||||
TYPEDESCRIPTION CScientist::m_SaveData[] =
|
||||
|
@ -374,6 +374,9 @@ void CCineMonster::PossessEntity( void )
|
||||
}
|
||||
|
||||
#ifdef MOBILE_HACKS
|
||||
if( g_iModType != MOD_TOT )
|
||||
return;
|
||||
|
||||
//
|
||||
// Fix a bug where barney would not run to the osprey on map 7.
|
||||
//
|
||||
|
@ -127,7 +127,9 @@ float CHalfLifeRules::FlPlayerFallDamage( CBasePlayer *pPlayer )
|
||||
void CHalfLifeRules::PlayerSpawn( CBasePlayer *pPlayer )
|
||||
{
|
||||
#ifdef MOBILE_HACKS
|
||||
pPlayer->GiveNamedItem( "item_suit" );
|
||||
if( g_iModType == HEVSUIT
|
||||
|| g_iModType == SEWERBETA )
|
||||
pPlayer->GiveNamedItem( "item_suit" );
|
||||
#endif // MOBILE_HACKS
|
||||
}
|
||||
|
||||
|
@ -35,8 +35,12 @@ public:
|
||||
BOOL CanHeal(void);
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(monster_civ, CCivScientist);
|
||||
|
||||
// LINK_ENTITY_TO_CLASS(monster_civ, CCivScientist);
|
||||
extern "C" EXPORT void monster_civ( entvars_t *pev )
|
||||
{
|
||||
if( g_iModType == MOD_TOT )
|
||||
GetClassPtr( (CCivScientist *)pev );
|
||||
}
|
||||
|
||||
//=========================================================
|
||||
// Spawn
|
||||
|
@ -2047,7 +2047,12 @@ public:
|
||||
int ObjectCaps( void ) { return CBaseDelay::ObjectCaps() & ~FCAP_ACROSS_TRANSITION; }
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS( trigger_playerfreeze, CTriggerPlayerFreeze )
|
||||
// LINK_ENTITY_TO_CLASS( trigger_playerfreeze, CTriggerPlayerFreeze )
|
||||
extern "C" EXPORT void trigger_playerfreeze( entvars_t *pev )
|
||||
{
|
||||
if( g_iModType == MOD_BSHIFT || g_iModType == MOD_INDUCTION )
|
||||
GetClassPtr( (CTriggerPlayerFreeze *)pev );
|
||||
}
|
||||
|
||||
void CTriggerPlayerFreeze::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user