Merge branch 'master' into scripting

Conflicts:
	src/g_heretic/a_hereticweaps.cpp
	src/thingdef/thingdef_codeptr.cpp
This commit is contained in:
Christoph Oelckers 2015-06-07 09:43:54 +02:00
commit 7ba577e1b0
33 changed files with 466 additions and 220 deletions

View file

@ -1411,7 +1411,6 @@ void P_ExplodeMissile (AActor *mo, line_t *line, AActor *target)
z = mo->z;
F3DFloor * ffloor=NULL;
#ifdef _3DFLOORS
if (line->sidedef[side^1] != NULL)
{
sector_t * backsector = line->sidedef[side^1]->sector;
@ -1431,7 +1430,6 @@ void P_ExplodeMissile (AActor *mo, line_t *line, AActor *target)
}
}
}
#endif
DImpactDecal::StaticCreate (base->GetDecal (),
x, y, z, line->sidedef[side], ffloor);
@ -2259,7 +2257,6 @@ explode:
{
if (mo->dropoffz != mo->floorz) // 3DMidtex or other special cases that must be excluded
{
#ifdef _3DFLOORS
unsigned i;
for(i=0;i<mo->Sector->e->XFloor.ffloors.Size();i++)
{
@ -2270,7 +2267,6 @@ explode:
if (rover->flags&FF_SOLID && rover->top.plane->ZatPoint(mo->x,mo->y)==mo->floorz) break;
}
if (i==mo->Sector->e->XFloor.ffloors.Size())
#endif
return oldfloorz;
}
}
@ -3223,8 +3219,24 @@ void AActor::SetShade (int r, int g, int b)
fillcolor = MAKEARGB(ColorMatcher.Pick (r, g, b), r, g, b);
}
void AActor::SetPitch(int p, bool interpolate)
void AActor::SetPitch(int p, bool interpolate, bool forceclamp)
{
if (player != NULL || forceclamp)
{ // clamp the pitch we set
int min, max;
if (player != NULL)
{
min = player->MinPitch;
max = player->MaxPitch;
}
else
{
min = -ANGLE_90 + (1 << ANGLETOFINESHIFT);
max = ANGLE_90 - (1 << ANGLETOFINESHIFT);
}
p = clamp<int>(p, min, max);
}
if (p != pitch)
{
pitch = p;
@ -3659,12 +3671,8 @@ void AActor::Tick ()
{
secplane_t floorplane;
#ifdef _3DFLOORS
// Check 3D floors as well
floorplane = P_FindFloorPlane(floorsector, x, y, floorz);
#else
floorplane = floorsector->floorplane;
#endif
if (floorplane.c < STEEPSLOPE &&
floorplane.ZatPoint (x, y) <= floorz)
@ -3982,7 +3990,6 @@ bool AActor::UpdateWaterLevel (fixed_t oldz, bool dosplash)
reset = true;
}
}
#ifdef _3DFLOORS
else
{
// Check 3D floors as well!
@ -4016,7 +4023,6 @@ bool AActor::UpdateWaterLevel (fixed_t oldz, bool dosplash)
break;
}
}
#endif
}
// some additional checks to make deep sectors like Boom's splash without setting
@ -5465,7 +5471,6 @@ bool P_HitWater (AActor * thing, sector_t * sec, fixed_t x, fixed_t y, fixed_t z
}
#endif
#ifdef _3DFLOORS
for(unsigned int i=0;i<sec->e->XFloor.ffloors.Size();i++)
{
F3DFloor * rover = sec->e->XFloor.ffloors[i];
@ -5482,7 +5487,6 @@ bool P_HitWater (AActor * thing, sector_t * sec, fixed_t x, fixed_t y, fixed_t z
planez = rover->bottom.plane->ZatPoint(x, y);
if (planez < z && !(planez < thing->floorz)) return false;
}
#endif
hsec = sec->GetHeightSec();
if (hsec == NULL || !(hsec->MoreFlags & SECF_CLIPFAKEPLANES))
{
@ -5492,9 +5496,7 @@ bool P_HitWater (AActor * thing, sector_t * sec, fixed_t x, fixed_t y, fixed_t z
{
terrainnum = TerrainTypes[hsec->GetTexture(sector_t::floor)];
}
#ifdef _3DFLOORS
foundone:
#endif
int splashnum = Terrains[terrainnum].Splash;
bool smallsplash = false;
@ -5597,7 +5599,6 @@ bool P_HitFloor (AActor *thing)
break;
}
#ifdef _3DFLOORS
// Check 3D floors
for(unsigned int i=0;i<m->m_sector->e->XFloor.ffloors.Size();i++)
{
@ -5611,7 +5612,6 @@ bool P_HitFloor (AActor *thing)
}
}
}
#endif
}
if (m == NULL || m->m_sector->GetHeightSec() != NULL)
{