Fix autowielding tools taking no time

When applying some tools (whips, polearms, grapples), or rubbing
a lamp, or when fireassist is on and you fire something without
wielded launcher, the automatic wielding should take as much time
as wielding the item normally does.

Fixes #696
This commit is contained in:
Pasi Kallinen
2022-03-15 11:34:45 +02:00
parent cc04bf9d8f
commit 006ae67029
3 changed files with 36 additions and 21 deletions

View File

@@ -461,7 +461,7 @@ dofire(void)
swap to it and retry */
cmdq_add_ec(doswapweapon);
cmdq_add_ec(dofire);
return ECMD_OK;
return ECMD_TIME;
} else
You("have no ammunition readied.");
}
@@ -502,7 +502,7 @@ dofire(void)
/* swap weapons and retry fire */
cmdq_add_ec(doswapweapon);
cmdq_add_ec(dofire);
return ECMD_OK;
return ECMD_TIME;
} else if ((olauncher = find_launcher(obj)) != 0) {
/* wield launcher, retry fire */
if (uwep && !flags.pushweapon)
@@ -510,7 +510,7 @@ dofire(void)
cmdq_add_ec(dowield);
cmdq_add_key(olauncher->invlet);
cmdq_add_ec(dofire);
return ECMD_OK;
return ECMD_TIME;
}
}