]> git.pond.sub.org Git - empserver/commit
torpedo: Let torpedo hit land only when target is in range
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 15 Feb 2015 13:25:39 +0000 (14:25 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 2 Mar 2015 07:20:52 +0000 (08:20 +0100)
commit33497e4242d466daf52d168f2d22e70f0f44651f
tree2b2ed2287ca79b57c3260153233a2dbfb0f20ae5
parentbb6c974ef239cd9d77bf3e85ca04329f4d791a0c
torpedo: Let torpedo hit land only when target is in range

Telling the player his torpedo "slams into land" can give a clue on
the direction to the target.  No good when the target is out of range,
because we shouldn't tell the player more than that then.

Screwed up in 4.2.2.  Fix by checking range before line of sight.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/torp.c
tests/torpedo/journal.log