mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Using m_RunLabel instead of trying to get the game script everytime
This commit is contained in:
parent
af056d7646
commit
2e4759ab1f
2 changed files with 5 additions and 5 deletions
|
@ -85,6 +85,7 @@ PlayerBot::PlayerBot()
|
|||
m_iAttackTime = 0;
|
||||
|
||||
m_StateFlags = 0;
|
||||
m_RunLabel.TrySetScript("global/bot_run.scr");
|
||||
}
|
||||
|
||||
void PlayerBot::Init
|
||||
|
@ -326,13 +327,11 @@ void PlayerBot::MoveThink
|
|||
m_botCmd.rightmove = ( signed char )( y > 127 ? 127 : y < -127 ? -127 : y );
|
||||
CheckJump();
|
||||
|
||||
Event params;
|
||||
|
||||
Weapon *pWeap = GetActiveWeapon( WEAPON_MAIN );
|
||||
|
||||
if( pWeap && !pWeap->ShouldReload() )
|
||||
{
|
||||
ExecuteThread( "global/bot_run.scr", "", params );
|
||||
m_RunLabel.Execute(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -83,8 +83,9 @@ private:
|
|||
float m_fYawSpeedMult;
|
||||
|
||||
// States
|
||||
int m_StateCount;
|
||||
unsigned int m_StateFlags;
|
||||
int m_StateCount;
|
||||
unsigned int m_StateFlags;
|
||||
ScriptThreadLabel m_RunLabel;
|
||||
|
||||
private:
|
||||
void CheckAttractiveNodes( void );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue