mirror of
https://github.com/yquake2/rogue.git
synced 2024-11-22 20:31:50 +00:00
Merge pull request #97 from BjossiAlfreds/powercubes
Fix coop power cube related bugs
This commit is contained in:
commit
fb2f6bd3b5
2 changed files with 4 additions and 2 deletions
|
@ -2090,7 +2090,7 @@ SpawnItem(edict_t *ent, gitem_t *item)
|
||||||
|
|
||||||
PrecacheItem(item);
|
PrecacheItem(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));
|
ent->spawnflags |= (1 << (8 + level.power_cubes));
|
||||||
level.power_cubes++;
|
level.power_cubes++;
|
||||||
|
|
|
@ -113,13 +113,15 @@ BeginIntermission(edict_t *targ)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* strip players of all keys between units */
|
/* 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)
|
if (itemlist[n].flags & IT_KEY)
|
||||||
{
|
{
|
||||||
client->client->pers.inventory[n] = 0;
|
client->client->pers.inventory[n] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
client->client->pers.power_cubes = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue