From 8a021c4b4bc3db73443fcdaf95160ad3a0900fa0 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 22 Aug 2012 22:09:17 +0000 Subject: [PATCH] - 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) --- src/p_acs.cpp | 5 ++++- src/p_acs.h | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 4b253efb8..fdba35118 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -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; } } diff --git a/src/p_acs.h b/src/p_acs.h index 7a432815b..df2abdf84 100644 --- a/src/p_acs.h +++ b/src/p_acs.h @@ -664,7 +664,9 @@ public: PLAYERINFO_NEVERSWITCH, PLAYERINFO_MOVEBOB, PLAYERINFO_STILLBOB, - PLAYERINFO_PLAYERCLASS + PLAYERINFO_PLAYERCLASS, + PLAYERINFO_FOV, + PLAYERINFO_DESIREDFOV, }; enum EScriptState