mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-30 07:41:22 +00:00
- Added ammo1capacity and ammo2capacity to drawnumber.
SVN r3277 (trunk)
This commit is contained in:
parent
bdbea0da32
commit
ba4630f0df
1 changed files with 24 additions and 0 deletions
|
@ -890,6 +890,10 @@ class CommandDrawNumber : public CommandDrawString
|
|||
value = AMMO1;
|
||||
else if(sc.Compare("ammo2"))
|
||||
value = AMMO2;
|
||||
else if(sc.Compare("ammo1capacity"))
|
||||
value = AMMO1CAPACITY;
|
||||
else if(sc.Compare("ammo2capacity"))
|
||||
value = AMMO2CAPACITY;
|
||||
else if(sc.Compare("score"))
|
||||
value = SCORE;
|
||||
else if(sc.Compare("ammo")) //request the next string to be an ammo type
|
||||
|
@ -1124,6 +1128,24 @@ class CommandDrawNumber : public CommandDrawString
|
|||
num = 0;
|
||||
break;
|
||||
}
|
||||
case AMMO1CAPACITY:
|
||||
if(statusBar->ammo1 == NULL) //no ammo, do not draw
|
||||
{
|
||||
str = "";
|
||||
return;
|
||||
}
|
||||
else
|
||||
num = statusBar->ammo1->MaxAmount;
|
||||
break;
|
||||
case AMMO2CAPACITY:
|
||||
if(statusBar->ammo2 == NULL) //no ammo, do not draw
|
||||
{
|
||||
str = "";
|
||||
return;
|
||||
}
|
||||
else
|
||||
num = statusBar->ammo2->MaxAmount;
|
||||
break;
|
||||
case AMMOCAPACITY:
|
||||
{
|
||||
AInventory* item = statusBar->CPlayer->mo->FindInventory(inventoryItem);
|
||||
|
@ -1283,6 +1305,8 @@ class CommandDrawNumber : public CommandDrawString
|
|||
AMMO1,
|
||||
AMMO2,
|
||||
AMMO,
|
||||
AMMO1CAPACITY,
|
||||
AMMO2CAPACITY,
|
||||
AMMOCAPACITY,
|
||||
FRAGS,
|
||||
INVENTORY,
|
||||
|
|
Loading…
Reference in a new issue