diff --git a/src/doomdata.h b/src/doomdata.h index e6cb728ec..5f681fa76 100644 --- a/src/doomdata.h +++ b/src/doomdata.h @@ -106,7 +106,7 @@ struct maplinedef_t uint16_t v1; uint16_t v2; uint16_t flags; - int16_t special; + uint16_t special; int16_t tag; uint16_t sidenum[2]; // sidenum[1] will be -1 if one sided diff --git a/src/p_setup.cpp b/src/p_setup.cpp index d19e65295..f89ad6704 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -2173,6 +2173,9 @@ void P_LoadLineDefs (MapData * map) // [RH] Translate old linedef special and flags to be // compatible with the new format. + mld->special = LittleShort(mld->special); + mld->tag = LittleShort(mld->tag); + mld->flags = LittleShort(mld->flags); P_TranslateLineDef (ld, mld, -1); // do not assign the tag for Extradata lines. if (ld->special != Static_Init || (ld->args[1] != Init_EDLine && ld->args[1] != Init_EDSector)) diff --git a/src/p_xlat.cpp b/src/p_xlat.cpp index 9ec582a92..4f3b45611 100644 --- a/src/p_xlat.cpp +++ b/src/p_xlat.cpp @@ -64,9 +64,9 @@ typedef enum void P_TranslateLineDef (line_t *ld, maplinedef_t *mld, int lineindexforid) { - unsigned short special = (unsigned short) LittleShort(mld->special); - short tag = LittleShort(mld->tag); - uint32_t flags = LittleShort(mld->flags); + uint32_t special = mld->special; + short tag = mld->tag; + uint32_t flags =mld->flags; INTBOOL passthrough = 0; uint32_t flags1 = flags;