Checks the class of the selected pointer.
Returns false if the specified class does not exist.
Returns false if the selected actor (default = caller) does not exist.
Returns true if the selected actor's class is the one specified in the first parameter.
Returns true if match_superclass is true and the selected actor's class is a descendant of the one specified in the first parameter.
Returns false otherwise.
Expression usable in A_JumpIf, as well as in other (less obviously useful) places.
If it is somehow preferable, A_JumpIf[Not]Class(...) could be submitted instead, but I generally prefer to use A_JumpIf for jumping and let an expression determine the outcome.
Programmer notes:
The global decorate functions now appear to have a standard implementation. I was not entirely comfortable with the parameter list, but my function does accept 1-3 parameters where the first has to be a string (name) (or class, which I don't think can actually happen), and the last two have to be numeric. A stronger general way to build the parameter list might be worth implementing.
CheckClass isn't very "global" in its behaviour. It will almost always be making use of the AActor * self value that is passed to it for evaluation. However, it does function if self == NULL; it will only find actors for static pointers (AAPTR_PLAYER1 and such) and returns false if no actor is found. I'm not aware of a more appropriate way to implement this expression.
I'd make an ACS counterpart. I might. Just not today. I'd like feedback on this. From potential users and from people who have an opinion on how this should be done (I hope there are not far too many of you).
I have only run the simplest of testcases:
Spoiler: