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:
Markus Armbruster 2013-08-17 17:57:23 +02:00
parent 7d78c586c6
commit 1621522c1c

View file

@ -267,6 +267,7 @@ s_commod(struct empobj *sink, short *vec,
if (actually_doit) {
vec[type] += can_move;
putship(ship.shp_uid, &ship);
if (n)
putsect(&sect);
put_empobj(sink->ef_type, sink->uid, sink);
}
@ -281,6 +282,7 @@ s_commod(struct empobj *sink, short *vec,
if (actually_doit) {
vec[type] += can_move;
putship(ship.shp_uid, &ship);
if (n)
putsect(&sect);
}
}