supply: Fix harmless bug in supply from ship in same sector
Bug bites when a ship supplies the sector it's in. First the sector is charged zero mob for moving the stuff, and is written back. Next, the sector receives the stuff, and is written back, clobbering the first write (no effect), and triggering a seqno oops. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
7d78c586c6
commit
1621522c1c
1 changed files with 4 additions and 2 deletions
|
@ -267,7 +267,8 @@ s_commod(struct empobj *sink, short *vec,
|
|||
if (actually_doit) {
|
||||
vec[type] += can_move;
|
||||
putship(ship.shp_uid, &ship);
|
||||
putsect(§);
|
||||
if (n)
|
||||
putsect(§);
|
||||
put_empobj(sink->ef_type, sink->uid, sink);
|
||||
}
|
||||
return 1;
|
||||
|
@ -281,7 +282,8 @@ s_commod(struct empobj *sink, short *vec,
|
|||
if (actually_doit) {
|
||||
vec[type] += can_move;
|
||||
putship(ship.shp_uid, &ship);
|
||||
putsect(§);
|
||||
if (n)
|
||||
putsect(§);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue