Fix empdump not to touch plane file when import fails
pln_zap_transient_flags() fixes up planes stuck in the air (commit7ca4f412
, v4.3.12). Since commit4e9e58bf
(v4.3.14), it writes back the fixed planes. This is wrong for empdump. empdump should touch data only on successful import. When it fails because ef_verify() fails, and any planes are found stuck in the air, the plane file gets rewritten. Make parameter ef_verify() take parameter may_put to let empdump suppress the plane write-back. The plane file still get written out on successful import, along with the other imported game state.
This commit is contained in:
parent
7da9aab5a1
commit
6eec001050
4 changed files with 13 additions and 7 deletions
|
@ -225,7 +225,7 @@ extern int ef_nelem(int);
|
|||
extern int ef_flags(int);
|
||||
extern int ef_byname(char *);
|
||||
extern int ef_byname_from(char *, int *);
|
||||
extern int ef_verify(void);
|
||||
extern int ef_verify(int);
|
||||
extern int ef_elt_byname(int, char *);
|
||||
|
||||
extern struct empfile empfile[EF_MAX + 1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue