- Modified the way autosaves are done. Instead of setting gameaction to
ga_autosave, write DEM_CHECKAUTOSAVE to the net stream. When this is processed, it will check if it's okay to do an autosave. If it is, it writes DEM_DOAUTOSAVE to the net stream, which the sets gameaction to ga_autosave. Essentially, about half of the functionality was moved out of G_DoAutoSave() and into Net_DoCommand(). - Minor changes to OS detection: The os_WinNT enumeration has been renamed to os_WinNT4, since every new OS coming out of Microsoft these days is essentially NT. NT 5.2 and 6.0 are now properly identified as "Windows Server 2003" and "Windows Vista" respectively, and any unknown NT versions Microsoft introduces in the future will now be displayed as "Windows NT" instead of "Windows 2000" if the minor version is 0 and "Windows XP" if the minor version is non-0. Win32s detection has also been removed. Presumably if somebody is foolish enough to try to run this on Windows 3.x with Win32s, it won't even load due to missing DLLs. - Fixed: Demos with NETD chunks should not set netgame to true unless they have more than one player. And since netdemo is ignored if netgame is false, it doesn't need to set that either. - Fixed: FTexture::GetScaled* functions did not check for scale values of 0. SVN r354 (trunk)
This commit is contained in:
parent
39d2ef0460
commit
7c1fbe7ee5
13 changed files with 89 additions and 54 deletions
|
|
@ -55,6 +55,9 @@
|
|||
int P_StartScript (AActor *who, line_t *where, int script, char *map, bool backSide,
|
||||
int arg0, int arg1, int arg2, int always, bool wantResultCode, bool net);
|
||||
|
||||
EXTERN_CVAR (Int, disableautosave)
|
||||
EXTERN_CVAR (Int, autosavecount)
|
||||
|
||||
//#define SIMULATEERRORS (RAND_MAX/3)
|
||||
#define SIMULATEERRORS 0
|
||||
|
||||
|
|
@ -2220,6 +2223,25 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
gameaction = ga_savegame;
|
||||
break;
|
||||
|
||||
case DEM_CHECKAUTOSAVE:
|
||||
// Do not autosave in multiplayer games or when dead.
|
||||
// For demo playback, DEM_DOAUTOSAVE already exists in the demo if the
|
||||
// autosave happened. And if it doesn't, we must not generate it.
|
||||
if (multiplayer ||
|
||||
demoplayback ||
|
||||
players[consoleplayer].playerstate != PST_LIVE ||
|
||||
disableautosave >= 2 ||
|
||||
autosavecount == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
Net_WriteByte (DEM_DOAUTOSAVE);
|
||||
break;
|
||||
|
||||
case DEM_DOAUTOSAVE:
|
||||
gameaction = ga_autosave;
|
||||
break;
|
||||
|
||||
case DEM_FOV:
|
||||
{
|
||||
float newfov = (float)ReadByte (stream);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue