Explorar el Código

Merge pull request #1187 from Azaezel/alpah41/callOnChildrenAUG

extended onCreateGame functionality
Brian Roberts hace 1 año
padre
commit
b66445e85f

+ 11 - 1
Templates/BaseGame/game/core/clientServer/scripts/server/levelLoad.tscript

@@ -139,7 +139,7 @@ function loadMissionStage3()
    
    // Construct MOD paths
    pathOnMissionLoadDone();
-
+   getRootScene().callOnChildren("onCreateGame");
    // Mission loading done...
    echo("*** Mission loaded");
 
@@ -152,6 +152,16 @@ function loadMissionStage3()
    %hasGameMode = callGamemodeFunction("onMissionStart");
    
 }
+
+function GameBase::onCreateGame(%this)
+{
+    %db = %this.getDatablock();
+    if (%db.isMethod("onCreateGame"))
+    {
+        %db.onCreateGame(%this);
+    }
+}
+
 function endMission()
 {
    if (!isObject( getScene(0) ))