changeset 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 69a7d40ccf62
children af9a5579763e
files clients/editor/plugins/mapeditor.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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'