- Added PLAYERINFO_FOV and PLAYERINFO_DESIREDFOV for use with GetPlayerInfo. PLAYERINFO_FOV is

the player's current FOV, and PLAYERINFO_DESIREDFOV is the FOV that was set with the fov
  console command.

SVN r3835 (trunk)
This commit is contained in:
Randy Heit 2012-08-22 22:09:17 +00:00
parent bc30b1a806
commit 8a021c4b4b
2 changed files with 7 additions and 2 deletions

View file

@ -6934,7 +6934,8 @@ scriptwait:
}
else
{
userinfo_t *userinfo = &players[STACK(2)].userinfo;
player_t *pl = &players[STACK(2)];
userinfo_t *userinfo = &pl->userinfo;
switch (STACK(1))
{
case PLAYERINFO_TEAM: STACK(2) = userinfo->team; break;
@ -6945,6 +6946,8 @@ scriptwait:
case PLAYERINFO_MOVEBOB: STACK(2) = userinfo->MoveBob; break;
case PLAYERINFO_STILLBOB: STACK(2) = userinfo->StillBob; break;
case PLAYERINFO_PLAYERCLASS: STACK(2) = userinfo->PlayerClass; break;
case PLAYERINFO_DESIREDFOV: STACK(2) = (int)pl->DesiredFOV; break;
case PLAYERINFO_FOV: STACK(2) = (int)pl->FOV; break;
default: STACK(2) = 0; break;
}
}

View file

@ -664,7 +664,9 @@ public:
PLAYERINFO_NEVERSWITCH,
PLAYERINFO_MOVEBOB,
PLAYERINFO_STILLBOB,
PLAYERINFO_PLAYERCLASS
PLAYERINFO_PLAYERCLASS,
PLAYERINFO_FOV,
PLAYERINFO_DESIREDFOV,
};
enum EScriptState