diff --git a/src/c_cmds.cpp b/src/c_cmds.cpp index 988567995..23e2634dc 100644 --- a/src/c_cmds.cpp +++ b/src/c_cmds.cpp @@ -931,12 +931,12 @@ static bool IsActorAMonster(AActor *mo) static bool IsActorAnItem(AActor *mo) { - return mo->IsKindOf(RUNTIME_CLASS(AInventory)) && mo->flags&MF_SPECIAL; + return mo->IsKindOf(NAME_Inventory) && mo->flags&MF_SPECIAL; } static bool IsActorACountItem(AActor *mo) { - return mo->IsKindOf(RUNTIME_CLASS(AInventory)) && mo->flags&MF_SPECIAL && mo->flags&MF_COUNTITEM; + return mo->IsKindOf(NAME_Inventory) && mo->flags&MF_SPECIAL && mo->flags&MF_COUNTITEM; } // [SP] for all actors diff --git a/src/d_dehacked.cpp b/src/d_dehacked.cpp index 619ccc4a6..5b11431fa 100644 --- a/src/d_dehacked.cpp +++ b/src/d_dehacked.cpp @@ -3065,7 +3065,7 @@ void FinishDehPatch () FStateDefinitions statedef; statedef.MakeStateDefines(type); - if (!type->IsDescendantOf(RUNTIME_CLASS(AInventory))) + if (!type->IsDescendantOf(NAME_Inventory)) { // If this is a hacked non-inventory item we must also copy AInventory's special states statedef.AddStateDefines(RUNTIME_CLASS(AInventory)->GetStateLabels()); diff --git a/src/fragglescript/t_func.cpp b/src/fragglescript/t_func.cpp index ac2fb8dfa..2e6ccc5ee 100644 --- a/src/fragglescript/t_func.cpp +++ b/src/fragglescript/t_func.cpp @@ -3669,7 +3669,7 @@ void FParser::SF_ThingCount(void) again: TThinkerIterator it; - if (t_argc<2 || intvalue(t_argv[1])==0 || pClass->IsDescendantOf(RUNTIME_CLASS(AInventory))) + if (t_argc<2 || intvalue(t_argv[1])==0 || pClass->IsDescendantOf(NAME_Inventory)) { while ((mo=it.Next())) { diff --git a/src/g_inventory/a_keys.cpp b/src/g_inventory/a_keys.cpp index 845131706..0e5e2a8bd 100644 --- a/src/g_inventory/a_keys.cpp +++ b/src/g_inventory/a_keys.cpp @@ -182,7 +182,7 @@ static void AddOneKey(Keygroup *keygroup, PClassActor *mi, FScanner &sc) if (mi) { // Any inventory item can be used to unlock a door - if (mi->IsDescendantOf(RUNTIME_CLASS(AInventory))) + if (mi->IsDescendantOf(NAME_Inventory)) { OneKey k = {mi,1}; keygroup->anykeylist.Push (k); diff --git a/src/g_shared/a_specialspot.cpp b/src/g_shared/a_specialspot.cpp index cdf3742ca..1484e3def 100644 --- a/src/g_shared/a_specialspot.cpp +++ b/src/g_shared/a_specialspot.cpp @@ -455,7 +455,7 @@ DEFINE_ACTION_FUNCTION(ASpecialSpot, A_SpawnSingleItem) { spawned->flags &= ~MF_DROPPED; } - if (spawned->IsKindOf(RUNTIME_CLASS(AInventory))) + if (spawned->IsKindOf(NAME_Inventory)) { static_cast(spawned)->SpawnPointClass = self->GetClass(); } diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index d9976cbeb..ff74017a3 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -584,7 +584,7 @@ void GLSprite::SplitSprite(sector_t * frontsector, bool translucent) void GLSprite::PerformSpriteClipAdjustment(AActor *thing, const DVector2 &thingpos, float spriteheight) { const float NO_VAL = 100000000.0f; - bool clipthing = (thing->player || thing->flags3&MF3_ISMONSTER || thing->IsKindOf(RUNTIME_CLASS(AInventory))) && (thing->flags&MF_ICECORPSE || !(thing->flags&MF_CORPSE)); + bool clipthing = (thing->player || thing->flags3&MF3_ISMONSTER || thing->IsKindOf(NAME_Inventory)) && (thing->flags&MF_ICECORPSE || !(thing->flags&MF_CORPSE)); bool smarterclip = !clipthing && gl_spriteclip == 3; if (clipthing || gl_spriteclip > 1) { diff --git a/src/info.cpp b/src/info.cpp index c02767c44..76eb20ce9 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -346,7 +346,7 @@ static void LoadAltHudStuff() { Printf("Unknown item class '%s' in ALTHUDCF\n", sc.String); } - else if (!ti->IsDescendantOf(RUNTIME_CLASS(AInventory))) + else if (!ti->IsDescendantOf(NAME_Inventory)) { Printf("Invalid item class '%s' in ALTHUDCF\n", sc.String); ti = NULL; diff --git a/src/p_acs.cpp b/src/p_acs.cpp index d0e8f9713..95a9b71db 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -1846,7 +1846,7 @@ static int CheckInventory (AActor *activator, const char *type, bool max) DPrintf (DMSG_ERROR, "ACS: '%s': Unknown actor class.\n", type); return 0; } - else if (!info->IsDescendantOf(RUNTIME_CLASS(AInventory))) + else if (!info->IsDescendantOf(NAME_Inventory)) { DPrintf(DMSG_ERROR, "ACS: '%s' is not an inventory item.\n", type); return 0; @@ -1860,7 +1860,7 @@ static int CheckInventory (AActor *activator, const char *type, bool max) { return item->MaxAmount; } - else if (info != nullptr && info->IsDescendantOf(RUNTIME_CLASS(AInventory))) + else if (info != nullptr && info->IsDescendantOf(NAME_Inventory)) { return ((AInventory *)GetDefaultByType(info))->MaxAmount; } diff --git a/src/p_actionfunctions.cpp b/src/p_actionfunctions.cpp index d8cf5a57e..d36c8f218 100644 --- a/src/p_actionfunctions.cpp +++ b/src/p_actionfunctions.cpp @@ -4062,7 +4062,7 @@ static bool DoRadiusGive(AActor *self, AActor *thing, PClassActor *item, int amo return false; doPass = true; } - else if (((flags & RGF_ITEMS) && thing->IsKindOf(RUNTIME_CLASS(AInventory))) || + else if (((flags & RGF_ITEMS) && thing->IsKindOf(NAME_Inventory)) || ((flags & RGF_CORPSES) && thing->flags & MF_CORPSE) || ((flags & RGF_KILLED) && thing->flags6 & MF6_KILLED)) { diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 058e2e6d7..93182e51c 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -380,7 +380,7 @@ static FStrifeDialogueNode *ReadRetailNode (FileReader &lump, uint32_t &prevSpea for (j = 0; j < 3; ++j) { auto inv = GetStrifeType(speech.ItemCheck[j]); - if (!inv->IsDescendantOf(RUNTIME_CLASS(AInventory))) inv = nullptr; + if (!inv->IsDescendantOf(NAME_Inventory)) inv = nullptr; node->ItemCheck[j].Item = inv; node->ItemCheck[j].Amount = -1; } @@ -526,7 +526,7 @@ static void ParseReplies (FStrifeDialogueReply **replyptr, Response *responses) for (k = 0; k < 3; ++k) { auto inv = GetStrifeType(rsp->Item[k]); - if (!inv->IsDescendantOf(RUNTIME_CLASS(AInventory))) inv = nullptr; + if (!inv->IsDescendantOf(NAME_Inventory)) inv = nullptr; reply->ItemCheck[k].Item = inv; reply->ItemCheck[k].Amount = rsp->Count[k]; } @@ -958,7 +958,7 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply takestuff = true; if (reply->GiveType != NULL) { - if (reply->GiveType->IsDescendantOf(RUNTIME_CLASS(AInventory))) + if (reply->GiveType->IsDescendantOf(NAME_Inventory)) { if (reply->GiveType->IsDescendantOf(NAME_Weapon)) { diff --git a/src/p_map.cpp b/src/p_map.cpp index f9cfdaed6..e50e7e527 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -552,7 +552,7 @@ bool P_TeleportMove(AActor* thing, const DVector3 &pos, bool telefrag, bool modi continue; // Don't let players and monsters block item teleports (all other actor types will still block.) - if (thing->IsKindOf(RUNTIME_CLASS(AInventory)) && !(thing->flags & MF_SOLID) && ((th->flags3 & MF3_ISMONSTER) || th->player != nullptr)) + if (thing->IsKindOf(NAME_Inventory) && !(thing->flags & MF_SOLID) && ((th->flags3 & MF3_ISMONSTER) || th->player != nullptr)) continue; // monsters don't stomp things except on boss level diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 45ef4b2be..7619a5ae6 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -636,7 +636,7 @@ DEFINE_ACTION_FUNCTION(AActor, InStateSequence) bool AActor::IsMapActor() { // [SP] Don't remove owned inventory objects. - return (!IsKindOf(RUNTIME_CLASS(AInventory)) || static_cast(this)->Owner == nullptr); + return (!IsKindOf(NAME_Inventory) || static_cast(this)->Owner == nullptr); } //========================================================================== diff --git a/src/p_usdf.cpp b/src/p_usdf.cpp index 01c091de9..9774371e5 100644 --- a/src/p_usdf.cpp +++ b/src/p_usdf.cpp @@ -78,7 +78,7 @@ class USDFParser : public UDMFParserBase PClassActor *CheckInventoryActorType(const char *key) { PClassActor* const type = CheckActorType(key); - return nullptr != type && type->IsDescendantOf(RUNTIME_CLASS(AInventory)) ? type : nullptr; + return nullptr != type && type->IsDescendantOf(NAME_Inventory) ? type : nullptr; } //=========================================================================== diff --git a/src/polyrenderer/scene/poly_sprite.cpp b/src/polyrenderer/scene/poly_sprite.cpp index 4e1e8f89a..c50d2ed82 100644 --- a/src/polyrenderer/scene/poly_sprite.cpp +++ b/src/polyrenderer/scene/poly_sprite.cpp @@ -225,7 +225,7 @@ double RenderPolySprite::PerformSpriteClipAdjustment(AActor *thing, const DVecto if (!(spriteheight > 0 && spriteclip > 0 && spritetype == RF_FACESPRITE)) return z2; - bool clipthing = (thing->player || thing->flags3&MF3_ISMONSTER || thing->IsKindOf(RUNTIME_CLASS(AInventory))) && (thing->flags&MF_ICECORPSE || !(thing->flags&MF_CORPSE)); + bool clipthing = (thing->player || thing->flags3&MF3_ISMONSTER || thing->IsKindOf(NAME_Inventory)) && (thing->flags&MF_ICECORPSE || !(thing->flags&MF_CORPSE)); bool smarterclip = !clipthing && spriteclip == 3; if (clipthing || spriteclip > 1) {