Mobj

A mobj, short for map object, is a type of thinker that roughly corresponds to things: players, monsters, items, obstacles and decorations, map spots such as teleport destinations or boss shooter destinations, and so on, are all mab objects. Mobjs are also frequently called actors. Code comments present them as such: // MapObj data. Map Objects or mobjs are actors, entities, // thinker, take-your-pick... anything that moves, acts, or // suffers state changes of more or less violent nature.

In the source code, mobjs are represented by the mobjtype_t enum and the mobj_t and mobjinfo_t structures. The order in which the mobj types are declared in the info.h and info.c files corresponds to their DeHackEd number, and most dehacked changes consist in altering the values of the mobjinfos' properties. The mobjinfo corresponds to the "class" of a mobj (for example, imp) whereas the mobj corresponds to a particular "instance" of the class (for example, the imp that waits in the exit room of E1M1). The mobjinfo_t structure determines how many hit points does a mobj starts with, which states does it use, what its flags are, what sounds it makes, what is its reaction time, its movement speed, and so on. The mobj_t structure stores its current position and momentum, which sector it is in, what is its current state, its current target, where it should respawn in Nightmare! mode, and so on.