Skip to content

Commit aa31835

Browse files
committed
Change new CNPC_BaseZombie customization vars to match actual data types
1 parent 0921f74 commit aa31835

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

sp/src/game/server/hl2/npc_BaseZombie.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ BEGIN_DATADESC( CNPC_BaseZombie )
211211
DEFINE_FIELD( m_fIsTorso, FIELD_BOOLEAN ),
212212
#ifdef MAPBASE
213213
DEFINE_KEYFIELD( m_fIsHeadless, FIELD_BOOLEAN, "Headless" ),
214-
DEFINE_KEYFIELD( m_iMeleeReach, FIELD_INTEGER, "MeleeReach" ),
215-
DEFINE_KEYFIELD( m_iMaxPlayerDistToSwat, FIELD_INTEGER, "MaxPlayerDistToSwat" ),
214+
DEFINE_KEYFIELD( m_flMeleeReach, FIELD_FLOAT, "MeleeReach" ),
215+
DEFINE_KEYFIELD( m_flMaxDistToSwat, FIELD_FLOAT, "MaxDistToSwat" ),
216216
DEFINE_KEYFIELD( m_iMaxObjMassToSwat, FIELD_INTEGER, "MaxObjMassToSwat" ),
217217
#else
218218
DEFINE_FIELD( m_fIsHeadless, FIELD_BOOLEAN ),
@@ -260,8 +260,8 @@ CNPC_BaseZombie::CNPC_BaseZombie()
260260
m_iMoanSound = g_numZombies;
261261

262262
#ifdef MAPBASE
263-
m_iMeleeReach = ZOMBIE_MELEE_REACH;
264-
m_iMaxPlayerDistToSwat = ZOMBIE_PLAYER_MAX_SWAT_DIST;
263+
m_flMeleeReach = ZOMBIE_MELEE_REACH;
264+
m_flMaxDistToSwat = ZOMBIE_PLAYER_MAX_SWAT_DIST;
265265
m_iMaxObjMassToSwat = ZOMBIE_MAX_PHYSOBJ_MASS;
266266
#endif
267267

@@ -307,7 +307,7 @@ bool CNPC_BaseZombie::FindNearestPhysicsObject( int iMaxMass )
307307
#ifndef MAPBASE
308308
if (dist > ZOMBIE_PLAYER_MAX_SWAT_DIST)
309309
#else
310-
if (dist > m_iMaxPlayerDistToSwat)
310+
if (dist > m_flMaxDistToSwat)
311311
#endif
312312
{
313313
// Player is too far away. Don't bother

sp/src/game/server/hl2/npc_BaseZombie.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ abstract_class CNPC_BaseZombie : public CAI_BaseZombieBase
145145
virtual float GetClawAttackRange() const
146146
{
147147
#ifdef MAPBASE
148-
return m_iMeleeReach;
148+
return m_flMeleeReach;
149149
#else
150150
return ZOMBIE_MELEE_REACH;
151151
#endif
@@ -266,8 +266,8 @@ abstract_class CNPC_BaseZombie : public CAI_BaseZombieBase
266266
float m_flNextFlinch;
267267

268268
#ifdef MAPBASE
269-
int m_iMeleeReach;
270-
int m_iMaxPlayerDistToSwat;
269+
float m_flMeleeReach;
270+
float m_flMaxDistToSwat;
271271
int m_iMaxObjMassToSwat;
272272
#endif
273273

0 commit comments

Comments
 (0)