Minor spelling changes and switching GameSessionId to const in the OnStartGameSession Lambda
This commit is contained in:
@@ -97,7 +97,7 @@ void AShooterGameMode::InitGameLift()
|
|||||||
ServerParametersForAnywhere.m_authToken = TCHAR_TO_UTF8(*GameLiftConfig.AuthTokenResult.Value);
|
ServerParametersForAnywhere.m_authToken = TCHAR_TO_UTF8(*GameLiftConfig.AuthTokenResult.Value);
|
||||||
LogServerParameters(ServerParametersForAnywhere);
|
LogServerParameters(ServerParametersForAnywhere);
|
||||||
|
|
||||||
// InitSDK will establish a local connection with GameLfit's agent to enable further communication.
|
// InitSDK will establish a local connection with GameLift's agent to enable further communication.
|
||||||
InitSdkOutcome = GameLiftSdkModule->InitSDK(ServerParametersForAnywhere);
|
InitSdkOutcome = GameLiftSdkModule->InitSDK(ServerParametersForAnywhere);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -125,9 +125,10 @@ void AShooterGameMode::InitGameLift()
|
|||||||
//When a game session is created, Amazon GameLift Servers sends an activation request to the game server and passes along the game session object containing game properties and other settings.
|
//When a game session is created, Amazon GameLift Servers sends an activation request to the game server and passes along the game session object containing game properties and other settings.
|
||||||
//Here is where a game server should take action based on the game session object.
|
//Here is where a game server should take action based on the game session object.
|
||||||
//Once the game server is ready to receive incoming player connections, it should invoke GameLiftServerAPI.ActivateGameSession()
|
//Once the game server is ready to receive incoming player connections, it should invoke GameLiftServerAPI.ActivateGameSession()
|
||||||
|
// ReSharper disable once CppPassValueParameterByConstReference - not safe to do with async lambdas
|
||||||
ProcessParameters->OnStartGameSession.BindLambda([=](Aws::GameLift::Server::Model::GameSession InGameSession)
|
ProcessParameters->OnStartGameSession.BindLambda([=](Aws::GameLift::Server::Model::GameSession InGameSession)
|
||||||
{
|
{
|
||||||
FString GameSessionId = FString(InGameSession.GetGameSessionId());
|
const FString GameSessionId = FString(InGameSession.GetGameSessionId());
|
||||||
UE_LOG(LogShooterGameMode, Log, TEXT("GameSession Initializing: %s"), *GameSessionId);
|
UE_LOG(LogShooterGameMode, Log, TEXT("GameSession Initializing: %s"), *GameSessionId);
|
||||||
GameLiftSdkModule->ActivateGameSession();
|
GameLiftSdkModule->ActivateGameSession();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user