Jump to content

IG Aviation / TerrainInfo doesn't support reload


Recommended Posts


TerrainInfo is stored as a singleton, but it doesn't work correctly when the database is reloaded (for eg after a CIGI reset, a database change request). After a reload, all rotorwash effects no longer work.

Also, TerrainInfo current implementation requires there is a Landscape object with TerrainSurfaceComponent, even if the database is based on a TerrainGlobal or simple meshes and using ObjectSurfaceComponent. This is both counter intuitive and error prone.


Link to comment


to fix reload issue, try to add in TerrainInfo::shutdown
initiated = false;
so that it can re-initialize

TerrainInfo doesnt support ObjectTerrainGlobal due to the lack of masks and the ability to somehow determine the surface type.

Currently, IG does not have a single universal way to determine surface type. Therefore, this class and components are placed in an addon with sources so that they can be customized in the final application.

If you want to use this with the global landscape, here is a small example of how you can modify this class for your purpose.

the main change is that initialization and shutdown are now tied to the WorldLogic loop.
added checks for TerrainGlobal(ground type by default. can be specified by ObjectSurfaceComponent) and WaterGlobal (water type by default.also might be specified)

TerrainSurfaceSettings.cpp TerrainSurfaceSettings.h

Link to comment
  • Create New...