Skip to content

Commit 8cea39d

Browse files
ernieRippeR37
authored andcommitted
Fix lightning initial firing loop
1 parent 8fccb38 commit 8cea39d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

code/cgame/cg_weapons.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2475,6 +2475,11 @@ void CG_FireWeapon( centity_t *cent ) {
24752475
}
24762476
weap = &cg_weapons[ ent->weapon ];
24772477

2478+
if ( ent->number >= 0 && ent->number < MAX_CLIENTS && cent != &cg.predictedPlayerEntity ) {
2479+
// point from external event to client entity
2480+
cent = &cg_entities[ ent->number ];
2481+
}
2482+
24782483
// mark the entity as muzzle flashing, so when it is added it will
24792484
// append the flash to the weapon model
24802485
cent->muzzleFlashTime = cg.time;

0 commit comments

Comments
 (0)