亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? bs03_view_bmv.c

?? 這是bs球隊的仿真2D比賽程序
?? C
字號:
/*Brainstormers 2D (Soccer Simulation League 2D)PUBLIC SOURCE CODE RELEASE 2005Copyright (C) 1998-2005 Neuroinformatics Group,                        University of Osnabrueck, GermanyThis program is free software; you can redistribute it and/ormodify it under the terms of the GNU General Public Licenseas published by the Free Software Foundation; either version 2of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.*/#include "bs03_view_bmv.h"#include "tools.h"#include "options.h"#include "ws_info.h"#include "log_macros.h"#include "blackboard.h"#define VIEW_NORMAL_TRESHOLD (14*ServerOptions::slow_down_factor)                                   // see message must arrive earlier than this to enable                                 // normal view angle!                                 // the server's slow down factor is also taken                                 // into consideration                                 #define BASELEVEL 3bool BS03View::initialized=false;BS03View::BS03View() {  init_state=0;  last_normal=-1;  lowq_counter = 0;  missed_commands  = 0;  cyc_cnt = 0;  //missed_sees = 0;}bool BS03View::get_cmd(Cmd & cmd){  if(WSinfo::ws->ms_time_of_see < 0 ) { // ignore_see, so no view behavior...    LOG_POL(BASELEVEL+1,<<"BS03View: See messages are being ignored, thus we don't use a view behavior.");    change_view(cmd,WSinfo::ws->view_angle,WSinfo::ws->view_quality); // set Blackboard    return false;  }  cyc_cnt++;  LOG_POL(BASELEVEL+2,<<"BS03View: Time of see is "<<time_of_see());  LOG_POL(BASELEVEL+3,<<"BS03View: ms_sb: "<<WSinfo::ws->ms_time_of_sb	  <<", ms_see: "<<WSinfo::ws->ms_time_of_see<<", cyc_cnt: "<<cyc_cnt);  if(WSinfo::ws->time % 500 == 5 || WSinfo::ws->time == 5999) {    if(missed_commands>0) {      ERROR_OUT << "\nBS03View [p="<<WSinfo::me->number<<" t="<<WSinfo::ws->time		<<"]: Missed "<<missed_commands<<" change_view within the last 500 cycles!";    }  }  if(WSinfo::ws->view_quality == Cmd_View::VIEW_QUALITY_LOW) lowq_cycles++;  else lowq_cycles=0;  if(WSinfo::ws->play_mode==PM_PlayOn) Blackboard::force_highq_view=false;    if(WSinfo::ws->ms_time_of_see<WSinfo::ws->ms_time_of_sb) {    //ERROR_OUT << "\nMissed a see command!";    LOG_POL(BASELEVEL,<<"BS03View: Missed a see command!");  }  switch(init_state) {  case 0:  // need to start synching!     LOG_POL(BASELEVEL+0,<<"BS03View: Still initialising synching sequence.");    if ( time_of_see() > (10*ServerOptions::slow_down_factor) )       init_state=1;    change_view(cmd,Cmd_View::VIEW_ANGLE_NARROW,Cmd_View::VIEW_QUALITY_LOW);    return true;    break;  case 1:    LOG_POL(BASELEVEL+0,<<"BS03View: Synching to sense_body in progress...");    if(can_view_normal_strict()) {  // we are synched now, so start normal behaviour!      init_state=2;      LOG_POL(BASELEVEL+0,<<"BS03View: Synching complete, starting normal behaviour!");      last_normal=WSinfo::ws->time;      change_view(cmd,Cmd_View::VIEW_ANGLE_NORMAL,Cmd_View::VIEW_QUALITY_HIGH);      cyc_cnt=0;      return true;    }    if(WSinfo::ws->play_mode==PM_PlayOn) {      LOG_POL(BASELEVEL+0,<<"BS03View: play_on, stop synching!");      change_view(cmd,Cmd_View::VIEW_ANGLE_NARROW,Cmd_View::VIEW_QUALITY_HIGH);      return true;    }    if(Blackboard::force_highq_view) {      LOG_POL(BASELEVEL+0,<<"BS03View: force_highq_view set, stop synching!");      change_view(cmd,Cmd_View::VIEW_ANGLE_NARROW,Cmd_View::VIEW_QUALITY_HIGH);      return true;    }    if(WSinfo::ws->play_mode==PM_my_BeforePenaltyKick       || WSinfo::ws->play_mode==PM_his_BeforePenaltyKick       || WSinfo::ws->play_mode==PM_my_PenaltyKick       || WSinfo::ws->play_mode==PM_his_PenaltyKick) {      LOG_POL(BASELEVEL+0,<<"BS03View: penalty mode, no synching...");      change_view(cmd,Cmd_View::VIEW_ANGLE_NARROW,Cmd_View::VIEW_QUALITY_HIGH);      return true;    }    change_view(cmd,Cmd_View::VIEW_ANGLE_NARROW,Cmd_View::VIEW_QUALITY_LOW);    return true;    break;      case 2:    if(    ClientOptions::consider_goalie         && (WSinfo::me->pos-WSinfo::ball->pos).norm() > 30        && (   time_of_see()==0             || time_of_see()==(50*ServerOptions::slow_down_factor)))     {      LOG_POL(BASELEVEL+1,<<"BS03View in goalie mode: Ball far away, using normal width");      last_normal=WSinfo::ws->time;      change_view(cmd,Cmd_View::VIEW_ANGLE_NORMAL,Cmd_View::VIEW_QUALITY_HIGH);      return true;    }     else     {       if (time_of_see() >= (68*ServerOptions::slow_down_factor)           /*&& WSinfo::view_angle!=Cmd_View::VIEW_ANGLE_WIDE*/)        {	// Message should never arrive that late - out of sync!		init_state=1;		LOG_POL(BASELEVEL+0,<<"BS03View: See message too late -> out of sync!");		change_view(cmd,Cmd_View::VIEW_ANGLE_NARROW,Cmd_View::VIEW_QUALITY_HIGH);		return true;       }       if(can_view_normal())        {           LOG_POL(BASELEVEL+1,<<"BS03View: Switching to normal (t="<<WSinfo::ws->time<<")");         last_normal=WSinfo::ws->time;         change_view(cmd,Cmd_View::VIEW_ANGLE_NORMAL,Cmd_View::VIEW_QUALITY_HIGH);         return true;       }        else        {	//if(mdpInfo::play_mode()==MDPstate::PM_PlayOn && !mdpInfo::am_I_goalie() &&	//   (WSinfo::ws->time_of_last_update!=WSinfo::ws->time || ms_time_since_sb()>70)) {	//  LOG_POL(2,<<"BS03_View: WARNING: See message apparently arrived later than 70 ms!");	  //cerr <<"BS03_View: WARNING: See message apparently arrived later than 70 ms!";	//}	//init_state=1;	//return change_view(Cmd_View::VIEW_ANGLE_NARROW,Cmd_View::VIEW_QUALITY_LOW);	//} else {		LOG_POL(BASELEVEL+1,<<"BS03View: Switching to narrow.");		if(   WSinfo::ws->time-last_normal>20 		   && WSinfo::ws->play_mode!=PM_PlayOn		   && !Blackboard::force_highq_view		   && ! (    WSinfo::ws->play_mode==PM_my_BeforePenaltyKick    			  || WSinfo::ws->play_mode==PM_his_BeforePenaltyKick				  || WSinfo::ws->play_mode==PM_my_PenaltyKick 				  || WSinfo::ws->play_mode==PM_his_PenaltyKick) )   // 10	    {		  LOG_POL(BASELEVEL+0,<<"BS03View: Could not switch to normal view since more than 20 cycles!");		  LOG_POL(BASELEVEL+0,<<"BS03View: Out of sync? Synching again (not in play_on mode).");		  //cerr << "\n\n#"<<WSinfo::me->number<<" PROBLEM mit BS03_View";		  init_state=1;		  change_view(cmd,Cmd_View::VIEW_ANGLE_NARROW,Cmd_View::VIEW_QUALITY_LOW);		  return true;		}    	change_view(cmd,Cmd_View::VIEW_ANGLE_NARROW,Cmd_View::VIEW_QUALITY_HIGH);    	return true;	//}      }    }    break;  case 4:  // new mode: do not check every cycle!  * DOES NOT WORK *    if ( cyc_cnt % 3==0 ) {      change_view(cmd,Cmd_View::VIEW_ANGLE_NORMAL,Cmd_View::VIEW_QUALITY_HIGH);      return true;    }     else     {      change_view(cmd,Cmd_View::VIEW_ANGLE_NARROW,Cmd_View::VIEW_QUALITY_HIGH);      return true;    }    break;  }  return false;}void BS03View::change_view(Cmd &cmd,int width, int quality) {  if(quality==Cmd_View::VIEW_QUALITY_LOW) {    Blackboard::set_last_lowq_cycle(WSinfo::ws->time);  }   //if(WSinfo::ws->view_quality==Cmd_View::VIEW_QUALITY_HIGH) {  //  Blackboard::set_last_ball_pos(WSinfo::ball->pos);  //}  if(WSinfo::is_ball_pos_valid() && WSinfo::ball->age<=1) {    Blackboard::set_last_ball_pos(WSinfo::ball->pos);  }  if(WSinfo::ws->ms_time_of_see >= 0) {  // ignore_see, thus nothing happens here    if(WSinfo::ws->time>0 && WSinfo::ws->view_angle!=next_view_width) {      LOG_ERR(0,<<"BS03View: WARNING: Server missed a change_view!");      missed_commands++;      //ERROR_OUT << "\n### Player "<<WSinfo::me->number<<", Cycle "<<WSinfo::ws->time      //		<<": Probably missed a change_view command!";    }#if 0    // this check is not needed and counter productive in chaotic environments...     if(width==Cmd_View::VIEW_ANGLE_NORMAL && !ClientOptions::consider_goalie        && WSinfo::ws->view_angle==Cmd_View::VIEW_ANGLE_NORMAL) {   // niemals zweimal NORMAL!      ERROR_OUT << "\n### Player "<<WSinfo::me->number<<", Cycle "<<WSinfo::ws->time		<< ": Why should I view NORMAL again? Ignoring!";      width=Cmd_View::VIEW_ANGLE_NARROW;    }#endif    // now check if we are synching too long due to network problems...    if(quality == Cmd_View::VIEW_QUALITY_LOW) {      if(lowq_counter-->0) {	LOG_POL(BASELEVEL+0,<<"BS03View: Still waiting some cycles before switching to low again!");	quality = Cmd_View::VIEW_QUALITY_HIGH;      }      else if(lowq_cycles>10) {	LOG_ERR(0,<<"BS03View: WARNING: More than 10 cycles in low quality, ignoring!");	ERROR_OUT << "\n###Player "<<WSinfo::me->number<<", Cycle "<<WSinfo::ws->time		  << ": Could not sync (network probs?), switching to HIGH!";	lowq_counter = 8;  // cycles to wait before next LOW	quality = Cmd_View::VIEW_QUALITY_HIGH;      }    } else {      lowq_counter = 0;    }  }  next_view_width = width;  Blackboard::set_next_view_angle_and_quality(width,quality);  LOG_POL(BASELEVEL+0,<<"BS03View: Setting width "<<width<<", quality "<<quality);  if(WSinfo::ws->view_angle!=width || WSinfo::ws->view_quality!=quality) {    cmd.cmd_view.set_angle_and_quality(width,quality);  }}/** * The method time_of_see() returns a value in MILLISECONDS that tells * about the difference between the arrival time of the last see message * and sense-body message received. *  * The normal case is, that the see message arrived AFTER the sense-body * message. In this case, simply the difference between both arrival times * is returned. *  * In case that the last message received was a sense-body message, the * difference see-sb will be negative. Here, a constant c is added to that * negative value (so that in turn the value returned will be positive). * The constant c is determined via function get_delay() which tells about * the actual frequency of see messages arriving from the server. */int BS03View::time_of_see() {  int tos;  long sb = WSinfo::ws->ms_time_of_sb;  long see = WSinfo::ws->ms_time_of_see;  //if(WSinfo::ws->time==WSinfo::ws->time_of_last_update) {  if(see>=sb)     tos = see-sb;  else     tos = see - sb + (int)get_delay();  //return ((tos+5)/10)*10;  return tos;}Value BS03View::get_delay() {  Value view_delay=0;  switch(WSinfo::ws->view_angle)   {    case Cmd_View::VIEW_ANGLE_NARROW:      view_delay = 75*ServerOptions::slow_down_factor;      break;    case Cmd_View::VIEW_ANGLE_NORMAL:      view_delay = 150*ServerOptions::slow_down_factor;      break;    case Cmd_View::VIEW_ANGLE_WIDE:      view_delay = 300*ServerOptions::slow_down_factor;      break;  }  switch(WSinfo::ws->view_quality)   {    case Cmd_View::VIEW_QUALITY_LOW:      view_delay/=2.0;  }  return view_delay;}bool BS03View::can_view_normal() {  if(time_of_see()<VIEW_NORMAL_TRESHOLD) return true;  else return false;}bool BS03View::can_view_normal_strict() {  if (time_of_see() < (8*ServerOptions::slow_down_factor))     return true;  else return false;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av电影在线观看完整版一区二区| 黄色精品一二区| 国产精品美女久久福利网站| 欧美tk—视频vk| 欧美一级艳片视频免费观看| 制服.丝袜.亚洲.中文.综合| 欧美亚洲禁片免费| 91精品国产综合久久久久| 欧美高清一级片在线| 91精品视频网| 国产人伦精品一区二区| 国产精品久久久久久久久免费桃花 | 91视频xxxx| 91久久精品一区二区| 欧美特级限制片免费在线观看| 欧美人与性动xxxx| 久久亚洲精品小早川怜子| 日本一区二区不卡视频| 亚洲精品网站在线观看| 亚洲mv大片欧洲mv大片精品| 美女高潮久久久| 成人av免费在线观看| 欧美在线免费观看亚洲| 日韩精品一区二区三区视频在线观看| 精品国产青草久久久久福利| 最新不卡av在线| 免费在线成人网| 成人精品一区二区三区四区| 欧美做爰猛烈大尺度电影无法无天| 欧美另类久久久品| 国产精品三级av| 午夜av一区二区| 懂色av中文一区二区三区| 欧美影院午夜播放| 精品免费视频.| 一区二区三区在线播放| 日本vs亚洲vs韩国一区三区 | 成人性生交大片免费看视频在线| 欧美在线观看禁18| 久久综合九色综合欧美98| 亚洲精选一二三| 国产乱国产乱300精品| 在线免费亚洲电影| 国产女同性恋一区二区| 亚洲成人一区二区| 99久久精品一区二区| 精品国内二区三区| 樱桃国产成人精品视频| 成人网页在线观看| 欧美一二三四在线| 一区二区不卡在线播放 | 亚洲午夜免费电影| 成熟亚洲日本毛茸茸凸凹| 欧美电影在线免费观看| 亚洲欧洲日产国码二区| 国产一区美女在线| 日韩一区二区三区视频| 一区二区久久久久| 色综合天天综合在线视频| 久久精品人人做人人爽人人| 首页亚洲欧美制服丝腿| 欧美视频在线播放| 亚洲精品欧美专区| 91免费国产在线观看| 亚洲国产电影在线观看| 国产在线精品视频| 精品国产制服丝袜高跟| 久久99久久99精品免视看婷婷 | 欧美日韩国产高清一区二区| 亚洲欧洲综合另类| 99精品黄色片免费大全| 日本一区二区三区久久久久久久久不| 免费欧美日韩国产三级电影| 欧美日韩亚洲综合在线| 亚洲国产日产av| 精品视频一区二区不卡| 亚洲国产中文字幕| 欧美日本一区二区三区| 日韩二区三区在线观看| 欧美一区二区三区视频在线 | 麻豆freexxxx性91精品| 日韩一区二区三区三四区视频在线观看 | 日韩丝袜美女视频| 九一久久久久久| 国产婷婷色一区二区三区四区| 国模套图日韩精品一区二区| 337p粉嫩大胆噜噜噜噜噜91av| 国产一区在线视频| 欧美激情综合五月色丁香小说| 国产1区2区3区精品美女| 欧美国产精品劲爆| 色视频欧美一区二区三区| 亚洲黄一区二区三区| 555夜色666亚洲国产免| 美女看a上一区| 中文字幕的久久| 欧美日韩国产精品自在自线| 蜜桃视频免费观看一区| 国产欧美一区二区三区沐欲 | 天堂蜜桃91精品| 2021久久国产精品不只是精品| 国产91高潮流白浆在线麻豆 | 香蕉影视欧美成人| 日韩精品在线看片z| 国产乱一区二区| 亚洲男人的天堂在线aⅴ视频| 欧美伦理电影网| 国产经典欧美精品| 亚洲综合男人的天堂| 国产精品乱人伦一区二区| 在线免费观看一区| 激情成人综合网| 亚洲一区二区三区自拍| 精品入口麻豆88视频| 色视频成人在线观看免| 国产一区二区三区精品欧美日韩一区二区三区 | 久久人人爽人人爽| 欧美色手机在线观看| 国产另类ts人妖一区二区| 一区二区三区免费看视频| 久久看人人爽人人| 欧美日韩在线播放三区| jizz一区二区| 久久99国产乱子伦精品免费| 亚洲一区视频在线观看视频| 中文字幕的久久| 精品久久久久久久人人人人传媒| 日本高清不卡视频| 国产.精品.日韩.另类.中文.在线.播放 | 亚洲精品日日夜夜| 国产欧美日韩视频在线观看| 欧美一区二区在线不卡| 一本色道久久综合亚洲91| 国产精品一区二区无线| 青青青爽久久午夜综合久久午夜| 日韩伦理免费电影| 欧美—级在线免费片| 久久综合av免费| 精品国产伦理网| 欧美一区二区免费观在线| 欧美日韩一区二区三区高清| 99精品黄色片免费大全| 国产成a人无v码亚洲福利| 加勒比av一区二区| 久久超碰97人人做人人爱| 日日骚欧美日韩| 蜜桃av一区二区三区电影| 午夜av一区二区三区| 亚洲亚洲人成综合网络| 一二三四社区欧美黄| 亚洲精品久久久久久国产精华液| 亚洲免费观看高清完整版在线观看熊| 国产精品美女一区二区三区 | 国产精品成人免费精品自在线观看| 久久美女高清视频| wwww国产精品欧美| 久久欧美一区二区| 日本一区免费视频| 亚洲欧美中日韩| 亚洲综合无码一区二区| 亚洲va天堂va国产va久| 免费观看一级特黄欧美大片| 欧美aⅴ一区二区三区视频| 精品一区二区免费在线观看| 国产精品18久久久久久久网站| 国产91精品露脸国语对白| 99视频一区二区| 欧美日韩视频不卡| 精品国产凹凸成av人网站| 国产欧美综合在线| 一区二区高清在线| 日韩中文字幕av电影| 国模少妇一区二区三区| av亚洲精华国产精华精| 欧美亚洲综合一区| www成人在线观看| 亚洲欧美成aⅴ人在线观看| 日韩av一二三| 成人动漫在线一区| 欧美日韩日日摸| 久久日韩粉嫩一区二区三区| 亚洲欧美激情视频在线观看一区二区三区| 亚洲一区二区在线免费看| 久久se精品一区精品二区| 成人国产精品免费观看动漫| 精品视频全国免费看| 久久久不卡网国产精品一区| 亚洲天堂福利av| 激情综合色综合久久| 91免费小视频| 久久蜜桃av一区精品变态类天堂| 亚洲男帅同性gay1069| 精品一区二区三区影院在线午夜 | 国产精品卡一卡二| 奇米影视一区二区三区| 99久久精品国产观看| 精品国产亚洲在线| 亚洲成人午夜电影| 99精品久久免费看蜜臀剧情介绍| 日韩一区二区精品|