- scriptified ammo.

- moved inventory stuff into its own directory.
This commit is contained in:
Christoph Oelckers 2017-01-14 21:27:31 +01:00
commit a597979738
13 changed files with 157 additions and 135 deletions

View file

@ -2623,7 +2623,7 @@ void FParser::SF_MaxPlayerAmmo()
}
else if(t_argc >= 3)
{
AAmmo * iammo = (AAmmo*)players[playernum].mo->FindInventory(ammotype);
auto iammo = players[playernum].mo->FindInventory(ammotype);
amount = intvalue(t_argv[2]);
if(amount < 0) amount = 0;
if (!iammo)
@ -2644,7 +2644,7 @@ void FParser::SF_MaxPlayerAmmo()
break;
}
}
iammo->BackpackMaxAmount=amount;
((AAmmo*)iammo)->BackpackMaxAmount=amount;
}
t_return.type = svt_int;