Пример #1
0
//===========================================================================
// called at the start of every frame
//
// Parameter:               -
// Returns:                 -
// Changes Globals:     -
//===========================================================================
int AAS_StartFrame(float time)
{
	// Ridah, do each of the aasworlds
	int             i;

	for(i = 0; i < MAX_AAS_WORLDS; i++)
	{
		AAS_SetCurrentWorld(i);

		(*aasworld).time = time;
		//invalidate the entities

		AAS_InvalidateEntities();
		//initialize AAS
		AAS_ContinueInit(time);
		//update team deaths
		AAS_UpdateTeamDeath();
		//
		(*aasworld).frameroutingupdates = 0;
		//
		/* Ridah, disabled for speed
		   if (LibVarGetValue("showcacheupdates"))
		   {
		   AAS_RoutingInfo();
		   LibVarSet("showcacheupdates", "0");
		   } //end if
		   if (LibVarGetValue("showmemoryusage"))
		   {
		   PrintUsedMemorySize();
		   LibVarSet("showmemoryusage", "0");
		   } //end if
		   if (LibVarGetValue("memorydump"))
		   {
		   PrintMemoryLabels();
		   LibVarSet("memorydump", "0");
		   } //end if
		 */
	}							//end if
	(*aasworld).numframes++;

	return BLERR_NOERROR;
}								//end of the function AAS_StartFrame
Пример #2
0
//===========================================================================
// called at the start of every frame
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
int AAS_StartFrame(float time)
{
	aasworld.time = time;
	//unlink all entities that were not updated last frame
	AAS_UnlinkInvalidEntities();
	//invalidate the entities
	AAS_InvalidateEntities();
	//initialize AAS
	AAS_ContinueInit(time);
	//
	aasworld.frameroutingupdates = 0;
	//
	if (bot_developer)
	{
		if (LibVarGetValue("showcacheupdates"))
		{
			AAS_RoutingInfo();
			LibVarSet("showcacheupdates", "0");
		} //end if
		if (LibVarGetValue("showmemoryusage"))
		{
			PrintUsedMemorySize();
			LibVarSet("showmemoryusage", "0");
		} //end if
		if (LibVarGetValue("memorydump"))
		{
			PrintMemoryLabels();
			LibVarSet("memorydump", "0");
		} //end if
	} //end if
	//
	if (saveroutingcache->value)
	{
		AAS_WriteRouteCache();
		LibVarSet("saveroutingcache", "0");
	} //end if
	//
	aasworld.numframes++;
	return BLERR_NOERROR;
} //end of the function AAS_StartFrame