Mercurial > fife-parpg
comparison 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 |
comparison
equal
deleted
inserted
replaced
100:69a7d40ccf62 | 101:adf0f2b6d1b0 |
---|---|
297 if self._shiftdown: | 297 if self._shiftdown: |
298 loc.setExactLayerCoordinates(self._selection) | 298 loc.setExactLayerCoordinates(self._selection) |
299 else: | 299 else: |
300 loc.setLayerCoordinates(self._selection) | 300 loc.setLayerCoordinates(self._selection) |
301 for i in self._instances: | 301 for i in self._instances: |
302 f = fife.Location(self._layer) | |
303 f.setExactLayerCoordinates(i.getFacingLocation().getExactLayerCoordinates() + fife.ExactModelCoordinate(float(self._selection.x), float(self._selection.y)) - i.getLocation().getExactLayerCoordinates()) | |
302 i.setLocation(loc) | 304 i.setLocation(loc) |
305 i.setFacingLocation(f) | |
303 | 306 |
304 def _rotateInstances(self): | 307 def _rotateInstances(self): |
305 mname = '_rotateInstances' | 308 mname = '_rotateInstances' |
306 self._assert(self._selection, 'No selection assigned in %s' % mname) | 309 self._assert(self._selection, 'No selection assigned in %s' % mname) |
307 self._assert(self._layer, 'No layer assigned in %s' % mname) | 310 self._assert(self._layer, 'No layer assigned in %s' % mname) |