Skip to content

Commit

Permalink
Fix Panthereye size. Increase pantereye's melee attack distance
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeSlave committed Jan 23, 2025
1 parent b2308a4 commit 9c1f2f7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions dlls/panthereye.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
#define PANTHEREYE_AE_STRIKE_RIGHT_LOW ( 2 )
#define PANTHEREYE_AE_STRIKE_RIGHT_HIGH ( 3 )

#define PANTHEREYE_MELEE_DISTANCE 84

struct PantherStrikeParams
{
float forwardDistance = 70.0f;
float forwardDistance = PANTHEREYE_MELEE_DISTANCE;
float punchz = 0.0f;
float velRightScalar = 0.0f;
float velForwardScalar = 0.0f;
Expand Down Expand Up @@ -46,8 +48,8 @@ class CPantherEye : public CBaseMonster
int DefaultSizeForGrapple() { return GRAPPLE_MEDIUM; }
bool IsDisplaceable() { return true; }

Vector DefaultMinHullSize() { return Vector( -32.0f, -32.0f, 0.0f ); }
Vector DefaultMaxHullSize() { return Vector( 32.0f, 32.0f, 64.0f ); }
Vector DefaultMinHullSize() { return Vector( -24.0f, -24.0f, 0.0f ); }
Vector DefaultMaxHullSize() { return Vector( 24.0f, 24.0f, 64.0f ); }

static constexpr const char* attackHitSoundScript = "PantherEye.AttackHit";
static constexpr const char* attackMissSoundScript = "PantherEye.AttackMiss";
Expand Down Expand Up @@ -122,7 +124,7 @@ void CPantherEye::Spawn()
Precache();

SetMyModel("models/panthereye.mdl");
SetMySize(Vector (-32, -16, 0 ), Vector ( 32, 16, 64) );
SetMySize(DefaultMinHullSize(), DefaultMaxHullSize());

pev->solid = SOLID_SLIDEBOX;
pev->movetype = MOVETYPE_STEP;
Expand Down Expand Up @@ -151,7 +153,7 @@ void CPantherEye::Precache()

bool CPantherEye::CheckMeleeAttack1 ( float flDot, float flDist )
{
if ( flDist <= 64.0f && flDot >= 0.7f && m_hEnemy != 0 && FBitSet ( m_hEnemy->pev->flags, FL_ONGROUND ) )
if ( HasConditions(bits_COND_SEE_ENEMY) && flDist <= PANTHEREYE_MELEE_DISTANCE && flDot >= 0.7f && m_hEnemy != 0 )
{
return true;
}
Expand Down

0 comments on commit 9c1f2f7

Please sign in to comment.