aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/concommand.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-08-14 18:30:36 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-08-14 18:30:36 +0100
commitf63b853468225e2bc675cde9484a27acfe8548b5 (patch)
tree931a0fc039d40a81897f3b2f1ee81473ff32a1a4 /NorthstarDedicatedTest/concommand.cpp
parentf425377e5b15dc97ce8caa484b3e282ec5df529c (diff)
downloadNorthstarLauncher-f63b853468225e2bc675cde9484a27acfe8548b5.tar.gz
NorthstarLauncher-f63b853468225e2bc675cde9484a27acfe8548b5.zip
add authentication with local server
Diffstat (limited to 'NorthstarDedicatedTest/concommand.cpp')
-rw-r--r--NorthstarDedicatedTest/concommand.cpp11
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