Added "<weapon> has no ammo." messages.
This commit is contained in:
parent
c5be5ae0c7
commit
e0d01f730e
2 changed files with 16 additions and 0 deletions
|
|
@ -1288,6 +1288,7 @@ Class UTWeapon : Weapon
|
|||
{
|
||||
int DropAmmo;
|
||||
bool bExtraPickup;
|
||||
transient int lastnoammotic;
|
||||
|
||||
Property DropAmmo: DropAmmo;
|
||||
|
||||
|
|
@ -1435,6 +1436,17 @@ Class UTWeapon : Weapon
|
|||
roll = 0;
|
||||
}
|
||||
|
||||
override bool CheckAmmo( int fireMode, bool autoSwitch, bool requireAmmo, int ammocount )
|
||||
{
|
||||
bool rslt = Super.CheckAmmo(fireMode,autoSwitch,requireAmmo,ammocount);
|
||||
if ( (gametic > lastnoammotic) && !rslt && !autoSwitch && !requireAmmo && Owner.CheckLocalView() )
|
||||
{
|
||||
lastnoammotic = gametic;
|
||||
Console.Printf(StringTable.Localize((Amount>1)?"$M_NOAMMO2":"$M_NOAMMO"),GetTag());
|
||||
}
|
||||
return rslt;
|
||||
}
|
||||
|
||||
Default
|
||||
{
|
||||
Weapon.BobStyle "Smooth";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue