mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-04 12:50:57 +00:00
- Exhumed: Extend 7b8dcde5d2
by showing the M60's clip/magazine amount available when cl_showmagamt 1
is set.
This commit is contained in:
parent
6940384625
commit
2a8e636066
3 changed files with 16 additions and 5 deletions
|
@ -2801,6 +2801,11 @@ DEFINE_ACTION_FUNCTION(_Exhumed, GetPistolClip)
|
|||
ACTION_RETURN_POINTER(&nPistolClip[nLocalPlayer]);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_Exhumed, GetPlayerClip)
|
||||
{
|
||||
ACTION_RETURN_POINTER(&nPlayerClip[nLocalPlayer]);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_ExhumedPlayer, IsUnderwater)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(Player);
|
||||
|
|
|
@ -12,6 +12,7 @@ struct Exhumed native
|
|||
native static int SizeOfStatusSequence(int s1);
|
||||
native static ExhumedPlayer GetViewPlayer();
|
||||
native static int GetPistolClip();
|
||||
native static int GetPlayerClip();
|
||||
|
||||
static void DrawAbs(String img, int x, int y, int shade = 0)
|
||||
{
|
||||
|
|
|
@ -307,15 +307,20 @@ class ExhumedStatusBar : RazeStatusBar
|
|||
int ammo = pp.nAmmo[weapon];
|
||||
if (ammo > 0) // wicon > 0
|
||||
{
|
||||
if (weapon != kWeaponPistol || (weapon == kWeaponPistol && !cl_showmagamt))
|
||||
{
|
||||
format = String.Format("%d", ammo);
|
||||
}
|
||||
else
|
||||
if (weapon == kWeaponPistol && cl_showmagamt)
|
||||
{
|
||||
int clip = CalcMagazineAmount(ammo, 6, Exhumed.GetPistolClip() == 0);
|
||||
format = String.Format("%d/%d", clip, ammo - clip);
|
||||
}
|
||||
else if (weapon == kWeaponM60 && cl_showmagamt)
|
||||
{
|
||||
int clip = CalcMagazineAmount(ammo, 100, Exhumed.GetPlayerClip() == 0);
|
||||
format = String.Format("%d/%d", clip, ammo - clip);
|
||||
}
|
||||
else
|
||||
{
|
||||
format = String.Format("%d", ammo);
|
||||
}
|
||||
/* non-implemented weapon icon.
|
||||
int wicon = 0;// ammo_sprites[weapon];
|
||||
img = tileGetTexture(wicon);
|
||||
|
|
Loading…
Reference in a new issue