]> git.pond.sub.org Git - empserver/commit
Don't permit demobilize to spend more money than available
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 3 Aug 2008 18:14:07 +0000 (14:14 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 9 Aug 2008 12:34:00 +0000 (08:34 -0400)
commitcc4cf23273da13ab10e91bfa712abdb985a4cb32
tree5a3459e34b67613f92862718602df7f521eafd34
parent2434d2c8eea2e034a401ad31b743b3a17276958e
Don't permit demobilize to spend more money than available

Complicated by the fact that demo() ran the demobilization code twice,
first for adding up the cost for chkmoney(), then for actually
demobilizing.  chkmoney() asks the player to confirm when he's about
to spend more than half his cash.  Get rid of that, not worth the
complexity.  This merges do_demo() back into demo().

It also removes the command's virtually undocumented fourth argument.
Update player_coms[] accordingly.  While there, make it require money;
it won't do anything useful without money anyway.
src/lib/commands/demo.c
src/lib/player/empmod.c