| | |
| | |
|
| | | if self.RandMapYet:
|
| | | # 升级后同一线路切换地点
|
| | | lineNO = random.randint(0, 9)#self.robot.GetPlayerInfo().GetFBID() #已在本地图 不再切线
|
| | | lineNO = self.robot.GetPlayerInfo().GetFBID() #已在本地图 不再切线
|
| | | else:
|
| | | lineNO = random.randint(0, 9) # 0 为服务端处理, 其他数值为具体线路
|
| | | self.RandMapYet = True
|
| | |
| | | if index >= self.robotMgr.GetRobotCount():
|
| | | # ProcessAI可能会清除了robot
|
| | | break
|
| | | robot = self.robotMgr.GetRobot( index )
|
| | | try:
|
| | | robot = self.robotMgr.GetRobot( index )
|
| | | except:
|
| | | # 判断index防范不到,可能多线程引起,此处报错结束循环
|
| | | break
|
| | | if not robot:
|
| | | continue
|
| | | robot.GetAIMgr().ProcessAI()
|