diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 53196363..633c0f3b 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1361,7 +1361,7 @@ static void CL_ReloadReceivedSavegame(void) for (i = 0; i <= splitscreen; i++) { - localangle[i] = (angle_t)(players[displayplayers[i]].cmd.angleturn << 16); //P_ForceLocalAngle(&players[displayplayers[i]], players[displayplayers[i]].angleturn << 16); + localangle[i] = (angle_t)(players[displayplayers[i]].cmd.angleturn << 16); //P_ForceLocalAngle(&players[displayplayers[i]], players[displayplayers[i]].cmd.angleturn << 16); } for (i = 0; i < MAXSPLITSCREENPLAYERS; i++) @@ -2567,9 +2567,6 @@ void CL_RemovePlayer(INT32 playernum, INT32 reason) playerpernode[node]--; if (playerpernode[node] <= 0) { - resendingsavegame[node] = false; - savegameresendcooldown[node] = 0; - nodeingame[node] = false; Net_CloseConnection(node); ResetNode(node); @@ -3338,7 +3335,7 @@ consvar_t cv_maxplayers = {"maxplayers", "8", CV_SAVE|CV_CALL, maxplayers_cons_t static CV_PossibleValue_t discordinvites_cons_t[] = {{0, "Admins Only"}, {1, "Everyone"}, {0, NULL}}; consvar_t cv_discordinvites = {"discordinvites", "Everyone", CV_SAVE|CV_CALL, discordinvites_cons_t, Joinable_OnChange, 0, NULL, NULL, 0, 0, NULL}; -consvar_t cv_resynchattempts = {"AllowGamestateresend", "ON", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL }; +consvar_t cv_allowgamestateresend = {"allowgamestateresend", "ON", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL }; consvar_t cv_blamecfail = {"blamecfail", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL }; // max file size to send to a player (in kilobytes) @@ -4501,7 +4498,7 @@ FILESTAMP && !resendingsavegame[node] && savegameresendcooldown[node] <= I_GetTime() && !SV_ResendingSavegameToAnyone()) { - if (cv_resynchattempts.value) + if (cv_allowgamestateresend.value) { // Tell the client we are about to resend them the gamestate netbuffer->packettype = PT_WILLRESENDGAMESTATE; diff --git a/src/d_clisrv.h b/src/d_clisrv.h index 4071044f..c4a98dbd 100644 --- a/src/d_clisrv.h +++ b/src/d_clisrv.h @@ -410,7 +410,7 @@ extern consvar_t #ifdef VANILLAJOINNEXTROUND cv_joinnextround, #endif - cv_netticbuffer, cv_allownewplayer, cv_maxplayers, cv_resynchattempts, cv_blamecfail, cv_maxsend, cv_noticedownload, cv_downloadspeed; + cv_netticbuffer, cv_allownewplayer, cv_maxplayers, cv_allowgamestateresend, cv_blamecfail, cv_maxsend, cv_noticedownload, cv_downloadspeed; extern consvar_t cv_discordinvites; diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 002eb844..a27fdffb 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -697,7 +697,7 @@ void D_RegisterServerCommands(void) // d_clisrv CV_RegisterVar(&cv_maxplayers); - CV_RegisterVar(&cv_resynchattempts); + CV_RegisterVar(&cv_allowgamestateresend); CV_RegisterVar(&cv_maxsend); CV_RegisterVar(&cv_noticedownload); CV_RegisterVar(&cv_downloadspeed); diff --git a/src/g_game.c b/src/g_game.c index fb2c9b3e..dc71b5c6 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1371,7 +1371,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer) // why build a ticcmd if we're paused? // Or, for that matter, if we're being reborn. - // Kart, don't build a ticcmd if the server is stopped too so we don't fly off course in bad conditions + // Kart, don't build a ticcmd if the server is stopped so we don't fly off course in bad conditions if (paused || P_AutoPause() || (gamestate == GS_LEVEL && player->playerstate == PST_REBORN)) { cmd->angleturn = (INT16)(lang >> 16); diff --git a/src/m_menu.c b/src/m_menu.c index 7a6bebf9..e1df8fb7 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1543,7 +1543,7 @@ static menuitem_t OP_AdvServerOptionsMenu[] = {IT_STRING | IT_CVAR | IT_CV_STRING, NULL, "Server Browser Address", &cv_masterserver, 10}, - {IT_STRING | IT_CVAR, NULL, "Attempts to resynchronise", &cv_resynchattempts, 40}, + {IT_STRING | IT_CVAR, NULL, "Attempt to resynchronise", &cv_allowgamestateresend,40}, {IT_STRING | IT_CVAR, NULL, "Delay limit (frames)", &cv_maxping, 50}, {IT_STRING | IT_CVAR, NULL, "Delay timeout (s)", &cv_pingtimeout, 60}, {IT_STRING | IT_CVAR, NULL, "Connection timeout (tics)", &cv_nettimeout, 70}, diff --git a/src/p_setup.c b/src/p_setup.c index d4c2f1c3..125df2d3 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2809,27 +2809,29 @@ static void P_InitCamera(void) { INT32 i; - if (!dedicated) + if (dedicated) { - if (!demo.freecam) - for (i = 0; i <= splitscreen; i++) - P_SetupCamera(displayplayers[i], &camera[i]); - - // Though, I don't think anyone would care about cam_rotate being reset back to the only value that makes sense :P - if (!cv_cam_rotate.changed) - CV_Set(&cv_cam_rotate, cv_cam_rotate.defaultvalue); - - if (!cv_cam2_rotate.changed) - CV_Set(&cv_cam2_rotate, cv_cam2_rotate.defaultvalue); - - if (!cv_cam3_rotate.changed) - CV_Set(&cv_cam3_rotate, cv_cam3_rotate.defaultvalue); - - if (!cv_cam4_rotate.changed) - CV_Set(&cv_cam4_rotate, cv_cam4_rotate.defaultvalue); - - displayplayers[0] = consoleplayer; // Start with your OWN view, please! + return; } + + if (!demo.freecam) + for (i = 0; i <= splitscreen; i++) + P_SetupCamera(displayplayers[i], &camera[i]); + + // Though, I don't think anyone would care about cam_rotate being reset back to the only value that makes sense :P + if (!cv_cam_rotate.changed) + CV_Set(&cv_cam_rotate, cv_cam_rotate.defaultvalue); + + if (!cv_cam2_rotate.changed) + CV_Set(&cv_cam2_rotate, cv_cam2_rotate.defaultvalue); + + if (!cv_cam3_rotate.changed) + CV_Set(&cv_cam3_rotate, cv_cam3_rotate.defaultvalue); + + if (!cv_cam4_rotate.changed) + CV_Set(&cv_cam4_rotate, cv_cam4_rotate.defaultvalue); + + displayplayers[0] = consoleplayer; // Start with your OWN view, please! } /** Loads a level from a lump or external wad. @@ -2847,7 +2849,6 @@ boolean P_SetupLevel(boolean skipprecip, boolean reloadinggamestate) INT32 fromnetsave = 0; boolean loadedbm = false; sector_t *ss; - boolean chase; levelloading = true; @@ -2884,24 +2885,20 @@ boolean P_SetupLevel(boolean skipprecip, boolean reloadinggamestate) && atoi(mapheaderinfo[gamemap-1]->forcecharacter) != 255) P_ForceCharacter(mapheaderinfo[gamemap-1]->forcecharacter); - // chasecam on in chaos, race, coop - // chasecam off in match, tag, capture the flag - chase = true; // srb2kart: always on - + // srb2kart: always enable chasecam if (!dedicated && !reloadinggamestate) { if (!cv_chasecam.changed) - CV_SetValue(&cv_chasecam, chase); + CV_SetValue(&cv_chasecam, true); - // same for second player if (!cv_chasecam2.changed) - CV_SetValue(&cv_chasecam2, chase); + CV_SetValue(&cv_chasecam2, true); if (!cv_chasecam3.changed) - CV_SetValue(&cv_chasecam3, chase); + CV_SetValue(&cv_chasecam3, true); if (!cv_chasecam4.changed) - CV_SetValue(&cv_chasecam4, chase); + CV_SetValue(&cv_chasecam4, true); } // Initial height of PointOfView