rem: orz_intelligence (ShipPtr, ObjectsOfConcern, ConcernCounter) PELEMENT ShipPtr; PEVALUATE_DESC ObjectsOfConcern; COUNT ConcernCounter;
add: orz_intelligence (PELEMENT ShipPtr, PEVALUATE_DESC ObjectsOfConcern, COUNT ConcernCounter)
context: orz_intelligence (ShipPtr, ObjectsOfConcern, ConcernCounter)PELEMENT ShipPtr;PEVALUATE_DESC ObjectsOfConcern;COUNT ConcernCounter;{	ELEMENTPTR TurretPtr;	STARSHIPPTR StarShipPtr;	PEVALUATE_DESC lpEvalDesc;	LockElement (GetSuccElement (ShipPtr), &TurretPtr);	++TurretPtr->turn_wait;	ship_intelligence (ShipPtr, ObjectsOfConcern, ConcernCounter);	--TurretPtr->turn_wait;	GetElementStarShip (ShipPtr, &StarShipPtr);	lpEvalDesc = &ObjectsOfConcern[ENEMY_SHIP_INDEX];	if (lpEvalDesc->ObjectPtr == 0)		StarShipPtr->ship_input_state &= ~SPECIAL;	else if (StarShipPtr->special_counter != 1)	{		STARSHIPPTR EnemyStarShipPtr;		if (ShipPtr->turn_wait == 0				&& lpEvalDesc->MoveState == ENTICE				&& lpEvalDesc->which_turn < 24				&& (StarShipPtr->cur_status_flags				& (SHIP_AT_MAX_SPEED | SHIP_BEYOND_MAX_SPEED))				&& !(StarShipPtr->ship_input_state & THRUST)				&& NORMALIZE_ANGLE (				GetVelocityTravelAngle (&ShipPtr->velocity)				- ARCTAN (						lpEvalDesc->ObjectPtr->next.location.x						- ShipPtr->next.location.x,						lpEvalDesc->ObjectPtr->next.location.y						- ShipPtr->next.location.y				) + (QUADRANT - (OCTANT >> 1))) >=				((QUADRANT - (OCTANT >> 1)) << 1))			StarShipPtr->ship_input_state &= ~(LEFT | RIGHT);		StarShipPtr->ship_input_state &= ~SPECIAL;		if (ShipPtr->turn_wait == 0				&& !(StarShipPtr->ship_input_state & (LEFT | RIGHT | WEAPON))				&& TurretPtr->turn_wait == 0)		{			SIZE delta_facing;			COUNT facing;//, orig_facing;			facing = NORMALIZE_FACING (StarShipPtr->ShipFacing					+ TurretPtr->thrust_wait);			if ((delta_facing = TrackShip (TurretPtr, &facing)) > 0)			{				StarShipPtr->ship_input_state |= SPECIAL;				if (delta_facing == ANGLE_TO_FACING (HALF_CIRCLE))					delta_facing += (((BYTE)TFB_Random () & 1) << 1) - 1;				if (delta_facing < ANGLE_TO_FACING (HALF_CIRCLE))					StarShipPtr->ship_input_state |= RIGHT;				else					StarShipPtr->ship_input_state |= LEFT;			}		}		GetElementStarShip (lpEvalDesc->ObjectPtr, &EnemyStarShipPtr);		if (StarShipPtr->special_counter == 0				&& !(StarShipPtr->ship_input_state & WEAPON)				&& StarShipPtr->RaceDescPtr->ship_info.crew_level >				(BYTE)(StarShipPtr->RaceDescPtr->ship_info.max_crew >> 2)				&& !(EnemyStarShipPtr->RaceDescPtr->ship_info.ship_flags				& POINT_DEFENSE)				&& (MANEUVERABILITY (						&EnemyStarShipPtr->RaceDescPtr->cyborg_control						) < SLOW_SHIP				|| lpEvalDesc->which_turn <= 12				|| count_marines (StarShipPtr, FALSE) < 2))		{			StarShipPtr->ship_input_state |= WEAPON | SPECIAL;		}	}	UnlockElement (GetSuccElement (ShipPtr));}