]> git.pond.sub.org Git - empserver/commitdiff
Clean up call of writemap() in ac_encounter()
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 14 Jun 2010 05:42:30 +0000 (07:42 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 18 Jul 2010 06:34:25 +0000 (08:34 +0200)
Pass the more obviously correct plane_owner instead of player->cnum.
They're the same, actually.

When deities could still fly foreign planes (before commit 2023b47c),
they weren't.  ac_encounter() updated the plane owner's in-memory
bmap, but wrote the current player's bmap to disk.

src/lib/subs/aircombat.c

index 5942f4a8742e29bccd0aef6d001849f73714219a..5e298f60efff404ed9b3c119408fd7d580fd1213 100644 (file)
@@ -226,7 +226,7 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
     }
     /* If the map changed, update it */
     if (changed)
-       writemap(player->cnum);
+       writemap(plane_owner);
 
     free_shiplist(&head);
     for (cn = 1; cn < MAXNOC; cn++)