Skip to content

ACS functions: "SetPlayerSkin" and "GetPlayerSkin"

Adam Kaminski requested to merge topic/default/acs-skinfunctions into branch/default

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 their skin CVar is set to in their userinfo.
  • GETPLAYERSKIN_WEAPON (1): gets the weapon's preferred skin.
  • GETPLAYERSKIN_ACS (2): gets the skin set via SetPlayerSkin.
  • 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).

https://zandronum.com/tracker/view.php?id=4122

Edited by Adam Kaminski

Merge request reports

Loading