mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-16 01:02:03 +00:00
- fixed a variable mixup in Dehacked weapon initialization.
This ultimately failed to set the weapon's AmmoUse field and made the weapon fail to detect it's out of ammo.
This commit is contained in:
parent
b5f55cacba
commit
82e5e2daa9
1 changed files with 3 additions and 3 deletions
|
@ -3085,10 +3085,10 @@ void FinishDehPatch ()
|
|||
StateVisited[state] = true;
|
||||
for(unsigned j = 0; AmmoPerAttacks[j].func != NAME_None; j++)
|
||||
{
|
||||
if (AmmoPerAttacks[i].ptr == nullptr)
|
||||
if (AmmoPerAttacks[j].ptr == nullptr)
|
||||
{
|
||||
auto p = dyn_cast<PFunction>(RUNTIME_CLASS(AStateProvider)->Symbols.FindSymbol(AmmoPerAttacks[i].func, true));
|
||||
if (p != nullptr) AmmoPerAttacks[i].ptr = p->Variants[0].Implementation;
|
||||
auto p = dyn_cast<PFunction>(RUNTIME_CLASS(AStateProvider)->Symbols.FindSymbol(AmmoPerAttacks[j].func, true));
|
||||
if (p != nullptr) AmmoPerAttacks[j].ptr = p->Variants[0].Implementation;
|
||||
}
|
||||
if (state->ActionFunc == AmmoPerAttacks[j].ptr)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue