From 4e9d691715ccf40c73f396baba194a2438c1017c Mon Sep 17 00:00:00 2001 From: Petr Mikheev Date: Tue, 12 Oct 2021 21:25:34 +0200 Subject: [PATCH] Add comment for MWWorld::Ptr::getType() because it is not obvious. --- apps/openmw/mwworld/ptr.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/openmw/mwworld/ptr.hpp b/apps/openmw/mwworld/ptr.hpp index 6813b7d124..3474f0c79d 100644 --- a/apps/openmw/mwworld/ptr.hpp +++ b/apps/openmw/mwworld/ptr.hpp @@ -35,6 +35,11 @@ namespace MWWorld return mRef == nullptr; } + // Returns a 32-bit id of the ESM record this object is based on. + // Specific values of ids are defined in ESM::RecNameInts. + // Note 1: ids are not sequential. E.g. for a creature `getType` returns 0x41455243. + // Note 2: Life is not easy and full of surprises. For example + // prison marker reuses ESM::Door record. Player is ESM::NPC. unsigned int getType() const; std::string getTypeDescription() const