mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +00:00
- Added Grubber's GetPlayerInfo ACS function.
SVN r276 (trunk)
This commit is contained in:
parent
d6bc07c3b1
commit
f94cdaf782
3 changed files with 36 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
July 30, 2006 (Changes by Graf Zahl)
|
||||
- Added Grubber's GetPlayerInfo ACS function.
|
||||
- Fixed: Starting a game without skill menu always started the first episode.
|
||||
- Changed A_AlertMonsters so that it can be placed directly in a weapon state.
|
||||
|
||||
|
|
|
@ -4853,6 +4853,30 @@ int DLevelScript::RunScript ()
|
|||
}
|
||||
break;
|
||||
|
||||
case PCD_GETPLAYERINFO: // [GRB]
|
||||
if (STACK(2) < 0 || STACK(2) >= MAXPLAYERS || !playeringame[STACK(2)])
|
||||
{
|
||||
STACK(2) = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
userinfo_t *userinfo = &players[STACK(2)].userinfo;
|
||||
switch (STACK(1))
|
||||
{
|
||||
case PLAYERINFO_TEAM: STACK(2) = userinfo->team;
|
||||
case PLAYERINFO_AIMDIST: STACK(2) = userinfo->aimdist;
|
||||
case PLAYERINFO_COLOR: STACK(2) = userinfo->color;
|
||||
case PLAYERINFO_GENDER: STACK(2) = userinfo->gender;
|
||||
case PLAYERINFO_NEVERSWITCH: STACK(2) = userinfo->neverswitch;
|
||||
case PLAYERINFO_MOVEBOB: STACK(2) = userinfo->MoveBob;
|
||||
case PLAYERINFO_STILLBOB: STACK(2) = userinfo->StillBob;
|
||||
case PLAYERINFO_PLAYERCLASS: STACK(2) = userinfo->PlayerClass;
|
||||
default: STACK(2) = 0;
|
||||
}
|
||||
}
|
||||
sp -= 1;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
11
src/p_acs.h
11
src/p_acs.h
|
@ -531,6 +531,7 @@ public:
|
|||
PCD_RSWORLDARRAY,
|
||||
PCD_RSGLOBALARRAY,
|
||||
//[MW] end my p-codes
|
||||
PCD_GETPLAYERINFO, // [GRB]
|
||||
|
||||
PCODE_COMMAND_COUNT
|
||||
};
|
||||
|
@ -585,6 +586,16 @@ public:
|
|||
LEVELINFO_KILLED_MONSTERS,
|
||||
LEVELINFO_SUCK_TIME
|
||||
};
|
||||
enum {
|
||||
PLAYERINFO_TEAM,
|
||||
PLAYERINFO_AIMDIST,
|
||||
PLAYERINFO_COLOR,
|
||||
PLAYERINFO_GENDER,
|
||||
PLAYERINFO_NEVERSWITCH,
|
||||
PLAYERINFO_MOVEBOB,
|
||||
PLAYERINFO_STILLBOB,
|
||||
PLAYERINFO_PLAYERCLASS
|
||||
};
|
||||
|
||||
enum EScriptState
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue