Skip to content

Commit 4bc56b2

Browse files
committed
Fixed an issue with env_instructor_hint crashing in some maps
1 parent 6b13b83 commit 4bc56b2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sp/src/game/server/env_instructor_hint.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
#include "cbase.h"
99
#include "baseentity.h"
1010
#include "world.h"
11+
#ifdef MAPBASE
12+
#include "eventqueue.h"
13+
#endif
1114

1215
#ifdef INFESTED_DLL
1316
#include "asw_marine.h"
@@ -135,6 +138,8 @@ CEnvInstructorHint::CEnvInstructorHint( void )
135138
//-----------------------------------------------------------------------------
136139
void CEnvInstructorHint::OnRestore( void )
137140
{
141+
BaseClass::OnRestore();
142+
138143
int iTimeLeft = 0;
139144
if ( m_flActiveUntil < 0.0f )
140145
{
@@ -151,8 +156,7 @@ void CEnvInstructorHint::OnRestore( void )
151156

152157
int iOriginalTimeout = m_iTimeout;
153158
m_iTimeout = iTimeLeft;
154-
inputdata_t inputdata;
155-
InputShowHint( inputdata );
159+
g_EventQueue.AddEvent( this, "ShowHint", 0.01f, NULL, this );
156160
m_iTimeout = iOriginalTimeout;
157161
}
158162
#endif

0 commit comments

Comments
 (0)