[quake3-commits] [ioquake/ioq3] 447429: Fix bot team order to kill last player it killed
Zack Middleton
zturtleman at gmail.com
Mon Jul 11 06:21:32 EDT 2016
Branch: refs/heads/master
Home: https://github.com/ioquake/ioq3
Commit: 4474297af88436d07d348a10dedb8aa65c0d9dbf
https://github.com/ioquake/ioq3/commit/4474297af88436d07d348a10dedb8aa65c0d9dbf
Author: Zack Middleton <zturtleman at gmail.com>
Date: 2016-07-11 (Mon, 11 Jul 2016)
Changed paths:
M code/game/ai_dmnet.c
Log Message:
-----------
Fix bot team order to kill last player it killed
Bot's lastkilledplayer was set to -1 after carrying out an ordered kill.
Later in BotChat_Random() the PlayerName function was passed -1 which
caused a "Error: PlayerName: playernum out of range" message.
I think the reason it was set to negative one is so that if the bot is
ordered to kill the player again, the bot will not say it's done and
drop the goal. Though, if the bot killed the player based on it's own
decision, it will just say it's done and drop the goal (bug?).
Let's check the time of the last kill to see if it happened since the
team order was received instead of setting lastkilledplayer to -1
after completing the team ordered kill. This fixes bot dropping goal
if target player was the last player they killed and the PlayerName
out of range error.
More information about the quake3-commits
mailing list