Prechádzať zdrojové kódy

Rename variable gamesession -> gameSession

Signed-off-by: AMZN-Gene <[email protected]>
AMZN-Gene 2 rokov pred
rodič
commit
fbf1b2edc5

+ 2 - 2
MPSGameLift/Code/Source/MPSGameLiftServerSystemComponent.cpp

@@ -15,7 +15,7 @@
 
 AZ_CVAR(
     float,
-    sv_gamesessionNoPlayerShutdownTimeoutSeconds,
+    sv_gameSessionNoPlayerShutdownTimeoutSeconds,
     3600.0f,
     nullptr,
     AZ::ConsoleFunctorFlags::DontReplicate,
@@ -96,7 +96,7 @@ namespace MPSGameLift
                 "Session requested by Amazon GameLift. Make sure to load into a multiplayer level before players join.");
         }
 
-        m_gamesessionNoPlayerShutdown.Enqueue(AZ::SecondsToTimeMs(sv_gamesessionNoPlayerShutdownTimeoutSeconds));
+        m_gameSessionNoPlayerShutdown.Enqueue(AZ::SecondsToTimeMs(sv_gameSessionNoPlayerShutdownTimeoutSeconds));
     }
 
     bool MPSGameLiftServerSystemComponent::ShouldBlockLevelLoading(const char* levelName)

+ 5 - 5
MPSGameLift/Code/Source/MPSGameLiftServerSystemComponent.h

@@ -52,13 +52,13 @@ namespace MPSGameLift
         AZStd::string m_loadedLevelName;
 
         // Keep track if the server starts a game session but no players join
-        AZ::ScheduledEvent m_gamesessionNoPlayerShutdown = AZ::ScheduledEvent([]
+        AZ::ScheduledEvent m_gameSessionNoPlayerShutdown = AZ::ScheduledEvent([]
             {
                 if (auto console = AZ::Interface<AZ::IConsole>::Get())
                 {
-                    float sv_gamesessionNoPlayerShutdownTimeoutSeconds = 0.0f;
-                    console->GetCvarValue("sv_gamesessionNoPlayerShutdownTimeoutSeconds", sv_gamesessionNoPlayerShutdownTimeoutSeconds);
-                    AZLOG_WARN("Terminating GameLift server due to zero players joining the game session after %f seconds.", sv_gamesessionNoPlayerShutdownTimeoutSeconds);
+                    float sv_gameSessionNoPlayerShutdownTimeoutSeconds = 0.0f;
+                    console->GetCvarValue("sv_gameSessionNoPlayerShutdownTimeoutSeconds", sv_gameSessionNoPlayerShutdownTimeoutSeconds);
+                    AZLOG_WARN("Terminating GameLift server due to zero players joining the game session after %f seconds.", sv_gameSessionNoPlayerShutdownTimeoutSeconds);
 
                     Multiplayer::GetMultiplayer()->Terminate(AzNetworking::DisconnectReason::TerminatedByServer);
                     AzFramework::ApplicationRequests::Bus::Broadcast(&AzFramework::ApplicationRequests::ExitMainLoop);
@@ -67,7 +67,7 @@ namespace MPSGameLift
             AZ::Name("MPSGameLiftServerSystemComponent No Player Joined the Game Session so Shutdown the App"));
 
         Multiplayer::ConnectionAcquiredEvent::Handler m_connectionAquiredEventHandler = Multiplayer::ConnectionAcquiredEvent::Handler([this]([[maybe_unused]] Multiplayer::MultiplayerAgentDatum agentDatum) -> void {
-            this->m_gamesessionNoPlayerShutdown.RemoveFromQueue();
+            this->m_gameSessionNoPlayerShutdown.RemoveFromQueue();
             });
     };
 }