本文整理汇总了C++中botlib_import_t::DebugLineCreate方法的典型用法代码示例。如果您正苦于以下问题:C++ botlib_import_t::DebugLineCreate方法的具体用法?C++ botlib_import_t::DebugLineCreate怎么用?C++ botlib_import_t::DebugLineCreate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类botlib_import_t
的用法示例。
在下文中一共展示了botlib_import_t::DebugLineCreate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BotExportTest
int BotExportTest( int parm0, char *parm1, vec3_t parm2, vec3_t parm3 ) {
#if !defined RTCW_ET
// return AAS_PointLight(parm2, NULL, NULL, NULL);
#ifdef DEBUG
static int area = -1;
static int line[2];
#if defined RTCW_SP
int newarea, i, highlightarea, bot_testhidepos, hideposarea, bot_testroutevispos;
#elif defined RTCW_MP
int newarea, i, highlightarea, bot_testhidepos, hideposarea;
#endif // RTCW_XX
// int reachnum;
vec3_t eye, forward, right, end, origin;
// vec3_t bottomcenter;
// aas_trace_t trace;
// aas_face_t *face;
// aas_entity_t *ent;
// bsp_trace_t bsptrace;
// aas_reachability_t reach;
// bot_goal_t goal;
// clock_t start_time, end_time;
vec3_t mins = {-16, -16, -24};
vec3_t maxs = {16, 16, 32};
// int areas[10], numareas;
//return 0;
if ( !( *aasworld ).loaded ) {
return 0;
}
AAS_SetCurrentWorld( 0 );
for ( i = 0; i < 2; i++ ) if ( !line[i] ) {
line[i] = botimport.DebugLineCreate();
}
// AAS_ClearShownDebugLines();
bot_testhidepos = LibVarGetValue( "bot_testhidepos" );
if ( bot_testhidepos ) {
VectorCopy( parm2, origin );
newarea = BotFuzzyPointReachabilityArea( origin );
if ( parm0 & 1 ) {
botlibglobals.goalareanum = newarea;
VectorCopy( origin, botlibglobals.goalorigin );
botimport.Print( PRT_MESSAGE, "new enemy position %2.1f %2.1f %2.1f area %d\n",
origin[0], origin[1], origin[2], newarea );
} //end if
AAS_ClearShownPolygons();
AAS_ClearShownDebugLines();
#if defined RTCW_SP
hideposarea = AAS_NearestHideArea( -1, origin, AAS_PointAreaNum( origin ), 0,
#elif defined RTCW_MP
hideposarea = AAS_NearestHideArea( 0, origin, AAS_PointAreaNum( origin ), 0,
#endif // RTCW_XX
botlibglobals.goalorigin, botlibglobals.goalareanum, TFL_DEFAULT );
#if defined RTCW_SP
if ( bot_testhidepos > 1 ) {
if ( hideposarea ) {
botimport.Print( PRT_MESSAGE, "hidepos (%i) %2.1f %2.1f %2.1f\n",
hideposarea,
( *aasworld ).areawaypoints[hideposarea][0],
( *aasworld ).areawaypoints[hideposarea][1],
( *aasworld ).areawaypoints[hideposarea][2] );
} else {
botimport.Print( PRT_MESSAGE, "no hidepos found\n" );
}
}
#endif // RTCW_XX
//area we are currently in
AAS_ShowAreaPolygons( newarea, 1, qtrue );
//enemy position
AAS_ShowAreaPolygons( botlibglobals.goalareanum, 2, qtrue );
//area we should go hide
AAS_ShowAreaPolygons( hideposarea, 4, qtrue );
return 0;
}
#if defined RTCW_SP
bot_testroutevispos = LibVarGetValue( "bot_testroutevispos" );
if ( bot_testroutevispos ) {
VectorCopy( parm2, origin );
newarea = BotFuzzyPointReachabilityArea( origin );
if ( parm0 & 1 ) {
botlibglobals.goalareanum = newarea;
VectorCopy( origin, botlibglobals.goalorigin );
botimport.Print( PRT_MESSAGE, "new enemy position %2.1f %2.1f %2.1f area %d\n",
origin[0], origin[1], origin[2], newarea );
} //end if
AAS_ClearShownPolygons();
AAS_ClearShownDebugLines();
//.........这里部分代码省略.........
示例2: BotExportTest
int BotExportTest(int parm0, char *parm1, vec3_t parm2, vec3_t parm3)
{
// return AAS_PointLight(parm2, NULL, NULL, NULL);
#ifdef DEBUG
static int area = -1;
static int line[2];
int newarea, i, highlightarea, flood;
// int reachnum;
vec3_t eye, forward, right, end, origin;
// vec3_t bottomcenter;
// aas_trace_t trace;
// aas_face_t *face;
// aas_entity_t *ent;
// bsp_trace_t bsptrace;
// aas_reachability_t reach;
// bot_goal_t goal;
// clock_t start_time, end_time;
vec3_t mins = {-16, -16, -24};
vec3_t maxs = {16, 16, 32};
// int areas[10], numareas;
//return 0;
if (!aasworld.loaded) return 0;
/*
if (parm0 & 1)
{
AAS_ClearShownPolygons();
AAS_FloodAreas(parm2);
} //end if
return 0;
*/
for (i = 0; i < 2; i++) if (!line[i]) line[i] = botimport.DebugLineCreate();
// AAS_ClearShownDebugLines();
//if (AAS_AgainstLadder(parm2)) botimport.Print(PRT_MESSAGE, "against ladder\n");
//BotOnGround(parm2, PRESENCE_NORMAL, 1, &newarea, &newarea);
//botimport.Print(PRT_MESSAGE, "%f %f %f\n", parm2[0], parm2[1], parm2[2]);
//*
highlightarea = LibVarGetValue("bot_highlightarea");
if (highlightarea > 0)
{
newarea = highlightarea;
} //end if
else
{
VectorCopy(parm2, origin);
origin[2] += 0.5;
//newarea = AAS_PointAreaNum(origin);
newarea = BotFuzzyPointReachabilityArea(origin);
} //end else
botimport.Print(PRT_MESSAGE, "\rtravel time to goal (%d) = %d ", botlibglobals.goalareanum,
AAS_AreaTravelTimeToGoalArea(newarea, origin, botlibglobals.goalareanum, TFL_DEFAULT));
//newarea = BotReachabilityArea(origin, qtrue);
if (newarea != area)
{
botimport.Print(PRT_MESSAGE, "origin = %f, %f, %f\n", origin[0], origin[1], origin[2]);
area = newarea;
botimport.Print(PRT_MESSAGE, "new area %d, cluster %d, presence type %d\n",
area, AAS_AreaCluster(area), AAS_PointPresenceType(origin));
botimport.Print(PRT_MESSAGE, "area contents: ");
if (aasworld.areasettings[area].contents & AREACONTENTS_WATER)
{
botimport.Print(PRT_MESSAGE, "water &");
} //end if
if (aasworld.areasettings[area].contents & AREACONTENTS_LAVA)
{
botimport.Print(PRT_MESSAGE, "lava &");
} //end if
if (aasworld.areasettings[area].contents & AREACONTENTS_SLIME)
{
botimport.Print(PRT_MESSAGE, "slime &");
} //end if
if (aasworld.areasettings[area].contents & AREACONTENTS_JUMPPAD)
{
botimport.Print(PRT_MESSAGE, "jump pad &");
} //end if
if (aasworld.areasettings[area].contents & AREACONTENTS_CLUSTERPORTAL)
{
botimport.Print(PRT_MESSAGE, "cluster portal &");
} //end if
if (aasworld.areasettings[area].contents & AREACONTENTS_VIEWPORTAL)
{
botimport.Print(PRT_MESSAGE, "view portal &");
} //end if
if (aasworld.areasettings[area].contents & AREACONTENTS_DONOTENTER)
{
botimport.Print(PRT_MESSAGE, "do not enter &");
} //end if
if (aasworld.areasettings[area].contents & AREACONTENTS_MOVER)
{
botimport.Print(PRT_MESSAGE, "mover &");
//.........这里部分代码省略.........