]> git.pond.sub.org Git - empserver/commit - src/lib/commands/miss.c
Don't reduce mission op area when range shrinks
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 21 Nov 2008 13:05:24 +0000 (08:05 -0500)
committerMarkus Armbruster <armbru@pond.sub.org>
Wed, 17 Dec 2008 16:36:49 +0000 (11:36 -0500)
commit439fa2eadc933b1f0fd107262fbd432d468437c2
tree4da7b5b8b65451137d4e95a2026cc3985ee7ae28
parent8d0e1af5b76ed500ab4b7a0f33d0b7330535369c
Don't reduce mission op area when range shrinks

The mission command limits op area radius to the possible range.
That's okay, as it doesn't actually restrict possible op areas.  When
the mission is executed, it was limited again.  Don't do that; remove
the limiting code from build_mission_list_type() and show_mission().

The removed limiting had no effect, except when the range shrunk.
Then limiting reduced the op area more than necessary.  For instance,
consider an object O with initial range 3 on a mission around M with
range 3:

    - - - y - - -
     - - z y - -
    - - z x y - -
     - O x x M -
    - - z x y - -
     - - z y - -
    - - - y - - -

Initially, all sectors not marked - are in range and in the op area.
If the range drops to two, sectors marked O, x and z are still in
range of O.  But only the x are still in range of M.  The O and z got
excluded.

Range can currently shrink when plane range is reduced (range
command), or a ship, plane or land unit somehow loses tech (deity
intervention).
include/prototypes.h
src/lib/commands/miss.c
src/lib/subs/mission.c