mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-11 06:24:30 +00:00
Merge branch 'master' into mobile_hacks
This commit is contained in:
commit
9347036c55
@ -824,6 +824,7 @@ bool CHudSpectator::ParseOverviewFile()
|
||||
char levelname[256] = { 0 };
|
||||
char token[1024] = { 0 };
|
||||
float height;
|
||||
bool ret = false;
|
||||
|
||||
char *afile = NULL, *pfile = NULL;
|
||||
|
||||
@ -843,7 +844,7 @@ bool CHudSpectator::ParseOverviewFile()
|
||||
strcpy( m_OverviewData.map, gEngfuncs.pfnGetLevelName() );
|
||||
|
||||
if( m_OverviewData.map[0] == '\0' )
|
||||
return false; // not active yet
|
||||
return ret; // not active yet
|
||||
|
||||
strcpy( levelname, m_OverviewData.map + 5 );
|
||||
levelname[strlen( levelname ) - 4] = 0;
|
||||
@ -855,7 +856,7 @@ bool CHudSpectator::ParseOverviewFile()
|
||||
if( !pfile )
|
||||
{
|
||||
gEngfuncs.Con_DPrintf( "Couldn't open file %s. Using default values for overiew mode.\n", filename );
|
||||
return false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
while( true )
|
||||
@ -872,7 +873,7 @@ bool CHudSpectator::ParseOverviewFile()
|
||||
if( stricmp( token, "{" ) )
|
||||
{
|
||||
gEngfuncs.Con_Printf( "Error parsing overview file %s. (expected { )\n", filename );
|
||||
return false;
|
||||
goto end;
|
||||
}
|
||||
|
||||
pfile = gEngfuncs.COM_ParseFile( pfile, token );
|
||||
@ -912,7 +913,7 @@ bool CHudSpectator::ParseOverviewFile()
|
||||
else
|
||||
{
|
||||
gEngfuncs.Con_Printf( "Error parsing overview file %s. (%s unkown)\n", filename, token );
|
||||
return false;
|
||||
goto end;
|
||||
}
|
||||
|
||||
pfile = gEngfuncs.COM_ParseFile( pfile, token ); // parse next token
|
||||
@ -924,7 +925,7 @@ bool CHudSpectator::ParseOverviewFile()
|
||||
if( m_OverviewData.layers == OVERVIEW_MAX_LAYERS )
|
||||
{
|
||||
gEngfuncs.Con_Printf( "Error parsing overview file %s. ( too many layers )\n", filename );
|
||||
return false;
|
||||
goto end;
|
||||
}
|
||||
|
||||
pfile = gEngfuncs.COM_ParseFile( pfile, token );
|
||||
@ -932,7 +933,7 @@ bool CHudSpectator::ParseOverviewFile()
|
||||
if( stricmp( token, "{" ) )
|
||||
{
|
||||
gEngfuncs.Con_Printf( "Error parsing overview file %s. (expected { )\n", filename );
|
||||
return false;
|
||||
goto end;
|
||||
}
|
||||
|
||||
pfile = gEngfuncs.COM_ParseFile( pfile, token );
|
||||
@ -953,7 +954,7 @@ bool CHudSpectator::ParseOverviewFile()
|
||||
else
|
||||
{
|
||||
gEngfuncs.Con_Printf( "Error parsing overview file %s. (%s unkown)\n", filename, token );
|
||||
return false;
|
||||
goto end;
|
||||
}
|
||||
|
||||
pfile = gEngfuncs.COM_ParseFile( pfile, token ); // parse next token
|
||||
@ -963,12 +964,14 @@ bool CHudSpectator::ParseOverviewFile()
|
||||
}
|
||||
}
|
||||
|
||||
gEngfuncs.COM_FreeFile( afile );
|
||||
|
||||
m_mapZoom = m_OverviewData.zoom;
|
||||
m_mapOrigin = m_OverviewData.origin;
|
||||
|
||||
return true;
|
||||
ret = true;
|
||||
end:
|
||||
gEngfuncs.COM_FreeFile( afile );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void CHudSpectator::LoadMapSprites()
|
||||
|
@ -736,6 +736,10 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams )
|
||||
if( CL_IsThirdPerson() )
|
||||
{
|
||||
VectorCopy( camAngles, pparams->viewangles );
|
||||
}
|
||||
|
||||
// Apply this at all times
|
||||
{
|
||||
float pitch = camAngles[0];
|
||||
|
||||
// Normalize angles
|
||||
|
@ -1034,7 +1034,7 @@ Vector VecCheckSplatToss( entvars_t *pev, const Vector &vecSpot1, Vector vecSpot
|
||||
Vector vecScale;
|
||||
Vector vecGrenadeVel;
|
||||
Vector vecTemp;
|
||||
float flGravity = g_psv_gravity->value;
|
||||
float flGravity = Q_max( g_psv_gravity->value, 0.1f );
|
||||
|
||||
// calculate the midpoint and apex of the 'triangle'
|
||||
vecMidPoint = vecSpot1 + ( vecSpot2 - vecSpot1 ) * 0.5f;
|
||||
@ -1050,6 +1050,9 @@ Vector VecCheckSplatToss( entvars_t *pev, const Vector &vecSpot1, Vector vecSpot
|
||||
|
||||
// Don't worry about actually hitting the target, this won't hurt us!
|
||||
|
||||
// TODO: Need another way to calculate height because current calculation is completely wrong
|
||||
// and there posible crash.
|
||||
|
||||
// How high should the grenade travel (subtract 15 so the grenade doesn't hit the ceiling)?
|
||||
float height = vecApex.z - vecSpot1.z - 15.0f;
|
||||
// How fast does the grenade need to travel to reach that height given gravity?
|
||||
|
@ -255,6 +255,8 @@ void DispatchSave( edict_t *pent, SAVERESTOREDATA *pSaveData )
|
||||
{
|
||||
ENTITYTABLE *pTable = &pSaveData->pTable[pSaveData->currentIndex];
|
||||
|
||||
gpGlobals->time = pSaveData->time;
|
||||
|
||||
if( pTable->pent != pent )
|
||||
ALERT( at_error, "ENTITY TABLE OR INDEX IS WRONG!!!!\n" );
|
||||
|
||||
@ -307,6 +309,9 @@ int DispatchRestore( edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity
|
||||
Vector oldOffset;
|
||||
|
||||
CRestore restoreHelper( pSaveData );
|
||||
|
||||
gpGlobals->time = pSaveData->time;
|
||||
|
||||
if( globalEntity )
|
||||
{
|
||||
CRestore tmpRestore( pSaveData );
|
||||
|
@ -193,7 +193,7 @@ public:
|
||||
virtual BOOL IsAlive( void ) { return (pev->deadflag == DEAD_NO) && pev->health > 0; }
|
||||
virtual BOOL IsBSPModel( void ) { return pev->solid == SOLID_BSP || pev->movetype == MOVETYPE_PUSHSTEP; }
|
||||
virtual BOOL ReflectGauss( void ) { return ( IsBSPModel() && !pev->takedamage ); }
|
||||
virtual BOOL HasTarget( string_t targetname ) { return FStrEq(STRING(targetname), STRING(pev->targetname) ); }
|
||||
virtual BOOL HasTarget( string_t targetname ) { return FStrEq(STRING(targetname), STRING(pev->target) ); }
|
||||
virtual BOOL IsInWorld( void );
|
||||
virtual BOOL IsPlayer( void ) { return FALSE; }
|
||||
virtual BOOL IsNetClient( void ) { return FALSE; }
|
||||
|
@ -28,7 +28,11 @@ extern enginefuncs_t g_engfuncs;
|
||||
// The actual engine callbacks
|
||||
#define GETPLAYERUSERID (*g_engfuncs.pfnGetPlayerUserId)
|
||||
#define PRECACHE_MODEL (*g_engfuncs.pfnPrecacheModel)
|
||||
#ifdef GOLDSOURCE_SUPPORT
|
||||
#define PRECACHE_SOUND (*g_engfuncs.pfnPrecacheSound)
|
||||
#else
|
||||
#define PRECACHE_SOUND(x)
|
||||
#endif
|
||||
#define PRECACHE_GENERIC (*g_engfuncs.pfnPrecacheGeneric)
|
||||
#define SET_MODEL (*g_engfuncs.pfnSetModel)
|
||||
#define MODEL_INDEX (*g_engfuncs.pfnModelIndex)
|
||||
|
@ -1150,6 +1150,9 @@ void CSentry::Precache()
|
||||
{
|
||||
CBaseTurret::Precache();
|
||||
PRECACHE_MODEL( "models/sentry.mdl" );
|
||||
PRECACHE_SOUND( "weapons/hks1.wav" );
|
||||
PRECACHE_SOUND( "weapons/hks2.wav" );
|
||||
PRECACHE_SOUND( "weapons/hks3.wav" );
|
||||
}
|
||||
|
||||
void CSentry::Spawn()
|
||||
|
@ -63,19 +63,7 @@ playermove_t *pmove = NULL;
|
||||
#define STOP_EPSILON 0.1f
|
||||
|
||||
#define CTEXTURESMAX 512 // max number of textures loaded
|
||||
#define CBTEXTURENAMEMAX 13 // only load first n chars of name
|
||||
|
||||
#define CHAR_TEX_CONCRETE 'C' // texture types
|
||||
#define CHAR_TEX_METAL 'M'
|
||||
#define CHAR_TEX_DIRT 'D'
|
||||
#define CHAR_TEX_VENT 'V'
|
||||
#define CHAR_TEX_GRATE 'G'
|
||||
#define CHAR_TEX_TILE 'T'
|
||||
#define CHAR_TEX_SLOSH 'S'
|
||||
#define CHAR_TEX_WOOD 'W'
|
||||
#define CHAR_TEX_COMPUTER 'P'
|
||||
#define CHAR_TEX_GLASS 'Y'
|
||||
#define CHAR_TEX_FLESH 'F'
|
||||
#include "pm_materials.h"
|
||||
|
||||
#define STEP_CONCRETE 0 // default step sound
|
||||
#define STEP_METAL 1 // metal floor
|
||||
|
Loading…
x
Reference in New Issue
Block a user