Move StartGameDirect from PlayerMenu to Menu

This commit is contained in:
Ricardo Luís Vaz Silva 2023-07-16 19:03:30 -03:00 committed by Christoph Oelckers
parent 133fbf1390
commit 9f24d8babc
2 changed files with 6 additions and 3 deletions

View file

@ -135,7 +135,7 @@ void StartGameDirect(bool hasPlayerClass, bool randomPlayerClass, PClassActor *
}
}
DEFINE_ACTION_FUNCTION_NATIVE(DPlayerMenu, StartGameDirect, StartGameDirect)
DEFINE_ACTION_FUNCTION_NATIVE(DMenu, StartGameDirect, StartGameDirect)
{
PARAM_PROLOGUE;
PARAM_BOOL(hasPlayerClass);

View file

@ -33,6 +33,11 @@
**
*/
extend class Menu
{
static native void StartGameDirect(bool hasPlayerClass, bool randomPlayerClass, Class<PlayerPawn> playerClass, int Episode, int Skill);
}
class PlayerMenu : ListMenu
{
int mRotation;
@ -41,8 +46,6 @@ class PlayerMenu : ListMenu
Array<int> PlayerColorSets;
Array<int> mPlayerSkins;
static native void StartGameDirect(bool hasPlayerClass, bool randomPlayerClass, Class<PlayerPawn> playerClass, int Episode, int Skill);
// All write function for the player config are native to prevent abuse.
static native void AutoaimChanged(float val);
static native void TeamChanged(int val);