Skip to content

Commit

Permalink
fix powerups spawning with g_elimination_items
Browse files Browse the repository at this point in the history
  • Loading branch information
Bishop-333 committed Nov 23, 2024
1 parent 28de474 commit 5a0b617
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions omega_gamecode/code/game/g_items.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ free fall from their spawn points
void FinishSpawningItem( gentity_t *ent ) {
trace_t tr;
vec3_t dest;
qboolean isEliminationMode = (g_gametype.integer == GT_ELIMINATION || g_gametype.integer == GT_CTF_ELIMINATION || g_elimination_allgametypes.integer);

VectorSet( ent->r.mins, -ITEM_RADIUS, -ITEM_RADIUS, -ITEM_RADIUS );
VectorSet( ent->r.maxs, ITEM_RADIUS, ITEM_RADIUS, ITEM_RADIUS );
Expand Down Expand Up @@ -745,18 +746,17 @@ void FinishSpawningItem( gentity_t *ent ) {


// powerups don't spawn in for a while (but not in elimination)
if(g_gametype.integer != GT_ELIMINATION && g_gametype.integer != GT_CTF_ELIMINATION && g_gametype.integer != GT_LMS
&& !g_instantgib.integer && !g_elimination_allgametypes.integer && !g_rockets.integer && !g_weaponArena.integer )
if ( ent->item->giType == IT_POWERUP ) {
float respawn;

respawn = 45 + crandom() * 15;
ent->s.eFlags |= EF_NODRAW;
ent->r.contents = 0;
ent->nextthink = level.time + respawn * 1000;
ent->think = RespawnItem;
return;
}
if ( ( (isEliminationMode && g_elimination_items.integer) || !isEliminationMode) && g_gametype.integer != GT_LMS && !g_instantgib.integer && !g_rockets.integer && !g_weaponArena.integer )
if ( ent->item->giType == IT_POWERUP ) {
float respawn;

respawn = 45 + crandom() * 15;
ent->s.eFlags |= EF_NODRAW;
ent->r.contents = 0;
ent->nextthink = level.time + respawn * 1000;
ent->think = RespawnItem;
return;
}


trap_LinkEntity (ent);
Expand Down

0 comments on commit 5a0b617

Please sign in to comment.