Skip to content

Commit

Permalink
Move StartGameDirect from PlayerMenu to Menu
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoLuis0 authored and coelckers committed Sep 14, 2023
1 parent 133fbf1 commit 9f24d8b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/menu/doommenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 5 additions & 2 deletions wadsrc/static/zscript/ui/menu/playermenu.zs
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@
**
*/

extend class Menu
{
static native void StartGameDirect(bool hasPlayerClass, bool randomPlayerClass, Class<PlayerPawn> playerClass, int Episode, int Skill);
}

class PlayerMenu : ListMenu
{
int mRotation;
int PlayerClassIndex;
PlayerClass mPlayerClass;
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);
Expand Down

0 comments on commit 9f24d8b

Please sign in to comment.