ACS functions: "SetPlayerSkin" and "GetPlayerSkin"
This backports the ACS function SetPlayerSkin
from Q-Zandronum (original commit link can be found here: https://github.com/IgeNiaI/Q-Zandronum/commit/c662ce4d901a4dfd71b7926e0e354571feb559df) to set/override a player's skin in ACS, and a new ACS function GetPlayerSkin
that can retrieve the name of a player's skin. The interesting part of GetPlayerSkin
is that because there's different skins that can be used simultaneously (e.g. the player's personal skin, a weapon's preferred skin, or whatever skin was set via SetPlayerSkin
), one of the arguments indicates what kind of skin to get:
-
GETPLAYERSKIN_USERINFO
(0): gets the player's personal skin, whatever theirskin
CVar is set to in theiruserinfo
. -
GETPLAYERSKIN_WEAPON
(1): gets the weapon's preferred skin. -
GETPLAYERSKIN_ACS
(2): gets the skin set viaSetPlayerSkin
. -
GETPLAYERSKIN_ACTUAL
(3): for less guess and check on the modder's part, this gets the skin that's actually being used (e.g. if the player's weapon has a preferred skin, or if their skin was overridden in ACS, return those first before their personal skin).
Edited by Adam Kaminski