in reply to David Seikel: Thank you for explaining your changes. I think you can commit it. Just a note: The reason you didn't find an ArchObject.setAttributeString() or ArchObject.removeAttribute() function is that all data the editor handles in a special way is parsed out of the attribute text and kept in seperate (more convenient) datastructures. Doing this with the height information (e.g. parse it into an int array in CMapModel) would probably have benefits, as you would never loose the data, and also could make special visual views like a "heightmap" without delays from parsing. OTOH, it would require much more work, and among other concerns height would then need a seperate input field somewhere. As said, this is just a suggestion. I don't have a problem with your solution. Andreas > My editor changes just make sure that any elevation information > already in the map is propagated to the bottom of the map as needed. > To quote from my notes, the propagation is as follows - > > delete bottom - propagate elevation up first. > delete other - do nothing. > insert bottom - propagate elevation down after. > insert other - do nothing. > move bottom tile up - propagate elevation down after. > move tile to bottom - propagate elevation down after. > move other - do nothing. > > The actual changes I made are as follows - > > Created ArchObject.setAttributeString() and > ArchObject.removeAttribute() to > complement the existing getAttributeString() method. > > Created an ArchObject.propagateElevation() method to do the > actual propagation using the above mentioned methods to get, set, > and remove elevation attributes as needed. > > Sprinkled calls to ArchObject.propagateElevation() in appropriate > places in CMapModel. > > Note that elevation is only propagated up or down within a stack > of tiles. This means that if you delete all tiles in a particular > spot, then add a tile, there is no tile to propagate the elevation > from, so elevation needs to be set manually. Best to add a tile > first, then delete the old one if you want to keep the old > elevation. Naturally, if you are replacing hills with mountains, > you need to change the elevation manually anyway... > > Having made these changes, I then used the editor to make my > changes to the big world maps and everything worked smoothly. > I will be committing those > > changed maps sometime today. I will hold off committing my editor > changes > > until I get approval from the list B-). > -- NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien... Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService Jetzt kostenlos anmelden unter http://www.gmx.net +++ GMX - die erste Adresse für Mail, Message, More! +++ _______________________________________________ crossfire-devel mailing list crossfire-devel at lists.real-time.com https://mailman.real-time.com/mailman/listinfo/crossfire-devel