#28 Refactoring zone change code

closed-fixed
ChadF
None
5
2007-09-30
2007-09-27
ChadF
No

Changing the StendhalRPAction code that does the zone change to consolidate (and hopefully simplify) disconnected but related code. This should also force a consistent order of operations for adding, removing, and positioning in zones.

This is needed at minimum to properly fix the push into damage area bug (and teleport into, etc).

Discussion

  • ChadF

    ChadF - 2007-09-30

    Logged In: YES
    user_id=1668474
    Originator: YES

    Redid/simplified the interface to change zones. StendhalRPAction.placeat() is all that is needed to place an entity in a [new] zone.

    It still hardcodes handling for players with sheep/pets. This could be generalized to an 'Object <RPEntity>.preZoneChange()' and 'void <RPEntity>.postZoneChange(Object preContext)' to let the object save off any implementation-specific information just before it is between zones, and restore them afterward.

     
  • ChadF

    ChadF - 2007-09-30
    • status: open --> closed-fixed
     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks