mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +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;
|
StateVisited[state] = true;
|
||||||
for(unsigned j = 0; AmmoPerAttacks[j].func != NAME_None; j++)
|
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));
|
auto p = dyn_cast<PFunction>(RUNTIME_CLASS(AStateProvider)->Symbols.FindSymbol(AmmoPerAttacks[j].func, true));
|
||||||
if (p != nullptr) AmmoPerAttacks[i].ptr = p->Variants[0].Implementation;
|
if (p != nullptr) AmmoPerAttacks[j].ptr = p->Variants[0].Implementation;
|
||||||
}
|
}
|
||||||
if (state->ActionFunc == AmmoPerAttacks[j].ptr)
|
if (state->ActionFunc == AmmoPerAttacks[j].ptr)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue