Merge branch 'floatcvt' of https://github.com/rheit/zdoom into floatcvt

# Conflicts:
#	src/p_saveg.cpp
#	src/r_defs.h
This commit is contained in:
Christoph Oelckers 2016-04-03 22:16:06 +02:00
commit 447ce0abe7
32 changed files with 392 additions and 869 deletions

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 << 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 << LastLight;
arc << Source << TargetID << Flags;
}
@ -1075,7 +1057,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)
@ -1110,28 +1092,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;
@ -1144,7 +1126,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:
@ -1156,11 +1138,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:
@ -1178,7 +1160,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:
@ -1191,11 +1173,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);
}
new DStrobe(sector, STROBEBRIGHT, FASTDARK, false);
P_CreateScroller(EScroll::sc_floor, -4., 0, -1, int(sector - sectors), 0);
keepspecial = true;
break;
@ -1205,7 +1184,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:
@ -1254,13 +1233,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;
@ -1290,7 +1269,7 @@ void P_SpawnSpecials (void)
if (sector->special == 0)
continue;
P_InitSectorSpecial(sector, sector->special, false);
P_InitSectorSpecial(sector, sector->special);
}
#ifndef NO_EDATA