This commit is contained in:
parent
e00010b31a
commit
58942549ae
|
@ -120,6 +120,8 @@ void CNB_Weapon_Detail::UpdateLabels( CASW_WeaponInfo *pWeaponData )
|
|||
nBonusDmg = MarineSkills()->GetSkillBasedValue(pProfile, ASW_MARINE_SKILL_ACCURACY, ASW_MARINE_SUBSKILL_ACCURACY_PDW_DMG);
|
||||
else if ( FStrEq("asw_weapon_sniper_rifle", pWeaponData->szClassName) )
|
||||
nBonusDmg = MarineSkills()->GetSkillBasedValue(pProfile, ASW_MARINE_SKILL_ACCURACY, ASW_MARINE_SUBSKILL_ACCURACY_SNIPER_RIFLE_DMG);
|
||||
else if ( FStrEq("asw_weapon_tesla_gun", pWeaponData->szClassName) )
|
||||
nBonusDmg = 0.5f + MarineSkills()->GetSkillBasedValue(pProfile, ASW_MARINE_SKILL_ACCURACY, ASW_MARINE_SUBSKILL_ACCURACY_TESLA_CANNON_DMG);
|
||||
else if ( FStrEq("asw_weapon_chainsaw", pWeaponData->szClassName) )
|
||||
{
|
||||
flBaseSkillDmgShift = asw_skill_melee_dmg_base.GetFloat();
|
||||
|
@ -170,7 +172,7 @@ void CNB_Weapon_Detail::UpdateLabels( CASW_WeaponInfo *pWeaponData )
|
|||
else if ( iDamValue > 0 )
|
||||
flCurrent = MAX( (flDamage-5.0f) / 55.0f, 0.05f );
|
||||
|
||||
if ( flDamage <= 1.0f )
|
||||
if ( flDamage <= 0.0f )
|
||||
{
|
||||
m_pValueLabel->SetText( L"N/A" );
|
||||
m_pStatsBar->SetVisible( false );
|
||||
|
|
|
@ -35,7 +35,7 @@ int ASW_GiveAmmo( CASW_Marine *pMarine, float flCount, const char *pszAmmoName,
|
|||
pMarine->TookAmmoPickup( pAmmoEntity );
|
||||
|
||||
// Check the ammo type... for some doing a spilling bullet effect isn't fictionally appropriate
|
||||
if ( iAmmoType != GetAmmoDef()->Index( "ASW_F" ) && iAmmoType != GetAmmoDef()->Index( "ASW_ML" ) && iAmmoType != GetAmmoDef()->Index( "ASW_GL" ) )
|
||||
if ( iAmmoType != GetAmmoDef()->Index( "ASW_F" ) && iAmmoType != GetAmmoDef()->Index( "ASW_ML" ) && iAmmoType != GetAmmoDef()->Index( "ASW_TG" ) && iAmmoType != GetAmmoDef()->Index( "ASW_GL" ) )
|
||||
{
|
||||
// Do effects
|
||||
int iAmmoCost = CASW_Ammo_Drop_Shared::GetAmmoUnitCost( iAmmoType );
|
||||
|
|
|
@ -308,7 +308,7 @@ float CASW_Marine_Resource::OnFired_GetDamageScale()
|
|||
|
||||
// damage amp causes double damage always
|
||||
CASW_Marine *pMarine = GetMarineEntity();
|
||||
if ( pMarine && pMarine->GetDamageBuffEndTime() > 0.0f )
|
||||
if ( pMarine && pMarine->GetDamageBuffEndTime() > gpGlobals->curtime )
|
||||
{
|
||||
flDamageScale *= 2.0f;
|
||||
}
|
||||
|
|
|
@ -794,11 +794,11 @@ void CASW_MarineSpeech::Update()
|
|||
int iProfileIndex = s_hActor2.Get()->GetMarineProfile()->m_ProfileIndex;
|
||||
// change the line to one appropriate for who we're talking to
|
||||
if (iProfileIndex == 0) iCurrentConvLine = CHATTER_TEQUILA_REPLY_SARGE;
|
||||
else if (iProfileIndex == 1) iCurrentConvLine = CHATTER_TEQUILA_REPLY_JAEGER;
|
||||
else if (iProfileIndex == 2) iCurrentConvLine = CHATTER_TEQUILA_REPLY_WILDCAT;
|
||||
else if (iProfileIndex == 3) iCurrentConvLine = CHATTER_TEQUILA_REPLY_WOLFE;
|
||||
else if (iProfileIndex == 4) iCurrentConvLine = CHATTER_TEQUILA_REPLY_FAITH;
|
||||
else if (iProfileIndex == 5) iCurrentConvLine = CHATTER_TEQUILA_REPLY_BASTILLE;
|
||||
else if (iProfileIndex == 4) iCurrentConvLine = CHATTER_TEQUILA_REPLY_JAEGER;
|
||||
else if (iProfileIndex == 1) iCurrentConvLine = CHATTER_TEQUILA_REPLY_WILDCAT;
|
||||
else if (iProfileIndex == 5) iCurrentConvLine = CHATTER_TEQUILA_REPLY_WOLFE;
|
||||
else if (iProfileIndex == 2) iCurrentConvLine = CHATTER_TEQUILA_REPLY_FAITH;
|
||||
else if (iProfileIndex == 6) iCurrentConvLine = CHATTER_TEQUILA_REPLY_BASTILLE;
|
||||
else iCurrentConvLine = -1;
|
||||
}
|
||||
else if (s_CurrentConversation == CONV_SERIOUS_INJURY)
|
||||
|
|
|
@ -23,6 +23,7 @@ void CASW_Ammo_Drop_Shared::InitAmmoCosts()
|
|||
ms_iAmmoType[ASW_AMMO_DROP_TYPE_PDW] = GetAmmoDef()->Index("ASW_PDW");
|
||||
ms_iAmmoType[ASW_AMMO_DROP_TYPE_PISTOL] = GetAmmoDef()->Index("ASW_P");
|
||||
ms_iAmmoType[ASW_AMMO_DROP_TYPE_MINING_LASER] = GetAmmoDef()->Index("ASW_ML");
|
||||
ms_iAmmoType[ASW_AMMO_DROP_TYPE_TESLA_CANNON] = GetAmmoDef()->Index("ASW_TG");
|
||||
ms_iAmmoType[ASW_AMMO_DROP_TYPE_GRENADE_LAUNCHER] = GetAmmoDef()->Index("ASW_GL");
|
||||
ms_iAmmoType[ASW_AMMO_DROP_TYPE_SNIPER] = GetAmmoDef()->Index("ASW_SNIPER");
|
||||
|
||||
|
@ -35,6 +36,7 @@ void CASW_Ammo_Drop_Shared::InitAmmoCosts()
|
|||
ms_iAmmoUnitCost[ASW_AMMO_DROP_TYPE_PDW] = 20;
|
||||
ms_iAmmoUnitCost[ASW_AMMO_DROP_TYPE_PISTOL] = 20;
|
||||
ms_iAmmoUnitCost[ASW_AMMO_DROP_TYPE_MINING_LASER] = 20;
|
||||
ms_iAmmoUnitCost[ASW_AMMO_DROP_TYPE_TESLA_CANNON] = 20;
|
||||
ms_iAmmoUnitCost[ASW_AMMO_DROP_TYPE_GRENADE_LAUNCHER] = 20;
|
||||
ms_iAmmoUnitCost[ASW_AMMO_DROP_TYPE_SNIPER] = 20;
|
||||
|
||||
|
@ -47,6 +49,7 @@ void CASW_Ammo_Drop_Shared::InitAmmoCosts()
|
|||
ms_iAmmoClips[ASW_AMMO_DROP_TYPE_PDW] = 1;
|
||||
ms_iAmmoClips[ASW_AMMO_DROP_TYPE_PISTOL] = 1;
|
||||
ms_iAmmoClips[ASW_AMMO_DROP_TYPE_MINING_LASER] = 1;
|
||||
ms_iAmmoClips[ASW_AMMO_DROP_TYPE_TESLA_CANNON] = 1;
|
||||
ms_iAmmoClips[ASW_AMMO_DROP_TYPE_GRENADE_LAUNCHER] = 3;
|
||||
ms_iAmmoClips[ASW_AMMO_DROP_TYPE_SNIPER] = 1;
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ private:
|
|||
ASW_AMMO_DROP_TYPE_PDW,
|
||||
ASW_AMMO_DROP_TYPE_PISTOL,
|
||||
ASW_AMMO_DROP_TYPE_MINING_LASER,
|
||||
ASW_AMMO_DROP_TYPE_TESLA_CANNON,
|
||||
ASW_AMMO_DROP_TYPE_GRENADE_LAUNCHER,
|
||||
ASW_AMMO_DROP_TYPE_SNIPER,
|
||||
ASW_AMMO_DROP_TYPE_COUNT
|
||||
|
|
|
@ -188,9 +188,9 @@ ConVar sk_plr_dmg_asw_ml ( "sk_plr_dmg_asw_ml","0", FCVAR_REPLICATED );
|
|||
ConVar sk_npc_dmg_asw_ml ( "sk_npc_dmg_asw_ml","0", FCVAR_REPLICATED);
|
||||
ConVar sk_max_asw_ml ( "sk_max_asw_ml","0", FCVAR_REPLICATED);
|
||||
// TeslaGun
|
||||
ConVar sk_plr_dmg_asw_tg ( "sk_plr_dmg_asw_ml","0", FCVAR_REPLICATED );
|
||||
ConVar sk_npc_dmg_asw_tg ( "sk_npc_dmg_asw_ml","0", FCVAR_REPLICATED);
|
||||
ConVar sk_max_asw_tg ( "sk_max_asw_ml","0", FCVAR_REPLICATED);
|
||||
ConVar sk_plr_dmg_asw_tg ( "sk_plr_dmg_asw_tg","0", FCVAR_REPLICATED );
|
||||
ConVar sk_npc_dmg_asw_tg ( "sk_npc_dmg_asw_tg","0", FCVAR_REPLICATED);
|
||||
ConVar sk_max_asw_tg ( "sk_max_asw_tg","0", FCVAR_REPLICATED);
|
||||
// Chainsaw
|
||||
ConVar sk_plr_dmg_asw_cs ( "sk_plr_dmg_asw_cs","0", FCVAR_REPLICATED );
|
||||
ConVar sk_npc_dmg_asw_cs ( "sk_npc_dmg_asw_cs","0", FCVAR_REPLICATED);
|
||||
|
@ -456,6 +456,8 @@ CAmmoDef *GetAmmoDef()
|
|||
def.AddAmmoType("ASW_P", DMG_BULLET, TRACER_LINE_AND_WHIZ, "sk_plr_dmg_asw_p", "sk_npc_dmg_asw_p", "sk_max_asw_p", BULLET_IMPULSE(200, 1225), 0 );
|
||||
// mining laser
|
||||
def.AddAmmoType("ASW_ML", DMG_ENERGYBEAM, TRACER_LINE_AND_WHIZ, "sk_plr_dmg_asw_ml", "sk_npc_dmg_asw_ml", "sk_max_asw_ml", BULLET_IMPULSE(200, 1225), 0 );
|
||||
// mining laser
|
||||
def.AddAmmoType("ASW_TG", DMG_ENERGYBEAM, TRACER_LINE_AND_WHIZ, "sk_plr_dmg_asw_tg", "sk_npc_dmg_asw_tg", "sk_max_asw_tg", BULLET_IMPULSE(200, 1225), 0 );
|
||||
// railgun
|
||||
def.AddAmmoType("ASW_RG", DMG_SONIC, TRACER_LINE_AND_WHIZ, "sk_plr_dmg_asw_rg", "sk_npc_dmg_asw_rg", "sk_max_asw_rg", BULLET_IMPULSE(200, 1225), 0 );
|
||||
// chainsaw
|
||||
|
|
|
@ -135,6 +135,8 @@ ConVar asw_skill_muzzle_flash_base("asw_skill_muzzle_flash_base", "1.0", FCVAR_R
|
|||
ConVar asw_skill_muzzle_flash_step("asw_skill_muzzle_flash_step", "0.2", FCVAR_REPLICATED );
|
||||
ConVar asw_skill_accuracy_sniper_rifle_dmg_base("asw_skill_accuracy_sniper_rifle_dmg_base", "0", FCVAR_REPLICATED );
|
||||
ConVar asw_skill_accuracy_sniper_rifle_dmg_step("asw_skill_accuracy_sniper_rifle_dmg_step", "0", FCVAR_REPLICATED );
|
||||
ConVar asw_skill_accuracy_tesla_cannon_dmg_base("asw_skill_accuracy_tesla_cannon_dmg_base", "0", FCVAR_REPLICATED );
|
||||
ConVar asw_skill_accuracy_tesla_cannon_dmg_step("asw_skill_accuracy_tesla_cannon_dmg_step", "0", FCVAR_REPLICATED );
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -275,6 +277,7 @@ float CASW_Marine_Skills::GetSkillBasedValue( CASW_Marine_Profile *pProfile, ASW
|
|||
case ASW_MARINE_SUBSKILL_ACCURACY_PISTOL_DMG: return asw_skill_accuracy_pistol_dmg_base.GetFloat() + asw_skill_accuracy_pistol_dmg_step.GetFloat() * iSkillPoints; break;
|
||||
case ASW_MARINE_SUBSKILL_ACCURACY_PDW_DMG: return asw_skill_accuracy_pdw_dmg_base.GetFloat() + asw_skill_accuracy_pdw_dmg_step.GetFloat() * iSkillPoints; break;
|
||||
case ASW_MARINE_SUBSKILL_ACCURACY_SNIPER_RIFLE_DMG: return asw_skill_accuracy_sniper_rifle_dmg_base.GetFloat() + asw_skill_accuracy_sniper_rifle_dmg_step.GetFloat() * iSkillPoints; break;
|
||||
case ASW_MARINE_SUBSKILL_ACCURACY_TESLA_CANNON_DMG: return asw_skill_accuracy_tesla_cannon_dmg_base.GetFloat() + asw_skill_accuracy_tesla_cannon_dmg_step.GetFloat() * iSkillPoints; break;
|
||||
case ASW_MARINE_SUBSKILL_ACCURACY_RIFLE_DMG:
|
||||
default: return asw_skill_accuracy_rifle_dmg_base.GetFloat() + asw_skill_accuracy_rifle_dmg_step.GetFloat() * iSkillPoints; break;
|
||||
}
|
||||
|
|
|
@ -96,6 +96,7 @@ enum
|
|||
ASW_MARINE_SUBSKILL_ACCURACY_PISTOL_DMG,
|
||||
ASW_MARINE_SUBSKILL_ACCURACY_PDW_DMG,
|
||||
ASW_MARINE_SUBSKILL_ACCURACY_SNIPER_RIFLE_DMG,
|
||||
ASW_MARINE_SUBSKILL_ACCURACY_TESLA_CANNON_DMG,
|
||||
ASW_MARINE_SUBSKILL_ACCURACY_MUZZLE,
|
||||
ASW_MARINE_SUBSKILL_HACKING_SPEED_SCALE = 0,
|
||||
ASW_MARINE_SUBSKILL_HACKING_TUMBLER_COUNT_REDUCTION,
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#include "takedamageinfo.h"
|
||||
#include "gamerules.h"
|
||||
#include "in_buttons.h"
|
||||
#include "asw_weapon_parse.h"
|
||||
#include "asw_marine_skills.h"
|
||||
|
||||
#ifdef CLIENT_DLL
|
||||
#include "c_baseplayer.h"
|
||||
|
@ -89,6 +91,8 @@ CASW_Weapon_Tesla_Gun::CASW_Weapon_Tesla_Gun( void )
|
|||
#ifdef GAME_DLL
|
||||
m_fLastForcedFireTime = 0; // last time we forced an AI marine to push its fire button
|
||||
#endif
|
||||
m_flLastShockTime = 0.0f;
|
||||
m_flLastDischargeTime = 0.0f;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -180,8 +184,14 @@ void CASW_Weapon_Tesla_Gun::PrimaryAttack( void )
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( gpGlobals->curtime > m_flLastDischargeTime + (GetFireRate()*3) )
|
||||
{
|
||||
m_iClip1 = MAX( 0, m_iClip1 - 1 );
|
||||
m_flLastDischargeTime = gpGlobals->curtime;
|
||||
}
|
||||
|
||||
m_flNextPrimaryAttack = gpGlobals->curtime;
|
||||
break;
|
||||
}
|
||||
|
@ -233,7 +243,7 @@ void CASW_Weapon_Tesla_Gun::PrimaryAttack( void )
|
|||
}
|
||||
|
||||
|
||||
if ( gpGlobals->curtime > m_flLastShockTime + GetFireRate() )
|
||||
if ( gpGlobals->curtime >= m_flLastShockTime + GetFireRate() )
|
||||
{
|
||||
ShockEntity();
|
||||
m_flLastShockTime = gpGlobals->curtime;
|
||||
|
@ -256,6 +266,18 @@ void CASW_Weapon_Tesla_Gun::PrimaryAttack( void )
|
|||
m_fSlowTime = gpGlobals->curtime + GetFireRate();
|
||||
}
|
||||
|
||||
float CASW_Weapon_Tesla_Gun::GetWeaponDamage()
|
||||
{
|
||||
float flDamage = GetWeaponInfo()->m_flBaseDamage;
|
||||
|
||||
if ( GetMarine() )
|
||||
{
|
||||
flDamage += MarineSkills()->GetSkillBasedValueByMarine(GetMarine(), ASW_MARINE_SKILL_ACCURACY, ASW_MARINE_SUBSKILL_ACCURACY_TESLA_CANNON_DMG);
|
||||
}
|
||||
|
||||
return flDamage;
|
||||
}
|
||||
|
||||
void CASW_Weapon_Tesla_Gun::ShockEntity()
|
||||
{
|
||||
CASW_Marine *pMarine = GetMarine();
|
||||
|
|
|
@ -59,6 +59,7 @@ public:
|
|||
virtual bool HasAmmo();
|
||||
virtual bool ShouldMarineMoveSlow();
|
||||
|
||||
virtual float GetWeaponDamage( void );
|
||||
virtual float GetWeaponRange( void ) { return 240; }
|
||||
|
||||
virtual Class_T Classify( void ) { return (Class_T)CLASS_ASW_TESLA_GUN; }
|
||||
|
|
Loading…
Reference in New Issue