[Pogamut-list] players.getNearestVisiblePlayer() throws null
jakub.gemrot
pogamut-forum at diana.ms.mff.cuni.cz
Sat Oct 29 16:23:24 CEST 2011
Re: players.getNearestVisiblePlayer() throws null
Author: jakub.gemrot
Correct, any "getNearest" method may return null, always check.
Regarding "one bot is shooting another", that's probably impossible to sense correctly from UT2004Bot (it is possible when you utilize UT2004Observer for observation of all bots).
At least, you may say whether some other bot is shooting or not by obtaining the Player instance (e.g. from players.getVisiblePlayers())
and then check whether Player.isShooting() is true.
Jimmy
--
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=849&post_reply=1#form>
More information about the Pogamut-list
mailing list