mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-08 21:14:14 +00:00
Tempents distance clipping (experimental)
This commit is contained in:
parent
5199847b05
commit
4f2f316879
@ -28,6 +28,8 @@ cvar_t mp_maxbmodeldist = { "mp_maxbmodeldist", "4096", FCVAR_SERVER};
|
|||||||
cvar_t mp_maxtrashdist = { "mp_maxtrashdist", "4096", FCVAR_SERVER};
|
cvar_t mp_maxtrashdist = { "mp_maxtrashdist", "4096", FCVAR_SERVER};
|
||||||
cvar_t mp_maxwaterdist = { "mp_maxwaterdist", "4096", FCVAR_SERVER};
|
cvar_t mp_maxwaterdist = { "mp_maxwaterdist", "4096", FCVAR_SERVER};
|
||||||
cvar_t mp_maxotherdist = { "mp_maxotherdist", "4096", FCVAR_SERVER};
|
cvar_t mp_maxotherdist = { "mp_maxotherdist", "4096", FCVAR_SERVER};
|
||||||
|
cvar_t mp_servercliptents = { "mp_servercliptents", "0", FCVAR_SERVER};
|
||||||
|
cvar_t mp_maxtentdist = { "mp_maxtentdist", "4096", FCVAR_SERVER};
|
||||||
|
|
||||||
void Ent_RunGC_f( void );
|
void Ent_RunGC_f( void );
|
||||||
|
|
||||||
@ -101,6 +103,8 @@ void GGM_RegisterCVars( void )
|
|||||||
CVAR_REGISTER( &mp_maxtrashdist );
|
CVAR_REGISTER( &mp_maxtrashdist );
|
||||||
CVAR_REGISTER( &mp_maxwaterdist );
|
CVAR_REGISTER( &mp_maxwaterdist );
|
||||||
CVAR_REGISTER( &mp_maxotherdist );
|
CVAR_REGISTER( &mp_maxotherdist );
|
||||||
|
CVAR_REGISTER( &mp_servercliptents );
|
||||||
|
CVAR_REGISTER( &mp_maxtentdist );
|
||||||
|
|
||||||
g_engfuncs.pfnAddServerCommand( "ent_rungc", Ent_RunGC_f );
|
g_engfuncs.pfnAddServerCommand( "ent_rungc", Ent_RunGC_f );
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,8 @@ extern cvar_t mp_maxbmodeldist;
|
|||||||
extern cvar_t mp_maxtrashdist;
|
extern cvar_t mp_maxtrashdist;
|
||||||
extern cvar_t mp_maxwaterdist;
|
extern cvar_t mp_maxwaterdist;
|
||||||
extern cvar_t mp_maxotherdist;
|
extern cvar_t mp_maxotherdist;
|
||||||
|
extern cvar_t mp_servercliptents;
|
||||||
|
extern cvar_t mp_maxtentdist;
|
||||||
|
|
||||||
void GGM_RegisterCVars( void );
|
void GGM_RegisterCVars( void );
|
||||||
void Ent_RunGC( bool common, bool enttools, const char *userid, const char *pattern = NULL );
|
void Ent_RunGC( bool common, bool enttools, const char *userid, const char *pattern = NULL );
|
||||||
|
362
dlls/util.cpp
362
dlls/util.cpp
@ -1102,18 +1102,54 @@ void UTIL_BloodStream( const Vector &origin, const Vector &direction, int color,
|
|||||||
|
|
||||||
if( g_Language == LANGUAGE_GERMAN && color == BLOOD_COLOR_RED )
|
if( g_Language == LANGUAGE_GERMAN && color == BLOOD_COLOR_RED )
|
||||||
color = 0;
|
color = 0;
|
||||||
|
if( mp_serverdistclip.value && mp_servercliptents.value )
|
||||||
|
{
|
||||||
|
// loop through all players
|
||||||
|
for( int i = 1; i <= gpGlobals->maxClients; i++ )
|
||||||
|
{
|
||||||
|
CBaseEntity *pPlayer = UTIL_PlayerByIndex( i );
|
||||||
|
if( pPlayer )
|
||||||
|
{
|
||||||
|
Vector delta = origin - pPlayer->edict()->v.origin;
|
||||||
|
float dist = 0;
|
||||||
|
|
||||||
MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, origin );
|
if( abs(delta.x) > dist )
|
||||||
WRITE_BYTE( TE_BLOODSTREAM );
|
dist = abs(delta.x);
|
||||||
WRITE_COORD( origin.x );
|
if( abs(delta.y) > dist )
|
||||||
WRITE_COORD( origin.y );
|
dist = abs(delta.y);
|
||||||
WRITE_COORD( origin.z );
|
if( abs(delta.z) > dist )
|
||||||
WRITE_COORD( direction.x );
|
dist = abs(delta.z);
|
||||||
WRITE_COORD( direction.y );
|
if( dist > mp_maxtentdist.value)
|
||||||
WRITE_COORD( direction.z );
|
continue;
|
||||||
WRITE_BYTE( color );
|
|
||||||
WRITE_BYTE( Q_min( amount, 255 ) );
|
MESSAGE_BEGIN( MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, NULL, pPlayer->edict() );
|
||||||
MESSAGE_END();
|
WRITE_BYTE( TE_BLOODSTREAM );
|
||||||
|
WRITE_COORD( origin.x );
|
||||||
|
WRITE_COORD( origin.y );
|
||||||
|
WRITE_COORD( origin.z );
|
||||||
|
WRITE_COORD( direction.x );
|
||||||
|
WRITE_COORD( direction.y );
|
||||||
|
WRITE_COORD( direction.z );
|
||||||
|
WRITE_BYTE( color );
|
||||||
|
WRITE_BYTE( Q_min( amount, 255 ) );
|
||||||
|
MESSAGE_END();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, origin );
|
||||||
|
WRITE_BYTE( TE_BLOODSTREAM );
|
||||||
|
WRITE_COORD( origin.x );
|
||||||
|
WRITE_COORD( origin.y );
|
||||||
|
WRITE_COORD( origin.z );
|
||||||
|
WRITE_COORD( direction.x );
|
||||||
|
WRITE_COORD( direction.y );
|
||||||
|
WRITE_COORD( direction.z );
|
||||||
|
WRITE_BYTE( color );
|
||||||
|
WRITE_BYTE( Q_min( amount, 255 ) );
|
||||||
|
MESSAGE_END();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UTIL_BloodDrips( const Vector &origin, const Vector &direction, int color, int amount )
|
void UTIL_BloodDrips( const Vector &origin, const Vector &direction, int color, int amount )
|
||||||
@ -1136,16 +1172,52 @@ void UTIL_BloodDrips( const Vector &origin, const Vector &direction, int color,
|
|||||||
if( amount > 255 )
|
if( amount > 255 )
|
||||||
amount = 255;
|
amount = 255;
|
||||||
|
|
||||||
MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, origin );
|
if( mp_serverdistclip.value && mp_servercliptents.value )
|
||||||
WRITE_BYTE( TE_BLOODSPRITE );
|
{
|
||||||
WRITE_COORD( origin.x); // pos
|
// loop through all players
|
||||||
WRITE_COORD( origin.y);
|
for( int i = 1; i <= gpGlobals->maxClients; i++ )
|
||||||
WRITE_COORD( origin.z);
|
{
|
||||||
WRITE_SHORT( g_sModelIndexBloodSpray ); // initial sprite model
|
CBaseEntity *pPlayer = UTIL_PlayerByIndex( i );
|
||||||
WRITE_SHORT( g_sModelIndexBloodDrop ); // droplet sprite models
|
if( pPlayer )
|
||||||
WRITE_BYTE( color ); // color index into host_basepal
|
{
|
||||||
WRITE_BYTE( Q_min( Q_max( 3, amount / 10 ), 16 ) ); // size
|
Vector delta = origin - pPlayer->edict()->v.origin;
|
||||||
MESSAGE_END();
|
float dist = 0;
|
||||||
|
|
||||||
|
if( abs(delta.x) > dist )
|
||||||
|
dist = abs(delta.x);
|
||||||
|
if( abs(delta.y) > dist )
|
||||||
|
dist = abs(delta.y);
|
||||||
|
if( abs(delta.z) > dist )
|
||||||
|
dist = abs(delta.z);
|
||||||
|
if( dist > mp_maxtentdist.value)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
MESSAGE_BEGIN( MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, NULL, pPlayer->edict() );
|
||||||
|
WRITE_BYTE( TE_BLOODSPRITE );
|
||||||
|
WRITE_COORD( origin.x); // pos
|
||||||
|
WRITE_COORD( origin.y);
|
||||||
|
WRITE_COORD( origin.z);
|
||||||
|
WRITE_SHORT( g_sModelIndexBloodSpray ); // initial sprite model
|
||||||
|
WRITE_SHORT( g_sModelIndexBloodDrop ); // droplet sprite models
|
||||||
|
WRITE_BYTE( color ); // color index into host_basepal
|
||||||
|
WRITE_BYTE( Q_min( Q_max( 3, amount / 10 ), 16 ) ); // size
|
||||||
|
MESSAGE_END();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, origin );
|
||||||
|
WRITE_BYTE( TE_BLOODSPRITE );
|
||||||
|
WRITE_COORD( origin.x); // pos
|
||||||
|
WRITE_COORD( origin.y);
|
||||||
|
WRITE_COORD( origin.z);
|
||||||
|
WRITE_SHORT( g_sModelIndexBloodSpray ); // initial sprite model
|
||||||
|
WRITE_SHORT( g_sModelIndexBloodDrop ); // droplet sprite models
|
||||||
|
WRITE_BYTE( color ); // color index into host_basepal
|
||||||
|
WRITE_BYTE( Q_min( Q_max( 3, amount / 10 ), 16 ) ); // size
|
||||||
|
MESSAGE_END();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector UTIL_RandomBloodVector( void )
|
Vector UTIL_RandomBloodVector( void )
|
||||||
@ -1217,15 +1289,50 @@ void UTIL_DecalTrace( TraceResult *pTrace, int decalNumber )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MESSAGE_BEGIN( MSG_BROADCAST, SVC_TEMPENTITY );
|
if( mp_serverdistclip.value && mp_servercliptents.value )
|
||||||
WRITE_BYTE( message );
|
{
|
||||||
WRITE_COORD( pTrace->vecEndPos.x );
|
// loop through all players
|
||||||
WRITE_COORD( pTrace->vecEndPos.y );
|
for( int i = 1; i <= gpGlobals->maxClients; i++ )
|
||||||
WRITE_COORD( pTrace->vecEndPos.z );
|
{
|
||||||
WRITE_BYTE( index );
|
CBaseEntity *pPlayer = UTIL_PlayerByIndex( i );
|
||||||
if( entityIndex )
|
if( pPlayer )
|
||||||
WRITE_SHORT( entityIndex );
|
{
|
||||||
MESSAGE_END();
|
Vector delta = pTrace->vecEndPos - pPlayer->edict()->v.origin;
|
||||||
|
float dist = 0;
|
||||||
|
|
||||||
|
if( abs(delta.x) > dist )
|
||||||
|
dist = abs(delta.x);
|
||||||
|
if( abs(delta.y) > dist )
|
||||||
|
dist = abs(delta.y);
|
||||||
|
if( abs(delta.z) > dist )
|
||||||
|
dist = abs(delta.z);
|
||||||
|
if( dist > mp_maxtentdist.value)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
MESSAGE_BEGIN( MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, NULL, pPlayer->edict() );
|
||||||
|
WRITE_BYTE( message );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.x );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.y );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.z );
|
||||||
|
WRITE_BYTE( index );
|
||||||
|
if( entityIndex )
|
||||||
|
WRITE_SHORT( entityIndex );
|
||||||
|
MESSAGE_END();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MESSAGE_BEGIN( MSG_BROADCAST, SVC_TEMPENTITY );
|
||||||
|
WRITE_BYTE( message );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.x );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.y );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.z );
|
||||||
|
WRITE_BYTE( index );
|
||||||
|
if( entityIndex )
|
||||||
|
WRITE_SHORT( entityIndex );
|
||||||
|
MESSAGE_END();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1256,15 +1363,50 @@ void UTIL_PlayerDecalTrace( TraceResult *pTrace, int playernum, int decalNumber,
|
|||||||
if( pTrace->flFraction == 1.0 )
|
if( pTrace->flFraction == 1.0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MESSAGE_BEGIN( MSG_BROADCAST, SVC_TEMPENTITY );
|
if( mp_serverdistclip.value && mp_servercliptents.value )
|
||||||
WRITE_BYTE( TE_PLAYERDECAL );
|
{
|
||||||
WRITE_BYTE( playernum );
|
// loop through all players
|
||||||
WRITE_COORD( pTrace->vecEndPos.x );
|
for( int i = 1; i <= gpGlobals->maxClients; i++ )
|
||||||
WRITE_COORD( pTrace->vecEndPos.y );
|
{
|
||||||
WRITE_COORD( pTrace->vecEndPos.z );
|
CBaseEntity *pPlayer = UTIL_PlayerByIndex( i );
|
||||||
WRITE_SHORT( (short)ENTINDEX( pTrace->pHit ) );
|
if( pPlayer )
|
||||||
WRITE_BYTE( index );
|
{
|
||||||
MESSAGE_END();
|
Vector delta = pTrace->vecEndPos - pPlayer->edict()->v.origin;
|
||||||
|
float dist = 0;
|
||||||
|
|
||||||
|
if( abs(delta.x) > dist )
|
||||||
|
dist = abs(delta.x);
|
||||||
|
if( abs(delta.y) > dist )
|
||||||
|
dist = abs(delta.y);
|
||||||
|
if( abs(delta.z) > dist )
|
||||||
|
dist = abs(delta.z);
|
||||||
|
if( dist > mp_maxtentdist.value)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
MESSAGE_BEGIN( MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, NULL, pPlayer->edict() );
|
||||||
|
WRITE_BYTE( TE_PLAYERDECAL );
|
||||||
|
WRITE_BYTE( playernum );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.x );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.y );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.z );
|
||||||
|
WRITE_SHORT( (short)ENTINDEX( pTrace->pHit ) );
|
||||||
|
WRITE_BYTE( index );
|
||||||
|
MESSAGE_END();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MESSAGE_BEGIN( MSG_BROADCAST, SVC_TEMPENTITY );
|
||||||
|
WRITE_BYTE( TE_PLAYERDECAL );
|
||||||
|
WRITE_BYTE( playernum );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.x );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.y );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.z );
|
||||||
|
WRITE_SHORT( (short)ENTINDEX( pTrace->pHit ) );
|
||||||
|
WRITE_BYTE( index );
|
||||||
|
MESSAGE_END();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UTIL_GunshotDecalTrace( TraceResult *pTrace, int decalNumber )
|
void UTIL_GunshotDecalTrace( TraceResult *pTrace, int decalNumber )
|
||||||
@ -1279,35 +1421,135 @@ void UTIL_GunshotDecalTrace( TraceResult *pTrace, int decalNumber )
|
|||||||
if( pTrace->flFraction == 1.0 )
|
if( pTrace->flFraction == 1.0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MESSAGE_BEGIN( MSG_PAS, SVC_TEMPENTITY, pTrace->vecEndPos );
|
if( mp_serverdistclip.value && mp_servercliptents.value )
|
||||||
WRITE_BYTE( TE_GUNSHOTDECAL );
|
{
|
||||||
WRITE_COORD( pTrace->vecEndPos.x );
|
// loop through all players
|
||||||
WRITE_COORD( pTrace->vecEndPos.y );
|
for( int i = 1; i <= gpGlobals->maxClients; i++ )
|
||||||
WRITE_COORD( pTrace->vecEndPos.z );
|
{
|
||||||
WRITE_SHORT( (short)ENTINDEX( pTrace->pHit ) );
|
CBaseEntity *pPlayer = UTIL_PlayerByIndex( i );
|
||||||
WRITE_BYTE( index );
|
if( pPlayer )
|
||||||
MESSAGE_END();
|
{
|
||||||
|
Vector delta = pTrace->vecEndPos - pPlayer->edict()->v.origin;
|
||||||
|
float dist = 0;
|
||||||
|
|
||||||
|
if( abs(delta.x) > dist )
|
||||||
|
dist = abs(delta.x);
|
||||||
|
if( abs(delta.y) > dist )
|
||||||
|
dist = abs(delta.y);
|
||||||
|
if( abs(delta.z) > dist )
|
||||||
|
dist = abs(delta.z);
|
||||||
|
if( dist > mp_maxtentdist.value)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
MESSAGE_BEGIN( MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, NULL, pPlayer->edict());
|
||||||
|
WRITE_BYTE( TE_GUNSHOTDECAL );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.x );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.y );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.z );
|
||||||
|
WRITE_SHORT( (short)ENTINDEX( pTrace->pHit ) );
|
||||||
|
WRITE_BYTE( index );
|
||||||
|
MESSAGE_END();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MESSAGE_BEGIN( MSG_PAS, SVC_TEMPENTITY, pTrace->vecEndPos );
|
||||||
|
WRITE_BYTE( TE_GUNSHOTDECAL );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.x );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.y );
|
||||||
|
WRITE_COORD( pTrace->vecEndPos.z );
|
||||||
|
WRITE_SHORT( (short)ENTINDEX( pTrace->pHit ) );
|
||||||
|
WRITE_BYTE( index );
|
||||||
|
MESSAGE_END();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UTIL_Sparks( const Vector &position )
|
void UTIL_Sparks( const Vector &position )
|
||||||
{
|
{
|
||||||
MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, position );
|
|
||||||
WRITE_BYTE( TE_SPARKS );
|
if( mp_serverdistclip.value && mp_servercliptents.value )
|
||||||
WRITE_COORD( position.x );
|
{
|
||||||
WRITE_COORD( position.y );
|
// loop through all players
|
||||||
WRITE_COORD( position.z );
|
for( int i = 1; i <= gpGlobals->maxClients; i++ )
|
||||||
MESSAGE_END();
|
{
|
||||||
|
CBaseEntity *pPlayer = UTIL_PlayerByIndex( i );
|
||||||
|
if( pPlayer )
|
||||||
|
{
|
||||||
|
Vector delta = position - pPlayer->edict()->v.origin;
|
||||||
|
float dist = 0;
|
||||||
|
|
||||||
|
if( abs(delta.x) > dist )
|
||||||
|
dist = abs(delta.x);
|
||||||
|
if( abs(delta.y) > dist )
|
||||||
|
dist = abs(delta.y);
|
||||||
|
if( abs(delta.z) > dist )
|
||||||
|
dist = abs(delta.z);
|
||||||
|
if( dist > mp_maxtentdist.value)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
MESSAGE_BEGIN( MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, NULL, pPlayer->edict() );
|
||||||
|
WRITE_BYTE( TE_SPARKS );
|
||||||
|
WRITE_COORD( position.x );
|
||||||
|
WRITE_COORD( position.y );
|
||||||
|
WRITE_COORD( position.z );
|
||||||
|
MESSAGE_END();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, position );
|
||||||
|
WRITE_BYTE( TE_SPARKS );
|
||||||
|
WRITE_COORD( position.x );
|
||||||
|
WRITE_COORD( position.y );
|
||||||
|
WRITE_COORD( position.z );
|
||||||
|
MESSAGE_END();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UTIL_Ricochet( const Vector &position, float scale )
|
void UTIL_Ricochet( const Vector &position, float scale )
|
||||||
{
|
{
|
||||||
MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, position );
|
if( mp_serverdistclip.value && mp_servercliptents.value )
|
||||||
WRITE_BYTE( TE_ARMOR_RICOCHET );
|
{
|
||||||
WRITE_COORD( position.x );
|
// loop through all players
|
||||||
WRITE_COORD( position.y );
|
for( int i = 1; i <= gpGlobals->maxClients; i++ )
|
||||||
WRITE_COORD( position.z );
|
{
|
||||||
WRITE_BYTE( (int)( scale * 10 ) );
|
CBaseEntity *pPlayer = UTIL_PlayerByIndex( i );
|
||||||
MESSAGE_END();
|
if( pPlayer )
|
||||||
|
{
|
||||||
|
Vector delta = position - pPlayer->edict()->v.origin;
|
||||||
|
float dist = 0;
|
||||||
|
|
||||||
|
if( abs(delta.x) > dist )
|
||||||
|
dist = abs(delta.x);
|
||||||
|
if( abs(delta.y) > dist )
|
||||||
|
dist = abs(delta.y);
|
||||||
|
if( abs(delta.z) > dist )
|
||||||
|
dist = abs(delta.z);
|
||||||
|
if( dist > mp_maxtentdist.value)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
MESSAGE_BEGIN( MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, NULL, pPlayer->edict() );
|
||||||
|
WRITE_BYTE( TE_ARMOR_RICOCHET );
|
||||||
|
WRITE_COORD( position.x );
|
||||||
|
WRITE_COORD( position.y );
|
||||||
|
WRITE_COORD( position.z );
|
||||||
|
WRITE_BYTE( (int)( scale * 10 ) );
|
||||||
|
MESSAGE_END();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, position );
|
||||||
|
WRITE_BYTE( TE_ARMOR_RICOCHET );
|
||||||
|
WRITE_COORD( position.x );
|
||||||
|
WRITE_COORD( position.y );
|
||||||
|
WRITE_COORD( position.z );
|
||||||
|
WRITE_BYTE( (int)( scale * 10 ) );
|
||||||
|
MESSAGE_END();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL UTIL_TeamsMatch( const char *pTeamName1, const char *pTeamName2 )
|
BOOL UTIL_TeamsMatch( const char *pTeamName1, const char *pTeamName2 )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user