|
|
|
@ -251,7 +251,7 @@ void BotCreate(const char *skin, const char *name, const char *skill)
@@ -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)
|
|
|
|
|
c_name[j] = c_name[j+1]; |
|
|
|
|
length--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
skill_level = 0; |
|
|
|
@ -577,7 +577,7 @@ float CBot::BotChangeYaw( float speed )
@@ -577,7 +577,7 @@ float CBot::BotChangeYaw( float speed )
|
|
|
|
|
|
|
|
|
|
// turn from the current v_angle yaw to the ideal_yaw by selecting
|
|
|
|
|
// the quickest way to turn to face that direction
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
current = pev->v_angle.y; |
|
|
|
|
ideal = pev->ideal_yaw; |
|
|
|
|
|
|
|
|
@ -1768,7 +1768,7 @@ void CBot::BotThink( void )
@@ -1768,7 +1768,7 @@ void CBot::BotThink( void )
|
|
|
|
|
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].state = BOT_IDLE; |
|
|
|
|
|
|
|
|
|
respawn_index = -1; // indicate no slot used
|
|
|
|
|
|
|
|
|
|
// fall through to next if statement (respawn_index will be -1)
|
|
|
|
@ -1985,7 +1985,7 @@ void CBot::BotThink( void )
@@ -1985,7 +1985,7 @@ void CBot::BotThink( void )
|
|
|
|
|
{ |
|
|
|
|
// 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((f_wall_on_left != 0) && |
|
|
|
|
(f_wall_on_left <= gpGlobals->time - 0.5) && |
|
|
|
|
(RANDOM_LONG(1, 100) <= 20)) |
|
|
|
@ -2045,7 +2045,7 @@ void CBot::BotThink( void )
@@ -2045,7 +2045,7 @@ void CBot::BotThink( void )
|
|
|
|
|
else if ((moved_distance <= 1) && (!bot_was_paused)) |
|
|
|
|
{ |
|
|
|
|
// the bot must be stuck!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (BotCanJumpUp( )) // can the bot jump onto something?
|
|
|
|
|
{ |
|
|
|
|
pev->button |= IN_JUMP; // jump up and move forward
|
|
|
|
@ -2106,4 +2106,3 @@ void CBot::BotThink( void )
@@ -2106,4 +2106,3 @@ void CBot::BotThink( void )
|
|
|
|
|
gpGlobals->frametime * 1000 ); |
|
|
|
|
// TheFatal - END
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|