Menu

#205 Update fails to call pre-write functions

open
None
7
2017-08-14
2004-08-17
No

Update code doesn't use ef_read() / ef_write().
Instead, it works on the in-core copy of the file, and
calls ef_flush() when done. It doesn't call pre-write
functions (empfile member prewrite). These functions
must run to maintain invariants.

For instance, when a ship is lost due to lack of
maintenance, embarked land units are not destroyed.

Discussion

  • Markus Armbruster

    Logged In: YES
    user_id=596270

    Another example: embarked planes and land units update their
    location to match their carrier's on ef_read(). The update
    can see them in an old location.

     
  • Markus Armbruster

    The carrier cargo location problem described in the previous comment is actually due to not calling the postread functions. Cargo location is now updated on carrier movement, so this is no longer an issue.

     
  • Markus Armbruster

    Ship can't be lost due to lack of maintenance since commit 8ccad0d, v4.3.28. The underlying problem persists.

     

Log in to post a comment.