Exemple #1
0
bool Conversation::CheckActorAvailability() {
	// Cycle through all actors and return false as soon as a busy one is detected
	for( int i = 0; i < GetNumActors(); i++ ) {
		idAI *actor = GetActor( i );
		if( actor == NULL ) {
			return false;    // actor removed from game!
		}
		if( actor->IsKnockedOut() || actor->AI_DEAD ) {
			return false;
		}
	}
	return true; // all checks passed
}
Exemple #2
0
bool Conversation::AllActorsReady() {
	// Cycle through all actors and return false as soon as a busy one is detected
	for( int i = 0; i < GetNumActors(); i++ ) {
		ConversationStatePtr convState = GetConversationState( i );
		if( convState == NULL ) {
			// This is the pathological case, but still don't return false here,
			// otherwise the conversation is blocked
			continue;
		}
		// Only continue the loop if this actor is in ready state
		if( convState->GetExecutionState() != ConversationState::EReady ) {
			return false;
		}
	}
	return true;
}
int DllWrapperGetNumActors()
{
	return GetNumActors();
}