Ignore:
Timestamp:
09/07/13 19:30:53 (8 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Phase:
public
Rebase:
65333836313463313638653262353533396439616534633834393538323532343063376132623732
Message:

Hackily unbreak terrian movement.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/area_editor.py

    r545 r546  
    876876        shape = obj.get_shape()
    877877        shape.body.position = (new_coords[0], new_coords[1])
     878        data = self.level.lookup[obj]
     879        args = data['args']
     880        param_defs = obj.requires()[1:]  # chop off name
     881        for i, (_key, key_type) in enumerate(param_defs):
     882            if i > len(args):
     883                break
     884            if key_type == "polygon (convex)":
     885                self._update_pos(obj, new_pos)
    878886        self.invalidate()
    879887
    880     def _update_pos(self, obj, new_pos, final=False):
     888    def _update_pos(self, obj, new_pos):
    881889        data = self.level.lookup[obj]
    882890        new_coords = self.level.point_to_pymunk(new_pos)
Note: See TracChangeset for help on using the changeset viewer.