mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 06:42:12 +00:00
- added an 'inventory change' and 'weapon change' sound, which by default are not defined.
This commit is contained in:
parent
35033891ac
commit
7f78b42f21
1 changed files with 18 additions and 0 deletions
|
@ -347,6 +347,10 @@ CCMD (weapnext)
|
||||||
StatusBar->AttachMessage(new DHUDMessageFadeOut(SmallFont, SendItemUse->GetTag(),
|
StatusBar->AttachMessage(new DHUDMessageFadeOut(SmallFont, SendItemUse->GetTag(),
|
||||||
1.5f, 0.90f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID( 'W', 'E', 'P', 'N' ));
|
1.5f, 0.90f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID( 'W', 'E', 'P', 'N' ));
|
||||||
}
|
}
|
||||||
|
if (SendItemUse != players[consoleplayer].ReadyWeapon)
|
||||||
|
{
|
||||||
|
S_Sound(CHAN_AUTO, "misc/weaponchange", 1.0, ATTN_NONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CCMD (weapprev)
|
CCMD (weapprev)
|
||||||
|
@ -358,6 +362,10 @@ CCMD (weapprev)
|
||||||
StatusBar->AttachMessage(new DHUDMessageFadeOut(SmallFont, SendItemUse->GetTag(),
|
StatusBar->AttachMessage(new DHUDMessageFadeOut(SmallFont, SendItemUse->GetTag(),
|
||||||
1.5f, 0.90f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID( 'W', 'E', 'P', 'N' ));
|
1.5f, 0.90f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID( 'W', 'E', 'P', 'N' ));
|
||||||
}
|
}
|
||||||
|
if (SendItemUse != players[consoleplayer].ReadyWeapon)
|
||||||
|
{
|
||||||
|
S_Sound(CHAN_AUTO, "misc/weaponchange", 1.0, ATTN_NONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CCMD (invnext)
|
CCMD (invnext)
|
||||||
|
@ -367,6 +375,7 @@ CCMD (invnext)
|
||||||
if (who == NULL)
|
if (who == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
auto old = who->InvSel;
|
||||||
if (who->InvSel != NULL)
|
if (who->InvSel != NULL)
|
||||||
{
|
{
|
||||||
if ((next = who->InvSel->NextInv()) != NULL)
|
if ((next = who->InvSel->NextInv()) != NULL)
|
||||||
|
@ -390,6 +399,10 @@ CCMD (invnext)
|
||||||
1.5f, 0.80f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID('S','I','N','V'));
|
1.5f, 0.80f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID('S','I','N','V'));
|
||||||
}
|
}
|
||||||
who->player->inventorytics = 5*TICRATE;
|
who->player->inventorytics = 5*TICRATE;
|
||||||
|
if (old != who->InvSel)
|
||||||
|
{
|
||||||
|
S_Sound(CHAN_AUTO, "misc/invchange", 1.0, ATTN_NONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CCMD (invprev)
|
CCMD (invprev)
|
||||||
|
@ -399,6 +412,7 @@ CCMD (invprev)
|
||||||
if (who == NULL)
|
if (who == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
auto old = who->InvSel;
|
||||||
if (who->InvSel != NULL)
|
if (who->InvSel != NULL)
|
||||||
{
|
{
|
||||||
if ((item = who->InvSel->PrevInv()) != NULL)
|
if ((item = who->InvSel->PrevInv()) != NULL)
|
||||||
|
@ -420,6 +434,10 @@ CCMD (invprev)
|
||||||
1.5f, 0.80f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID('S','I','N','V'));
|
1.5f, 0.80f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID('S','I','N','V'));
|
||||||
}
|
}
|
||||||
who->player->inventorytics = 5*TICRATE;
|
who->player->inventorytics = 5*TICRATE;
|
||||||
|
if (old != who->InvSel)
|
||||||
|
{
|
||||||
|
S_Sound(CHAN_AUTO, "misc/invchange", 1.0, ATTN_NONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CCMD (invuseall)
|
CCMD (invuseall)
|
||||||
|
|
Loading…
Reference in a new issue