home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Server/AI: Fix bug in standing-on-consumable test.
[plomrogue]
/
src
/
server
/
run.c
diff --git
a/src/server/run.c
b/src/server/run.c
index 3ae71757fe6ec0568a3bc6f937608846a129db4e..8c1297d1da1172a51a802578c5d01c5ce99f016a 100644
(file)
--- a/
src/server/run.c
+++ b/
src/server/run.c
@@
-86,12
+86,20
@@
static uint8_t player_commands_allowed()
static uint8_t parse_player_command_0arg(char * tok0)
{
struct Thing * player = get_player();
static uint8_t parse_player_command_0arg(char * tok0)
{
struct Thing * player = get_player();
- if (!strcmp(tok0, s[S_CMD_WAIT]) || !strcmp(tok0, s[S_CMD_PICKUP]))
+ if ( !strcmp(tok0, s[S_CMD_WAIT]) || !strcmp(tok0, s[S_CMD_PICKUP])
+ || !strcmp(tok0, s[S_CMD_AI]))
{
if (player_commands_allowed())
{
{
if (player_commands_allowed())
{
- player->command = get_thing_action_id_by_name(tok0);
- player->arg = 0;
+ if (!strcmp(tok0, s[S_CMD_AI]))
+ {
+ ai(player);
+ }
+ else
+ {
+ player->command = get_thing_action_id_by_name(tok0);
+ player->arg = 0;
+ }
turn_over();
}
return 1;
turn_over();
}
return 1;