- removed PClassAmmo.
No need to maintain these clunky meta class for one single property. The overhead the mere existence of this class creates is far more than 100 spawned ammo items would cost. There is no need to serialize AAmmo::DropAmount, this value has no meaning on an already spawned item.
This commit is contained in:
parent
da43576035
commit
23482735a0
17 changed files with 30 additions and 62 deletions
|
|
@ -341,7 +341,7 @@ inline int T_FindFirstSectorFromTag(int tagnum)
|
|||
// Doom index is only supported for the 4 original ammo types
|
||||
//
|
||||
//==========================================================================
|
||||
static PClassAmmo * T_GetAmmo(const svalue_t &t)
|
||||
static PClassInventory * T_GetAmmo(const svalue_t &t)
|
||||
{
|
||||
const char * p;
|
||||
|
||||
|
|
@ -362,7 +362,7 @@ static PClassAmmo * T_GetAmmo(const svalue_t &t)
|
|||
}
|
||||
p=DefAmmo[ammonum];
|
||||
}
|
||||
PClassAmmo * am=dyn_cast<PClassAmmo>(PClass::FindActor(p));
|
||||
PClassInventory * am=dyn_cast<PClassInventory>(PClass::FindActor(p));
|
||||
if (am == NULL)
|
||||
{
|
||||
script_error("unknown ammo type : %s", p);
|
||||
|
|
@ -2572,7 +2572,7 @@ void FParser::SF_PlayerKeys(void)
|
|||
void FParser::SF_PlayerAmmo(void)
|
||||
{
|
||||
int playernum, amount;
|
||||
PClassAmmo * ammotype;
|
||||
PClassInventory * ammotype;
|
||||
|
||||
if (CheckArgs(2))
|
||||
{
|
||||
|
|
@ -2608,7 +2608,7 @@ void FParser::SF_PlayerAmmo(void)
|
|||
void FParser::SF_MaxPlayerAmmo()
|
||||
{
|
||||
int playernum, amount;
|
||||
PClassAmmo * ammotype;
|
||||
PClassInventory * ammotype;
|
||||
|
||||
if (CheckArgs(2))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue