[SDK] How to force the game to redraw shadows?

CommanderZ

Warlord
Joined
Nov 24, 2007
Messages
182
Location
Prague, Czech. Rep.
I need to do some major changes to the terrain ingame in my mod. I'm currently trying to create/delete hills using
Code:
pLoopPlot->setPlotType((PlotTypes)PLOT_LAND,true,true);
resp.
Code:
pLoopPlot->setPlotType((PlotTypes)PLOT_HILLS,true,true);
The code works well, but there are shadows left after the hills are deleted. And hills created on the run have no shadows. See the pic - there are no hils, only shadows.

The same problem applies to coasts - if some coast is turned to land, there are its shadows left visible.

How can I prevent this from happening?

Thanks.
 

Attachments

  • hills.jpg
    hills.jpg
    82.9 KB · Views: 66
Try adding the following line at the end of your code:

gDLL->getEngineIFace()->SetDirty(GlobeTexture_DIRTY_BIT, true);

Or to rebuild a single plot try:

gDLL->getEngineIFace()->RebuildPlot(plot->getX_INLINE(), plot->getY_INLINE(), false, true);
 
Back
Top Bottom