Fix issues

This commit is contained in:
Peter Covington 2022-04-19 00:57:05 -04:00
parent 179b7a5298
commit 13f422f4c4
2 changed files with 6 additions and 5 deletions

View File

@ -33,10 +33,10 @@ C_HLCustomWeaponMelee::C_HLCustomWeaponMelee()
class C_HLCustomWeaponGun : public C_BaseHLBludgeonWeapon class C_HLCustomWeaponGun : public C_BaseHLCombatWeapon
{ {
public: public:
DECLARE_CLASS(C_HLCustomWeaponGun, C_BaseHLBludgeonWeapon); DECLARE_CLASS(C_HLCustomWeaponGun, C_BaseHLCombatWeapon);
DECLARE_CLIENTCLASS(); DECLARE_CLIENTCLASS();
DECLARE_PREDICTABLE(); DECLARE_PREDICTABLE();

View File

@ -354,6 +354,7 @@ public:
CHLCustomWeaponGun(); CHLCustomWeaponGun();
virtual void ParseCustomFromWeaponFile(const char* pFileName); virtual void ParseCustomFromWeaponFile(const char* pFileName);
const char* GetWeaponScriptName() { return m_iszWeaponScriptName.Get(); }
// Weapon behaviour // Weapon behaviour
virtual void ItemPostFrame(void); // called each frame by the player PostThink virtual void ItemPostFrame(void); // called each frame by the player PostThink
@ -672,9 +673,9 @@ void CHLCustomWeaponGun::ParseCustomFromWeaponFile(const char* pFileName)
float flSpread = pkvData->GetFloat("spread", 5.f); float flSpread = pkvData->GetFloat("spread", 5.f);
float flNPCSpread = pkvData->GetFloat("spread_npc", flSpread); float flNPCSpread = pkvData->GetFloat("spread_npc", flSpread);
float flAllySperad = pkvData->GetFloat("spread_ally", flNPCSpread); float flAllySperad = pkvData->GetFloat("spread_ally", flNPCSpread);
m_vPlayerSpread = Vector(sin(flSpread * 0.5f)); m_vPlayerSpread = Vector(sin(DEG2RAD(flSpread * 0.5f)));
m_vNPCSpread = Vector(sin(flNPCSpread * 0.5f)); m_vNPCSpread = Vector(sin(DEG2RAD(flNPCSpread * 0.5f)));
m_vAllySpread = Vector(sin(flAllySperad * 0.5f)); m_vAllySpread = Vector(sin(DEG2RAD(flAllySperad * 0.5f)));
const char* pszAnimType = pkvData->GetString("anim_type", nullptr); const char* pszAnimType = pkvData->GetString("anim_type", nullptr);
if (pszAnimType) if (pszAnimType)