Add "user canceled" as extended command return value
Instead of returning ECMD_OK, the commands now return ECMD_CANCEL when user declined to pick a direction or an object to act on. Note that this can be ORed with ECMD_TIME, if the command still took a turn. For now this has no gameplay meaning.
This commit is contained in:
@@ -1196,7 +1196,7 @@ dobreathe(void)
|
||||
g.context.botl = 1;
|
||||
|
||||
if (!getdir((char *) 0))
|
||||
return ECMD_OK;
|
||||
return ECMD_CANCEL;
|
||||
|
||||
mattk = attacktype_fordmg(g.youmonst.data, AT_BREA, AD_ANY);
|
||||
if (!mattk)
|
||||
@@ -1216,7 +1216,7 @@ dospit(void)
|
||||
struct attack *mattk;
|
||||
|
||||
if (!getdir((char *) 0))
|
||||
return ECMD_OK;
|
||||
return ECMD_CANCEL;
|
||||
mattk = attacktype_fordmg(g.youmonst.data, AT_SPIT, AD_ANY);
|
||||
if (!mattk) {
|
||||
impossible("bad spit attack?");
|
||||
|
||||
Reference in New Issue
Block a user