summaryrefslogtreecommitdiff
path: root/src/cgame/cg_ents.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgame/cg_ents.c')
-rw-r--r--src/cgame/cg_ents.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c
index f2c4d8a0..8f872f31 100644
--- a/src/cgame/cg_ents.c
+++ b/src/cgame/cg_ents.c
@@ -810,19 +810,19 @@ static void CG_Lev2ZapChain( centity_t *cent )
int i;
entityState_t *es;
centity_t *source = NULL, *target = NULL, *attacker = NULL;
- int targets[ LEVEL2_AREAZAP_MAX_TARGETS + 1 ];
+ int targets[ LEVEL2_AREAZAP_MAX_TARGETS ], creator;
es = &cent->currentState;
- BG_UnpackZapTargets( es, targets, LEVEL2_AREAZAP_MAX_TARGETS + 1 );
- attacker = &cg_entities[ targets[ 0 ] ];
+ BG_UnpackZapTargets( es, &creator, targets, LEVEL2_AREAZAP_MAX_TARGETS + 1 );
+ attacker = &cg_entities[ creator ];
- for( i = 1; i < LEVEL2_AREAZAP_MAX_TARGETS + 1; i++ )
+ for( i = 0; i < LEVEL2_AREAZAP_MAX_TARGETS; i++ )
{
- if( i == 1 )
+ if( i == 0 )
source = attacker;
else
- source = &cg_entities[ targets[ 1 ] ];
+ source = &cg_entities[ targets[ 0 ] ];
if( targets[ i ] == ENTITYNUM_NONE )
continue;