- Standardized use of PClassActor::AllActorClasses for iterating over all classes of actors

instead of PClass::m_Types (now PClass::AllClasses).
- Removed ClassIndex from PClass. It was only needed by FArchive, and maps take care of the
  problem just as well.
- Moved PClass into a larger type system (which is likely to change some/lots once I try and actually use it and have a better feel for what I need from it).

SVN r2281 (scripting)
This commit is contained in:
Randy Heit 2010-04-16 02:57:51 +00:00
commit ee55e0319f
24 changed files with 1200 additions and 346 deletions

View file

@ -1119,9 +1119,9 @@ void FWeaponSlots::AddExtraWeapons()
}
// Append extra weapons to the slots.
for (unsigned int i = 0; i < PClass::m_Types.Size(); ++i)
for (unsigned int i = 0; i < PClassActor::AllActorClasses.Size(); ++i)
{
PClass *cls = PClass::m_Types[i];
PClass *cls = PClassActor::AllActorClasses[i];
if (!cls->IsDescendantOf(RUNTIME_CLASS(AWeapon)))
{
@ -1569,9 +1569,9 @@ void P_SetupWeapons_ntohton()
cls = NULL;
Weapons_ntoh.Push(cls); // Index 0 is always NULL.
for (i = 0; i < PClass::m_Types.Size(); ++i)
for (i = 0; i < PClassActor::AllActorClasses.Size(); ++i)
{
PClass *cls = PClass::m_Types[i];
PClassActor *cls = PClassActor::AllActorClasses[i];
if (cls->IsDescendantOf(RUNTIME_CLASS(AWeapon)))
{