Merge branch 'master' into portals2_visual

This commit is contained in:
Braden Obrzut 2016-01-18 09:45:42 -05:00
commit f3f77a1ba0
303 changed files with 21853 additions and 10014 deletions

View file

@ -48,6 +48,7 @@
#include "w_wad.h"
#include "p_tags.h"
#include "portal.h"
#include "p_terrain.h"
//===========================================================================
//
@ -475,6 +476,7 @@ public:
th->RenderStyle = STYLE_Count;
th->alpha = -1;
th->health = 1;
th->FloatbobPhase = -1;
sc.MustGetToken('{');
while (!sc.CheckToken('}'))
{
@ -632,6 +634,11 @@ public:
Flag(th->flags, MTF_SECRET, key);
break;
case NAME_Floatbobphase:
CHECK_N(Zd | Zdt)
th->FloatbobPhase = CheckInt(key);
break;
case NAME_Renderstyle:
{
FName style = CheckString(key);
@ -780,7 +787,7 @@ public:
bool strifetrans = false;
bool strifetrans2 = false;
FString arg0str, arg1str;
int lineid; // forZDoomTranslated namespace
int lineid = -1; // forZDoomTranslated namespace
FString tagstring;
memset(ld, 0, sizeof(*ld));
@ -1077,7 +1084,7 @@ public:
maplinedef_t mld;
memset(&mld, 0, sizeof(mld));
mld.special = ld->special;
mld.tag = lineid;
mld.tag = ld->args[0];
P_TranslateLineDef(ld, &mld);
ld->flags = saved | (ld->flags&(ML_MONSTERSCANACTIVATE|ML_REPEAT_SPECIAL|ML_FIRSTSIDEONLY));
}
@ -1294,6 +1301,8 @@ public:
sec->prevsec = -1; // stair retriggering until build completes
sec->heightsec = NULL; // sector used to get floor and ceiling height
sec->sectornum = index;
sec->damageinterval = 32;
sec->terrainnum[sector_t::ceiling] = sec->terrainnum[sector_t::floor] = -1;
if (floordrop) sec->Flags = SECF_FLOORDROP;
// killough 3/7/98: end changes
@ -1519,6 +1528,39 @@ public:
cp[3] = CheckFloat(key);
break;
case NAME_damageamount:
sec->damageamount = CheckInt(key);
break;
case NAME_damagetype:
sec->damagetype = CheckString(key);
break;
case NAME_damageinterval:
sec->damageinterval = CheckInt(key);
if (sec->damageinterval < 1) sec->damageinterval = 1;
break;
case NAME_leakiness:
sec->leakydamage = CheckInt(key);
break;
case NAME_damageterraineffect:
Flag(sec->Flags, SECF_DMGTERRAINFX, key);
break;
case NAME_damagehazard:
Flag(sec->Flags, SECF_HAZARD, key);
break;
case NAME_floorterrain:
sec->terrainnum[sector_t::floor] = P_FindTerrain(CheckString(key));
break;
case NAME_ceilingterrain:
sec->terrainnum[sector_t::ceiling] = P_FindTerrain(CheckString(key));
break;
case NAME_MoreIds:
// delay parsing of the tag string until parsing of the sector is complete
// This ensures that the ID is always the first tag in the list.
@ -1545,7 +1587,15 @@ public:
}
}
sec->secretsector = !!(sec->special&SECRET_MASK);
if (sec->damageamount == 0)
{
// If no damage is set, clear all other related properties so that they do not interfere
// with other means of setting them.
sec->damagetype = NAME_None;
sec->damageinterval = 0;
sec->leakydamage = 0;
sec->Flags &= ~SECF_DAMAGEFLAGS;
}
// Reset the planes to their defaults if not all of the plane equation's parameters were found.
if (fplaneflags != 15)
@ -1589,10 +1639,10 @@ public:
{
// [RH] Sectors default to white light with the default fade.
// If they are outside (have a sky ceiling), they use the outside fog.
if (level.outsidefog != 0xff000000 && (sec->GetTexture(sector_t::ceiling) == skyflatnum || (sec->special&0xff) == Sector_Outside))
if (level.outsidefog != 0xff000000 && (sec->GetTexture(sector_t::ceiling) == skyflatnum || (sec->special & 0xff) == Sector_Outside))
{
if (fogMap == NULL)
fogMap = GetSpecialLights (PalEntry (255,255,255), level.outsidefog, 0);
fogMap = GetSpecialLights(PalEntry(255, 255, 255), level.outsidefog, 0);
sec->ColorMap = fogMap;
}
else
@ -1605,9 +1655,9 @@ public:
else
{
if (lightcolor == -1) lightcolor = PalEntry(255,255,255);
if (fadecolor == -1)
if (fadecolor == -1)
{
if (level.outsidefog != 0xff000000 && (sec->GetTexture(sector_t::ceiling) == skyflatnum || (sec->special&0xff) == Sector_Outside))
if (level.outsidefog != 0xff000000 && (sec->GetTexture(sector_t::ceiling) == skyflatnum || (sec->special & 0xff) == Sector_Outside))
fadecolor = level.outsidefog;
else
fadecolor = level.fadeto;