diff gamescenecontroller.py @ 116:7f7f54c4077b

Fixed dropping items on the map.
author KarstenBock@gmx.net
date Mon, 03 Oct 2011 18:25:31 +0200
parents 26e65f27dbd7
children 452bbc3d915d
line wrap: on
line diff
--- a/gamescenecontroller.py	Mon Oct 03 14:12:17 2011 +0200
+++ b/gamescenecontroller.py	Mon Oct 03 18:25:31 2011 +0200
@@ -245,11 +245,13 @@
                                     .getExactLayerCoordinates()
                 commands = ({"Command": "ResetMouseCursor"}, 
                             {"Command": "StopDragging"})
-                self.model.game_state.getObjectById("PlayerCharacter").fifeagent.approach([coord.x, 
-                                                                 coord.y],
-                                    DropItemAction(self, 
-                                                   data_drag.dragged_item, 
-                                                   commands))
+                player_char = (self.model.game_state.
+                               getObjectById("PlayerCharacter"))
+                action =  DropItemAction(self, 
+                                         data_drag.dragged_item, 
+                                         commands)
+                player_char.fifeagent.behaviour.approach([coord.x, coord.y], 
+                                                         action)
             else:
                 self.model.movePlayer(self.model.getCoords(scr_point))
         elif(evt.getButton() == fife.MouseEvent.RIGHT):