Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // the tile selection
- Info("Tiles selected from " << startTile << " to " << endTile);
- // Disable auto-updates until we're done making all our changes
- _terrain->setAutoUpdate(false);
- // Now, set tiles selected - only on the starting z-level for now.
- for(Real x = Math::Min(startTile[0], endTile[0]); x <= Math::Max(startTile[0], endTile[0]); x++) {
- for(Real y = Math::Min(startTile[1], endTile[1]); y <= Math::Max(startTile[1], endTile[1]); y++) {
- Info("Marking " << x << " " << y << " " << startTile[2] << " as selected");
- // FIXME: to-implement pseudo-code
- // if(!Tile.empty? and Tile.is_visible?) {
- // Add tile to selection
- Vector3 toAdd(x, y, startTile[2]);
- _selection->append(toAdd);
- // Mark tile to display as selected
- // FIXME: this currently isn't being removed anywhere
- if(!_terrain->isTileEmpty(x, y, startTile[2])) {
- _terrain->setTileProperty(x, y, startTile[2], SELECTED, PropertyType(true));
- }
- }
- }
- // Re-enable auto-updates
- _terrain->setAutoUpdate(true);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement