diff options
Diffstat (limited to 'NorthstarDedicatedTest/concommand.cpp')
-rw-r--r-- | NorthstarDedicatedTest/concommand.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/concommand.cpp b/NorthstarDedicatedTest/concommand.cpp index d97ef2e5..2db46aa2 100644 --- a/NorthstarDedicatedTest/concommand.cpp +++ b/NorthstarDedicatedTest/concommand.cpp @@ -1,5 +1,6 @@ #include "pch.h" #include "concommand.h" +#include "gameutils.h" #include <iostream> typedef void(*ConCommandConstructorType)(ConCommand* newCommand, const char* name, void(*callback)(const CCommand&), const char* helpString, int flags, void* parent); @@ -14,7 +15,17 @@ void RegisterConCommand(const char* name, void(*callback)(const CCommand&), cons conCommandConstructor(newCommand, name, callback, helpString, flags, nullptr); } +void SetPlaylistCommand(const CCommand& args) +{ + if (args.ArgC() < 2) + return; + + SetCurrentPlaylist(args.Arg(1)); +} + void InitialiseConCommands(HMODULE baseAddress) { conCommandConstructor = (ConCommandConstructorType)((char*)baseAddress + 0x415F60); + + RegisterConCommand("setplaylist", SetPlaylistCommand, "", FCVAR_NONE); }
\ No newline at end of file |