mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge remote-tracking branch 'origin/master' into ironman
This commit is contained in:
commit
1798ae9f4e
13 changed files with 184 additions and 129 deletions
178
src/d_clisrv.c
178
src/d_clisrv.c
|
|
@ -581,7 +581,7 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
|
||||
// Draw bottom box
|
||||
M_DrawTextBox(BASEVIDWIDTH/2-128-8, BASEVIDHEIGHT-24-8, 32, 1);
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press ESC to abort");
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press (B) to abort");
|
||||
|
||||
for (i = 0; i < 16; ++i)
|
||||
V_DrawFill((BASEVIDWIDTH/2-128) + (i * 16), BASEVIDHEIGHT-24, 16, 8, palstart + ((animtime - i) & 15));
|
||||
|
|
@ -644,7 +644,7 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
INT32 checkednum = 0;
|
||||
INT32 i;
|
||||
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press ESC to abort");
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press (B) to abort");
|
||||
|
||||
//ima just count files here
|
||||
for (i = 0; i < fileneedednum; i++)
|
||||
|
|
@ -666,7 +666,7 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
INT32 loadcompletednum = 0;
|
||||
INT32 i;
|
||||
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press ESC to abort");
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press (B) to abort");
|
||||
|
||||
//ima just count files here
|
||||
for (i = 0; i < fileneedednum; i++)
|
||||
|
|
@ -693,7 +693,7 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
|
||||
// Draw the bottom box.
|
||||
M_DrawTextBox(BASEVIDWIDTH/2-128-8, BASEVIDHEIGHT-58-8, 32, 1);
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-58-14, V_YELLOWMAP, "Press ESC to abort");
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-58-14, V_YELLOWMAP, "Press (B) to abort");
|
||||
|
||||
Net_GetNetStat();
|
||||
dldlength = (INT32)((file->currentsize/(double)file->totalsize) * 256);
|
||||
|
|
@ -757,7 +757,7 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
|
||||
//Draw bottom box
|
||||
M_DrawTextBox(BASEVIDWIDTH/2-128-8, BASEVIDHEIGHT-24-8, 32, 1);
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press ESC to abort");
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press (B) to abort");
|
||||
|
||||
for (i = 0; i < 16; ++i)
|
||||
V_DrawFill((BASEVIDWIDTH/2-128) + (i * 16), BASEVIDHEIGHT-24, 16, 8, palstart + ((animtime - i) & 15));
|
||||
|
|
@ -1483,38 +1483,35 @@ void CL_UpdateServerList (void)
|
|||
SendAskInfo(BROADCASTADDR);
|
||||
}
|
||||
|
||||
static void M_ConfirmConnect(event_t *ev)
|
||||
static void M_ConfirmConnect(void)
|
||||
{
|
||||
if (ev->type == ev_keydown)
|
||||
if (G_PlayerInputDown(0, gc_a, 1) || gamekeydown[0][KEY_ENTER])
|
||||
{
|
||||
if (G_PlayerInputDown(0, gc_a, 1))
|
||||
if (totalfilesrequestednum > 0)
|
||||
{
|
||||
if (totalfilesrequestednum > 0)
|
||||
#ifdef HAVE_CURL
|
||||
if (http_source[0] == '\0' || curl_failedwebdownload)
|
||||
#endif
|
||||
{
|
||||
#ifdef HAVE_CURL
|
||||
if (http_source[0] == '\0' || curl_failedwebdownload)
|
||||
#endif
|
||||
if (CL_SendFileRequest())
|
||||
{
|
||||
if (CL_SendFileRequest())
|
||||
{
|
||||
cl_mode = CL_DOWNLOADFILES;
|
||||
}
|
||||
cl_mode = CL_DOWNLOADFILES;
|
||||
}
|
||||
#ifdef HAVE_CURL
|
||||
else
|
||||
cl_mode = CL_PREPAREHTTPFILES;
|
||||
#endif
|
||||
}
|
||||
#ifdef HAVE_CURL
|
||||
else
|
||||
cl_mode = CL_LOADFILES;
|
||||
cl_mode = CL_PREPAREHTTPFILES;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
cl_mode = CL_LOADFILES;
|
||||
|
||||
M_ClearMenus(true);
|
||||
}
|
||||
else if (G_PlayerInputDown(0, gc_x, 1))
|
||||
{
|
||||
cl_mode = CL_ABORTED;
|
||||
M_ClearMenus(true);
|
||||
}
|
||||
M_StopMessage(0);
|
||||
}
|
||||
else if (G_PlayerInputDown(0, gc_b, 1) || G_PlayerInputDown(0, gc_x, 1) || gamekeydown[0][KEY_ESCAPE])
|
||||
{
|
||||
cl_mode = CL_ABORTED;
|
||||
M_StopMessage(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1537,7 +1534,7 @@ static boolean CL_FinishedFileList(void)
|
|||
"You have too many WAD files loaded\n"
|
||||
"to add ones the server is using.\n"
|
||||
"Please restart Ring Racers before connecting.\n\n"
|
||||
"Press ESC\n"
|
||||
"Press (B)\n"
|
||||
), NULL, MM_NOTHING);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1552,7 +1549,7 @@ static boolean CL_FinishedFileList(void)
|
|||
"the game and don't load any addons.\n"
|
||||
"Ring Racers will automatically add\n"
|
||||
"everything you need when you join.\n\n"
|
||||
"Press ESC\n"
|
||||
"Press (B)\n"
|
||||
), NULL, MM_NOTHING);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1565,8 +1562,8 @@ static boolean CL_FinishedFileList(void)
|
|||
"\n"
|
||||
"You may load server addons (if any), and wait for a slot.\n"
|
||||
"\n"
|
||||
"Press ACCEL to continue or BRAKE to cancel.\n\n"
|
||||
), FUNCPTRCAST (M_ConfirmConnect), MM_EVENTHANDLER);
|
||||
"Press (A) to continue or (B) to cancel\n"
|
||||
), NULL, MM_NOTHING);
|
||||
cl_mode = CL_CONFIRMCONNECT;
|
||||
}
|
||||
else
|
||||
|
|
@ -1592,7 +1589,7 @@ static boolean CL_FinishedFileList(void)
|
|||
"with the server, not your game.)\n\n"
|
||||
"See the console or log file\n"
|
||||
"for additional details.\n\n"
|
||||
"Press ESC\n"
|
||||
"Press (B)\n"
|
||||
), NULL, MM_NOTHING);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1622,18 +1619,21 @@ static boolean CL_FinishedFileList(void)
|
|||
if (serverisfull)
|
||||
M_StartMessage(va(M_GetText(
|
||||
"This server is full!\n"
|
||||
"Download of %s additional content is required to join.\n"
|
||||
"Download of %s additional content\n"
|
||||
"is required to join.\n"
|
||||
"\n"
|
||||
"You may download, load server addons, and wait for a slot.\n"
|
||||
"You may download, load server addons,\n"
|
||||
"and wait for a slot.\n"
|
||||
"\n"
|
||||
"Press ACCEL to continue or BRAKE to cancel.\n\n"
|
||||
), downloadsize), FUNCPTRCAST(M_ConfirmConnect), MM_EVENTHANDLER);
|
||||
"Press (A) to continue or (B) to cancel\n"
|
||||
), downloadsize), NULL, MM_NOTHING);
|
||||
else
|
||||
M_StartMessage(va(M_GetText(
|
||||
"Download of %s additional content is required to join.\n"
|
||||
"Download of %s additional content\n"
|
||||
"is required to join.\n"
|
||||
"\n"
|
||||
"Press ACCEL to continue or BRAKE to cancel.\n\n"
|
||||
), downloadsize), FUNCPTRCAST(M_ConfirmConnect), MM_EVENTHANDLER);
|
||||
"Press (A) to continue or (B) to cancel\n"
|
||||
), downloadsize), NULL, MM_NOTHING);
|
||||
|
||||
Z_Free(downloadsize);
|
||||
cl_mode = CL_CONFIRMCONNECT;
|
||||
|
|
@ -1870,7 +1870,7 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
|||
"5 minute wait time exceeded.\n"
|
||||
"You may retry connection.\n"
|
||||
"\n"
|
||||
"Press ESC\n"
|
||||
"Press (B)\n"
|
||||
), NULL, MM_NOTHING);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1921,28 +1921,40 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
|||
{
|
||||
I_OsPolling();
|
||||
|
||||
// Needs to be updated here for M_DrawEggaChannel
|
||||
renderdeltatics = FRACUNIT;
|
||||
rendertimefrac = FRACUNIT;
|
||||
|
||||
memset(deviceResponding, false, sizeof (deviceResponding));
|
||||
|
||||
if (cl_mode == CL_CONFIRMCONNECT)
|
||||
{
|
||||
D_ProcessEvents(); //needed for menu system to receive inputs
|
||||
}
|
||||
else
|
||||
if (netgame)
|
||||
{
|
||||
for (; eventtail != eventhead; eventtail = (eventtail+1) & (MAXEVENTS-1))
|
||||
{
|
||||
G_MapEventsToControls(&events[eventtail]);
|
||||
}
|
||||
|
||||
if (cl_mode == CL_CONFIRMCONNECT)
|
||||
{
|
||||
M_ConfirmConnect();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (G_PlayerInputDown(0, gc_b, 1)
|
||||
|| G_PlayerInputDown(0, gc_x, 1)
|
||||
|| gamekeydown[0][KEY_ESCAPE])
|
||||
cl_mode = CL_ABORTED;
|
||||
}
|
||||
}
|
||||
|
||||
if (G_PlayerInputDown(0, gc_x, 1) || cl_mode == CL_ABORTED)
|
||||
if (cl_mode == CL_ABORTED)
|
||||
{
|
||||
CONS_Printf(M_GetText("Network game synchronization aborted.\n"));
|
||||
// M_StartMessage(M_GetText("Network game synchronization aborted.\n\nPress ESC\n"), NULL, MM_NOTHING);
|
||||
// M_StartMessage(M_GetText("Network game synchronization aborted.\n\nPress (B)\n"), NULL, MM_NOTHING);
|
||||
|
||||
D_QuitNetGame();
|
||||
CL_Reset();
|
||||
D_StartTitle();
|
||||
memset(gamekeydown, 0, sizeof (gamekeydown));
|
||||
memset(deviceResponding, false, sizeof (deviceResponding));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1959,17 +1971,20 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
|||
{
|
||||
if (cl_mode != CL_DOWNLOADFILES && cl_mode != CL_DOWNLOADSAVEGAME)
|
||||
{
|
||||
F_TitleScreenTicker(true);
|
||||
F_TitleScreenDrawer();
|
||||
M_DrawEggaChannel();
|
||||
}
|
||||
CL_DrawConnectionStatus();
|
||||
|
||||
if (cl_mode == CL_CONFIRMCONNECT)
|
||||
{
|
||||
#ifdef HAVE_THREADS
|
||||
I_lock_mutex(&k_menu_mutex);
|
||||
I_lock_mutex(&k_menu_mutex);
|
||||
#endif
|
||||
M_Drawer(); //Needed for drawing messageboxes on the connection screen
|
||||
M_DrawMenuMessage();
|
||||
#ifdef HAVE_THREADS
|
||||
I_unlock_mutex(k_menu_mutex);
|
||||
I_unlock_mutex(k_menu_mutex);
|
||||
#endif
|
||||
}
|
||||
I_UpdateNoVsync(); // page flip or blit buffer
|
||||
if (moviemode)
|
||||
M_SaveFrame();
|
||||
|
|
@ -2017,16 +2032,21 @@ static void CL_ConnectToServer(void)
|
|||
}
|
||||
|
||||
if (cv_currprofile.value == -1)
|
||||
{
|
||||
PR_ApplyProfilePretend(cv_ttlprofilen.value, 0);
|
||||
for (i = 1; i < cv_splitplayers.value; i++)
|
||||
{
|
||||
PR_ApplyProfile(cv_lastprofile[i].value, i);
|
||||
}
|
||||
}
|
||||
if (gamestate == GS_INTERMISSION)
|
||||
Y_EndIntermission(); // clean up intermission graphics etc
|
||||
if (gamestate == GS_VOTING)
|
||||
Y_EndVote();
|
||||
|
||||
DEBFILE(va("waiting %d nodes\n", doomcom->numnodes));
|
||||
M_ClearMenus(true);
|
||||
G_SetGamestate(GS_WAITINGPLAYERS);
|
||||
if (wipegamestate == GS_MENU)
|
||||
M_ClearMenus(true);
|
||||
wipegamestate = GS_WAITINGPLAYERS;
|
||||
|
||||
ClearAdminPlayers();
|
||||
|
|
@ -2391,33 +2411,6 @@ static void Command_connect(void)
|
|||
CONS_Printf(M_GetText("You cannot connect while in a game. End this game first.\n"));
|
||||
return;
|
||||
}
|
||||
else if (cv_currprofile.value == 0)
|
||||
{
|
||||
CONS_Printf(M_GetText("You cannot connect while using the Guest Profile. Use a Custom Profile to play Online.\n"));
|
||||
return;
|
||||
}
|
||||
else if (cv_currprofile.value == -1)
|
||||
{
|
||||
// No profile set, we're attempting to connect from the title screen. (Discord RPC / connect command)
|
||||
// Automatically apply the last profiles for every potential split player.
|
||||
// Make sure Player 1's Profile ISN'T the guest profile even if we do that.
|
||||
|
||||
UINT8 i;
|
||||
|
||||
CONS_Printf(M_GetText("No Profile set, attempting to use last used Profiles...\n"));
|
||||
|
||||
for (i = 0; i < cv_splitplayers.value; i++)
|
||||
{
|
||||
if (cv_lastprofile[i].value || i > 0)
|
||||
PR_ApplyProfile(cv_lastprofile[i].value, i);
|
||||
else
|
||||
{
|
||||
CONS_Printf(M_GetText("Player 1's last used Profile is the Guest Profile, which cannot be used to play Online.\n"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
CONS_Printf(M_GetText("Profiles have been automatically set according to the last used Profiles.\n"));
|
||||
}
|
||||
|
||||
// modified game check: no longer handled
|
||||
// we don't request a restart unless the filelist differs
|
||||
|
|
@ -2480,7 +2473,6 @@ static void Command_connect(void)
|
|||
SplitScreen_OnChange();
|
||||
}
|
||||
|
||||
M_ClearMenus(true);
|
||||
CL_ConnectToServer();
|
||||
}
|
||||
|
||||
|
|
@ -3096,17 +3088,17 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
|||
D_StartTitle();
|
||||
|
||||
if (msg == KICK_MSG_CON_FAIL)
|
||||
M_StartMessage(M_GetText("Server closed connection\n(Synch failure)\nPress ESC\n"), NULL, MM_NOTHING);
|
||||
M_StartMessage(M_GetText("Server closed connection\n(Synch failure)\nPress (B)\n"), NULL, MM_NOTHING);
|
||||
else if (msg == KICK_MSG_PING_HIGH)
|
||||
M_StartMessage(M_GetText("Server closed connection\n(Broke delay limit)\nPress ESC\n"), NULL, MM_NOTHING);
|
||||
M_StartMessage(M_GetText("Server closed connection\n(Broke delay limit)\nPress (B)\n"), NULL, MM_NOTHING);
|
||||
else if (msg == KICK_MSG_BANNED)
|
||||
M_StartMessage(M_GetText("You have been banned by the server\n\nPress ESC\n"), NULL, MM_NOTHING);
|
||||
M_StartMessage(M_GetText("You have been banned by the server\n\nPress (B)\n"), NULL, MM_NOTHING);
|
||||
else if (msg == KICK_MSG_CUSTOM_KICK)
|
||||
M_StartMessage(va(M_GetText("You have been kicked\n(%s)\n\nPress ESC\n"), reason), NULL, MM_NOTHING);
|
||||
M_StartMessage(va(M_GetText("You have been kicked\n(%s)\nPress (B)\n"), reason), NULL, MM_NOTHING);
|
||||
else if (msg == KICK_MSG_CUSTOM_BAN)
|
||||
M_StartMessage(va(M_GetText("You have been banned\n(%s)\n\nPress ESC\n"), reason), NULL, MM_NOTHING);
|
||||
M_StartMessage(va(M_GetText("You have been banned\n(%s)\nPress (B)\n"), reason), NULL, MM_NOTHING);
|
||||
else
|
||||
M_StartMessage(M_GetText("You have been kicked by the server\n\nPress ESC\n"), NULL, MM_NOTHING);
|
||||
M_StartMessage(M_GetText("You have been kicked by the server\n\nPress (B)\n"), NULL, MM_NOTHING);
|
||||
}
|
||||
else if (server)
|
||||
{
|
||||
|
|
@ -4084,7 +4076,7 @@ static void HandleShutdown(SINT8 node)
|
|||
D_QuitNetGame();
|
||||
CL_Reset();
|
||||
D_StartTitle();
|
||||
M_StartMessage(M_GetText("Server has shutdown\n\nPress Esc\n"), NULL, MM_NOTHING);
|
||||
M_StartMessage(M_GetText("Server has shutdown\n\nPress (B)\n"), NULL, MM_NOTHING);
|
||||
}
|
||||
|
||||
/** Called when a PT_NODETIMEOUT packet is received
|
||||
|
|
@ -4099,7 +4091,7 @@ static void HandleTimeout(SINT8 node)
|
|||
D_QuitNetGame();
|
||||
CL_Reset();
|
||||
D_StartTitle();
|
||||
M_StartMessage(M_GetText("Server Timeout\n\nPress Esc\n"), NULL, MM_NOTHING);
|
||||
M_StartMessage(M_GetText("Server Timeout\n\nPress (B)\n"), NULL, MM_NOTHING);
|
||||
}
|
||||
|
||||
/** Called when a PT_SERVERINFO packet is received
|
||||
|
|
|
|||
12
src/d_main.c
12
src/d_main.c
|
|
@ -998,6 +998,11 @@ void D_StartTitle(void)
|
|||
G_SetGametype(GT_RACE); // SRB2kart
|
||||
paused = false;
|
||||
advancedemo = false;
|
||||
|
||||
// clear cmd building stuff
|
||||
memset(gamekeydown, 0, sizeof (gamekeydown));
|
||||
memset(deviceResponding, false, sizeof (deviceResponding));
|
||||
|
||||
F_StartTitleScreen();
|
||||
|
||||
// Reset the palette
|
||||
|
|
@ -1207,7 +1212,7 @@ D_ConvertVersionNumbers (void)
|
|||
//
|
||||
void D_SRB2Main(void)
|
||||
{
|
||||
INT32 p;
|
||||
INT32 i, p;
|
||||
|
||||
INT32 numbasemapheaders;
|
||||
|
||||
|
|
@ -1767,6 +1772,11 @@ void D_SRB2Main(void)
|
|||
// ttlprofilen used because it's roughly equivalent in functionality - a QoL aid for quickly getting from startup to action
|
||||
PR_ApplyProfile(cv_ttlprofilen.value, 0);
|
||||
|
||||
for (i = 1; i < cv_splitplayers.value; i++)
|
||||
{
|
||||
PR_ApplyProfile(cv_lastprofile[i].value, i);
|
||||
}
|
||||
|
||||
if (autostart || netgame)
|
||||
{
|
||||
gameaction = ga_nothing;
|
||||
|
|
|
|||
|
|
@ -2103,6 +2103,9 @@ luahook:
|
|||
LUA_HookHUD(luahuddrawlist_title, HUD_HOOK(title));
|
||||
}
|
||||
LUA_HUD_DrawList(luahuddrawlist_title);
|
||||
|
||||
if (finalecount > 0)
|
||||
M_DrawMenuMessage();
|
||||
}
|
||||
|
||||
// (no longer) De-Demo'd Title Screen
|
||||
|
|
@ -2112,13 +2115,15 @@ void F_TitleScreenTicker(boolean run)
|
|||
|
||||
if (run)
|
||||
{
|
||||
finalecount++;
|
||||
|
||||
if (finalecount == 1)
|
||||
if (finalecount == 0)
|
||||
{
|
||||
// Now start the music
|
||||
S_ChangeMusicInternal("_title", looptitle);
|
||||
}
|
||||
else if (menumessage.fadetimer < 9)
|
||||
menumessage.fadetimer++;
|
||||
|
||||
finalecount++;
|
||||
}
|
||||
|
||||
// don't trigger if doing anything besides idling on title
|
||||
|
|
|
|||
|
|
@ -1340,7 +1340,13 @@ void G_DoLoadLevel(boolean resetplayer)
|
|||
wipegamestate = -1; // force a wipe
|
||||
|
||||
if (cv_currprofile.value == -1)
|
||||
{
|
||||
PR_ApplyProfilePretend(cv_ttlprofilen.value, 0);
|
||||
for (i = 1; i < cv_splitplayers.value; i++)
|
||||
{
|
||||
PR_ApplyProfile(cv_lastprofile[i].value, i);
|
||||
}
|
||||
}
|
||||
if (gamestate == GS_INTERMISSION)
|
||||
Y_EndIntermission();
|
||||
if (gamestate == GS_VOTING)
|
||||
|
|
|
|||
37
src/k_bot.c
37
src/k_bot.c
|
|
@ -921,7 +921,7 @@ static void K_DrawPredictionDebug(botprediction_t *predict, player_t *player)
|
|||
Return:-
|
||||
None
|
||||
--------------------------------------------------*/
|
||||
static void K_BotTrick(player_t *player, ticcmd_t *cmd, line_t *botController)
|
||||
static void K_BotTrick(player_t *player, ticcmd_t *cmd, const line_t *botController)
|
||||
{
|
||||
// Trick panel state -- do nothing until a controller line is found, in which case do a trick.
|
||||
if (botController == NULL)
|
||||
|
|
@ -1259,7 +1259,7 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
|
|||
angle_t destangle = 0;
|
||||
UINT8 spindash = 0;
|
||||
INT32 turnamt = 0;
|
||||
line_t *botController = NULL;
|
||||
const line_t *botController = player->botvars.controller != UINT16_MAX ? &lines[player->botvars.controller] : NULL;
|
||||
|
||||
// Remove any existing controls
|
||||
memset(cmd, 0, sizeof(ticcmd_t));
|
||||
|
|
@ -1292,18 +1292,6 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
|
|||
return;
|
||||
}
|
||||
|
||||
botController = K_FindBotController(player->mo);
|
||||
if (botController == NULL)
|
||||
{
|
||||
player->botvars.controller = UINT16_MAX;
|
||||
}
|
||||
else
|
||||
{
|
||||
player->botvars.controller = botController - lines;
|
||||
}
|
||||
|
||||
player->botvars.rubberband = K_UpdateRubberband(player);
|
||||
|
||||
if (player->trickpanel != 0)
|
||||
{
|
||||
K_BotTrick(player, cmd, botController);
|
||||
|
|
@ -1531,3 +1519,24 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
|
|||
Z_Free(predict);
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
void K_UpdateBotGameplayVars(player_t *player);
|
||||
|
||||
See header file for description.
|
||||
--------------------------------------------------*/
|
||||
void K_UpdateBotGameplayVars(player_t *player)
|
||||
{
|
||||
const line_t *botController;
|
||||
|
||||
if (gamestate != GS_LEVEL || !player->mo)
|
||||
{
|
||||
// Not in the level.
|
||||
return;
|
||||
}
|
||||
|
||||
botController = K_FindBotController(player->mo);
|
||||
|
||||
player->botvars.controller = botController ? (botController - lines) : UINT16_MAX;
|
||||
player->botvars.rubberband = K_UpdateRubberband(player);
|
||||
}
|
||||
|
|
|
|||
16
src/k_bot.h
16
src/k_bot.h
|
|
@ -238,6 +238,22 @@ INT32 K_PositionBully(player_t *player);
|
|||
void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd);
|
||||
|
||||
|
||||
/*--------------------------------------------------
|
||||
void K_UpdateBotGameplayVars(player_t *player);
|
||||
|
||||
Updates gamestate affecting botvars. This must be
|
||||
called for both client and server.
|
||||
|
||||
Input Arguments:-
|
||||
player - Player to whom to update the botvars.
|
||||
|
||||
Return:-
|
||||
None
|
||||
--------------------------------------------------*/
|
||||
|
||||
void K_UpdateBotGameplayVars(player_t *player);
|
||||
|
||||
|
||||
/*--------------------------------------------------
|
||||
void K_BotItemUsage(player_t *player, ticcmd_t *cmd, INT16 turnamt);
|
||||
|
||||
|
|
|
|||
|
|
@ -568,6 +568,7 @@ void M_Init(void);
|
|||
extern menu_t MessageDef;
|
||||
void M_StartMessage(const char *string, void *routine, menumessagetype_t itemtype);
|
||||
void M_StopMessage(INT32 choice);
|
||||
void M_DrawMenuMessage(void);
|
||||
|
||||
void M_QuitResponse(INT32 ch);
|
||||
void M_QuitSRB2(INT32 choice);
|
||||
|
|
@ -911,6 +912,8 @@ void M_HandleVideoModes(INT32 ch);
|
|||
// data stuff
|
||||
void M_HandleProfileErase(INT32 choice);
|
||||
|
||||
// Draws the EGGA CHANNEL background.
|
||||
void M_DrawEggaChannel(void);
|
||||
|
||||
// Extras menu:
|
||||
#define DF_ENCORE 0x40
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ static void M_DrawMenuTyping(void)
|
|||
}
|
||||
|
||||
// Draw the message popup submenu
|
||||
static void M_DrawMenuMessage(void)
|
||||
void M_DrawMenuMessage(void)
|
||||
{
|
||||
|
||||
INT32 y = menumessage.y + (9-menumessage.fadetimer)*20;
|
||||
|
|
@ -443,6 +443,9 @@ static void M_DrawMenuMessage(void)
|
|||
INT32 mlines;
|
||||
const char *msg = menumessage.message;
|
||||
|
||||
if (!menumessage.active)
|
||||
return;
|
||||
|
||||
mlines = menumessage.m>>8;
|
||||
max = (INT16)((UINT8)(menumessage.m & 0xFF)*8);
|
||||
|
||||
|
|
@ -550,8 +553,7 @@ void M_Drawer(void)
|
|||
}
|
||||
|
||||
// Draw message overlay when needed
|
||||
if (menumessage.active)
|
||||
M_DrawMenuMessage();
|
||||
M_DrawMenuMessage();
|
||||
|
||||
// Draw typing overlay when needed, above all other menu elements.
|
||||
if (menutyping.active)
|
||||
|
|
@ -2290,7 +2292,7 @@ static void M_MPOptDrawer(menu_t *m, INT16 extend[3][3])
|
|||
}
|
||||
|
||||
// Draws the EGGA CHANNEL background.
|
||||
static void M_DrawEggaChannel(void)
|
||||
void M_DrawEggaChannel(void)
|
||||
{
|
||||
patch_t *background = W_CachePatchName("M_EGGACH", PU_CACHE);
|
||||
|
||||
|
|
|
|||
|
|
@ -921,11 +921,6 @@ void M_StartControlPanel(void)
|
|||
menucmd[i].delay = MENUDELAYTIME;
|
||||
}
|
||||
|
||||
// No instantly skipping the titlescreen.
|
||||
// (We can change this timer later when extra animation is added.)
|
||||
if (gamestate == GS_TITLESCREEN && finalecount < 1)
|
||||
return;
|
||||
|
||||
// intro might call this repeatedly
|
||||
if (menuactive)
|
||||
{
|
||||
|
|
@ -935,6 +930,11 @@ void M_StartControlPanel(void)
|
|||
|
||||
if (gamestate == GS_TITLESCREEN) // Set up menu state
|
||||
{
|
||||
// No instantly skipping the titlescreen.
|
||||
// (We can change this timer later when extra animation is added.)
|
||||
if (finalecount < 1)
|
||||
return;
|
||||
|
||||
G_SetGamestate(GS_MENU);
|
||||
|
||||
gameaction = ga_nothing;
|
||||
|
|
@ -954,6 +954,8 @@ void M_StartControlPanel(void)
|
|||
|
||||
if (!Playing())
|
||||
{
|
||||
M_StopMessage(0); // Doesn't work with MM_YESNO or MM_EVENTHANDLER... but good enough to get the game as it is currently functional again
|
||||
|
||||
if (cv_currprofile.value == -1) // Only ask once per session.
|
||||
{
|
||||
// Make sure the profile data is ready now since we need to select a profile.
|
||||
|
|
@ -1807,7 +1809,7 @@ void M_StartMessage(const char *string, void *routine, menumessagetype_t itemtyp
|
|||
strncpy(menumessage.message, string, MAXMENUMESSAGE);
|
||||
menumessage.flags = itemtype;
|
||||
*(void**)&menumessage.routine = routine;
|
||||
menumessage.fadetimer = 1;
|
||||
menumessage.fadetimer = (gamestate == GS_WAITINGPLAYERS) ? 9 : 1;
|
||||
menumessage.active = true;
|
||||
|
||||
start = 0;
|
||||
|
|
@ -1875,11 +1877,8 @@ void M_HandleMenuMessage(void)
|
|||
boolean btok = M_MenuConfirmPressed(pid);
|
||||
boolean btnok = M_MenuBackPressed(pid);
|
||||
|
||||
menumessage.fadetimer++;
|
||||
|
||||
if (menumessage.fadetimer > 9)
|
||||
menumessage.fadetimer = 9;
|
||||
|
||||
if (menumessage.fadetimer < 9)
|
||||
menumessage.fadetimer++;
|
||||
|
||||
switch (menumessage.flags)
|
||||
{
|
||||
|
|
@ -3830,7 +3829,6 @@ void M_JoinIP(const char *ipa)
|
|||
}
|
||||
|
||||
COM_BufAddText(va("connect \"%s\"\n", ipa));
|
||||
M_ClearMenus(true);
|
||||
|
||||
// A little "please wait" message.
|
||||
M_DrawTextBox(56, BASEVIDHEIGHT/2-12, 24, 2);
|
||||
|
|
|
|||
|
|
@ -406,7 +406,7 @@ hyudoro_patrol_hit_player
|
|||
if (!player->itemamount)
|
||||
return false;
|
||||
|
||||
K_AddHitLag(toucher, TICRATE/2, true);
|
||||
K_AddHitLag(toucher, TICRATE/2, false);
|
||||
|
||||
hyudoro_mode(hyu) = HYU_RETURN;
|
||||
hyudoro_itemtype(hyu) = player->itemtype;
|
||||
|
|
|
|||
|
|
@ -1997,7 +1997,9 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
|
||||
// Check if the player is allowed to be damaged!
|
||||
// If not, then spawn the instashield effect instead.
|
||||
if (!force && !(inflictor && inflictor->type == MT_SPBEXPLOSION && inflictor->extravalue1 == 1))
|
||||
// NB: "allowcombo", "hardhit" and related checks are here to disallow HITLAG COMBOS, not loss-of-control combos
|
||||
// DMG_EXPLODE bypasses this check to prevent blocking eggbox/SPB with spinout flashtics
|
||||
if (!force && (type != DMG_EXPLODE))
|
||||
{
|
||||
if (gametyperules & GTR_BUMPERS)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4326,6 +4326,12 @@ void P_PlayerAfterThink(player_t *player)
|
|||
// Run followers in AfterThink, after the players have moved,
|
||||
// so a lag value of 1 is exactly attached to the player.
|
||||
K_HandleFollower(player);
|
||||
|
||||
|
||||
if (K_PlayerUsesBotMovement(player))
|
||||
{
|
||||
K_UpdateBotGameplayVars(player);
|
||||
}
|
||||
}
|
||||
|
||||
void P_SetPlayerAngle(player_t *player, angle_t angle)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
|
||||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue