Catches FPSGameplay module up to new gamemode and module paradigm

Adds additional args for callGamemodeFunction
Adds default Observer camera datablock
This commit is contained in:
Areloch 2019-10-04 21:00:58 -05:00
parent 01f562b9e5
commit 94b6749012
3 changed files with 11 additions and 6 deletions

View file

@ -141,3 +141,8 @@ datablock MissionMarkerData(CameraBookmarkMarker)
category = "Misc";
shapeFile = "core/gameObjects/shapes/camera.dts";
};
datablock CameraData(Observer)
{
mode = "Observer";
};

View file

@ -1,4 +1,4 @@
function callGamemodeFunction(%gameModeFuncName, %data)
function callGamemodeFunction(%gameModeFuncName, %arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %arg6)
{
if(%data !$= "")
%data = "\""@%data@"\"";
@ -14,7 +14,7 @@ function callGamemodeFunction(%gameModeFuncName, %data)
//if the scene defines a game mode, go ahead and envoke it here
if(isObject(%gamemodeName) && %gamemodeName.isMethod(%gameModeFuncName))
{
eval(%gamemodeName @ "."@%gameModeFuncName@"("@%data@");" );
eval(%gamemodeName @ "."@%gameModeFuncName@"(\""@%arg0@"\", \""@%arg1@"\", \""@%arg2@"\", \""@%arg3@"\", \""@%arg4@"\", \""@%arg5@"\", \""@%arg6@"\");" );
%hasGameMode = 1;
}
else
@ -22,7 +22,7 @@ function callGamemodeFunction(%gameModeFuncName, %data)
//if we don't have an object, attempt the static call
if(isMethod(%gamemodeName, %gameModeFuncName))
{
eval(%gamemodeName @ "::"@%gameModeFuncName@"("@%data@");" );
eval(%gamemodeName @ "::"@%gameModeFuncName@"(\""@%arg0@"\", \""@%arg1@"\", \""@%arg2@"\", \""@%arg3@"\", \""@%arg4@"\", \""@%arg5@"\", \""@%arg6@"\");" );
%hasGameMode = 1;
}
}
@ -37,14 +37,14 @@ function callGamemodeFunction(%gameModeFuncName, %data)
{
if(isObject(%defaultModeName) && %defaultModeName.isMethod(%gameModeFuncName))
{
eval(%defaultModeName @ "."@%gameModeFuncName@"("@%data@");" );
eval(%defaultModeName @ "."@%gameModeFuncName@"(\""@%arg0@"\", \""@%arg1@"\", \""@%arg2@"\", \""@%arg3@"\", \""@%arg4@"\", \""@%arg5@"\", \""@%arg6@"\");" );
%hasGameMode = 1;
}
else
{
if(isMethod(%defaultModeName, %gameModeFuncName))
{
eval(%defaultModeName @ "::"@%gameModeFuncName@"("@%data@");" );
eval(%defaultModeName @ "::"@%gameModeFuncName@"(\""@%arg0@"\", \""@%arg1@"\", \""@%arg2@"\", \""@%arg3@"\", \""@%arg4@"\", \""@%arg5@"\", \""@%arg6@"\");" );
%hasGameMode = 1;
}
}

View file

@ -150,7 +150,7 @@ function ExampleGameMode::onClientLeaveGame(%this, %client)
//This is called when the player has connected and finaly setup is done and control is handed
//over to the client. It allows a point to special-case setting the client's canvas content
//(Such as a gamemode-specific GUI) or setting up gamemode-specific keybinds/control schemes
function ExampleGameMode::onInitialControlSet()
function ExampleGameMode::onInitialControlSet(%this)
{
}