CON: Add player[].index, which returns the player ID that you put in. Mostly useful to get the magic value of THISACTOR when applied to the player struct.

DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@5165 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2015-04-26 00:07:57 +00:00
parent 60106f1e37
commit 5979378c4e
4 changed files with 4 additions and 0 deletions

View file

@ -1012,6 +1012,7 @@ const memberlabel_t PlayerLabels[]=
{ "autostep", PLAYER_AUTOSTEP, 0, 0 },
{ "autostep_sbw", PLAYER_AUTOSTEP_SBW, 0, 0 },
{ "hudpal", PLAYER_HUDPAL, 0, 0 },
{ "index", PLAYER_INDEX, 0, 0 },
{ "", -1, 0, 0 } // END OF LIST
};

View file

@ -357,6 +357,7 @@ enum PlayerLabel_t
PLAYER_AUTOSTEP,
PLAYER_AUTOSTEP_SBW,
PLAYER_HUDPAL,
PLAYER_INDEX,
PLAYER_END
};

View file

@ -555,6 +555,7 @@ int32_t __fastcall VM_GetPlayer(register int32_t const iPlayer, register int32_t
case PLAYER_AUTOSTEP: lLabelID = ps->autostep; break;
case PLAYER_AUTOSTEP_SBW: lLabelID = ps->autostep_sbw; break;
case PLAYER_HUDPAL: lLabelID = P_GetHudPal(ps); break;
case PLAYER_INDEX: lLabelID = iPlayer; break;
default: lLabelID = -1; break;
}

View file

@ -577,6 +577,7 @@ local PlayerLabels = {
on_crane = PL".on_crane",
i = { PL".i" },
index = { "%s" },
one_parallax_sectnum = DISABLED{ PL".one_parallax_sectnum" },