This commit is contained in:
github-actions[bot]
2021-11-10 00:53:36 +00:00
parent dfba74d427
commit 03d7aa3145
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ int arg4 - The hit chance
int ret0 - Override the hit/miss
int ret1 - Override the targeted bodypart
Critter ret2 - Override the target of the attack
</code></pre></div></div> <h2 id="ammocost"> <a href="#ammocost" class="anchor-heading" aria-labelledby="ammocost"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> AmmoCost </h2> <p><code class="highlighter-rouge">HOOK_AMMOCOST</code> (hs_ammocost.int)</p> <p>Runs when calculating ammo cost for a weapon. Doesnt affect damage, only how much ammo is spent. By default, weapon will shoot when at least 1 round is left, regardless of ammo cost calculations. To add proper check for ammo before shooting and proper calculation of number of burst rounds (hook type 1 and 2 in arg3), set <strong>CheckWeaponAmmoCost=1</strong> in <strong>Misc</strong> section of ddraw.ini.</p> <div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Item arg0 - The weapon
</code></pre></div></div> <h2 id="ammocost"> <a href="#ammocost" class="anchor-heading" aria-labelledby="ammocost"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> AmmoCost </h2> <p><code class="highlighter-rouge">HOOK_AMMOCOST</code> (hs_ammocost.int)</p> <p>Runs when calculating ammo cost for a weapon. Doesnt affect damage, only how much ammo is spent. By default, weapons can make attacks when at least 1 ammo is left, regardless of ammo cost calculations. To add proper check for ammo before attacking and proper calculation of the number of burst rounds (hook type 1 and 2 in arg3), set <strong>CheckWeaponAmmoCost=1</strong> in <strong>Misc</strong> section of ddraw.ini.</p> <div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Item arg0 - The weapon
int arg1 - Number of bullets in burst or 1 for single shots
int arg2 - The amount of ammo that will be consumed, calculated by the original ammo cost function (this is basically 2 for Super Cattle Prod and Mega Power Fist)
NOTE: for hook type 2, this value is the ammo cost per round (default is always 1)