Map editor changes from Kriplo (DNL).

Adding roads from “Draw Roads” selection will first remove exact the same road tile object before placing the same again at the same location.  
Adding roads from “Place banks and cliffs” option now will not put same road in same map element just once.  
Whenever you chose to place rocs,bu ches,tree,junk, or any what call PasteStructureCommon() will first remove exact element before it put again.  
“Fill area” will not go to endless recursion loop when try to fill inside buildings, ending with stack overflow.  


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2361 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
ChrisL
2008-09-26 23:41:37 +00:00
parent 6f2af55cba
commit 92b1865817
4 changed files with 17 additions and 3 deletions
+1 -1
View File
@@ -409,7 +409,7 @@ void PlaceRoadMacroAtGridNo( INT32 iMapIndex, INT32 iMacroID )
while( gRoadMacros[ i ].sMacroID == iMacroID )
{
AddToUndoList( iMapIndex + gRoadMacros[ i ].sOffset );
RemoveAllObjectsOfTypeRange( i, ROADPIECES, ROADPIECES );
RemoveAllObjectsOfTypeRange( iMapIndex + gRoadMacros[ i ].sOffset, ROADPIECES, ROADPIECES );//dnl this was but is very wrong and leading to stacking tilesets, RemoveAllObjectsOfTypeRange( i, ROADPIECES, ROADPIECES );
GetTileIndexFromTypeSubIndex( ROADPIECES, (UINT16)(i+1) , &usTileIndex );
AddObjectToHead( iMapIndex + gRoadMacros[ i ].sOffset, usTileIndex );
i++;