Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8747 in orxonox.OLD


Ignore:
Timestamp:
Jun 23, 2006, 4:45:04 PM (18 years ago)
Author:
ponder
Message:

Added a boundary check to the getAltitude() method

Location:
branches/terrain
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/terrain/acinclude.m4

    r8715 r8747  
    303303      if test -e ${_lua_lib_directory}/liblua.a  || test -e ${_lua_lib_directory}/liblua.dylib ; then
    304304        LUA_LIB_DIRECTORY=${_lua_lib_directory}
    305         LDFLAGS="${LDFLAGS} -L${LUA_LIB_DIRECTORY} -llua"
     305        LDFLAGS="${LDFLAGS} -L${LUA_LIB_DIRECTORY} -llualib"
    306306        break
    307307      fi
  • branches/terrain/src/lib/graphics/importer/terrain/terrain.h

    r8745 r8747  
    206206inline float Terrain::getAltitude( int _x, int _z ) const
    207207{
     208        if ( _x < 0 || _x > heightfield.width || _z < 0 || _z > heightfield.height )
     209                return 0.0f;
    208210        return heightfield.data[heightfield.pitch*_z+_x]/255.0f;       
    209211}
Note: See TracChangeset for help on using the changeset viewer.