Skip to content

Commit 1aed227

Browse files
committed
remove npc lag compensation, i'm pretty sure there's better ways to handle this (look in tf2 code)
1 parent 537f3ed commit 1aed227

File tree

3 files changed

+2
-749
lines changed

3 files changed

+2
-749
lines changed

src/game/server/ai_basenpc.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11470,7 +11470,6 @@ CAI_BaseNPC::CAI_BaseNPC(void)
1147011470

1147111471
#ifdef BDSBASE
1147211472
SetAIIndex(g_AI_Manager.AddAI(this));
11473-
lagcompensation->RemoveNpcData(GetAIIndex()); // make sure we're not inheriting anyone else's data
1147411473
#else
1147511474
g_AI_Manager.AddAI(this);
1147611475
#endif //BDSBASE
@@ -11497,10 +11496,6 @@ CAI_BaseNPC::CAI_BaseNPC(void)
1149711496
CAI_BaseNPC::~CAI_BaseNPC(void)
1149811497
{
1149911498
g_AI_Manager.RemoveAI( this );
11500-
#ifdef BDSBASE
11501-
// this should stop a crash occuring when our death immediately creates a new NPC (eg headcrab from zombie)
11502-
lagcompensation->RemoveNpcData(GetAIIndex());
11503-
#endif //BDSBASE
1150411499

1150511500
delete m_pLockedBestSound;
1150611501

src/game/server/ilagcompensationmanager.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ abstract_class ILagCompensationManager
2424
virtual void StartLagCompensation( CBasePlayer *player, CUserCmd *cmd ) = 0;
2525
virtual void FinishLagCompensation( CBasePlayer *player ) = 0;
2626
virtual bool IsCurrentlyDoingLagCompensation() const = 0;
27-
#ifdef BDSBASE
28-
virtual void RemoveNpcData(int index) = 0;
29-
#endif //BDSBASE
3027
};
3128

3229
extern ILagCompensationManager *lagcompensation;

0 commit comments

Comments
 (0)