Fix coop power cube related bugs

This commit is contained in:
BjossiAlfreds 2022-09-24 13:54:59 +00:00
parent e29d37956a
commit 37db07410f
2 changed files with 4 additions and 2 deletions

View file

@ -1638,7 +1638,7 @@ SpawnItem(edict_t *ent, gitem_t *item)
}
}
if (coop->value && (strcmp(ent->classname, "key_power_cube") == 0))
if (coop->value && !(ent->spawnflags & ITEM_NO_TOUCH) && (strcmp(ent->classname, "key_power_cube") == 0))
{
ent->spawnflags |= (1 << (8 + level.power_cubes));
level.power_cubes++;

View file

@ -132,13 +132,15 @@ BeginIntermission(edict_t *targ)
}
/* strip players of all keys between units */
for (n = 0; n < MAX_ITEMS; n++)
for (n = 0; n < game.num_items; n++)
{
if (itemlist[n].flags & IT_KEY)
{
client->client->pers.inventory[n] = 0;
}
}
client->client->pers.power_cubes = 0;
}
}
}