Ejemplo n.º 1
0
void AFPSGCharacter::Destroyed()
{
	Super::Destroyed();

	//GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, "AFPSGCharacter::Destroyed()");

	destroyInventory();
}
Ejemplo n.º 2
0
Parallaction_br::~Parallaction_br() {
	freeFonts();
	freeCharacter();

	destroyInventory();

	delete _objects;

	delete _locationParser;
	delete _programParser;

	_location._animations.remove(_char._ani);

	delete _walker;
}
Ejemplo n.º 3
0
void AFPSGCharacter::die(AFPSGPlayerController* killer)
{
	if (GEngine != NULL)
	{
		//GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Yellow, TEXT("AFPSGCharacter::die"));
	}

	//Destroy the player inventory
	destroyInventory();

	AFPSGPlayerController* myPlayerController = Cast<AFPSGPlayerController>(GetController());

	if (myPlayerController != NULL)
	{
		//Set to true, and when replicated to clients, will call the callback function onRep_DieOwnerOnly in player controller
		myPlayerController->setDieCallback(true);

		//We are the server, but just to be sure
		if (Role == ROLE_Authority)
		{
			//Server have to manually call the onRep_DieOwnerOnly callback
			myPlayerController->onRep_DieOwnerOnly();

			AFPSGGameMode* gameMode = GetWorld() ? GetWorld()->GetAuthGameMode<AFPSGGameMode>() : NULL;

			if (gameMode != NULL)
			{
				gameMode->notifyKill(killer, myPlayerController);
			}
		}
	}

	//Set to true, and when replicated to clients, will call the callback function onRep_DieAll
	dieCallback = true;

	//We are the server, but just to be sure
	if (Role == ROLE_Authority)
	{
		//Server have to manually call the onRep_DieAll callback
		onRep_DieAll();
	}

	//Calls our controller PawnPendingDestroy function
	DetachFromControllerPendingDestroy();
}
Ejemplo n.º 4
0
Parallaction_ns::~Parallaction_ns() {
	freeFonts();

	// TODO: we may want to add a ~Character instead
	freeCharacter();
	_char._ani.reset();

	destroyInventory();

	delete _locationParser;
	delete _programParser;
	freeLocation(true);

	_location._animations.remove(_char._ani);

	delete _walker;

	destroyTestResultLabels();
}