weapon_{shotgun,rpg}: add punchangle
HLWeapon: draw ammo2 icon
This commit is contained in:
parent
9027d19fa7
commit
f52e61dbd0
3 changed files with 23 additions and 0 deletions
|
@ -50,6 +50,7 @@ HLWeapon:NSWeapon
|
|||
int m_iHudSlotPos;
|
||||
|
||||
string m_ammoIcon;
|
||||
string m_ammo2Icon;
|
||||
string m_crossHair;
|
||||
NSWeapon m_nextWeapon;
|
||||
virtual void UpdateGUI(void);
|
||||
|
@ -129,6 +130,12 @@ HLWeapon::AddedToInventory(void)
|
|||
m_ammoIcon = sprintf("%s.ammo", strtolower(classname));
|
||||
}
|
||||
|
||||
m_ammo2Icon = GetDefString("ammoIcon");
|
||||
|
||||
if (m_ammo2Icon == "") {
|
||||
m_ammo2Icon = sprintf("%s.ammo2", strtolower(classname));
|
||||
}
|
||||
|
||||
m_crossHair = GetDefString("crosshair");
|
||||
|
||||
if (m_crossHair == "") {
|
||||
|
@ -139,6 +146,10 @@ HLWeapon::AddedToInventory(void)
|
|||
m_ammoIcon = __NULL__;
|
||||
}
|
||||
|
||||
if (m_ammo2Icon == "none") {
|
||||
m_ammo2Icon = __NULL__;
|
||||
}
|
||||
|
||||
if (m_crossHair == "none") {
|
||||
m_crossHair = __NULL__;
|
||||
}
|
||||
|
@ -185,6 +196,12 @@ HLWeapon::UpdateGUI(void)
|
|||
if (m_secondaryAmmoType && m_primaryAmmoType != m_secondaryAmmoType) {
|
||||
ourOwner.a_ammo3 = ourOwner.GetReserveAmmo(m_secondaryAmmoType);
|
||||
HUD_DrawAmmo3();
|
||||
|
||||
/* draw ammo icon */
|
||||
if (m_ammo2Icon) {
|
||||
vector ammoPos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 74];
|
||||
HLSprite_Draw_RGBA(m_ammo2Icon, ammoPos, g_hud_color, pSeatLocal->m_flAmmo2Alpha, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -95,9 +95,11 @@ entityDef damage_rocketSplash
|
|||
entityDef fireInfo_rpg
|
||||
{
|
||||
"def_onFire" "projectile_rocket"
|
||||
"punchAngle" "-10 0 0"
|
||||
}
|
||||
|
||||
entityDef fireInfo_rpg_homing
|
||||
{
|
||||
"def_onFire" "projectile_rocket_homing"
|
||||
"punchAngle" "-10 0 0"
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ entityDef fireInfo_shotgun
|
|||
"def_onFire" "projectile_shotgun"
|
||||
"ammoPerShot" "1"
|
||||
"fireRate" "0.75"
|
||||
"punchAngle" "-5 0 0"
|
||||
"model_flash" "sprites/muzzleflash2.spr"
|
||||
}
|
||||
|
||||
|
@ -71,6 +72,7 @@ entityDef fireInfo_altShotgun
|
|||
"ammoPerShot" "2"
|
||||
"fireRate" "1.5"
|
||||
"actFire" "2"
|
||||
"punchAngle" "-10 0 0"
|
||||
"snd_fire" "weapon_shotgun.double"
|
||||
"model_flash" "sprites/muzzleflash2.spr"
|
||||
}
|
||||
|
@ -97,6 +99,7 @@ entityDef fireInfo_shotgun_mp
|
|||
"def_onFire" "projectile_shotgun_mp"
|
||||
"ammoPerShot" "1"
|
||||
"fireRate" "1.25"
|
||||
"punchAngle" "-5 0 0"
|
||||
"model_flash" "sprites/muzzleflash2.spr"
|
||||
}
|
||||
|
||||
|
@ -105,6 +108,7 @@ entityDef fireInfo_altShotgun_mp
|
|||
"def_onFire" "projectile_shotgun_alt_mp"
|
||||
"ammoPerShot" "2"
|
||||
"fireRate" "1.5"
|
||||
"punchAngle" "-10 0 0"
|
||||
"model_flash" "sprites/muzzleflash2.spr"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue