- Removed the old meta data system. All meta data is now stored in subclasses of PClass. This

should simplify scripting, since it means that meta fields can be treated (mostly) the same as
  normal fields.

SVN r2242 (scripting)
This commit is contained in:
Randy Heit 2010-03-25 20:38:00 +00:00
commit 604b5ef673
62 changed files with 902 additions and 802 deletions

View file

@ -142,7 +142,7 @@ struct StyleName
static TArray<StyleName> StyleNames;
static TArray<PClassActor *> AmmoNames;
static TArray<PClassAmmo *> AmmoNames;
static TArray<PClassActor *> WeaponNames;
// DeHackEd trickery to support MBF-style parameters
@ -1869,18 +1869,14 @@ static int PatchMisc (int dummy)
player->health = deh.StartHealth;
// Hm... I'm not sure that this is the right way to change this info...
unsigned int index = PClass::FindClass(NAME_DoomPlayer)->Meta.GetMetaInt (ACMETA_DropItems) - 1;
if (index >= 0 && index < DropItemList.Size())
DDropItem *di = PClass::FindActor(NAME_DoomPlayer)->DropItems;
while (di != NULL)
{
FDropItem * di = DropItemList[index];
while (di != NULL)
if (di->Name == NAME_Clip)
{
if (di->Name == NAME_Clip)
{
di->amount = deh.StartBullets;
}
di = di->Next;
di->Amount = deh.StartBullets;
}
di = di->Next;
}
}
@ -2780,12 +2776,12 @@ static bool LoadDehSupp ()
}
else
{
PClass *cls = PClass::FindClass(sc.String);
if (cls == NULL || cls->ParentClass != RUNTIME_CLASS(AAmmo))
PClassAmmo *cls = dyn_cast<PClassAmmo>(PClass::FindClass(sc.String));
if (cls == NULL)
{
sc.ScriptError("Unknown ammo type '%s'", sc.String);
}
AmmoNames.Push(static_cast<PClassActor *>(cls));
AmmoNames.Push(cls);
}
if (sc.CheckString("}")) break;
sc.MustGetStringName(",");