2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 01:45:19 +01:00

engine: client: don't kill entity's beams if this entity number was never used on client

Fixes issue when beam was sent over to client before it's start point entity
(due to PVS, for example)
This commit is contained in:
Alibek Omarov 2024-11-15 07:42:33 +03:00
parent 823dc3d46f
commit 190e4a5e8a
2 changed files with 14 additions and 2 deletions

View File

@ -806,7 +806,13 @@ static void CL_DeltaEntity( sizebuf_t *msg, frame_t *frame, int newnum, entity_s
SETVISBIT( frame->flags, pack );
// release beams from previous entity
CL_KillDeadBeams( ent );
// a1ba: check that this entity number was never used on client
// as beams can be transferred before this entity was sent to client
// (for example, beam was sent over during beam entity spawn
// but referenced start point entity hasn't been sent over due to PVS)
if( ent->curstate.messagenum != 0 )
CL_KillDeadBeams( ent );
}
// add entity to packet

View File

@ -241,7 +241,13 @@ static void CL_DeltaEntityGS( const delta_header_t *hdr, sizebuf_t *msg, frame_t
SETVISBIT( frame->flags, pack );
// release beams from previous entity
CL_KillDeadBeams( ent );
// a1ba: check that this entity number was never used on client
// as beams can be transferred before this entity was sent to client
// (for example, beam was sent over during beam entity spawn
// but referenced start point entity hasn't been sent over due to PVS)
if( ent->curstate.messagenum != 0 )
CL_KillDeadBeams( ent );
}
// add entity to packet