diff --git a/src/d_main.c b/src/d_main.c index 16962320..c9f80180 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -318,7 +318,10 @@ static void D_Display(void) F_WipeEndScreen(); F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK); if (wipegamestate == GS_LEVEL && rendermode != render_none) + { V_SetPaletteLump("PLAYPAL"); // Reset the palette + R_ReInitColormaps(0); + } } F_WipeStartScreen(); diff --git a/src/d_netcmd.c b/src/d_netcmd.c index c897e70e..9b635cb0 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -780,7 +780,6 @@ void D_RegisterClientCommands(void) CV_RegisterVar(&cv_usegamma); // m_menu.c - CV_RegisterVar(&cv_compactscoreboard); CV_RegisterVar(&cv_chatheight); CV_RegisterVar(&cv_chatwidth); CV_RegisterVar(&cv_chattime); diff --git a/src/g_game.c b/src/g_game.c index 4a1c84d3..81f94845 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -400,9 +400,6 @@ static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"}, // don't mind me putting these here, I was lazy to figure out where else I could put those without blowing up the compiler. -// it automatically becomes compact with 20+ players, but if you like it, I guess you can turn that on! -consvar_t cv_compactscoreboard= {"compactscoreboard", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; - // chat timer thingy static CV_PossibleValue_t chattime_cons_t[] = {{5, "MIN"}, {999, "MAX"}, {0, NULL}}; consvar_t cv_chattime = {"chattime", "8", CV_SAVE, chattime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; @@ -425,8 +422,8 @@ consvar_t cv_chatspamprotection = {"chatspamprotection", "On", CV_SAVE, CV_OnOff consvar_t cv_chatbacktint = {"chatbacktint", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; // old shit console chat. (mostly exists for stuff like terminal, not because I cared if anyone liked the old chat.) -//static CV_PossibleValue_t consolechat_cons_t[] = {{0, "Box"}, {1, "Console"}, {0, NULL}}; -- for menu, but menu disabled... -consvar_t cv_consolechat = {"consolechat", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; +static CV_PossibleValue_t consolechat_cons_t[] = {{0, "Window"}, {1, "Console"}, {0, NULL}}; +consvar_t cv_consolechat = {"chatmode", "Window", CV_SAVE, consolechat_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_crosshair = {"crosshair", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_crosshair2 = {"crosshair2", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; @@ -3306,7 +3303,7 @@ static void G_DoCompleted(void) } // play some generic music if there's no win/cool/lose music going on (for exitlevel commands) - if (G_RaceGametype() && j == splitscreen+1) + if (G_RaceGametype() && j == splitscreen+1 && (cv_inttime.value > 0)) S_ChangeMusicInternal("racent", true); if (automapactive) @@ -3464,30 +3461,25 @@ void G_AfterIntermission(void) // void G_NextLevel(void) { - boolean dovote = false; - - if ((cv_advancemap.value == 3 && gamestate != GS_VOTING) - && !modeattacking && !skipstats && (multiplayer || netgame)) + if (gamestate != GS_VOTING) { - UINT8 i; - for (i = 0; i < MAXPLAYERS; i++) + if ((cv_advancemap.value == 3) && !modeattacking && !skipstats && (multiplayer || netgame)) { - if (playeringame[i] && !players[i].spectator) + UINT8 i; + for (i = 0; i < MAXPLAYERS; i++) { - dovote = true; - break; + if (playeringame[i] && !players[i].spectator) + { + gameaction = ga_startvote; + return; + } } } + + forceresetplayers = false; } - if (dovote) - gameaction = ga_startvote; - else - { - if (gamestate != GS_VOTING) - forceresetplayers = false; - gameaction = ga_worlddone; - } + gameaction = ga_worlddone; } static void G_DoWorldDone(void) diff --git a/src/g_game.h b/src/g_game.h index 53c970d2..ad099bf2 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -54,7 +54,7 @@ extern tic_t timeinmap; // Ticker for time spent in level (used for levelcard di extern INT16 rw_maximums[NUM_WEAPONS]; // used in game menu -extern consvar_t cv_chatwidth, cv_chatnotifications, cv_chatheight, cv_chattime, cv_consolechat, cv_chatspamprotection, cv_compactscoreboard, cv_chatbacktint; +extern consvar_t cv_chatwidth, cv_chatnotifications, cv_chatheight, cv_chattime, cv_consolechat, cv_chatspamprotection, cv_chatbacktint; extern consvar_t cv_crosshair, cv_crosshair2, cv_crosshair3, cv_crosshair4; extern consvar_t cv_invertmouse, cv_alwaysfreelook, cv_mousemove; extern consvar_t cv_turnaxis,cv_moveaxis,cv_brakeaxis,cv_aimaxis,cv_lookaxis,cv_fireaxis,cv_driftaxis; diff --git a/src/k_kart.c b/src/k_kart.c index 31cbbaea..fe6a6aff 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1029,7 +1029,7 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid) nobumpx = mobj1->momx; nobumpy = mobj1->momy; }*/ - + distx = (mobj1->x + mobj2->momx) - (mobj2->x + mobj1->momx); disty = (mobj1->y + mobj2->momy) - (mobj2->y + mobj1->momy); @@ -2234,8 +2234,8 @@ void K_SpawnSparkleTrail(mobj_t *mo) sparkle = P_SpawnMobj(newx, newy, newz, MT_SPARKLETRAIL); - if (i == 0) - P_SetMobjState(sparkle, S_KARTINVULN_LARGE1); + //if (i == 0) + //P_SetMobjState(sparkle, S_KARTINVULN_LARGE1); P_SetTarget(&sparkle->target, mo); sparkle->destscale = mo->destscale; @@ -2244,6 +2244,8 @@ void K_SpawnSparkleTrail(mobj_t *mo) sparkle->color = mo->color; //sparkle->colorized = mo->colorized; } + + P_SetMobjState(sparkle, S_KARTINVULN_LARGE1); } void K_SpawnWipeoutTrail(mobj_t *mo, boolean translucent) @@ -4331,7 +4333,7 @@ void K_CheckBumpers(void) void K_CheckSpectateStatus(void) { - UINT8 respawnlist[MAXPLAYERS]; + UINT8 respawnlist[MAXPLAYERS]; UINT8 i, numingame = 0, numjoiners = 0; // Get the number of players in game, and the players to be de-spectated. @@ -4348,7 +4350,7 @@ void K_CheckSpectateStatus(void) if (players[i].exiting) // DON'T allow if anyone's exiting return; if (numingame < 2 || leveltime < starttime || mapreset) // Allow if the match hasn't started yet - continue; + continue; if (G_RaceGametype() && players[i].laps) // DON'T allow if the race is at 2 laps return; continue; @@ -6032,6 +6034,9 @@ static void K_drawInput(void) #undef drawbutt +#undef BUTTW +#undef BUTTH + y -= 1; if (!cmd->driftturn) // no turn diff --git a/src/m_menu.c b/src/m_menu.c index 5f83d3a8..a3ebdc7d 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -314,7 +314,7 @@ static void M_RestartAudio(void); //Misc menu_t /*OP_DataOptionsDef,*/ OP_ScreenshotOptionsDef, OP_EraseDataDef; -menu_t OP_HUDOptionsDef; +menu_t OP_HUDOptionsDef, OP_ChatOptionsDef; menu_t OP_GameOptionsDef, OP_ServerOptionsDef; //menu_t OP_NetgameOptionsDef, OP_GametypeOptionsDef; menu_t OP_MonitorToggleDef; @@ -338,6 +338,7 @@ static void M_DrawTimeAttackMenu(void); static void M_DrawSetupChoosePlayerMenu(void); static void M_DrawControl(void); static void M_DrawVideoMenu(void); +static void M_DrawHUDOptions(void); static void M_DrawVideoMode(void); //static void M_DrawMonitorToggles(void); #ifdef HWRENDER @@ -1251,22 +1252,17 @@ static menuitem_t OP_VideoOptionsMenu[] = {IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Gamma", &cv_usegamma, 30}, - {IT_STRING | IT_CVAR, NULL, "Menu Highlights", &cons_menuhighlight, 45}, - // highlight info - (GOOD HIGHLIGHT, WARNING HIGHLIGHT) - 55 (see M_DrawVideoMenu) + {IT_STRING | IT_CVAR, NULL, "Draw Distance", &cv_drawdist, 45}, + //{IT_STRING | IT_CVAR, NULL, "NiGHTS Draw Dist", &cv_drawdist_nights, 55}, + {IT_STRING | IT_CVAR, NULL, "Weather Draw Distance",&cv_drawdist_precip, 55}, + {IT_STRING | IT_CVAR, NULL, "Weather Density", &cv_precipdensity, 65}, + {IT_STRING | IT_CVAR, NULL, "Skyboxes", &cv_skybox, 75}, - {IT_STRING | IT_CVAR, NULL, "Draw Distance", &cv_drawdist, 70}, - //{IT_STRING | IT_CVAR, NULL, "NiGHTS Draw Dist", &cv_drawdist_nights, 80}, - {IT_STRING | IT_CVAR, NULL, "Weather Draw Distance",&cv_drawdist_precip, 80}, - {IT_STRING | IT_CVAR, NULL, "Weather Density", &cv_precipdensity, 90}, - {IT_STRING | IT_CVAR, NULL, "Skyboxes", &cv_skybox, 100}, - - {IT_STRING | IT_CVAR, NULL, "Show FPS", &cv_ticrate, 115}, - {IT_STRING | IT_CVAR, NULL, "Vertical Sync", &cv_vidwait, 125}, - - {IT_STRING | IT_CVAR, NULL, "Console Text Size", &cv_constextsize, 140}, + {IT_STRING | IT_CVAR, NULL, "Show FPS", &cv_ticrate, 90}, + {IT_STRING | IT_CVAR, NULL, "Vertical Sync", &cv_vidwait, 100}, #ifdef HWRENDER - {IT_SUBMENU|IT_STRING, NULL, "OpenGL Options...", &OP_OpenGLOptionsDef, 155}, + {IT_SUBMENU|IT_STRING, NULL, "OpenGL Options...", &OP_OpenGLOptionsDef, 115}, #endif }; @@ -1277,14 +1273,12 @@ enum op_video_fullscreen, #endif op_video_gamma, - op_video_hili, op_video_dd, op_video_wdd, op_video_wd, op_video_skybox, op_video_fps, op_video_vsync, - op_video_consoletext, #ifdef HWRENDER op_video_ogl, #endif @@ -1423,19 +1417,30 @@ static menuitem_t OP_HUDOptionsMenu[] = {IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "HUD Visibility", &cv_translucenthud, 20}, - {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "Minimap Visibility", &cv_kartminimap, 35}, - {IT_STRING | IT_CVAR, NULL, "Speedometer Display", &cv_kartspeedometer, 45}, - {IT_STRING | IT_CVAR, NULL, "Show \"CHECK\"", &cv_kartcheck, 55}, + {IT_STRING | IT_SUBMENU, NULL, "Online chat options...",&OP_ChatOptionsDef, 35}, + {IT_STRING | IT_CVAR, NULL, "Background Glass", &cons_backcolor, 45}, - //{IT_STRING | IT_CVAR, NULL, "Chat mode", &cv_consolechat, 70}, -- will ANYONE who doesn't know how to use the console want to touch this {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "Chat box width", &cv_chatwidth, 70}, + NULL, "Minimap Visibility", &cv_kartminimap, 60}, + {IT_STRING | IT_CVAR, NULL, "Speedometer Display", &cv_kartspeedometer, 70}, + {IT_STRING | IT_CVAR, NULL, "Show \"CHECK\"", &cv_kartcheck, 80}, + + {IT_STRING | IT_CVAR, NULL, "Menu Highlights", &cons_menuhighlight, 95}, + // highlight info - (GOOD HIGHLIGHT, WARNING HIGHLIGHT) - 105 (see M_DrawHUDOptions) + + {IT_STRING | IT_CVAR, NULL, "Console Text Size", &cv_constextsize, 120}, +}; + +static menuitem_t OP_ChatOptionsMenu[] = +{ + // will ANYONE who doesn't know how to use the console want to touch this one? + {IT_STRING | IT_CVAR, NULL, "Chat mode", &cv_consolechat, 10}, // nonetheless... {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "Chat box height", &cv_chatheight, 80}, - {IT_STRING | IT_CVAR, NULL, "Chat fadeout time", &cv_chattime, 90}, - {IT_STRING | IT_CVAR, NULL, "Show tint behind messages",&cv_chatbacktint, 100}, - {IT_STRING | IT_CVAR, NULL, "Background Color", &cons_backcolor, 110}, + NULL, "Window width", &cv_chatwidth, 25}, + {IT_STRING | IT_CVAR | IT_CV_SLIDER, + NULL, "Window height", &cv_chatheight, 35}, + {IT_STRING | IT_CVAR, NULL, "Message fadeout time", &cv_chattime, 50}, + {IT_STRING | IT_CVAR, NULL, "Show tint behind messages",&cv_chatbacktint, 60}, }; static menuitem_t OP_GameOptionsMenu[] = @@ -1941,12 +1946,14 @@ menu_t OP_HUDOptionsDef = sizeof (OP_HUDOptionsMenu)/sizeof (menuitem_t), &OP_MainDef, OP_HUDOptionsMenu, - M_DrawGenericMenu, //M_DrawHUDOptions, + M_DrawHUDOptions, 30, 30, 0, NULL }; +menu_t OP_ChatOptionsDef = DEFAULTMENUSTYLE("M_HUD", OP_ChatOptionsMenu, &OP_HUDOptionsDef, 30, 30); + menu_t OP_GameOptionsDef = DEFAULTMENUSTYLE("M_GAME", OP_GameOptionsMenu, &OP_MainDef, 30, 30); menu_t OP_ServerOptionsDef = DEFAULTMENUSTYLE("M_SERVER", OP_ServerOptionsMenu, &OP_MainDef, 24, 30); @@ -8235,12 +8242,21 @@ static void M_VideoModeMenu(INT32 choice) } static void M_DrawVideoMenu(void) +{ + M_DrawGenericMenu(); + + V_DrawRightAlignedString(BASEVIDWIDTH - currentMenu->x, currentMenu->y + OP_VideoOptionsMenu[0].alphaKey, + (SCR_IsAspectCorrect(vid.width, vid.height) ? recommendedflags : highlightflags), + va("%dx%d", vid.width, vid.height)); +} + +static void M_DrawHUDOptions(void) { const char *str0 = ")"; const char *str1 = " Warning highlight"; const char *str2 = ","; const char *str3 = "Good highlight"; - INT32 x = BASEVIDWIDTH - currentMenu->x + 2, y = currentMenu->y + 55; + INT32 x = BASEVIDWIDTH - currentMenu->x + 2, y = currentMenu->y + 105; INT32 w0 = V_StringWidth(str0, 0), w1 = V_StringWidth(str1, 0), w2 = V_StringWidth(str2, 0), w3 = V_StringWidth(str3, 0); M_DrawGenericMenu(); @@ -8254,10 +8270,6 @@ static void M_DrawVideoMenu(void) x -= w3; V_DrawString(x, y, recommendedflags, str3); V_DrawRightAlignedString(x, y, highlightflags, "("); - - V_DrawRightAlignedString(BASEVIDWIDTH - currentMenu->x, currentMenu->y + OP_VideoOptionsMenu[0].alphaKey, - (SCR_IsAspectCorrect(vid.width, vid.height) ? recommendedflags : highlightflags), - va("%dx%d", vid.width, vid.height)); } // Draw the video modes list, a-la-Quake diff --git a/src/p_user.c b/src/p_user.c index 86e404ac..d493e383 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8369,7 +8369,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall } else if (P_AnalogMove(player)) // Analog angle = R_PointToAngle2(thiscam->x, thiscam->y, mo->x, mo->y); - else if (demoplayback) + else if (demoplayback && leveltime > starttime) { angle = focusangle; focusangle = R_PointToAngle2(thiscam->x, thiscam->y, mo->x, mo->y); @@ -8384,7 +8384,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall else angle = focusangle + FixedAngle(camrotate*FRACUNIT); - if (!resetcalled && (cv_analog.value || demoplayback) + if (!resetcalled && (leveltime > starttime) && (cv_analog.value || demoplayback) && ((thiscam == &camera && t_cam_rotate != -42) || (thiscam == &camera2 && t_cam2_rotate != -42) || (thiscam == &camera3 && t_cam3_rotate != -42) diff --git a/src/st_stuff.c b/src/st_stuff.c index 7efbe6d2..02e5b657 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -804,8 +804,8 @@ static void ST_drawLevelTitle(void) V_DrawDiag(sub + ttlnumxpos, bary, 10, gtc); if (subttl[0]) V_DrawRightAlignedString(sub + zonexpos - 8, bary+1, V_ALLOWLOWERCASE, subttl); - else - V_DrawRightAlignedString(sub + zonexpos - 8, bary+1, V_ALLOWLOWERCASE, va("%s Mode", gametype_cons_t[gametype].strvalue)); + //else + //V_DrawRightAlignedString(sub + zonexpos - 8, bary+1, V_ALLOWLOWERCASE, va("%s Mode", gametype_cons_t[gametype].strvalue)); } ttlnumxpos += sub; diff --git a/src/y_inter.c b/src/y_inter.c index 93459811..357c08e0 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -753,7 +753,8 @@ void Y_StartIntermission(void) { // Calculate who won Y_CalculateMatchData(false, Y_CompareBattle); - S_ChangeMusicInternal("racent", true); // loop it + if (cv_inttime.value > 0) + S_ChangeMusicInternal("racent", true); // loop it break; } case int_race: // (time-only race) @@ -1174,18 +1175,15 @@ void Y_VoteTicker(void) { INT32 i; - if (paused || P_AutoPause()) + if (paused || P_AutoPause() || !voteclient.loaded) return; votetic++; if (votetic == voteendtic) { - if (voteclient.loaded) - { - Y_EndVote(); - Y_FollowIntermission(); - } + Y_EndVote(); + Y_FollowIntermission(); return; } @@ -1226,17 +1224,14 @@ void Y_VoteTicker(void) if (numvotes < 1) // Whoops! Get outta here. { - if (voteclient.loaded) - { - Y_EndVote(); - Y_FollowIntermission(); - } + Y_EndVote(); + Y_FollowIntermission(); return; } voteclient.rtics--; - if (voteclient.rtics <= 0 && voteclient.loaded) + if (voteclient.rtics <= 0) { voteclient.roffset++; voteclient.rtics = min(20, (3*voteclient.roffset/4)+5);