mirror of
https://github.com/FWGS/hlsdk-xash3d
synced 2025-01-18 16:00:35 +01:00
Fix bullet impact sounds and interpolation artifacts.
This commit is contained in:
parent
b91043602e
commit
28112bab77
@ -99,6 +99,7 @@ float EV_HLDM_PlayTextureSound( int idx, pmtrace_t *ptr, float *vecSrc, float *v
|
||||
int cnt;
|
||||
float fattn = ATTN_NORM;
|
||||
int entity;
|
||||
cl_entity_t *ent;
|
||||
char *pTextureName;
|
||||
char texname[64];
|
||||
char szbuffer[64];
|
||||
@ -110,7 +111,8 @@ float EV_HLDM_PlayTextureSound( int idx, pmtrace_t *ptr, float *vecSrc, float *v
|
||||
chTextureType = 0;
|
||||
|
||||
// Player
|
||||
if( entity >= 1 && entity <= gEngfuncs.GetMaxClients() )
|
||||
if( entity >= 1 && entity <= gEngfuncs.GetMaxClients()
|
||||
|| ( ( ent = gEngfuncs.GetEntityByIndex( entity )) && ( ent->curstate.eflags & EFLAG_MONSTER )))
|
||||
{
|
||||
// hit body
|
||||
chTextureType = CHAR_TEX_FLESH;
|
||||
|
@ -127,7 +127,8 @@
|
||||
|
||||
// entity flags
|
||||
#define EFLAG_SLERP 1 // do studio interpolation of this entity
|
||||
|
||||
#define EFLAG_MONSTER 2
|
||||
|
||||
//
|
||||
// temp entity events
|
||||
//
|
||||
|
@ -1123,6 +1123,7 @@ we could also use the pas/ pvs that we set in SetupVisibility, if we wanted to.
|
||||
int AddToFullPack( struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet )
|
||||
{
|
||||
int i;
|
||||
CBaseEntity *Entity;
|
||||
|
||||
// don't send if flagged for NODRAW and it's not the host getting the message
|
||||
if( ( ent->v.effects & EF_NODRAW ) && ( ent != host ) )
|
||||
@ -1308,6 +1309,17 @@ int AddToFullPack( struct entity_state_s *state, int e, edict_t *ent, edict_t *h
|
||||
state->health = (int)ent->v.health;
|
||||
}
|
||||
|
||||
if( ( Entity = CBaseEntity::Instance( ent ))
|
||||
&& Entity->Classify() != CLASS_NONE
|
||||
&& Entity->Classify() != CLASS_MACHINE )
|
||||
{
|
||||
SetBits( state->eflags, EFLAG_MONSTER );
|
||||
}
|
||||
else
|
||||
{
|
||||
ClearBits( state->eflags, EFLAG_SLERP | EFLAG_MONSTER );
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user