From 96a02f922dee72288c591362f16bf5d1132f589c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 2 Apr 2016 20:10:25 +0200 Subject: [PATCH] - removed R_PointToAngle2 call in P_Setup.cpp. - removed long inactive node saving code in p_writemap.cpp. If this file is ever made operational again it will be with UDMF output. --- src/p_setup.cpp | 2 +- src/p_writemap.cpp | 62 ---------------------------------------------- 2 files changed, 1 insertion(+), 63 deletions(-) diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 6c6b05d0a8..ad4ebe84eb 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -1315,7 +1315,7 @@ void P_LoadSegs (MapData * map) // off, then move one vertex. This may seem insignificant, but one degree // errors _can_ cause firelines. - ptp_angle = R_PointToAngle2 (li->v1->fixX(), li->v1->fixY(), li->v2->fixX(), li->v2->fixY()); + ptp_angle = (li->v2->fPos() - li->v1->fPos()).Angle().BAMs(); dis = 0; delta_angle = (absangle(ptp_angle-(segangle<<16))>>ANGLETOFINESHIFT)*360/FINEANGLES; diff --git a/src/p_writemap.cpp b/src/p_writemap.cpp index 3b0ba4f137..7d0793304d 100644 --- a/src/p_writemap.cpp +++ b/src/p_writemap.cpp @@ -177,79 +177,17 @@ static int WriteVERTEXES (FILE *file) static int WriteSEGS (FILE *file) { -#if 0 - mapseg_t ms; - - ms.offset = 0; // unused by ZDoom, so just leave it 0 - for (int i = 0; i < numsegs; ++i) - { - if (segs[i].linedef!=NULL) - { - ms.v1 = LittleShort(short(segs[i].v1 - vertexes)); - ms.v2 = LittleShort(short(segs[i].v2 - vertexes)); - ms.linedef = LittleShort(short(segs[i].linedef - lines)); - ms.side = segs[i].sidedef == segs[i].linedef->sidedef[0] ? 0 : LittleShort((short)1); - ms.angle = LittleShort(short(R_PointToAngle2 (segs[i].v1->fixX(), segs[i].v1->fixY(), segs[i].v2->fixX(), segs[i].v2->fixY())>>16)); - fwrite (&ms, sizeof(ms), 1, file); - } - } - return numsegs * sizeof(ms); -#else return 0; -#endif } static int WriteSSECTORS (FILE *file) { -#if 0 - mapsubsector_t mss; - - for (int i = 0; i < numsubsectors; ++i) - { - mss.firstseg = LittleShort((WORD)subsectors[i].firstline); - mss.numsegs = LittleShort((WORD)subsectors[i].numlines); - fwrite (&mss, sizeof(mss), 1, file); - } - return numsubsectors * sizeof(mss); -#else return 0; -#endif } static int WriteNODES (FILE *file) { -#if 0 - mapnode_t mn; - - for (int i = 0; i < numnodes; ++i) - { - mn.x = LittleShort(short(nodes[i].x >> FRACBITS)); - mn.y = LittleShort(short(nodes[i].y >> FRACBITS)); - mn.dx = LittleShort(short(nodes[i].dx >> FRACBITS)); - mn.dy = LittleShort(short(nodes[i].dy >> FRACBITS)); - for (int j = 0; j < 2; ++j) - { - for (int k = 0; k < 4; ++k) - { - mn.bbox[j][k] = LittleShort(short(nodes[i].bbox[j][k] >> FRACBITS)); - } - WORD child; - if ((size_t)nodes[i].children[j] & 1) - { - child = mapnode_t::NF_SUBSECTOR | WORD((subsector_t *)((BYTE *)nodes[i].children[j] - 1) - subsectors); - } - else - { - child = WORD((node_t *)nodes[i].children[j] - nodes); - } - mn.children[j] = LittleShort(child); - } - fwrite (&mn, sizeof(mn), 1, file); - } - return numnodes * sizeof(mn); -#else return 0; -#endif } static int WriteSECTORS (FILE *file)