Aaptr_playernum(int playernumber) for ACS and Decorate.

Actor pointer selectors for players 1-8 already exist as constants for decorate and acs. That solution will not scale well if zdoom adds support for more players. The selector function has been updated so that a player number can be embedded without altering the meaning of the existing 8 constants (AAPTR_PLAYER1-8).

The return value is used in the same way as any AAPTR_PLAYER# constant would be used.

The function currently returns valid selectors for player number 0-127 (inclusive). Player number 0-7 returns selectors for player 1-8.

Invalid player numbers (negative, or larger than the selector int is fit to store) return AAPTR_NULL.

Player numbers that are not supported yet (anything outside the 0-7 range) will be returned normally. When resolved into a pointer they will simply find that the player does not exist, a scenario which is already possible.