mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix bad master merge
This commit is contained in:
parent
5852b40482
commit
83c74af696
1 changed files with 0 additions and 163 deletions
163
src/p_mobj.c
163
src/p_mobj.c
|
|
@ -6209,169 +6209,6 @@ static void P_RemoveOverlay(mobj_t *thing)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Simplified version of a code bit in P_MobjFloorZ
|
|
||||||
static fixed_t P_ShadowSlopeZ(pslope_t *slope, fixed_t x, fixed_t y, fixed_t radius, boolean ceiling)
|
|
||||||
{
|
|
||||||
fixed_t testx, testy;
|
|
||||||
|
|
||||||
if (slope->d.x < 0)
|
|
||||||
testx = radius;
|
|
||||||
else
|
|
||||||
testx = -radius;
|
|
||||||
|
|
||||||
if (slope->d.y < 0)
|
|
||||||
testy = radius;
|
|
||||||
else
|
|
||||||
testy = -radius;
|
|
||||||
|
|
||||||
if ((slope->zdelta > 0) ^ !!(ceiling))
|
|
||||||
{
|
|
||||||
testx = -testx;
|
|
||||||
testy = -testy;
|
|
||||||
}
|
|
||||||
|
|
||||||
testx += x;
|
|
||||||
testy += y;
|
|
||||||
|
|
||||||
return P_GetZAt(slope, testx, testy);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sets standingslope/modeltilt, returns z position for shadows; used also for stuff like bananas
|
|
||||||
// (I would've preferred to be able to return both the slope & z, but I'll take what I can get...)
|
|
||||||
fixed_t P_CalculateShadowFloor(mobj_t *mobj, fixed_t x, fixed_t y, fixed_t z, fixed_t radius, fixed_t height, boolean flip, boolean player)
|
|
||||||
{
|
|
||||||
fixed_t newz;
|
|
||||||
sector_t *sec;
|
|
||||||
#ifdef ESLOPE
|
|
||||||
pslope_t *slope = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
sec = R_PointInSubsector(x, y)->sector;
|
|
||||||
|
|
||||||
if (flip)
|
|
||||||
{
|
|
||||||
#ifdef ESLOPE
|
|
||||||
if (sec->c_slope)
|
|
||||||
{
|
|
||||||
slope = sec->c_slope;
|
|
||||||
newz = P_ShadowSlopeZ(slope, x, y, radius, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
newz = sec->ceilingheight;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#ifdef ESLOPE
|
|
||||||
if (sec->f_slope)
|
|
||||||
{
|
|
||||||
slope = sec->f_slope;
|
|
||||||
newz = P_ShadowSlopeZ(slope, x, y, radius, false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
newz = sec->floorheight;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check FOFs for a better suited slope
|
|
||||||
if (sec->ffloors)
|
|
||||||
{
|
|
||||||
ffloor_t *rover;
|
|
||||||
|
|
||||||
for (rover = sec->ffloors; rover; rover = rover->next)
|
|
||||||
{
|
|
||||||
fixed_t top, bottom;
|
|
||||||
fixed_t d1, d2;
|
|
||||||
|
|
||||||
if (!(rover->flags & FF_EXISTS))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if ((!(((rover->flags & FF_BLOCKPLAYER && player)
|
|
||||||
|| (rover->flags & FF_BLOCKOTHERS && !player))
|
|
||||||
|| (rover->flags & FF_QUICKSAND))
|
|
||||||
|| (rover->flags & FF_SWIMMABLE)))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
#ifdef ESLOPE
|
|
||||||
if (*rover->t_slope)
|
|
||||||
top = P_ShadowSlopeZ(*rover->t_slope, x, y, radius, false);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
top = *rover->topheight;
|
|
||||||
|
|
||||||
#ifdef ESLOPE
|
|
||||||
if (*rover->b_slope)
|
|
||||||
bottom = P_ShadowSlopeZ(*rover->b_slope, x, y, radius, true);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
bottom = *rover->bottomheight;
|
|
||||||
|
|
||||||
if (flip)
|
|
||||||
{
|
|
||||||
if (rover->flags & FF_QUICKSAND)
|
|
||||||
{
|
|
||||||
if (z < top && (z + height) > bottom)
|
|
||||||
{
|
|
||||||
if (newz > (z + height))
|
|
||||||
{
|
|
||||||
newz = (z + height);
|
|
||||||
slope = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
d1 = (z + height) - (top + ((bottom - top)/2));
|
|
||||||
d2 = z - (top + ((bottom - top)/2));
|
|
||||||
|
|
||||||
if (bottom < newz && abs(d1) < abs(d2))
|
|
||||||
{
|
|
||||||
newz = bottom;
|
|
||||||
#ifdef ESLOPE
|
|
||||||
if (*rover->b_slope)
|
|
||||||
slope = *rover->b_slope;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (rover->flags & FF_QUICKSAND)
|
|
||||||
{
|
|
||||||
if (z < top && (z + height) > bottom)
|
|
||||||
{
|
|
||||||
if (newz < z)
|
|
||||||
{
|
|
||||||
newz = z;
|
|
||||||
slope = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
d1 = z - (bottom + ((top - bottom)/2));
|
|
||||||
d2 = (z + height) - (bottom + ((top - bottom)/2));
|
|
||||||
|
|
||||||
if (top > newz && abs(d1) < abs(d2))
|
|
||||||
{
|
|
||||||
newz = top;
|
|
||||||
#ifdef ESLOPE
|
|
||||||
if (*rover->t_slope)
|
|
||||||
slope = *rover->t_slope;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mobj->standingslope = slope;
|
|
||||||
|
|
||||||
#ifdef HWRENDER
|
|
||||||
mobj->modeltilt = slope;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return newz;
|
|
||||||
}
|
|
||||||
|
|
||||||
// SAL'S KART BATTLE MODE OVERTIME HANDLER
|
// SAL'S KART BATTLE MODE OVERTIME HANDLER
|
||||||
#define MAXPLANESPERSECTOR (MAXFFLOORS+1)*2
|
#define MAXPLANESPERSECTOR (MAXFFLOORS+1)*2
|
||||||
static void P_SpawnOvertimeParticles(fixed_t x, fixed_t y, fixed_t scale, mobjtype_t type, boolean ceiling)
|
static void P_SpawnOvertimeParticles(fixed_t x, fixed_t y, fixed_t scale, mobjtype_t type, boolean ceiling)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue