mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- fixed Dehacked check for A_ConsumeAmmo.
This must use the internal function name.
This commit is contained in:
parent
8b1d671f6b
commit
d0e1aea273
2 changed files with 4 additions and 3 deletions
|
@ -237,7 +237,7 @@ static AmmoPerAttack AmmoPerAttacks[] = {
|
|||
{ NAME_A_FireBFG, -1}, // uses deh.BFGCells
|
||||
{ NAME_A_FireOldBFG, 1},
|
||||
{ NAME_A_FireRailgun, 1},
|
||||
{ NAME_A_ConsumeAmmo, 1}, // MBF21
|
||||
{ NAME_MBF21_ConsumeAmmo, 1}, // MBF21
|
||||
{ NAME_None, 0}
|
||||
};
|
||||
|
||||
|
@ -3587,8 +3587,9 @@ void FinishDehPatch ()
|
|||
{
|
||||
auto p = dyn_cast<PFunction>(wcls->FindSymbol(AmmoPerAttacks[j].func, true));
|
||||
if (p != nullptr) AmmoPerAttacks[j].ptr = p->Variants[0].Implementation;
|
||||
assert(AmmoPerAttacks[j].ptr);
|
||||
}
|
||||
if (state->ActionFunc == AmmoPerAttacks[j].ptr)
|
||||
if (state->ActionFunc == AmmoPerAttacks[j].ptr && AmmoPerAttacks[j].ptr)
|
||||
{
|
||||
found = true;
|
||||
int use = AmmoPerAttacks[j].ammocount;
|
||||
|
|
|
@ -233,7 +233,7 @@ xx(A_FirePlasma)
|
|||
xx(A_FireBFG)
|
||||
xx(A_FireOldBFG)
|
||||
xx(A_FireRailgun)
|
||||
xx(A_ConsumeAmmo)
|
||||
xx(MBF21_ConsumeAmmo)
|
||||
|
||||
// Special translation names
|
||||
xx(RainPillar1)
|
||||
|
|
Loading…
Reference in a new issue