- removed all savegame compatibility handling, since the data is just too different from what it was before to try to convert it.

This commit is contained in:
Christoph Oelckers 2016-04-03 20:55:23 +02:00
parent 4e5ba49aca
commit 3ee42f6aa6
15 changed files with 153 additions and 607 deletions

View file

@ -1929,13 +1929,6 @@ void G_DoLoadGame ()
BYTE *vars_p = (BYTE *)text;
C_ReadCVars (&vars_p);
delete[] text;
if (SaveVersion <= 4509)
{
// account for the flag shuffling for making freelook a 3-state option
INTBOOL flag = dmflags & DF_YES_FREELOOK;
dmflags = dmflags & ~DF_YES_FREELOOK;
if (flag) dmflags2 = dmflags2 | DF2_RESPAWN_SUPER;
}
}
// dearchive all the modifications

View file

@ -1493,26 +1493,11 @@ void G_SerializeLevel (FArchive &arc, bool hubLoad)
<< level.maptime
<< i;
if (SaveVersion >= 3313)
{
// This is a player property now
int nextmusic;
arc << nextmusic;
}
// Hub transitions must keep the current total time
if (!hubLoad)
level.totaltime = i;
if (SaveVersion >= 4507)
{
arc << level.skytexture1 << level.skytexture2;
}
else
{
level.skytexture1 = TexMan.GetTexture(arc.ReadName(), FTexture::TEX_Wall, FTextureManager::TEXMAN_Overridable | FTextureManager::TEXMAN_ReturnFirst);
level.skytexture2 = TexMan.GetTexture(arc.ReadName(), FTexture::TEX_Wall, FTextureManager::TEXMAN_Overridable | FTextureManager::TEXMAN_ReturnFirst);
}
if (arc.IsLoading())
{
sky1texture = level.skytexture1;
@ -1553,12 +1538,7 @@ void G_SerializeLevel (FArchive &arc, bool hubLoad)
P_SerializeSubsectors(arc);
StatusBar->Serialize (arc);
if (SaveVersion >= 4222)
{ // This must be done *after* thinkers are serialized.
arc << level.DefaultSkybox;
}
arc << level.total_monsters << level.total_items << level.total_secrets;
arc << level.DefaultSkybox << level.total_monsters << level.total_items << level.total_secrets;
// Does this level have custom translations?
FRemapTable *trans;
@ -1788,8 +1768,6 @@ void G_WriteSnapshots (FILE *file)
void G_ReadSnapshots (PNGHandle *png)
{
DWORD chunkLen;
BYTE namelen;
char mapname[256];
FString MapName;
level_info_t *i;
@ -1802,14 +1780,7 @@ void G_ReadSnapshots (PNGHandle *png)
DWORD snapver;
arc << snapver;
if (SaveVersion < 4508)
{
arc << namelen;
arc.Read(mapname, namelen);
mapname[namelen] = 0;
MapName = mapname;
}
else arc << MapName;
arc << MapName;
i = FindLevelInfo (MapName);
i->snapshotVer = snapver;
i->snapshot = new FCompressedMemFile;
@ -1824,14 +1795,7 @@ void G_ReadSnapshots (PNGHandle *png)
DWORD snapver;
arc << snapver;
if (SaveVersion < 4508)
{
arc << namelen;
arc.Read(mapname, namelen);
mapname[namelen] = 0;
MapName = mapname;
}
else arc << MapName;
arc << MapName;
TheDefaultLevelInfo.snapshotVer = snapver;
TheDefaultLevelInfo.snapshot = new FCompressedMemFile;
TheDefaultLevelInfo.snapshot->Serialize (arc);
@ -1842,27 +1806,12 @@ void G_ReadSnapshots (PNGHandle *png)
{
FPNGChunkArchive arc (png->File->GetFile(), VIST_ID, chunkLen);
if (SaveVersion < 4508)
{
arc << namelen;
while (namelen != 0)
{
arc.Read(mapname, namelen);
mapname[namelen] = 0;
i = FindLevelInfo(mapname);
i->flags |= LEVEL_VISITED;
arc << namelen;
}
}
else
{
while (arc << MapName, MapName.Len() > 0)
{
i = FindLevelInfo(MapName);
i->flags |= LEVEL_VISITED;
}
}
}
chunkLen = (DWORD)M_FindPNGChunk (png, RCLS_ID);
if (chunkLen != 0)
@ -1956,8 +1905,6 @@ void P_WriteACSDefereds (FILE *file)
void P_ReadACSDefereds (PNGHandle *png)
{
BYTE namelen;
char mapname[256];
FString MapName;
size_t chunklen;
@ -1967,24 +1914,6 @@ void P_ReadACSDefereds (PNGHandle *png)
{
FPNGChunkArchive arc (png->File->GetFile(), ACSD_ID, chunklen);
if (SaveVersion < 4508)
{
arc << namelen;
while (namelen != 0)
{
arc.Read(mapname, namelen);
mapname[namelen] = 0;
level_info_t *i = FindLevelInfo(mapname);
if (i == NULL)
{
I_Error("Unknown map '%s' in savegame", mapname);
}
arc << i->defered;
arc << namelen;
}
}
else
{
while (arc << MapName, MapName.Len() > 0)
{
level_info_t *i = FindLevelInfo(MapName);
@ -1995,7 +1924,6 @@ void P_ReadACSDefereds (PNGHandle *png)
arc << i->defered;
}
}
}
png->File->ResetFilePtr();
}

View file

@ -24,12 +24,7 @@ IMPLEMENT_CLASS (AHexenArmor)
void ABasicArmor::Serialize (FArchive &arc)
{
Super::Serialize (arc);
arc << SavePercent << BonusCount << MaxAbsorb << MaxFullAbsorb << AbsorbCount << ArmorType;
if (SaveVersion >= 4511)
{
arc << ActualSaveAmount;
}
arc << SavePercent << BonusCount << MaxAbsorb << MaxFullAbsorb << AbsorbCount << ArmorType << ActualSaveAmount;
}
//===========================================================================

View file

@ -1205,15 +1205,8 @@ IMPLEMENT_CLASS (APowerSpeed)
void APowerSpeed::Serialize(FArchive &arc)
{
Super::Serialize (arc);
if (SaveVersion < 4146)
{
SpeedFlags = 0;
}
else
{
arc << SpeedFlags;
}
}
//===========================================================================
//

View file

@ -44,26 +44,6 @@ void DLightningThinker::Serialize (FArchive &arc)
arc << Stopped << NextLightningFlash << LightningFlashCount;
if (SaveVersion < 3243)
{
// Do nothing with old savegames and just keep whatever the constructor made
// but read the obsolete data from the savegame
for (i = (numsectors + (numsectors+7)/8); i > 0; --i)
{
if (SaveVersion < 3223)
{
BYTE bytelight;
arc << bytelight;
}
else
{
short shortlight;
arc << shortlight;
}
}
return;
}
if (arc.IsLoading ())
{
if (LightningLightLevels != NULL)

View file

@ -90,16 +90,11 @@ void AWeapon::Serialize (FArchive &arc)
<< MoveCombatDist
<< Ammo1 << Ammo2 << SisterWeapon << GivenAsMorphWeapon
<< bAltFire
<< ReloadCounter;
if (SaveVersion >= 3615) {
arc << BobStyle << BobSpeed << BobRangeX << BobRangeY;
}
arc << FOVScale
<< Crosshair;
if (SaveVersion >= 4203)
{
arc << MinSelAmmo1 << MinSelAmmo2;
}
<< ReloadCounter
<< BobStyle << BobSpeed << BobRangeX << BobRangeY
<< FOVScale
<< Crosshair
<< MinSelAmmo1 << MinSelAmmo2;
}
//===========================================================================
@ -731,11 +726,8 @@ IMPLEMENT_CLASS(AWeaponGiver)
void AWeaponGiver::Serialize(FArchive &arc)
{
Super::Serialize(arc);
if (SaveVersion >= 4246)
{
arc << DropAmmoFactor;
}
}
bool AWeaponGiver::TryPickup(AActor *&toucher)
{

View file

@ -185,48 +185,18 @@ void DHUDMessage::Serialize (FArchive &arc)
arc << Left << Top << CenterX << HoldTics
<< Tics << State << TextColor
<< SBarID << SourceText << Font << Next
<< HUDWidth << HUDHeight;
if (SaveVersion >= 3960)
{
arc << NoWrap;
arc << ClipX << ClipY << ClipWidth << ClipHeight;
arc << WrapWidth;
}
else
{
NoWrap = false;
ClipX = ClipY = ClipWidth = ClipHeight = WrapWidth = 0;
}
if (SaveVersion >= 4525)
{
arc << HandleAspect;
}
else
{
HandleAspect = true;
}
<< HUDWidth << HUDHeight
<< NoWrap
<< ClipX << ClipY << ClipWidth << ClipHeight
<< WrapWidth
<< HandleAspect
<< VisibilityFlags
<< Style << Alpha;
if (arc.IsLoading())
{
Lines = NULL;
ResetText(SourceText);
}
if (SaveVersion < 3821)
{
VisibilityFlags = 0;
}
else
{
arc << VisibilityFlags;
}
if (SaveVersion < 3824)
{
Style = STYLE_Translucent;
Alpha = 1.;
}
else
{
arc << Style << Alpha;
}
}
//============================================================================

View file

@ -1650,20 +1650,12 @@ void DBaseStatusBar::ReceivedWeapon (AWeapon *weapon)
}
void DBaseStatusBar::Serialize (FArchive &arc)
{
if (SaveVersion < 3821)
{
memset(Messages, 0, sizeof(Messages));
arc << Messages[HUDMSGLayer_Default];
}
else
{
for (size_t i = 0; i < countof(Messages); ++i)
{
arc << Messages[i];
}
}
}
void DBaseStatusBar::ScreenSizeChanged ()
{

View file

@ -1654,13 +1654,13 @@ void FBehavior::StaticSerializeModuleStates (FArchive &arc)
if (arc.IsStoring())
{
arc.WriteString (module->ModuleName);
if (SaveVersion >= 4516) arc << ModSize;
arc << ModSize;
}
else
{
char *modname = NULL;
arc << modname;
if (SaveVersion >= 4516) arc << ModSize;
arc << ModSize;
if (stricmp (modname, module->ModuleName) != 0)
{
delete[] modname;
@ -2898,21 +2898,6 @@ void FBehavior::StaticStopMyScripts (AActor *actor)
//==========================================================================
void P_SerializeACSScriptNumber(FArchive &arc, int &scriptnum, bool was2byte)
{
if (SaveVersion < 3359)
{
if (was2byte)
{
WORD oldver;
arc << oldver;
scriptnum = oldver;
}
else
{
arc << scriptnum;
}
}
else
{
arc << scriptnum;
// If the script number is negative, then it's really a name.
@ -2930,7 +2915,6 @@ void P_SerializeACSScriptNumber(FArchive &arc, int &scriptnum, bool was2byte)
}
}
}
}
//---- The ACS Interpreter ----//
@ -2969,10 +2953,6 @@ void DACSThinker::Serialize (FArchive &arc)
int scriptcount = 0;
Super::Serialize (arc);
if (SaveVersion < 4515)
arc << Scripts << LastScript;
else
{
if (arc.IsStoring())
{
DLevelScript *script;
@ -3016,7 +2996,6 @@ void DACSThinker::Serialize (FArchive &arc)
LastScript = Scripts;
}
}
}
if (arc.IsStoring ())
{
ScriptMap::Iterator it(RunningScripts);
@ -3102,8 +3081,6 @@ void DLevelScript::Serialize (FArchive &arc)
DWORD i;
Super::Serialize (arc);
if (SaveVersion < 4515)
arc << next << prev;
P_SerializeACSScriptNumber(arc, script, false);
@ -3140,24 +3117,10 @@ void DLevelScript::Serialize (FArchive &arc)
arc << activefont
<< hudwidth << hudheight;
if (SaveVersion >= 3960)
{
arc << ClipRectLeft << ClipRectTop << ClipRectWidth << ClipRectHeight
<< WrapWidth;
}
else
{
ClipRectLeft = ClipRectTop = ClipRectWidth = ClipRectHeight = WrapWidth = 0;
}
if (SaveVersion >= 4058)
{
arc << InModuleScriptNumber;
}
else
{ // Don't worry about locating profiling info for old saves.
InModuleScriptNumber = -1;
}
}
DLevelScript::DLevelScript ()
{

View file

@ -275,29 +275,17 @@ void AActor::Serialize(FArchive &arc)
arc << dmg;
Damage = UncalcDamageValue(dmg, GetDefault()->Damage);
}
if (SaveVersion >= 4530)
{
P_SerializeTerrain(arc, floorterrain);
}
if (SaveVersion >= 3227)
{
arc << projectileKickback;
}
arc << flags
arc << projectileKickback
<< flags
<< flags2
<< flags3
<< flags4
<< flags5
<< flags6;
if (SaveVersion >= 4504)
{
arc << flags7;
}
if (SaveVersion >= 4512)
{
arc << weaponspecial;
}
arc << special1
<< flags6
<< flags7
<< weaponspecial
<< special1
<< special2
<< specialf1
<< specialf2
@ -313,12 +301,9 @@ void AActor::Serialize(FArchive &arc)
<< threshold
<< player
<< SpawnPoint
<< SpawnAngle;
if (SaveVersion >= 4506)
{
arc << StartHealth;
}
arc << skillrespawncount
<< SpawnAngle
<< StartHealth
<< skillrespawncount
<< tracer
<< Floorclip
<< tid
@ -332,21 +317,13 @@ void AActor::Serialize(FArchive &arc)
arc << args[0];
}
arc << args[1] << args[2] << args[3] << args[4];
if (SaveVersion >= 3427)
{
arc << accuracy << stamina;
}
arc << goal
<< waterlevel
<< MinMissileChance
<< SpawnFlags
<< Inventory
<< InventoryID;
if (SaveVersion < 4513)
{
SDWORD id;
arc << id;
}
arc << FloatBobPhase
<< Translation
<< SeeSound
@ -376,16 +353,9 @@ void AActor::Serialize(FArchive &arc)
<< meleethreshold
<< meleerange
<< DamageType;
if (SaveVersion >= 4501)
{
arc << DamageTypeReceived;
}
if (SaveVersion >= 3237)
{
arc
<< PainType
arc << PainType
<< DeathType;
}
arc << Gravity
<< FastChaseStrafeCount
<< master
@ -396,48 +366,23 @@ void AActor::Serialize(FArchive &arc)
<< pushfactor
<< Species
<< Score;
if (SaveVersion >= 3113)
{
arc << DesignatedTeam;
}
arc << lastpush << lastbump
<< PainThreshold
<< DamageFactor;
if (SaveVersion >= 4516)
{
arc << DamageMultiply;
}
else
{
DamageMultiply = 1.;
}
arc << WeaveIndexXY << WeaveIndexZ
<< PoisonDamageReceived << PoisonDurationReceived << PoisonPeriodReceived << Poisoner
<< PoisonDamage << PoisonDuration << PoisonPeriod;
if (SaveVersion >= 3235)
{
arc << PoisonDamageType << PoisonDamageTypeReceived;
}
arc << ConversationRoot << Conversation;
if (SaveVersion >= 4509)
{
arc << FriendPlayer;
}
if (SaveVersion >= 4517)
{
arc << TeleFogSourceType
<< TeleFogDestType;
}
if (SaveVersion >= 4518)
{
arc << RipperLevel
<< RipLevelMin
<< RipLevelMax;
}
if (SaveVersion >= 4533)
{
arc << DefThreshold;
}
{
FString tagstr;

View file

@ -341,22 +341,8 @@ void P_SerializeWorld (FArchive &arc)
{
arc << sec->floorplane
<< sec->ceilingplane;
if (SaveVersion < 3223)
{
BYTE bytelight;
arc << bytelight;
sec->lightlevel = bytelight;
}
else
{
arc << sec->lightlevel;
}
arc << sec->special;
if (SaveVersion < 4523)
{
short tag;
arc << tag;
}
arc << sec->soundtraversed
<< sec->seqType
<< sec->friction
@ -372,49 +358,12 @@ void P_SerializeWorld (FArchive &arc)
<< sec->heightsec
<< sec->bottommap << sec->midmap << sec->topmap
<< sec->gravity;
if (SaveVersion >= 4530)
{
P_SerializeTerrain(arc, sec->terrainnum[0]);
P_SerializeTerrain(arc, sec->terrainnum[1]);
}
if (SaveVersion >= 4529)
{
arc << sec->damageamount;
}
else
{
short dmg;
arc << dmg;
sec->damageamount = dmg;
}
if (SaveVersion >= 4528)
{
arc << sec->damageinterval
<< sec->leakydamage
<< sec->damagetype;
}
else
{
short damagemod;
arc << damagemod;
sec->damagetype = MODtoDamageType(damagemod);
if (sec->damageamount < 20)
{
sec->leakydamage = 0;
sec->damageinterval = 32;
}
else if (sec->damageamount < 50)
{
sec->leakydamage = 5;
sec->damageinterval = 32;
}
else
{
sec->leakydamage = 256;
sec->damageinterval = 1;
}
}
arc << sec->SoundTarget
<< sec->SecActTarget
<< sec->sky
@ -422,13 +371,6 @@ void P_SerializeWorld (FArchive &arc)
<< sec->Flags
<< sec->SkyBoxes[sector_t::floor] << sec->SkyBoxes[sector_t::ceiling]
<< sec->ZoneNumber;
if (SaveVersion < 4529)
{
short secretsector;
arc << secretsector;
if (secretsector) sec->Flags |= SECF_WASSECRET;
P_InitSectorSpecial(sec, sec->special, true);
}
arc << sec->interpolations[0]
<< sec->interpolations[1]
<< sec->interpolations[2]
@ -461,11 +403,6 @@ void P_SerializeWorld (FArchive &arc)
<< li->special
<< li->Alpha;
if (SaveVersion < 4523)
{
int id;
arc << id;
}
if (P_IsACSSpecial(li->special))
{
P_SerializeACSScriptNumber(arc, li->args[0], false);
@ -476,12 +413,7 @@ void P_SerializeWorld (FArchive &arc)
}
arc << li->args[1] << li->args[2] << li->args[3] << li->args[4];
if (SaveVersion >= 4532)
{
arc << li->portalindex;
}
else li->portalindex = UINT_MAX;
for (j = 0; j < 2; j++)
{
if (li->sidedef[j] == NULL)
@ -517,14 +449,7 @@ void P_SerializeWorld (FArchive &arc)
arc << zn->Environment;
}
if (SaveVersion >= 4532)
{
arc << linePortals;
}
else
{
linePortals.Clear();
}
P_CollectLinkedPortals();
}

View file

@ -1051,17 +1051,6 @@ double sector_t::NextLowestFloorAt(double x, double y, double z, int flags, doub
//===========================================================================
FArchive &operator<< (FArchive &arc, secspecial_t &p)
{
if (SaveVersion < 4529)
{
int special;
arc << special;
sector_t sec;
memset(&sec, 0, sizeof(sec));
P_InitSectorSpecial(&sec, special, true);
sec.GetSpecial(&p);
}
else
{
arc << p.special
<< p.damageamount
@ -1069,7 +1058,6 @@ FArchive &operator<< (FArchive &arc, secspecial_t &p)
<< p.damageinterval
<< p.leakydamage
<< p.Flags;
}
return arc;
}

View file

@ -665,16 +665,7 @@ IMPLEMENT_CLASS (DLightTransfer)
void DLightTransfer::Serialize (FArchive &arc)
{
Super::Serialize (arc);
if (SaveVersion < 3223)
{
BYTE bytelight;
arc << bytelight;
LastLight = bytelight;
}
else
{
arc << LastLight;
}
arc << Source << TargetTag << CopyFloor;
}
@ -762,16 +753,7 @@ IMPLEMENT_CLASS (DWallLightTransfer)
void DWallLightTransfer::Serialize (FArchive &arc)
{
Super::Serialize (arc);
if (SaveVersion < 3223)
{
BYTE bytelight;
arc << bytelight;
LastLight = bytelight;
}
else
{
arc << LastLight;
}
arc << Source << TargetID << Flags;
}
@ -1058,7 +1040,7 @@ static void P_SetupSectorDamage(sector_t *sector, int damage, int interval, int
// ('fromload' is necessary to allow conversion upon savegame load.)
//
void P_InitSectorSpecial(sector_t *sector, int special, bool nothinkers)
void P_InitSectorSpecial(sector_t *sector, int special)
{
// [RH] All secret sectors are marked with a BOOM-ish bitfield
if (sector->special & SECRET_MASK)
@ -1093,28 +1075,28 @@ void P_InitSectorSpecial(sector_t *sector, int special, bool nothinkers)
switch (sector->special)
{
case Light_Phased:
if (!nothinkers) new DPhased (sector, 48, 63 - (sector->lightlevel & 63));
new DPhased (sector, 48, 63 - (sector->lightlevel & 63));
break;
// [RH] Hexen-like phased lighting
case LightSequenceStart:
if (!nothinkers) new DPhased (sector);
new DPhased (sector);
break;
case dLight_Flicker:
if (!nothinkers) new DLightFlash (sector);
new DLightFlash (sector);
break;
case dLight_StrobeFast:
if (!nothinkers) new DStrobe (sector, STROBEBRIGHT, FASTDARK, false);
new DStrobe (sector, STROBEBRIGHT, FASTDARK, false);
break;
case dLight_StrobeSlow:
if (!nothinkers) new DStrobe (sector, STROBEBRIGHT, SLOWDARK, false);
new DStrobe (sector, STROBEBRIGHT, SLOWDARK, false);
break;
case dLight_Strobe_Hurt:
if (!nothinkers) new DStrobe (sector, STROBEBRIGHT, FASTDARK, false);
new DStrobe (sector, STROBEBRIGHT, FASTDARK, false);
P_SetupSectorDamage(sector, 20, 32, 5, NAME_Slime, 0);
break;
@ -1127,7 +1109,7 @@ void P_InitSectorSpecial(sector_t *sector, int special, bool nothinkers)
break;
case dLight_Glow:
if (!nothinkers) new DGlow (sector);
new DGlow (sector);
break;
case dSector_DoorCloseIn30:
@ -1139,11 +1121,11 @@ void P_InitSectorSpecial(sector_t *sector, int special, bool nothinkers)
break;
case dLight_StrobeSlowSync:
if (!nothinkers) new DStrobe (sector, STROBEBRIGHT, SLOWDARK, true);
new DStrobe (sector, STROBEBRIGHT, SLOWDARK, true);
break;
case dLight_StrobeFastSync:
if (!nothinkers) new DStrobe (sector, STROBEBRIGHT, FASTDARK, true);
new DStrobe (sector, STROBEBRIGHT, FASTDARK, true);
break;
case dSector_DoorRaiseIn5Mins:
@ -1161,7 +1143,7 @@ void P_InitSectorSpecial(sector_t *sector, int special, bool nothinkers)
break;
case dLight_FireFlicker:
if (!nothinkers) new DFireFlicker (sector);
new DFireFlicker (sector);
break;
case dDamage_LavaWimpy:
@ -1174,11 +1156,8 @@ void P_InitSectorSpecial(sector_t *sector, int special, bool nothinkers)
case dScroll_EastLavaDamage:
P_SetupSectorDamage(sector, 5, 32, 256, NAME_Fire, SECF_DMGTERRAINFX);
if (!nothinkers)
{
new DStrobe(sector, STROBEBRIGHT, FASTDARK, false);
P_CreateScroller(EScroll::sc_floor, -4., 0, -1, int(sector - sectors), 0);
}
keepspecial = true;
break;
@ -1188,7 +1167,7 @@ void P_InitSectorSpecial(sector_t *sector, int special, bool nothinkers)
case sLight_Strobe_Hurt:
P_SetupSectorDamage(sector, 5, 32, 0, NAME_Slime, 0);
if (!nothinkers) new DStrobe (sector, STROBEBRIGHT, FASTDARK, false);
new DStrobe (sector, STROBEBRIGHT, FASTDARK, false);
break;
case sDamage_Hellslime:
@ -1237,13 +1216,13 @@ void P_InitSectorSpecial(sector_t *sector, int special, bool nothinkers)
int i = sector->special - Scroll_North_Slow;
double dx = hexenScrollies[i][0] / 2.;
double dy = hexenScrollies[i][1] / 2.;
if (!nothinkers) P_CreateScroller(EScroll::sc_floor, dx, dy, -1, int(sector-sectors), 0);
P_CreateScroller(EScroll::sc_floor, dx, dy, -1, int(sector-sectors), 0);
}
else if (sector->special >= Carry_East5 &&
sector->special <= Carry_East35)
{ // Heretic scroll special
// Only east scrollers also scroll the texture
if (!nothinkers) P_CreateScroller(EScroll::sc_floor,
P_CreateScroller(EScroll::sc_floor,
-0.5 * (1 << ((sector->special & 0xff) - Carry_East5)), 0, -1, int(sector-sectors), 0);
}
keepspecial = true;
@ -1272,7 +1251,7 @@ void P_SpawnSpecials (void)
if (sector->special == 0)
continue;
P_InitSectorSpecial(sector, sector->special, false);
P_InitSectorSpecial(sector, sector->special);
}
#ifndef NO_EDATA

View file

@ -643,29 +643,11 @@ void APlayerPawn::Serialize (FArchive &arc)
<< DamageFade
<< PlayerFlags
<< FlechetteType;
if (SaveVersion < 3829)
{
GruntSpeed = 12;
FallingScreamMinSpeed = 35;
FallingScreamMaxSpeed = 40;
}
else
{
arc << GruntSpeed << FallingScreamMinSpeed << FallingScreamMaxSpeed;
}
if (SaveVersion >= 4502)
{
arc << UseRange;
}
if (SaveVersion >= 4503)
{
arc << AirCapacity;
}
if (SaveVersion >= 4526)
{
arc << ViewHeight;
}
}
//===========================================================================
//
@ -3039,11 +3021,6 @@ void player_t::Serialize (FArchive &arc)
<< centering
<< health
<< inventorytics;
if (SaveVersion < 4513)
{
bool backpack;
arc << backpack;
}
arc << fragcount
<< spreecount
<< multicount
@ -3074,50 +3051,14 @@ void player_t::Serialize (FArchive &arc)
<< air_finished
<< turnticks
<< oldbuttons;
if (SaveVersion >= 4929)
{
arc << hazardtype
<< hazardinterval;
}
bool IsBot = false;
if (SaveVersion >= 4514)
{
arc << Bot;
}
else
{
arc << IsBot;
}
arc << BlendR
<< BlendG
<< BlendB
<< BlendA;
if (SaveVersion < 3427)
{
WORD oldaccuracy, oldstamina;
arc << oldaccuracy << oldstamina;
if (mo != NULL)
{
mo->accuracy = oldaccuracy;
mo->stamina = oldstamina;
}
}
if (SaveVersion < 4041)
{
// Move weapon state flags from cheats and into WeaponState.
WeaponState = ((cheats >> 14) & 1) | ((cheats & (0x37 << 24)) >> (24 - 1));
cheats &= ~((1 << 14) | (0x37 << 24));
}
if (SaveVersion < 4527)
{
BYTE oldWeaponState;
arc << oldWeaponState;
WeaponState = oldWeaponState;
}
else
{
arc << WeaponState;
}
arc << LogText
<< ConversationNPC
<< ConversationPC
@ -3137,45 +3078,10 @@ void player_t::Serialize (FArchive &arc)
<< crouchviewdelta
<< original_cmd
<< original_oldbuttons;
if (SaveVersion >= 3475)
{
arc << poisontype << poisonpaintype;
}
else if (poisoner != NULL)
{
poisontype = poisoner->DamageType;
poisonpaintype = poisoner->PainType != NAME_None ? poisoner->PainType : poisoner->DamageType;
}
if (SaveVersion >= 3599)
{
arc << timefreezer;
}
else
{
cheats &= ~(1 << 15); // make sure old CF_TIMEFREEZE bit is cleared
}
if (SaveVersion < 3640)
{
cheats &= ~(1 << 17); // make sure old CF_REGENERATION bit is cleared
}
if (SaveVersion >= 3780)
{
arc << settings_controller;
}
else
{
settings_controller = (this - players == Net_Arbitrator);
}
if (SaveVersion >= 4505)
{
arc << onground;
}
else
{
onground = (mo->Z() <= mo->floorz) || (mo->flags2 & MF2_ONMOBJ) || (mo->BounceFlags & BOUNCE_MBF) || (cheats & CF_NOCLIP2);
}
if (arc.IsLoading ())
{
@ -3188,11 +3094,8 @@ void player_t::Serialize (FArchive &arc)
{
userinfo.SkinChanged(skinname, CurrentPlayerClass);
}
if (SaveVersion >= 4522)
{
arc << MUSINFOactor << MUSINFOtics;
}
}
bool P_IsPlayerTotallyFrozen(const player_t *player)
{

View file

@ -72,11 +72,11 @@ const char *GetVersionString();
// SAVESIG should match SAVEVER.
// MINSAVEVER is the minimum level snapshot version that can be loaded.
#define MINSAVEVER 4535
#define MINSAVEVER 4536
// Use 4500 as the base git save version, since it's higher than the
// SVN revision ever got.
#define SAVEVER 4535
#define SAVEVER 4536
#define SAVEVERSTRINGIFY2(x) #x
#define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x)