mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-16 17:51:27 +00:00
Merge branch 'master' into next
This commit is contained in:
commit
6be0f90fbe
7 changed files with 64 additions and 27 deletions
|
@ -2244,7 +2244,7 @@ static void Command_connect(void)
|
|||
// Assume we connect directly.
|
||||
boolean viams = false;
|
||||
|
||||
if (COM_Argc() < 2)
|
||||
if (COM_Argc() < 2 || *COM_Argv(1) == 0)
|
||||
{
|
||||
CONS_Printf(M_GetText(
|
||||
"Connect <serveraddress> (port): connect to a server\n"
|
||||
|
|
19
src/d_main.c
19
src/d_main.c
|
@ -1068,7 +1068,7 @@ void D_SRB2Main(void)
|
|||
|
||||
// add any files specified on the command line with -file wadfile
|
||||
// to the wad list
|
||||
if (!(M_CheckParm("-connect")))
|
||||
if (!(M_CheckParm("-connect") && !M_CheckParm("-server")))
|
||||
{
|
||||
if (M_CheckParm("-file"))
|
||||
{
|
||||
|
@ -1223,8 +1223,16 @@ void D_SRB2Main(void)
|
|||
CONS_Printf("R_Init(): Init SRB2 refresh daemon.\n");
|
||||
R_Init();
|
||||
|
||||
// setting up sound
|
||||
CONS_Printf("S_Init(): Setting up sound.\n");
|
||||
// setting up sound
|
||||
if (dedicated)
|
||||
{
|
||||
nosound = true;
|
||||
nomidimusic = nodigimusic = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
CONS_Printf("S_Init(): Setting up sound.\n");
|
||||
}
|
||||
if (M_CheckParm("-nosound"))
|
||||
nosound = true;
|
||||
if (M_CheckParm("-nomusic")) // combines -nomidimusic and -nodigmusic
|
||||
|
@ -1323,7 +1331,7 @@ void D_SRB2Main(void)
|
|||
ultimatemode = true;
|
||||
}
|
||||
|
||||
if (autostart || netgame || M_CheckParm("+connect") || M_CheckParm("-connect"))
|
||||
if (autostart || netgame)
|
||||
{
|
||||
gameaction = ga_nothing;
|
||||
|
||||
|
@ -1361,8 +1369,7 @@ void D_SRB2Main(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (server && !M_CheckParm("+map") && !M_CheckParm("+connect")
|
||||
&& !M_CheckParm("-connect"))
|
||||
if (server && !M_CheckParm("+map"))
|
||||
{
|
||||
// Prevent warping to nonexistent levels
|
||||
if (W_CheckNumForName(G_BuildMapName(pstartmap)) == LUMPERROR)
|
||||
|
|
|
@ -990,19 +990,41 @@ filestatus_t checkfilemd5(char *filename, const UINT8 *wantedmd5sum)
|
|||
return FS_FOUND; // will never happen, but makes the compiler shut up
|
||||
}
|
||||
|
||||
// Rewritten by Monster Iestyn to be less stupid
|
||||
// Note: if completepath is true, "filename" is modified, but only if FS_FOUND is going to be returned
|
||||
// (Don't worry about WinCE's version of filesearch, nobody cares about that OS anymore)
|
||||
filestatus_t findfile(char *filename, const UINT8 *wantedmd5sum, boolean completepath)
|
||||
{
|
||||
filestatus_t homecheck = filesearch(filename, srb2home, wantedmd5sum, false, 10);
|
||||
if (homecheck == FS_FOUND)
|
||||
return filesearch(filename, srb2home, wantedmd5sum, completepath, 10);
|
||||
filestatus_t homecheck; // store result of last file search
|
||||
boolean badmd5 = false; // store whether md5 was bad from either of the first two searches (if nothing was found in the third)
|
||||
|
||||
homecheck = filesearch(filename, srb2path, wantedmd5sum, false, 10);
|
||||
if (homecheck == FS_FOUND)
|
||||
return filesearch(filename, srb2path, wantedmd5sum, completepath, 10);
|
||||
// first, check SRB2's "home" directory
|
||||
homecheck = filesearch(filename, srb2home, wantedmd5sum, completepath, 10);
|
||||
|
||||
if (homecheck == FS_FOUND) // we found the file, so return that we have :)
|
||||
return FS_FOUND;
|
||||
else if (homecheck == FS_MD5SUMBAD) // file has a bad md5; move on and look for a file with the right md5
|
||||
badmd5 = true;
|
||||
// if not found at all, just move on without doing anything
|
||||
|
||||
// next, check SRB2's "path" directory
|
||||
homecheck = filesearch(filename, srb2path, wantedmd5sum, completepath, 10);
|
||||
|
||||
if (homecheck == FS_FOUND) // we found the file, so return that we have :)
|
||||
return FS_FOUND;
|
||||
else if (homecheck == FS_MD5SUMBAD) // file has a bad md5; move on and look for a file with the right md5
|
||||
badmd5 = true;
|
||||
// if not found at all, just move on without doing anything
|
||||
|
||||
// finally check "." directory
|
||||
#ifdef _arch_dreamcast
|
||||
return filesearch(filename, "/cd", wantedmd5sum, completepath, 10);
|
||||
homecheck = filesearch(filename, "/cd", wantedmd5sum, completepath, 10);
|
||||
#else
|
||||
return filesearch(filename, ".", wantedmd5sum, completepath, 10);
|
||||
homecheck = filesearch(filename, ".", wantedmd5sum, completepath, 10);
|
||||
#endif
|
||||
|
||||
if (homecheck != FS_NOTFOUND) // if not found this time, fall back on the below return statement
|
||||
return homecheck; // otherwise return the result we got
|
||||
|
||||
return (badmd5 ? FS_MD5SUMBAD : FS_NOTFOUND); // md5 sum bad or file not found
|
||||
}
|
||||
|
|
|
@ -3588,7 +3588,8 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
|
|||
unlocktriggers = 0;
|
||||
|
||||
// clear itemfinder, just in case
|
||||
CV_StealthSetValue(&cv_itemfinder, 0);
|
||||
if (!dedicated) // except in dedicated servers, where it is not registered and can actually I_Error debug builds
|
||||
CV_StealthSetValue(&cv_itemfinder, 0);
|
||||
}
|
||||
|
||||
// internal game map
|
||||
|
|
|
@ -6295,6 +6295,13 @@ static void M_DrawConnectIPMenu(void)
|
|||
static void M_ConnectIP(INT32 choice)
|
||||
{
|
||||
(void)choice;
|
||||
|
||||
if (*setupm_ip == 0)
|
||||
{
|
||||
M_StartMessage("You must specify an IP address.\n", NULL, MM_NOTHING);
|
||||
return;
|
||||
}
|
||||
|
||||
COM_BufAddText(va("connect \"%s\"\n", setupm_ip));
|
||||
|
||||
// A little "please wait" message.
|
||||
|
|
|
@ -2565,6 +2565,7 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
{
|
||||
tic_t starttime = I_GetTime();
|
||||
tic_t endtime = starttime + (3*TICRATE)/2;
|
||||
tic_t nowtime;
|
||||
|
||||
S_StartSound(NULL, sfx_s3kaf);
|
||||
|
||||
|
@ -2574,9 +2575,17 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
F_WipeEndScreen();
|
||||
F_RunWipe(wipedefs[wipe_speclevel_towhite], false);
|
||||
|
||||
nowtime = lastwipetic;
|
||||
// Hold on white for extra effect.
|
||||
while (I_GetTime() < endtime)
|
||||
I_Sleep();
|
||||
while (nowtime < endtime)
|
||||
{
|
||||
// wait loop
|
||||
while (!((nowtime = I_GetTime()) - lastwipetic))
|
||||
I_Sleep();
|
||||
lastwipetic = nowtime;
|
||||
if (moviemode) // make sure we save frames for the white hold too
|
||||
M_SaveFrame();
|
||||
}
|
||||
|
||||
ranspecialwipe = 1;
|
||||
}
|
||||
|
|
|
@ -1180,12 +1180,6 @@ void I_StartupSound(void)
|
|||
audio.callback = I_UpdateStream;
|
||||
audio.userdata = &localdata;
|
||||
|
||||
if (dedicated)
|
||||
{
|
||||
nosound = nomidimusic = nodigimusic = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// Configure sound device
|
||||
CONS_Printf("I_StartupSound:\n");
|
||||
|
||||
|
@ -1481,9 +1475,6 @@ void I_InitMusic(void)
|
|||
I_AddExitFunc(I_ShutdownGMEMusic);
|
||||
#endif
|
||||
|
||||
if ((nomidimusic && nodigimusic) || dedicated)
|
||||
return;
|
||||
|
||||
#ifdef HAVE_MIXER
|
||||
MIX_VERSION(&MIXcompiled)
|
||||
MIXlinked = Mix_Linked_Version();
|
||||
|
|
Loading…
Reference in a new issue