engine: client: more accurate R_BeamKill reimplementation
Reverse engineered from HL25 hw.so
This commit is contained in:
parent
85dfaaa2c2
commit
64726f13e1
1 changed files with 16 additions and 4 deletions
|
@ -636,12 +636,24 @@ and all particle trails (if this is a beamfollow)
|
||||||
*/
|
*/
|
||||||
void GAME_EXPORT R_BeamKill( int deadEntity )
|
void GAME_EXPORT R_BeamKill( int deadEntity )
|
||||||
{
|
{
|
||||||
cl_entity_t *pDeadEntity;
|
BEAM *beam;
|
||||||
|
|
||||||
pDeadEntity = R_BeamGetEntity( deadEntity );
|
for( beam = cl_active_beams; beam; beam = beam->next )
|
||||||
if( !pDeadEntity ) return;
|
{
|
||||||
|
if( FBitSet( beam->flags, FBEAM_STARTENTITY ) && beam->startEntity == deadEntity )
|
||||||
|
{
|
||||||
|
if( beam->type != TE_BEAMFOLLOW )
|
||||||
|
beam->die = cl.time;
|
||||||
|
|
||||||
CL_KillDeadBeams( pDeadEntity );
|
ClearBits( beam->flags, FBEAM_STARTENTITY );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( FBitSet( beam->flags, FBEAM_ENDENTITY ) && beam->endEntity == deadEntity )
|
||||||
|
{
|
||||||
|
beam->die = cl.time;
|
||||||
|
ClearBits( beam->flags, FBEAM_ENDENTITY );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue