Merge branch 'master' into next

This commit is contained in:
Monster Iestyn 2016-08-25 19:19:53 +01:00
commit 96f74a3a17
3 changed files with 12 additions and 15 deletions

View file

@ -2661,7 +2661,7 @@ isblocking:
// see about climbing on the wall // see about climbing on the wall
if (!(checkline->flags & ML_NOCLIMB)) if (!(checkline->flags & ML_NOCLIMB))
{ {
boolean canclimb; // FUCK C90 boolean canclimb;
angle_t climbangle, climbline; angle_t climbangle, climbline;
INT32 whichside = P_PointOnLineSide(slidemo->x, slidemo->y, li); INT32 whichside = P_PointOnLineSide(slidemo->x, slidemo->y, li);

View file

@ -2276,25 +2276,24 @@ static void P_DoClimbing(player_t *player)
fixed_t platy; fixed_t platy;
subsector_t *glidesector; subsector_t *glidesector;
boolean climb = true; boolean climb = true;
boolean onesided = ((player->lastsidehit != -1 && player->lastlinehit != -1) && !(lines[player->lastlinehit].backsector));
platx = P_ReturnThrustX(player->mo, player->mo->angle, player->mo->radius + FixedMul(8*FRACUNIT, player->mo->scale)); platx = P_ReturnThrustX(player->mo, player->mo->angle, player->mo->radius + FixedMul(8*FRACUNIT, player->mo->scale));
platy = P_ReturnThrustY(player->mo, player->mo->angle, player->mo->radius + FixedMul(8*FRACUNIT, player->mo->scale)); platy = P_ReturnThrustY(player->mo, player->mo->angle, player->mo->radius + FixedMul(8*FRACUNIT, player->mo->scale));
glidesector = R_IsPointInSubsector(player->mo->x + platx, player->mo->y + platy); glidesector = R_PointInSubsector(player->mo->x + platx, player->mo->y + platy);
if (!glidesector || glidesector->sector != player->mo->subsector->sector) if (onesided || glidesector->sector != player->mo->subsector->sector)
{ {
boolean floorclimb; boolean floorclimb = false;
boolean thrust; boolean thrust = false;
boolean boostup; boolean boostup = false;
boolean skyclimber; boolean skyclimber = false;
fixed_t floorheight, ceilingheight; // ESLOPE fixed_t floorheight, ceilingheight; // ESLOPE
thrust = false;
floorclimb = false;
boostup = false;
skyclimber = false;
if (glidesector) if (onesided)
floorclimb = true;
else
{ {
#ifdef ESLOPE #ifdef ESLOPE
floorheight = glidesector->sector->f_slope ? P_GetZAt(glidesector->sector->f_slope, player->mo->x, player->mo->y) floorheight = glidesector->sector->f_slope ? P_GetZAt(glidesector->sector->f_slope, player->mo->x, player->mo->y)
@ -2589,8 +2588,6 @@ static void P_DoClimbing(player_t *player)
} }
} }
} }
else
floorclimb = true;
if (player->lastsidehit != -1 && player->lastlinehit != -1) if (player->lastsidehit != -1 && player->lastlinehit != -1)
{ {

View file

@ -771,7 +771,7 @@ subsector_t *R_PointInSubsector(fixed_t x, fixed_t y)
} }
// //
// R_IsPointInSubsector, same as above but returns 0 if not in subsector // R_IsPointInSubsector, same as above but returns 0 if not in subsector - this does not work in opengl because of polyvertex_t
// //
subsector_t *R_IsPointInSubsector(fixed_t x, fixed_t y) subsector_t *R_IsPointInSubsector(fixed_t x, fixed_t y)
{ {