mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 22:33:17 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
d2b0596cd4
4 changed files with 21 additions and 13 deletions
|
@ -1385,7 +1385,7 @@ bool DoArbitrate (void *userdata)
|
||||||
|
|
||||||
stream = &netbuffer[4];
|
stream = &netbuffer[4];
|
||||||
s = ReadString (&stream);
|
s = ReadString (&stream);
|
||||||
startmap = FString(s, 8);
|
startmap = s;
|
||||||
delete[] s;
|
delete[] s;
|
||||||
rngseed = ReadLong (&stream);
|
rngseed = ReadLong (&stream);
|
||||||
C_ReadCVars (&stream);
|
C_ReadCVars (&stream);
|
||||||
|
|
|
@ -2302,11 +2302,10 @@ void G_BeginRecording (const char *startmap)
|
||||||
WriteWord (DEMOGAMEVERSION, &demo_p); // Write ZDoom version
|
WriteWord (DEMOGAMEVERSION, &demo_p); // Write ZDoom version
|
||||||
*demo_p++ = 2; // Write minimum version needed to use this demo.
|
*demo_p++ = 2; // Write minimum version needed to use this demo.
|
||||||
*demo_p++ = 3; // (Useful?)
|
*demo_p++ = 3; // (Useful?)
|
||||||
for (i = 0; i < 8; i++) // Write name of map demo was recorded on.
|
|
||||||
{
|
strcpy((char*)demo_p, startmap); // Write name of map demo was recorded on.
|
||||||
*demo_p++ = startmap[i];
|
demo_p += strlen(startmap) + 1;
|
||||||
}
|
WriteLong(rngseed, &demo_p); // Write RNG seed
|
||||||
WriteLong (rngseed, &demo_p); // Write RNG seed
|
|
||||||
*demo_p++ = consoleplayer;
|
*demo_p++ = consoleplayer;
|
||||||
FinishChunk (&demo_p);
|
FinishChunk (&demo_p);
|
||||||
|
|
||||||
|
@ -2385,7 +2384,7 @@ CCMD (timedemo)
|
||||||
|
|
||||||
// [RH] Process all the information in a FORM ZDEM
|
// [RH] Process all the information in a FORM ZDEM
|
||||||
// until a BODY chunk is entered.
|
// until a BODY chunk is entered.
|
||||||
bool G_ProcessIFFDemo (char *mapname)
|
bool G_ProcessIFFDemo (FString &mapname)
|
||||||
{
|
{
|
||||||
bool headerHit = false;
|
bool headerHit = false;
|
||||||
bool bodyHit = false;
|
bool bodyHit = false;
|
||||||
|
@ -2441,9 +2440,16 @@ bool G_ProcessIFFDemo (char *mapname)
|
||||||
Printf ("Demo requires a newer version of ZDoom!\n");
|
Printf ("Demo requires a newer version of ZDoom!\n");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
memcpy (mapname, demo_p, 8); // Read map name
|
if (demover >= 0x21a)
|
||||||
mapname[8] = 0;
|
{
|
||||||
|
mapname = (char*)demo_p;
|
||||||
|
demo_p += mapname.Len() + 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mapname = FString((char*)demo_p, 8);
|
||||||
demo_p += 8;
|
demo_p += 8;
|
||||||
|
}
|
||||||
rngseed = ReadLong (&demo_p);
|
rngseed = ReadLong (&demo_p);
|
||||||
// Only reset the RNG if this demo is not in conjunction with a savegame.
|
// Only reset the RNG if this demo is not in conjunction with a savegame.
|
||||||
if (mapname[0] != 0)
|
if (mapname[0] != 0)
|
||||||
|
@ -2525,7 +2531,7 @@ bool G_ProcessIFFDemo (char *mapname)
|
||||||
|
|
||||||
void G_DoPlayDemo (void)
|
void G_DoPlayDemo (void)
|
||||||
{
|
{
|
||||||
char mapname[9];
|
FString mapname;
|
||||||
int demolump;
|
int demolump;
|
||||||
|
|
||||||
gameaction = ga_nothing;
|
gameaction = ga_nothing;
|
||||||
|
@ -2578,7 +2584,7 @@ void G_DoPlayDemo (void)
|
||||||
// don't spend a lot of time in loadlevel
|
// don't spend a lot of time in loadlevel
|
||||||
precache = false;
|
precache = false;
|
||||||
demonew = true;
|
demonew = true;
|
||||||
if (mapname[0] != 0)
|
if (mapname.Len() != 0)
|
||||||
{
|
{
|
||||||
G_InitNew (mapname, false);
|
G_InitNew (mapname, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1410,6 +1410,8 @@ void G_SerializeLevel (FArchive &arc, bool hubLoad)
|
||||||
}
|
}
|
||||||
if (arc.IsLoading())
|
if (arc.IsLoading())
|
||||||
{
|
{
|
||||||
|
sky1texture = level.skytexture1;
|
||||||
|
sky2texture = level.skytexture2;
|
||||||
R_InitSkyMap();
|
R_InitSkyMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ const char *GetVersionString();
|
||||||
// Protocol version used in demos.
|
// Protocol version used in demos.
|
||||||
// Bump it if you change existing DEM_ commands or add new ones.
|
// Bump it if you change existing DEM_ commands or add new ones.
|
||||||
// Otherwise, it should be safe to leave it alone.
|
// Otherwise, it should be safe to leave it alone.
|
||||||
#define DEMOGAMEVERSION 0x219
|
#define DEMOGAMEVERSION 0x21A
|
||||||
|
|
||||||
// Minimum demo version we can play.
|
// Minimum demo version we can play.
|
||||||
// Bump it whenever you change or remove existing DEM_ commands.
|
// Bump it whenever you change or remove existing DEM_ commands.
|
||||||
|
|
Loading…
Reference in a new issue