diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_misc.c | 56 | ||||
-rw-r--r-- | src/game/bg_pmove.c | 40 | ||||
-rw-r--r-- | src/game/bg_public.h | 4 | ||||
-rw-r--r-- | src/game/g_active.c | 22 | ||||
-rw-r--r-- | src/game/g_client.c | 7 | ||||
-rw-r--r-- | src/game/g_cmds.c | 14 | ||||
-rw-r--r-- | src/game/g_combat.c | 4 | ||||
-rw-r--r-- | src/game/g_main.c | 2 | ||||
-rw-r--r-- | src/game/g_misc.c | 6 | ||||
-rw-r--r-- | src/game/g_mover.c | 4 | ||||
-rw-r--r-- | src/game/g_team.c | 4 | ||||
-rw-r--r-- | src/game/g_trigger.c | 19 | ||||
-rw-r--r-- | src/game/g_weapon.c | 8 |
13 files changed, 61 insertions, 129 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 8286b51d..2319f31f 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -4785,8 +4785,8 @@ void BG_PlayerStateToEntityState( playerState_t *ps, entityState_t *s, qboolean } } - // use powerups field to store team/class info: - s->powerups = ps->stats[ STAT_PTEAM ] | ( ps->stats[ STAT_PCLASS ] << 8 ); + // use misc field to store team/class info: + s->misc = ps->stats[ STAT_PTEAM ] | ( ps->stats[ STAT_PCLASS ] << 8 ); // have to get the surfNormal through somehow... VectorCopy( ps->grapplePoint, s->angles2 ); @@ -4895,8 +4895,8 @@ void BG_PlayerStateToEntityStateExtraPolate( playerState_t *ps, entityState_t *s } } - // use powerups field to store team/class info: - s->powerups = ps->stats[ STAT_PTEAM ] | ( ps->stats[ STAT_PCLASS ] << 8 ); + // use misc field to store team/class info: + s->misc = ps->stats[ STAT_PTEAM ] | ( ps->stats[ STAT_PCLASS ] << 8 ); // have to get the surfNormal through somehow... VectorCopy( ps->grapplePoint, s->angles2 ); @@ -4914,62 +4914,16 @@ void BG_PlayerStateToEntityStateExtraPolate( playerState_t *ps, entityState_t *s /* ======================== -BG_UnpackAmmoArray - -Extract the ammo quantity from the array -======================== -*/ -void BG_UnpackAmmoArray( int weapon, int psAmmo[ ], int psAmmo2[ ], int *ammo, int *clips ) -{ - int ammoarray[ 32 ]; - int i; - - for( i = 0; i <= 15; i++ ) - ammoarray[ i ] = psAmmo[ i ]; - - for( i = 16; i <= 31; i++ ) - ammoarray[ i ] = psAmmo2[ i - 16 ]; - - if( ammo != NULL ) - *ammo = ammoarray[ weapon ] & 0x0FFF; - - if( clips != NULL ) - *clips = ( ammoarray[ weapon ] >> 12 ) & 0x0F; -} - -/* -======================== -BG_PackAmmoArray - -Pack the ammo quantity into the array -======================== -*/ -void BG_PackAmmoArray( int weapon, int psAmmo[ ], int psAmmo2[ ], int ammo, int clips ) -{ - int weaponvalue; - - weaponvalue = ammo | ( clips << 12 ); - - if( weapon <= 15 ) - psAmmo[ weapon ] = weaponvalue; - else if( weapon >= 16 ) - psAmmo2[ weapon - 16 ] = weaponvalue; -} - -/* -======================== BG_WeaponIsFull Check if a weapon has full ammo ======================== */ -qboolean BG_WeaponIsFull( weapon_t weapon, int stats[ ], int psAmmo[ ], int psAmmo2[ ] ) +qboolean BG_WeaponIsFull( weapon_t weapon, int stats[ ], int ammo, int clips ) { int maxAmmo, maxClips; - int ammo, clips; BG_FindAmmoForWeapon( weapon, &maxAmmo, &maxClips ); - BG_UnpackAmmoArray( weapon, psAmmo, psAmmo2, &ammo, &clips ); if( BG_InventoryContainsUpgrade( UP_BATTPACK, stats ) ) maxAmmo = (int)( (float)maxAmmo * BATTPACK_MODIFIER ); diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index a3f05b74..ae9e3073 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -2670,7 +2670,7 @@ Generates weapon events and modifes the weapon counter static void PM_Weapon( void ) { int addTime = 200; //default addTime - should never be used - int ammo, clips, maxClips; + int maxClips; qboolean attack1 = qfalse; qboolean attack2 = qfalse; qboolean attack3 = qfalse; @@ -2768,11 +2768,10 @@ static void PM_Weapon( void ) // start the animation even if out of ammo - BG_UnpackAmmoArray( pm->ps->weapon, pm->ps->ammo, pm->ps->powerups, &ammo, &clips ); BG_FindAmmoForWeapon( pm->ps->weapon, NULL, &maxClips ); // check for out of ammo - if( !ammo && !clips && !BG_FindInfinteAmmoForWeapon( pm->ps->weapon ) ) + if( !pm->ps->ammo && !pm->ps->clips && !BG_FindInfinteAmmoForWeapon( pm->ps->weapon ) ) { PM_AddEvent( EV_NOAMMO ); pm->ps->weaponTime += 200; @@ -2788,15 +2787,13 @@ static void PM_Weapon( void ) { if( maxClips > 0 ) { - clips--; - BG_FindAmmoForWeapon( pm->ps->weapon, &ammo, NULL ); + pm->ps->clips--; + BG_FindAmmoForWeapon( pm->ps->weapon, &pm->ps->ammo, NULL ); } if( BG_FindUsesEnergyForWeapon( pm->ps->weapon ) && BG_InventoryContainsUpgrade( UP_BATTPACK, pm->ps->stats ) ) - ammo = (int)( (float)ammo * BATTPACK_MODIFIER ); - - BG_PackAmmoArray( pm->ps->weapon, pm->ps->ammo, pm->ps->powerups, ammo, clips ); + pm->ps->ammo = (int)( (float)pm->ps->ammo * BATTPACK_MODIFIER ); //allow some time for the weapon to be raised pm->ps->weaponstate = WEAPON_RAISING; @@ -2806,7 +2803,7 @@ static void PM_Weapon( void ) } // check for end of clip - if( ( !ammo || pm->ps->pm_flags & PMF_WEAPON_RELOAD ) && clips ) + if( ( !pm->ps->ammo || pm->ps->pm_flags & PMF_WEAPON_RELOAD ) && pm->ps->clips ) { pm->ps->pm_flags &= ~PMF_WEAPON_RELOAD; @@ -2925,7 +2922,7 @@ static void PM_Weapon( void ) if( BG_WeaponHasThirdMode( pm->ps->weapon ) ) { //hacky special case for slowblob - if( pm->ps->weapon == WP_ALEVEL3_UPG && !ammo ) + if( pm->ps->weapon == WP_ALEVEL3_UPG && !pm->ps->ammo ) { PM_AddEvent( EV_NOAMMO ); pm->ps->weaponTime += 200; @@ -3047,22 +3044,19 @@ static void PM_Weapon( void ) //special case for lcannon if( pm->ps->weapon == WP_LUCIFER_CANNON && attack1 && !attack2 ) { - ammo -= (int)( ceil( ( (float)pm->ps->stats[ STAT_MISC ] / (float)LCANNON_TOTAL_CHARGE ) * 10.0f ) ); + pm->ps->ammo -= (int)( ceil( ( (float)pm->ps->stats[ STAT_MISC ] / (float)LCANNON_TOTAL_CHARGE ) * 10.0f ) ); //stay on the safe side - if( ammo < 0 ) - ammo = 0; + if( pm->ps->ammo < 0 ) + pm->ps->ammo = 0; } else - ammo--; - - BG_PackAmmoArray( pm->ps->weapon, pm->ps->ammo, pm->ps->powerups, ammo, clips ); + pm->ps->ammo--; } else if( pm->ps->weapon == WP_ALEVEL3_UPG && attack3 ) { //special case for slowblob - ammo--; - BG_PackAmmoArray( pm->ps->weapon, pm->ps->ammo, pm->ps->powerups, ammo, clips ); + pm->ps->ammo--; } //FIXME: predicted angles miss a problem?? @@ -3264,12 +3258,8 @@ void trap_SnapVector( float *v ); void PmoveSingle( pmove_t *pmove ) { - int ammo, clips; - pm = pmove; - BG_UnpackAmmoArray( pm->ps->weapon, pm->ps->ammo, pm->ps->powerups, &ammo, &clips ); - // this counter lets us debug movement problems with a journal // by setting a conditional breakpoint fot the previous frame c_pmove++; @@ -3296,7 +3286,7 @@ void PmoveSingle( pmove_t *pmove ) // set the firing flag for continuous beam weapons if( !(pm->ps->pm_flags & PMF_RESPAWNED) && pm->ps->pm_type != PM_INTERMISSION && ( pm->cmd.buttons & BUTTON_ATTACK ) && - ( ( ammo > 0 || clips > 0 ) || BG_FindInfinteAmmoForWeapon( pm->ps->weapon ) ) ) + ( ( pm->ps->ammo > 0 || pm->ps->clips > 0 ) || BG_FindInfinteAmmoForWeapon( pm->ps->weapon ) ) ) pm->ps->eFlags |= EF_FIRING; else pm->ps->eFlags &= ~EF_FIRING; @@ -3304,7 +3294,7 @@ void PmoveSingle( pmove_t *pmove ) // set the firing flag for continuous beam weapons if( !(pm->ps->pm_flags & PMF_RESPAWNED) && pm->ps->pm_type != PM_INTERMISSION && ( pm->cmd.buttons & BUTTON_ATTACK2 ) && - ( ( ammo > 0 || clips > 0 ) || BG_FindInfinteAmmoForWeapon( pm->ps->weapon ) ) ) + ( ( pm->ps->ammo > 0 || pm->ps->clips > 0 ) || BG_FindInfinteAmmoForWeapon( pm->ps->weapon ) ) ) pm->ps->eFlags |= EF_FIRING2; else pm->ps->eFlags &= ~EF_FIRING2; @@ -3312,7 +3302,7 @@ void PmoveSingle( pmove_t *pmove ) // set the firing flag for continuous beam weapons if( !(pm->ps->pm_flags & PMF_RESPAWNED) && pm->ps->pm_type != PM_INTERMISSION && ( pm->cmd.buttons & BUTTON_USE_HOLDABLE ) && - ( ( ammo > 0 || clips > 0 ) || BG_FindInfinteAmmoForWeapon( pm->ps->weapon ) ) ) + ( ( pm->ps->ammo > 0 || pm->ps->clips > 0 ) || BG_FindInfinteAmmoForWeapon( pm->ps->weapon ) ) ) pm->ps->eFlags |= EF_FIRING3; else pm->ps->eFlags &= ~EF_FIRING3; diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 038dd86a..36e6a0aa 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -1098,9 +1098,7 @@ typedef struct WUTeam_t team; } upgradeAttributes_t; -void BG_UnpackAmmoArray( int weapon, int psAmmo[ ], int psAmmo2[ ], int *ammo, int *clips ); -void BG_PackAmmoArray( int weapon, int psAmmo[ ], int psAmmo2[ ], int ammo, int clips ); -qboolean BG_WeaponIsFull( weapon_t weapon, int stats[ ], int psAmmo[ ], int psAmmo2[ ] ); +qboolean BG_WeaponIsFull( weapon_t weapon, int stats[ ], int ammo, int clips ); void BG_AddWeaponToInventory( int weapon, int stats[ ] ); void BG_RemoveWeaponFromInventory( int weapon, int stats[ ] ); qboolean BG_InventoryContainsWeapon( int weapon, int stats[ ] ); diff --git a/src/game/g_active.c b/src/game/g_active.c index d8d7a3d8..ce60daff 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -648,18 +648,14 @@ void ClientTimerActions( gentity_t *ent, int msec ) //client is charging up an lcannon if( client->ps.weapon == WP_LUCIFER_CANNON ) { - int ammo; - - BG_UnpackAmmoArray( WP_LUCIFER_CANNON, client->ps.ammo, client->ps.powerups, &ammo, NULL ); - if( client->ps.stats[ STAT_MISC ] < LCANNON_TOTAL_CHARGE && ucmd->buttons & BUTTON_ATTACK ) client->ps.stats[ STAT_MISC ] += ( 100.0f / LCANNON_CHARGE_TIME ) * LCANNON_TOTAL_CHARGE; if( client->ps.stats[ STAT_MISC ] > LCANNON_TOTAL_CHARGE ) client->ps.stats[ STAT_MISC ] = LCANNON_TOTAL_CHARGE; - if( client->ps.stats[ STAT_MISC ] > ( ammo * LCANNON_TOTAL_CHARGE ) / 10 ) - client->ps.stats[ STAT_MISC ] = ammo * LCANNON_TOTAL_CHARGE / 10; + if( client->ps.stats[ STAT_MISC ] > ( client->ps.ammo * LCANNON_TOTAL_CHARGE ) / 10 ) + client->ps.stats[ STAT_MISC ] = client->ps.ammo * LCANNON_TOTAL_CHARGE / 10; } switch( client->ps.weapon ) @@ -802,8 +798,8 @@ void ClientTimerActions( gentity_t *ent, int msec ) if( ent->health > client->ps.stats[ STAT_MAX_HEALTH ] ) ent->health = client->ps.stats[ STAT_MAX_HEALTH ]; } - - // turn off life support when a team admits defeat + + // turn off life support when a team admits defeat if( client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS && level.surrenderTeam == PTE_ALIENS ) { @@ -824,16 +820,12 @@ void ClientTimerActions( gentity_t *ent, int msec ) if( client->ps.weapon == WP_ALEVEL3_UPG ) { - int ammo, maxAmmo; + int maxAmmo; BG_FindAmmoForWeapon( WP_ALEVEL3_UPG, &maxAmmo, NULL ); - BG_UnpackAmmoArray( WP_ALEVEL3_UPG, client->ps.ammo, client->ps.powerups, &ammo, NULL ); - if( ammo < maxAmmo ) - { - ammo++; - BG_PackAmmoArray( WP_ALEVEL3_UPG, client->ps.ammo, client->ps.powerups, ammo, 0 ); - } + if( client->ps.ammo < maxAmmo ) + client->ps.ammo++; } } } diff --git a/src/game/g_client.c b/src/game/g_client.c index 27dcb0fc..bed2fefd 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -582,7 +582,7 @@ void BodySink( gentity_t *ent ) ent->active = qtrue; //sinking bodies can't be infested - ent->killedBy = ent->s.powerups = MAX_CLIENTS; + ent->killedBy = ent->s.misc = MAX_CLIENTS; ent->timestamp = level.time; } @@ -656,7 +656,7 @@ void SpawnCorpse( gentity_t *ent ) else body->classname = "alienCorpse"; - body->s.powerups = MAX_CLIENTS; + body->s.misc = MAX_CLIENTS; body->think = BodySink; body->nextthink = level.time + 20000; @@ -1493,7 +1493,8 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles BG_FindAmmoForWeapon( weapon, &maxAmmo, &maxClips ); BG_AddWeaponToInventory( weapon, client->ps.stats ); - BG_PackAmmoArray( weapon, client->ps.ammo, client->ps.powerups, maxAmmo, maxClips ); + client->ps.ammo = maxAmmo; + client->ps.clips = maxClips; ent->client->ps.stats[ STAT_PCLASS ] = ent->client->pers.classSelection; ent->client->ps.stats[ STAT_PTEAM ] = ent->client->pers.teamSelection; diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index fc5a95af..f1525f3f 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -52,7 +52,7 @@ void G_SanitiseName( char *in, char *out ) spaces = 0; skip = qfalse; } - + if( *in == 27 || *in == '^' ) { in += 2; // skip color code @@ -67,7 +67,7 @@ void G_SanitiseName( char *in, char *out ) *out++ = tolower( *in++ ); } - out -= spaces; + out -= spaces; *out = 0; } @@ -380,7 +380,8 @@ void Cmd_Give_f( gentity_t *ent ) BG_InventoryContainsUpgrade( UP_BATTPACK, client->ps.stats ) ) maxAmmo = (int)( (float)maxAmmo * BATTPACK_MODIFIER ); - BG_PackAmmoArray( client->ps.weapon, client->ps.ammo, client->ps.powerups, maxAmmo, maxClips ); + client->ps.ammo = maxAmmo; + client->ps.clips = maxClips; } } @@ -2052,8 +2053,8 @@ void Cmd_Buy_f( gentity_t *ent ) BG_InventoryContainsUpgrade( UP_BATTPACK, ent->client->ps.stats ) ) maxAmmo = (int)( (float)maxAmmo * BATTPACK_MODIFIER ); - BG_PackAmmoArray( weapon, ent->client->ps.ammo, ent->client->ps.powerups, - maxAmmo, maxClips ); + ent->client->ps.ammo = maxAmmo; + ent->client->ps.clips = maxClips; G_ForceWeaponChange( ent, weapon ); @@ -2305,7 +2306,8 @@ void Cmd_Sell_f( gentity_t *ent ) BG_FindUsesEnergyForWeapon( j ) && !BG_FindInfinteAmmoForWeapon( j ) ) { - BG_PackAmmoArray( j, ent->client->ps.ammo, ent->client->ps.powerups, 0, 0 ); + ent->client->ps.ammo = 0; + ent->client->ps.clips = 0; } } } diff --git a/src/game/g_combat.c b/src/game/g_combat.c index e4c5d143..5f889b0e 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -394,8 +394,8 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int // g_forcerespawn may force spawning at some later time self->client->respawnTime = level.time + 1700; - // remove powerups - memset( self->client->ps.powerups, 0, sizeof( self->client->ps.powerups ) ); + // clear misc + memset( self->client->ps.misc, 0, sizeof( self->client->ps.misc ) ); { // normal death diff --git a/src/game/g_main.c b/src/game/g_main.c index 84209315..dd258c13 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -1421,7 +1421,7 @@ void MoveClientToIntermission( gentity_t *ent ) ent->client->ps.pm_type = PM_INTERMISSION; // clean up powerup info - memset( ent->client->ps.powerups, 0, sizeof( ent->client->ps.powerups ) ); + memset( ent->client->ps.misc, 0, sizeof( ent->client->ps.misc ) ); ent->client->ps.eFlags = 0; ent->s.eFlags = 0; diff --git a/src/game/g_misc.c b/src/game/g_misc.c index 5352dbe3..5c551104 100644 --- a/src/game/g_misc.c +++ b/src/game/g_misc.c @@ -163,10 +163,10 @@ void locateCamera( gentity_t *ent ) if( owner->spawnflags & 4 ) { // set to 0 for no rotation at all - ent->s.powerups = 0; + ent->s.misc = 0; } else - ent->s.powerups = 1; + ent->s.misc = 1; // clientNum holds the rotate offset ent->s.clientNum = owner->s.clientNum; @@ -327,7 +327,7 @@ Spawn function for anim model */ void SP_misc_anim_model( gentity_t *self ) { - self->s.powerups = (int)self->animation[ 0 ]; + self->s.misc = (int)self->animation[ 0 ]; self->s.weapon = (int)self->animation[ 1 ]; self->s.torsoAnim = (int)self->animation[ 2 ]; self->s.legsAnim = (int)self->animation[ 3 ]; diff --git a/src/game/g_mover.c b/src/game/g_mover.c index 2eda08b7..856f8cd5 100644 --- a/src/game/g_mover.c +++ b/src/game/g_mover.c @@ -1707,8 +1707,8 @@ void SP_func_door_model( gentity_t *ent ) ent->s.apos.trDuration = 0; VectorClear( ent->s.apos.trDelta ); - ent->s.powerups = (int)ent->animation[ 0 ]; //first frame - ent->s.weapon = abs( (int)ent->animation[ 1 ] ); //number of frames + ent->s.misc = (int)ent->animation[ 0 ]; //first frame + ent->s.weapon = abs( (int)ent->animation[ 1 ] ); //number of frames //must be at least one frame -- mapper has forgotten animation key if( ent->s.weapon == 0 ) diff --git a/src/game/g_team.c b/src/game/g_team.c index 881ed35a..f2293922 100644 --- a/src/game/g_team.c +++ b/src/game/g_team.c @@ -145,7 +145,7 @@ static int QDECL SortClients( const void *a, const void *b ) TeamplayLocationsMessage Format: - clientNum location health armor weapon powerups + clientNum location health armor weapon misc ================== */ @@ -198,7 +198,7 @@ void TeamplayInfoMessage( gentity_t *ent ) " %i %i %i %i %i %i", // level.sortedClients[i], player->client->pers.teamState.location, h, a, i, player->client->pers.teamState.location, h, a, - player->client->ps.weapon, player->s.powerups ); + player->client->ps.weapon, player->s.misc ); j = strlen( entry ); diff --git a/src/game/g_trigger.c b/src/game/g_trigger.c index 2b5b25af..18af97c0 100644 --- a/src/game/g_trigger.c +++ b/src/game/g_trigger.c @@ -1073,7 +1073,7 @@ trigger_ammo_touch */ void trigger_ammo_touch( gentity_t *self, gentity_t *other, trace_t *trace ) { - int ammo, clips, maxClips, maxAmmo; + int maxClips, maxAmmo; if( !other->client ) return; @@ -1099,24 +1099,19 @@ void trigger_ammo_touch( gentity_t *self, gentity_t *other, trace_t *trace ) self->timestamp = level.time + FRAMETIME; BG_FindAmmoForWeapon( other->client->ps.weapon, &maxAmmo, &maxClips ); - BG_UnpackAmmoArray( other->client->ps.weapon, other->client->ps.ammo, other->client->ps.powerups, - &ammo, &clips ); - if( ( ammo + self->damage ) > maxAmmo ) + if( ( other->client->ps.ammo + self->damage ) > maxAmmo ) { - if( clips < maxClips ) + if( other->client->ps.clips < maxClips ) { - clips++; - ammo = 1; + other->client->ps.clips++; + other->client->ps.ammo = 1; } else - ammo = maxAmmo; + other->client->ps.ammo = maxAmmo; } else - ammo += self->damage; - - BG_PackAmmoArray( other->client->ps.weapon, other->client->ps.ammo, other->client->ps.powerups, - ammo, clips ); + other->client->ps.ammo += self->damage; } /* diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index f1d23e8a..9d015e8b 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -93,7 +93,7 @@ void G_GiveClientMaxAmmo( gentity_t *ent, qboolean buyingEnergyAmmo ) if( BG_InventoryContainsWeapon( i, ent->client->ps.stats ) && weaponType && !BG_FindInfinteAmmoForWeapon( i ) && !BG_WeaponIsFull( i, ent->client->ps.stats, - ent->client->ps.ammo, ent->client->ps.powerups ) ) + ent->client->ps.ammo, ent->client->ps.clips ) ) { BG_FindAmmoForWeapon( i, &maxAmmo, &maxClips ); @@ -105,8 +105,8 @@ void G_GiveClientMaxAmmo( gentity_t *ent, qboolean buyingEnergyAmmo ) maxAmmo = (int)( (float)maxAmmo * BATTPACK_MODIFIER ); } - BG_PackAmmoArray( i, ent->client->ps.ammo, ent->client->ps.powerups, - maxAmmo, maxClips ); + ent->client->ps.ammo = maxAmmo; + ent->client->ps.clips = maxClips; restoredAmmo = qtrue; } @@ -1090,7 +1090,7 @@ static void G_UpdateZapEffect( zap_t *zap ) effect->s.eType = ET_LEV2_ZAP_CHAIN; effect->classname = "lev2zapchain"; G_SetOrigin( effect, zap->creator->s.origin ); - effect->s.powerups = zap->creator->s.number; + effect->s.misc = zap->creator->s.number; effect->s.time = effect->s.time2 = effect->s.constantLight = -1; |