diff clients/editor/plugins/mapeditor.py @ 101:adf0f2b6d1b0

fixed rotating instances when moving them
author spq@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 22 Jul 2008 20:55:13 +0000
parents 9d0a21184c13
children 0c017b8e4ab2
line wrap: on
line diff
--- a/clients/editor/plugins/mapeditor.py	Tue Jul 22 13:07:51 2008 +0000
+++ b/clients/editor/plugins/mapeditor.py	Tue Jul 22 20:55:13 2008 +0000
@@ -299,7 +299,10 @@
 		else:
 			loc.setLayerCoordinates(self._selection)
 		for i in self._instances:
+			f = fife.Location(self._layer)
+			f.setExactLayerCoordinates(i.getFacingLocation().getExactLayerCoordinates() + fife.ExactModelCoordinate(float(self._selection.x), float(self._selection.y)) - i.getLocation().getExactLayerCoordinates())
 			i.setLocation(loc)
+			i.setFacingLocation(f)
 	
 	def _rotateInstances(self):
 		mname = '_rotateInstances'