Disable viewheight cvar and vanilla's irrelevant first person HUD stuff, move Viewpoint HUD to a nicer spot

This commit is contained in:
SeventhSentinel 2018-06-26 11:33:54 -04:00
parent 55b29504ae
commit b18406aaa1
8 changed files with 20 additions and 19 deletions

View file

@ -4867,7 +4867,8 @@ void K_drawKartHUD(void)
// This is handled by console/menu values // This is handled by console/menu values
K_initKartHUD(); K_initKartHUD();
if (leveltime < 15 && stplyr == &players[displayplayer]) // Draw a white fade on level opening // Draw a white fade on level opening
if (leveltime < 15 && stplyr == &players[displayplayer])
{ {
if (leveltime < 5) if (leveltime < 5)
V_DrawFill(0,0,BASEVIDWIDTH,BASEVIDHEIGHT,120); // Pure white on first three frames, to hide SRB2's awful level load artifacts V_DrawFill(0,0,BASEVIDWIDTH,BASEVIDHEIGHT,120); // Pure white on first three frames, to hide SRB2's awful level load artifacts
@ -4875,7 +4876,7 @@ void K_drawKartHUD(void)
V_DrawFadeScreen(120, 15-leveltime); // Then gradually fade out from there V_DrawFadeScreen(120, 15-leveltime); // Then gradually fade out from there
} }
if (splitscreen == 2) // Player 4 in 3P is basically the minimap :p if (splitscreen == 2) // Player 4 in 3P is the minimap :p
K_drawKartMinimap(); K_drawKartMinimap();
// Draw full screen stuff that turns off the rest of the HUD // Draw full screen stuff that turns off the rest of the HUD

View file

@ -1149,7 +1149,7 @@ void OP_ObjectplaceMovement(player_t *player)
// make sure viewz follows player if in 1st person mode // make sure viewz follows player if in 1st person mode
//player->deltaviewheight = 0; //player->deltaviewheight = 0;
player->viewheight = FixedMul(cv_viewheight.value << FRACBITS, player->mo->scale); player->viewheight = FixedMul(32 << FRACBITS, player->mo->scale);
if (player->mo->eflags & MFE_VERTICALFLIP) if (player->mo->eflags & MFE_VERTICALFLIP)
player->viewz = player->mo->z + player->mo->height - player->viewheight; player->viewz = player->mo->z + player->mo->height - player->viewheight;
else else

View file

@ -25,7 +25,7 @@
#define FLOATSPEED (FRACUNIT*4) #define FLOATSPEED (FRACUNIT*4)
#define VIEWHEIGHTS "41" //#define VIEWHEIGHTS "41"
// Maximum player score. // Maximum player score.
#define MAXSCORE 999999990 #define MAXSCORE 999999990
@ -209,7 +209,7 @@ void P_PlayLivesJingle(player_t *player);
extern mapthing_t *itemrespawnque[ITEMQUESIZE]; extern mapthing_t *itemrespawnque[ITEMQUESIZE];
extern tic_t itemrespawntime[ITEMQUESIZE]; extern tic_t itemrespawntime[ITEMQUESIZE];
extern size_t iquehead, iquetail; extern size_t iquehead, iquetail;
extern consvar_t cv_gravity, cv_viewheight; extern consvar_t cv_gravity/*, cv_viewheight*/;
void P_RespawnSpecials(void); void P_RespawnSpecials(void);

View file

@ -38,8 +38,8 @@
#include "k_kart.h" #include "k_kart.h"
// protos. // protos.
static CV_PossibleValue_t viewheight_cons_t[] = {{16, "MIN"}, {56, "MAX"}, {0, NULL}}; //static CV_PossibleValue_t viewheight_cons_t[] = {{16, "MIN"}, {56, "MAX"}, {0, NULL}};
consvar_t cv_viewheight = {"viewheight", VIEWHEIGHTS, 0, viewheight_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; //consvar_t cv_viewheight = {"viewheight", VIEWHEIGHTS, 0, viewheight_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
#ifdef WALLSPLATS #ifdef WALLSPLATS
consvar_t cv_splats = {"splats", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_splats = {"splats", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
#endif #endif
@ -9972,7 +9972,7 @@ void P_AfterPlayerSpawn(INT32 playernum)
else if (playernum == fourthdisplayplayer) else if (playernum == fourthdisplayplayer)
localangle4 = mobj->angle; localangle4 = mobj->angle;
p->viewheight = cv_viewheight.value<<FRACBITS; p->viewheight = 32<<FRACBITS;
if (p->mo->eflags & MFE_VERTICALFLIP) if (p->mo->eflags & MFE_VERTICALFLIP)
p->viewz = p->mo->z + p->mo->height - p->viewheight; p->viewz = p->mo->z + p->mo->height - p->viewheight;

View file

@ -436,7 +436,7 @@ static void P_NetUnArchivePlayers(void)
if (flags & AWAYVIEW) if (flags & AWAYVIEW)
players[i].awayviewmobj = (mobj_t *)(size_t)READUINT32(save_p); players[i].awayviewmobj = (mobj_t *)(size_t)READUINT32(save_p);
players[i].viewheight = cv_viewheight.value<<FRACBITS; players[i].viewheight = 32<<FRACBITS;
//SetPlayerSkinByNum(i, players[i].skin); //SetPlayerSkinByNum(i, players[i].skin);
players[i].charability = READUINT8(save_p); players[i].charability = READUINT8(save_p);

View file

@ -218,7 +218,7 @@ void P_CalcHeight(player_t *player)
//bob = FixedMul(player->bob/2, FINESINE(angle)); //bob = FixedMul(player->bob/2, FINESINE(angle));
// move viewheight // move viewheight
player->viewheight = FixedMul(cv_viewheight.value << FRACBITS, mo->scale); // default eye view height player->viewheight = FixedMul(32 << FRACBITS, mo->scale); // default eye view height
/*if (player->playerstate == PST_LIVE) /*if (player->playerstate == PST_LIVE)
{ {
@ -8099,9 +8099,9 @@ void P_ResetCamera(player_t *player, camera_t *thiscam)
x = player->mo->x - P_ReturnThrustX(player->mo, thiscam->angle, player->mo->radius); x = player->mo->x - P_ReturnThrustX(player->mo, thiscam->angle, player->mo->radius);
y = player->mo->y - P_ReturnThrustY(player->mo, thiscam->angle, player->mo->radius); y = player->mo->y - P_ReturnThrustY(player->mo, thiscam->angle, player->mo->radius);
if (player->mo->eflags & MFE_VERTICALFLIP) if (player->mo->eflags & MFE_VERTICALFLIP)
z = player->mo->z + player->mo->height - (cv_viewheight.value<<FRACBITS) - 16*FRACUNIT; z = player->mo->z + player->mo->height - (32<<FRACBITS) - 16*FRACUNIT;
else else
z = player->mo->z + (cv_viewheight.value<<FRACBITS); z = player->mo->z + (32<<FRACBITS);
// set bits for the camera // set bits for the camera
thiscam->x = x; thiscam->x = x;
@ -8462,7 +8462,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
} }
#endif // bad 2D camera code #endif // bad 2D camera code
pviewheight = FixedMul(cv_viewheight.value<<FRACBITS, mo->scale); pviewheight = FixedMul(32<<FRACBITS, mo->scale);
if (mo->eflags & MFE_VERTICALFLIP) if (mo->eflags & MFE_VERTICALFLIP)
z = mo->z + mo->height - pviewheight - camheight; z = mo->z + mo->height - pviewheight - camheight;
@ -9952,7 +9952,7 @@ void P_PlayerAfterThink(player_t *player)
{ {
// defaults to make sure 1st person cam doesn't do anything weird on startup // defaults to make sure 1st person cam doesn't do anything weird on startup
//player->deltaviewheight = 0; //player->deltaviewheight = 0;
player->viewheight = FixedMul(cv_viewheight.value << FRACBITS, player->mo->scale); player->viewheight = FixedMul(32 << FRACBITS, player->mo->scale);
if (player->mo->eflags & MFE_VERTICALFLIP) if (player->mo->eflags & MFE_VERTICALFLIP)
player->viewz = player->mo->z + player->mo->height - player->viewheight; player->viewz = player->mo->z + player->mo->height - player->viewheight;
else else

View file

@ -1548,7 +1548,7 @@ void R_RegisterEngineStuff(void)
// Default viewheight is changeable, // Default viewheight is changeable,
// initialized to standard viewheight // initialized to standard viewheight
CV_RegisterVar(&cv_viewheight); //CV_RegisterVar(&cv_viewheight);
#ifdef HWRENDER #ifdef HWRENDER
// GL-specific Commands // GL-specific Commands

View file

@ -1897,18 +1897,18 @@ static void ST_overlayDrawer(void)
strlcpy(name, player_names[stplyr-players], 13); strlcpy(name, player_names[stplyr-players], 13);
// Show name of player being displayed // Show name of player being displayed
V_DrawCenteredString((BASEVIDWIDTH/6), BASEVIDHEIGHT-80, 0, M_GetText("Viewpoint:")); V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-40, 0, M_GetText("Viewpoint:"));
V_DrawCenteredString((BASEVIDWIDTH/6), BASEVIDHEIGHT-64, V_ALLOWLOWERCASE, name); V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-32, V_ALLOWLOWERCASE, name);
} }
// This is where we draw all the fun cheese if you have the chasecam off! // This is where we draw all the fun cheese if you have the chasecam off!
if ((stplyr == &players[displayplayer] && !camera.chase) /*if ((stplyr == &players[displayplayer] && !camera.chase)
|| ((splitscreen && stplyr == &players[secondarydisplayplayer]) && !camera2.chase) || ((splitscreen && stplyr == &players[secondarydisplayplayer]) && !camera2.chase)
|| ((splitscreen > 1 && stplyr == &players[thirddisplayplayer]) && !camera3.chase) || ((splitscreen > 1 && stplyr == &players[thirddisplayplayer]) && !camera3.chase)
|| ((splitscreen > 2 && stplyr == &players[fourthdisplayplayer]) && !camera4.chase)) || ((splitscreen > 2 && stplyr == &players[fourthdisplayplayer]) && !camera4.chase))
{ {
ST_drawFirstPersonHUD(); ST_drawFirstPersonHUD();
} }*/
} }
#ifdef HAVE_BLUA #ifdef HAVE_BLUA