mirror of https://github.com/FWGS/hlsdk-xash3d
Merge branch 'master' into sohl1.2
This commit is contained in:
commit
019e11a04d
|
@ -24,6 +24,8 @@
|
|||
#include "movewith.h"
|
||||
#include "skill.h"
|
||||
|
||||
bool g_fIsXash3D = false;
|
||||
|
||||
void EntvarsKeyvalue( entvars_t *pev, KeyValueData *pkvd );
|
||||
|
||||
extern "C" void PM_Move ( struct playermove_s *ppmove, int server );
|
||||
|
@ -127,6 +129,11 @@ int GetEntityAPI2( DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion )
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
int Server_GetPhysicsInterface( int version, server_physics_api_t *api, physics_interface_t *interface )
|
||||
{
|
||||
g_fIsXash3D = true;
|
||||
return FALSE; // do not tell engine to init physics interface, as we're not using it
|
||||
}
|
||||
#if !XASH_WIN32
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -68,6 +68,11 @@ CBaseEntity
|
|||
|
||||
extern "C" EXPORT int GetEntityAPI( DLL_FUNCTIONS *pFunctionTable, int interfaceVersion );
|
||||
extern "C" EXPORT int GetEntityAPI2( DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion );
|
||||
// TODO: replace this by actual definitions from physint.h
|
||||
typedef void *server_physics_api_t;
|
||||
typedef void *physics_interface_t;
|
||||
extern "C" EXPORT int Server_GetPhysicsInterface( int version, server_physics_api_t *api, physics_interface_t *interface );
|
||||
extern bool g_fIsXash3D;
|
||||
|
||||
extern int DispatchSpawn( edict_t *pent );
|
||||
extern void DispatchKeyValue( edict_t *pentKeyvalue, KeyValueData *pkvd );
|
||||
|
|
|
@ -59,12 +59,6 @@ void CGib::SpawnStickyGibs( entvars_t *pevVictim, Vector vecOrigin, int cGibs )
|
|||
{
|
||||
int i;
|
||||
|
||||
if( g_Language == LANGUAGE_GERMAN )
|
||||
{
|
||||
// no sticky gibs in germany right now!
|
||||
return;
|
||||
}
|
||||
|
||||
for( i = 0; i < cGibs; i++ )
|
||||
{
|
||||
CGib *pGib = GetClassPtr( (CGib *)NULL );
|
||||
|
@ -125,18 +119,15 @@ void CGib::SpawnStickyGibs( entvars_t *pevVictim, Vector vecOrigin, int cGibs )
|
|||
|
||||
void CGib::SpawnHeadGib( entvars_t *pevVictim )
|
||||
{
|
||||
if( g_Language == LANGUAGE_GERMAN )
|
||||
SpawnHeadGib(pevVictim, "models/germangibs.mdl" );// throw one head
|
||||
else
|
||||
SpawnHeadGib(pevVictim, "models/hgibs.mdl" );
|
||||
}
|
||||
SpawnHeadGib( pevVictim, "models/hgibs.mdl" );
|
||||
}
|
||||
|
||||
void CGib :: SpawnHeadGib( entvars_t *pevVictim, const char* szGibModel )
|
||||
{
|
||||
CGib *pGib = GetClassPtr( (CGib *)NULL );
|
||||
|
||||
pGib->Spawn( szGibModel );// throw one head
|
||||
pGib->pev->body = 0;
|
||||
pGib->pev->body = 0;
|
||||
|
||||
if( pevVictim )
|
||||
{
|
||||
|
@ -182,9 +173,7 @@ void CGib :: SpawnHeadGib( entvars_t *pevVictim, const char* szGibModel )
|
|||
|
||||
void CGib::SpawnRandomGibs( entvars_t *pevVictim, int cGibs, int human )
|
||||
{
|
||||
if ( g_Language == LANGUAGE_GERMAN )
|
||||
SpawnRandomGibs(pevVictim, cGibs, 1, "models/germangibs.mdl");
|
||||
else if (human)
|
||||
if (human)
|
||||
SpawnRandomGibs(pevVictim, cGibs, 1, "models/hgibs.mdl");
|
||||
else
|
||||
SpawnRandomGibs(pevVictim, cGibs, 0, "models/agibs.mdl");
|
||||
|
@ -192,10 +181,10 @@ void CGib::SpawnRandomGibs( entvars_t *pevVictim, int cGibs, int human )
|
|||
|
||||
//LRC - changed signature, to support custom gib models
|
||||
void CGib :: SpawnRandomGibs( entvars_t *pevVictim, int cGibs, int notfirst, const char *szGibModel )
|
||||
{
|
||||
{
|
||||
if (cGibs == 0) return; // spawn nothing!
|
||||
|
||||
CGib *pGib = GetClassPtr( (CGib *)NULL );
|
||||
CGib *pGib = GetClassPtr( (CGib *)NULL );
|
||||
pGib->Spawn( szGibModel );
|
||||
|
||||
//LRC - check the model itself to find out how many gibs are available
|
||||
|
@ -770,7 +759,7 @@ void CGib::BounceGibTouch( CBaseEntity *pOther )
|
|||
}
|
||||
else
|
||||
{
|
||||
if( g_Language != LANGUAGE_GERMAN && m_cBloodDecals > 0 && m_bloodColor != DONT_BLEED )
|
||||
if( m_cBloodDecals > 0 && m_bloodColor != DONT_BLEED )
|
||||
{
|
||||
vecSpot = pev->origin + Vector( 0.0f, 0.0f, 8.0f );//move up a bit, and trace down.
|
||||
UTIL_TraceLine( vecSpot, vecSpot + Vector( 0.0f, 0.0f, -24.0f ), ignore_monsters, ENT( pev ), &tr );
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
#define BOLT_AIR_VELOCITY 2000
|
||||
#define BOLT_WATER_VELOCITY 1000
|
||||
|
||||
extern BOOL g_fIsXash3D;
|
||||
|
||||
// UNDONE: Save/restore this? Don't forget to set classname and LINK_ENTITY_TO_CLASS()
|
||||
//
|
||||
// OVERLOADS SOME ENTVARS:
|
||||
|
|
|
@ -1901,11 +1901,7 @@ LINK_ENTITY_TO_CLASS( gibshooter, CGibShooter )
|
|||
|
||||
void CGibShooter::Precache( void )
|
||||
{
|
||||
if( g_Language == LANGUAGE_GERMAN )
|
||||
{
|
||||
m_iGibModelIndex = PRECACHE_MODEL( "models/germanygibs.mdl" );
|
||||
}
|
||||
else if (m_iBloodColor == BLOOD_COLOR_YELLOW)
|
||||
if (m_iBloodColor == BLOOD_COLOR_YELLOW)
|
||||
{
|
||||
m_iGibModelIndex = PRECACHE_MODEL ("models/agibs.mdl");
|
||||
}
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
#include "util.h"
|
||||
#include "game.h"
|
||||
|
||||
BOOL g_fIsXash3D;
|
||||
|
||||
cvar_t displaysoundlist = {"displaysoundlist","0"};
|
||||
|
||||
// multiplayer server rules
|
||||
|
@ -466,10 +464,6 @@ cvar_t sv_busters = { "sv_busters", "0" };
|
|||
// This gets called one time when the game is initialied
|
||||
void GameDLLInit( void )
|
||||
{
|
||||
// Register cvars here:
|
||||
if( !CVAR_GET_POINTER( "sv_language" ) )
|
||||
g_fIsXash3D = TRUE;
|
||||
|
||||
g_psv_gravity = CVAR_GET_POINTER( "sv_gravity" );
|
||||
g_psv_aim = CVAR_GET_POINTER( "sv_aim" );
|
||||
g_footsteps = CVAR_GET_POINTER( "mp_footsteps" );
|
||||
|
|
|
@ -36,4 +36,4 @@ DLL_GLOBAL int g_iSkillLevel;
|
|||
DLL_GLOBAL int gDisplayTitle;
|
||||
DLL_GLOBAL BOOL g_fGameOver;
|
||||
DLL_GLOBAL const Vector g_vecZero = Vector( 0, 0, 0 );
|
||||
DLL_GLOBAL int g_Language;
|
||||
|
||||
|
|
|
@ -3540,13 +3540,11 @@ void CBloodSplat::Spray( void )
|
|||
{
|
||||
TraceResult tr;
|
||||
|
||||
if( g_Language != LANGUAGE_GERMAN )
|
||||
{
|
||||
UTIL_MakeVectors( pev->angles );
|
||||
UTIL_TraceLine( pev->origin, pev->origin + gpGlobals->v_forward * 128, ignore_monsters, pev->owner, & tr );
|
||||
UTIL_MakeVectors( pev->angles );
|
||||
UTIL_TraceLine( pev->origin, pev->origin + gpGlobals->v_forward * 128, ignore_monsters, pev->owner, & tr );
|
||||
|
||||
UTIL_BloodDecalTrace( &tr, BLOOD_COLOR_RED );
|
||||
|
||||
UTIL_BloodDecalTrace( &tr, BLOOD_COLOR_RED );
|
||||
}
|
||||
SetThink( &CBloodSplat::SUB_Remove );
|
||||
SetNextThink( 0.1f );
|
||||
}
|
||||
|
|
|
@ -1442,9 +1442,6 @@ void UTIL_BloodStream( const Vector &origin, const Vector &direction, int color,
|
|||
if( !UTIL_ShouldShowBlood( color ) )
|
||||
return;
|
||||
|
||||
if( g_Language == LANGUAGE_GERMAN && color == BLOOD_COLOR_RED )
|
||||
color = 0;
|
||||
|
||||
MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, origin );
|
||||
WRITE_BYTE( TE_BLOODSTREAM );
|
||||
WRITE_COORD( origin.x );
|
||||
|
@ -1466,9 +1463,6 @@ void UTIL_BloodDrips( const Vector &origin, const Vector &direction, int color,
|
|||
if( color == DONT_BLEED || amount == 0 )
|
||||
return;
|
||||
|
||||
if( g_Language == LANGUAGE_GERMAN && color == BLOOD_COLOR_RED )
|
||||
color = 0;
|
||||
|
||||
if( g_pGameRules->IsMultiplayer() )
|
||||
{
|
||||
// scale up blood effect in multiplayer for better visibility
|
||||
|
|
12
dlls/util.h
12
dlls/util.h
|
@ -429,18 +429,6 @@ void DBG_AssertFunction(BOOL fExpr, const char* szExpr, const char* szFile, int
|
|||
|
||||
extern DLL_GLOBAL const Vector g_vecZero;
|
||||
|
||||
//
|
||||
// Constants that were used only by QC (maybe not used at all now)
|
||||
//
|
||||
// Un-comment only as needed
|
||||
//
|
||||
#define LANGUAGE_ENGLISH 0
|
||||
#define LANGUAGE_GERMAN 1
|
||||
#define LANGUAGE_FRENCH 2
|
||||
#define LANGUAGE_BRITISH 3
|
||||
|
||||
extern DLL_GLOBAL int g_Language;
|
||||
|
||||
#define AMBIENT_SOUND_STATIC 0 // medium radius attenuation
|
||||
#define AMBIENT_SOUND_EVERYWHERE 1
|
||||
#define AMBIENT_SOUND_SMALLRADIUS 2
|
||||
|
|
|
@ -523,16 +523,8 @@ void CWorld::Precache( void )
|
|||
PRECACHE_SOUND( "common/bodydrop3.wav" );// dead bodies hitting the ground (animation events)
|
||||
PRECACHE_SOUND( "common/bodydrop4.wav" );
|
||||
|
||||
g_Language = (int)CVAR_GET_FLOAT( "sv_language" );
|
||||
if( g_Language == LANGUAGE_GERMAN )
|
||||
{
|
||||
PRECACHE_MODEL( "models/germangibs.mdl" );
|
||||
}
|
||||
else
|
||||
{
|
||||
PRECACHE_MODEL( "models/hgibs.mdl" );
|
||||
PRECACHE_MODEL( "models/agibs.mdl" );
|
||||
}
|
||||
PRECACHE_MODEL( "models/hgibs.mdl" );
|
||||
PRECACHE_MODEL( "models/agibs.mdl" );
|
||||
|
||||
PRECACHE_SOUND( "weapons/ric1.wav" );
|
||||
PRECACHE_SOUND( "weapons/ric2.wav" );
|
||||
|
|
Loading…
Reference in New Issue