- Ensure that only actor with positive SpawnIDs get added to the SpawnableThings map, so there will

be no conflicts with recently-added named arguments for spawnable things on UDMF maps.
- Change the SpawnableThings array into a map, so there is no longer any particular upper limit on an actor's SpawnID. Also fixes a possible exploit, since an actor's SpawnID was never checked to make sure it was within range.

SVN r3959 (trunk)
This commit is contained in:
Randy Heit 2012-11-09 23:53:58 +00:00
commit 955d929d5e
5 changed files with 37 additions and 27 deletions

View file

@ -141,7 +141,7 @@ void FActorInfo::StaticInit ()
void FActorInfo::StaticSetActorNums ()
{
memset (SpawnableThings, 0, sizeof(SpawnableThings));
SpawnableThings.Clear();
DoomEdMap.Empty ();
for (unsigned int i = 0; i < PClass::m_RuntimeActors.Size(); ++i)
@ -162,7 +162,7 @@ void FActorInfo::RegisterIDs ()
if (GameFilter == GAME_Any || (GameFilter & gameinfo.gametype))
{
if (SpawnID != 0)
if (SpawnID > 0)
{
SpawnableThings[SpawnID] = cls;
if (cls != Class)