Hey guys,
after several hours of bug tracking I finally managed to track down to a very big problem, as the GameMode-Reference I get from GetWorld()->GetAuthGameMode() returns always NULL, but only on the client.
The same code is also executed on the Server and works fine.
Any ideas? (I basically do nothing with the GameMode besides getting a reference to it in the whole game, so there are no modifications which could lead to a NULL-Pointer)
Here is the code snippet of the problem …: (basically just Logging, but it always logs: “GameMode == NULL, ArenaCharacter.cpp : OnDeath”)
UWorld* world = GetWorld();
if (world)
{
AARGameMode* gameMode = world->GetAuthGameMode<AARGameMode>();
if (gameMode != NULL)
{
if (this->GetController() != NULL)
{
//TODO
}
else
{
UE_LOG(GeneralLog, Fatal, TEXT("GETCONTROLLER() == NULL, ArenaCharacter.cpp : OnDeath"));
}
}
else
{
UE_LOG(GeneralLog, Error, TEXT("GameMode == NULL, ArenaCharacter.cpp : OnDeath"));
}
}
Thanks in advance!