#1579: Buried artifacts
------------------------------+---------------------------------------------
Reporter: Buginator | Owner:
Type: bug | Status: new
Priority: minor | Milestone: unspecified
Component: Engine: Graphics | Version: svn/trunk
Keywords: | Operating_system: All/Non-Specific
Blockedby: | Blocking:
------------------------------+---------------------------------------------
As reported by Safety0ff, the artifacts can get buried, and the reason for
this is:
{{{
static inline WZ_DECL_PURE float map_TileHeight(SDWORD x, SDWORD y)
{
if ( x >= mapWidth || y >= mapHeight )
{
return 0;
}
return psMapTiles[x + (y * mapWidth)].height * ELEVATION_SCALE;
}
}}}
It returns 0 for the height, which puts it underneath the tile.
I have no idea how either x or y got out of range though.
in feature.c
{{{
psFeature->pos.z = map_TileHeight(mapX,mapY);//jps 18july97
}}}
I guess we could do
{{{
psFeature->pos.z = map_TileHeight(mapX,mapY)+ .05;//jps 18july97
}}}
or something along those lines, but I really want to know how it got out
of range in the first place.
This is his screenshot.
--
Ticket URL: <http://developer.wz2100.net/ticket/1579>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev