Heretic hack to guarantee one mace spawn per map.
This commit is contained in:
parent
a9b69e37f0
commit
3948454866
3 changed files with 22 additions and 2 deletions
|
|
@ -553,6 +553,24 @@ Class SWWMLevelCompatibility : LevelPostProcessor
|
|||
level.ReplaceTextures("SW1TEK","-noflat-",0);
|
||||
break;
|
||||
}
|
||||
// [Heretic] override mace spawner behavior to always guarantee
|
||||
// one spawn per map
|
||||
if ( gameinfo.gametype&GAME_Heretic )
|
||||
{
|
||||
Array<uint> Maces;
|
||||
Maces.Clear();
|
||||
for ( uint i=0; i<GetThingCount(); i++ )
|
||||
{
|
||||
if ( GetThingEdNum(i) != 2002 ) continue;
|
||||
Maces.Push(i);
|
||||
}
|
||||
int chosen = Random[Replacements](0,Maces.Size()-1);
|
||||
for ( int i=0; i<Maces.Size(); i++ )
|
||||
{
|
||||
if ( i == chosen ) SetThingEdNum(Maces[i],4206999);
|
||||
else SetThingEdNum(Maces[i],0);
|
||||
}
|
||||
}
|
||||
// [Hexen] force Mystic Ambit Incants to spawn outside coop
|
||||
if ( gameinfo.gametype&GAME_Hexen )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue