Merge branch 'zmaster'

This commit is contained in:
Christoph Oelckers 2016-01-04 21:06:54 +01:00
commit d68c97b42a
2 changed files with 7 additions and 6 deletions

View file

@ -1125,10 +1125,11 @@ void P_SpawnPortal(line_t *line, int sectortag, int plane, int alpha)
lines[i].args[2] == plane && lines[i].args[2] == plane &&
lines[i].args[3] == 1) lines[i].args[3] == 1)
{ {
fixed_t x1 = (line->v1->x + line->v2->x) >> 1; // beware of overflows.
fixed_t y1 = (line->v1->y + line->v2->y) >> 1; fixed_t x1 = fixed_t((SQWORD(line->v1->x) + SQWORD(line->v2->x)) >> 1);
fixed_t x2 = (lines[i].v1->x + lines[i].v2->x) >> 1; fixed_t y1 = fixed_t((SQWORD(line->v1->y) + SQWORD(line->v2->y)) >> 1);
fixed_t y2 = (lines[i].v1->y + lines[i].v2->y) >> 1; fixed_t x2 = fixed_t((SQWORD(lines[i].v1->x) + SQWORD(lines[i].v2->x)) >> 1);
fixed_t y2 = fixed_t((SQWORD(lines[i].v1->y) + SQWORD(lines[i].v2->y)) >> 1);
fixed_t alpha = Scale (lines[i].args[4], OPAQUE, 255); fixed_t alpha = Scale (lines[i].args[4], OPAQUE, 255);
AStackPoint *anchor = Spawn<AStackPoint>(x1, y1, 0, NO_REPLACE); AStackPoint *anchor = Spawn<AStackPoint>(x1, y1, 0, NO_REPLACE);
@ -1155,7 +1156,7 @@ void P_SpawnPortal(line_t *line, int sectortag, int plane, int alpha)
// This must be done here to ensure that it gets done only after the portal is set up // This must be done here to ensure that it gets done only after the portal is set up
if (lines[j].special == Sector_SetPortal && if (lines[j].special == Sector_SetPortal &&
lines[j].args[1] == 1 && lines[j].args[1] == 1 &&
lines[j].args[2] == plane && (lines[j].args[2] == plane || lines[j].args[2] == 3) &&
lines[j].args[3] == sectortag) lines[j].args[3] == sectortag)
{ {
if (lines[j].args[0] == 0) if (lines[j].args[0] == 0)

View file

@ -170,7 +170,7 @@ define Unsupported (0)
384 = 0, Static_Init(0, 3, 0, 10) // "Attach_MirrorCeilingToControl" 384 = 0, Static_Init(0, 3, 0, 10) // "Attach_MirrorCeilingToControl"
// Attach tagged portal to front sector // Attach tagged portal to front sector
385 = 0, Sector_SetPortal(0, 1, 2, tag) // "Apply_PortalToFrontsector" 385 = 0, Sector_SetPortal(0, 1, 3, tag) // "Apply_PortalToFrontsector"
// Slopes! // Slopes!
386 = 0, Plane_Align (1, 0) // "Slope_FrontsectorFloor" 386 = 0, Plane_Align (1, 0) // "Slope_FrontsectorFloor"