Skip to content

Commit

Permalink
Map Data|All Games: Map entity database stores coordinates as doubles
Browse files Browse the repository at this point in the history
Previously was using short => float.
  • Loading branch information
skyjake committed Nov 17, 2016
1 parent 3bcfa42 commit 9dfeaf4
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
26 changes: 13 additions & 13 deletions doomsday/apps/plugins/common/src/world/p_mapsetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,29 +399,29 @@ static void initXSectors()
static void initMapSpots()
{
numMapSpots = P_CountMapObjs(MO_THING);
mapSpots = (mapspot_t *)Z_Malloc(numMapSpots * sizeof(mapspot_t), PU_MAP, 0);
mapSpots = reinterpret_cast<mapspot_t *>(Z_Malloc(numMapSpots * sizeof(mapspot_t), PU_MAP, 0));

for(uint i = 0; i < numMapSpots; ++i)
{
mapspot_t *spot = &mapSpots[i];

spot->origin[VX] = P_GetGMOFloat(MO_THING, i, MO_X);
spot->origin[VY] = P_GetGMOFloat(MO_THING, i, MO_Y);
spot->origin[VZ] = P_GetGMOFloat(MO_THING, i, MO_Z);
spot->origin[VX] = P_GetGMODouble(MO_THING, i, MO_X);
spot->origin[VY] = P_GetGMODouble(MO_THING, i, MO_Y);
spot->origin[VZ] = P_GetGMODouble(MO_THING, i, MO_Z);

spot->doomEdNum = P_GetGMOInt(MO_THING, i, MO_DOOMEDNUM);
spot->doomEdNum = P_GetGMOInt(MO_THING, i, MO_DOOMEDNUM);
spot->skillModes = P_GetGMOInt(MO_THING, i, MO_SKILLMODES);
spot->flags = P_GetGMOInt(MO_THING, i, MO_FLAGS);
spot->angle = P_GetGMOAngle(MO_THING, i, MO_ANGLE);
spot->flags = P_GetGMOInt(MO_THING, i, MO_FLAGS);
spot->angle = P_GetGMOAngle(MO_THING, i, MO_ANGLE);

#if __JHEXEN__
spot->tid = P_GetGMOShort(MO_THING, i, MO_ID);
spot->tid = P_GetGMOShort(MO_THING, i, MO_ID);
spot->special = P_GetGMOByte(MO_THING, i, MO_SPECIAL);
spot->arg1 = P_GetGMOByte(MO_THING, i, MO_ARG0);
spot->arg2 = P_GetGMOByte(MO_THING, i, MO_ARG1);
spot->arg3 = P_GetGMOByte(MO_THING, i, MO_ARG2);
spot->arg4 = P_GetGMOByte(MO_THING, i, MO_ARG3);
spot->arg5 = P_GetGMOByte(MO_THING, i, MO_ARG4);
spot->arg1 = P_GetGMOByte(MO_THING, i, MO_ARG0);
spot->arg2 = P_GetGMOByte(MO_THING, i, MO_ARG1);
spot->arg3 = P_GetGMOByte(MO_THING, i, MO_ARG2);
spot->arg4 = P_GetGMOByte(MO_THING, i, MO_ARG3);
spot->arg5 = P_GetGMOByte(MO_THING, i, MO_ARG4);
#endif

#if __JHERETIC__
Expand Down
6 changes: 3 additions & 3 deletions doomsday/apps/plugins/doom/src/p_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
void P_RegisterMapObjs(void)
{
P_RegisterMapObj(MO_THING, "Thing");
P_RegisterMapObjProperty(MO_THING, MO_X, "X", DDVT_SHORT);
P_RegisterMapObjProperty(MO_THING, MO_Y, "Y", DDVT_SHORT);
P_RegisterMapObjProperty(MO_THING, MO_Z, "Z", DDVT_SHORT);
P_RegisterMapObjProperty(MO_THING, MO_X, "X", DDVT_DOUBLE);
P_RegisterMapObjProperty(MO_THING, MO_Y, "Y", DDVT_DOUBLE);
P_RegisterMapObjProperty(MO_THING, MO_Z, "Z", DDVT_DOUBLE);
P_RegisterMapObjProperty(MO_THING, MO_ANGLE, "Angle", DDVT_ANGLE);
P_RegisterMapObjProperty(MO_THING, MO_DOOMEDNUM, "DoomEdNum", DDVT_INT);
P_RegisterMapObjProperty(MO_THING, MO_SKILLMODES, "SkillModes", DDVT_INT);
Expand Down
6 changes: 3 additions & 3 deletions doomsday/apps/plugins/doom64/src/p_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
void P_RegisterMapObjs(void)
{
P_RegisterMapObj(MO_THING, "Thing");
P_RegisterMapObjProperty(MO_THING, MO_X, "X", DDVT_SHORT);
P_RegisterMapObjProperty(MO_THING, MO_Y, "Y", DDVT_SHORT);
P_RegisterMapObjProperty(MO_THING, MO_Z, "Z", DDVT_SHORT);
P_RegisterMapObjProperty(MO_THING, MO_X, "X", DDVT_DOUBLE);
P_RegisterMapObjProperty(MO_THING, MO_Y, "Y", DDVT_DOUBLE);
P_RegisterMapObjProperty(MO_THING, MO_Z, "Z", DDVT_DOUBLE);
P_RegisterMapObjProperty(MO_THING, MO_ID, "ID", DDVT_SHORT);
P_RegisterMapObjProperty(MO_THING, MO_ANGLE, "Angle", DDVT_ANGLE);
P_RegisterMapObjProperty(MO_THING, MO_DOOMEDNUM, "DoomEdNum", DDVT_INT);
Expand Down
6 changes: 3 additions & 3 deletions doomsday/apps/plugins/heretic/src/p_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
void P_RegisterMapObjs(void)
{
P_RegisterMapObj(MO_THING, "Thing");
P_RegisterMapObjProperty(MO_THING, MO_X, "X", DDVT_SHORT);
P_RegisterMapObjProperty(MO_THING, MO_Y, "Y", DDVT_SHORT);
P_RegisterMapObjProperty(MO_THING, MO_Z, "Z", DDVT_SHORT);
P_RegisterMapObjProperty(MO_THING, MO_X, "X", DDVT_DOUBLE);
P_RegisterMapObjProperty(MO_THING, MO_Y, "Y", DDVT_DOUBLE);
P_RegisterMapObjProperty(MO_THING, MO_Z, "Z", DDVT_DOUBLE);
P_RegisterMapObjProperty(MO_THING, MO_ANGLE, "Angle", DDVT_ANGLE);
P_RegisterMapObjProperty(MO_THING, MO_DOOMEDNUM, "DoomEdNum", DDVT_INT);
P_RegisterMapObjProperty(MO_THING, MO_SKILLMODES, "SkillModes", DDVT_INT);
Expand Down
6 changes: 3 additions & 3 deletions doomsday/apps/plugins/hexen/src/p_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ void P_RegisterMapObjs(void)
{
P_RegisterMapObj(MO_THING, "Thing");
P_RegisterMapObjProperty(MO_THING, MO_ID, "ID", DDVT_SHORT);
P_RegisterMapObjProperty(MO_THING, MO_X, "X", DDVT_SHORT);
P_RegisterMapObjProperty(MO_THING, MO_Y, "Y", DDVT_SHORT);
P_RegisterMapObjProperty(MO_THING, MO_Z, "Z", DDVT_SHORT);
P_RegisterMapObjProperty(MO_THING, MO_X, "X", DDVT_DOUBLE);
P_RegisterMapObjProperty(MO_THING, MO_Y, "Y", DDVT_DOUBLE);
P_RegisterMapObjProperty(MO_THING, MO_Z, "Z", DDVT_DOUBLE);
P_RegisterMapObjProperty(MO_THING, MO_ANGLE, "Angle", DDVT_ANGLE);
P_RegisterMapObjProperty(MO_THING, MO_DOOMEDNUM, "DoomEdNum", DDVT_INT);
P_RegisterMapObjProperty(MO_THING, MO_SKILLMODES, "SkillModes", DDVT_INT);
Expand Down

0 comments on commit 9dfeaf4

Please sign in to comment.