From 47fd44d7bb4acd32854e4f6fdbdef04692ff728f Mon Sep 17 00:00:00 2001 From: Roman Tetelman Date: Sat, 3 Oct 2009 12:41:13 +0000 Subject: * make zap damage instant --- src/cgame/cg_ents.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/cgame') 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 = ¢->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; -- cgit