mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-23 13:14:51 +00:00
remove state changing to BOT_IDLE on bot thinking
This commit is contained in:
parent
6d2f4bc58f
commit
af277a035b
@ -251,7 +251,7 @@ void BotCreate(const char *skin, const char *name, const char *skill)
|
|||||||
for (j = i; j < length; j++) // shuffle chars left (and null)
|
for (j = i; j < length; j++) // shuffle chars left (and null)
|
||||||
c_name[j] = c_name[j+1];
|
c_name[j] = c_name[j+1];
|
||||||
length--;
|
length--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
skill_level = 0;
|
skill_level = 0;
|
||||||
@ -577,7 +577,7 @@ float CBot::BotChangeYaw( float speed )
|
|||||||
|
|
||||||
// turn from the current v_angle yaw to the ideal_yaw by selecting
|
// turn from the current v_angle yaw to the ideal_yaw by selecting
|
||||||
// the quickest way to turn to face that direction
|
// the quickest way to turn to face that direction
|
||||||
|
|
||||||
current = pev->v_angle.y;
|
current = pev->v_angle.y;
|
||||||
ideal = pev->ideal_yaw;
|
ideal = pev->ideal_yaw;
|
||||||
|
|
||||||
@ -1768,7 +1768,7 @@ void CBot::BotThink( void )
|
|||||||
pev->deadflag = DEAD_DEAD; // make the kicked bot be dead
|
pev->deadflag = DEAD_DEAD; // make the kicked bot be dead
|
||||||
|
|
||||||
bot_respawn[respawn_index].is_used = FALSE; // this slot is now free
|
bot_respawn[respawn_index].is_used = FALSE; // this slot is now free
|
||||||
bot_respawn[respawn_index].state = BOT_IDLE;
|
|
||||||
respawn_index = -1; // indicate no slot used
|
respawn_index = -1; // indicate no slot used
|
||||||
|
|
||||||
// fall through to next if statement (respawn_index will be -1)
|
// fall through to next if statement (respawn_index will be -1)
|
||||||
@ -1985,7 +1985,7 @@ void CBot::BotThink( void )
|
|||||||
{
|
{
|
||||||
// if there was a wall on the left over 1/2 a second ago then
|
// if there was a wall on the left over 1/2 a second ago then
|
||||||
// 20% of the time randomly turn between 45 and 60 degrees
|
// 20% of the time randomly turn between 45 and 60 degrees
|
||||||
|
|
||||||
if ((f_wall_on_left != 0) &&
|
if ((f_wall_on_left != 0) &&
|
||||||
(f_wall_on_left <= gpGlobals->time - 0.5) &&
|
(f_wall_on_left <= gpGlobals->time - 0.5) &&
|
||||||
(RANDOM_LONG(1, 100) <= 20))
|
(RANDOM_LONG(1, 100) <= 20))
|
||||||
@ -2045,7 +2045,7 @@ void CBot::BotThink( void )
|
|||||||
else if ((moved_distance <= 1) && (!bot_was_paused))
|
else if ((moved_distance <= 1) && (!bot_was_paused))
|
||||||
{
|
{
|
||||||
// the bot must be stuck!
|
// the bot must be stuck!
|
||||||
|
|
||||||
if (BotCanJumpUp( )) // can the bot jump onto something?
|
if (BotCanJumpUp( )) // can the bot jump onto something?
|
||||||
{
|
{
|
||||||
pev->button |= IN_JUMP; // jump up and move forward
|
pev->button |= IN_JUMP; // jump up and move forward
|
||||||
@ -2106,4 +2106,3 @@ void CBot::BotThink( void )
|
|||||||
gpGlobals->frametime * 1000 );
|
gpGlobals->frametime * 1000 );
|
||||||
// TheFatal - END
|
// TheFatal - END
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user