Many uses of random() & value have been turned into random(0, value).
This is not only more efficient, it also ensures better random distribution because the parameter-less variant only returns values between 0 and 255.
The problem here is that this affects the public scripting interface so it cannot be committed to master without further adjustments.
# Conflicts:
# src/p_interaction.cpp
Why? So mods that reveal enemy names don't show internal monster class names.
Tags are based on language.enu lump:
- Tags for Doom/Doom 2 monsters are referring directly to CC_* strings.
- Tags for Heretic monsters are based on obituaries.
- All tags match corresponding obituaries.
(cherry picked from commit 97aba0c416)
DamageMobj can destroy the damaged actor if the death state sequence has zero duration. But Actor.target is a garbage collected member variable, i.e. it will be null, once the actor it points to gets destroyed.
This was originally done correctly in the C++ code but during the scriptification all those 'AActor *target = self->target' lines were removed because they looked redundant, but were not.
This can see some heavy use in iterators where saving several hundreds of function calls can be achieved. In these cases, using a function to do the job will become a significant time waster.
Interesting tidbit: The damage calculation in P_MinotaurSlam had been incorrect for the Heretic version since the friendly Hexen Dark Servant was added, but nobody ever noticed in 14 years...
- fixed emission of the self pointer in FxVMFunctionCall. I did not realize that the self expression only sets up a register for the value, not pushing it onto the stack.