From 3f22bf5cc04e914273481ea51a0f82a6d79d9aa1 Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Mon, 3 Jun 2024 22:44:54 -0500 Subject: [PATCH] Add an easy way to stop spectating --- dGame/dUtilities/SlashCommandHandler.cpp | 2 +- dGame/dUtilities/SlashCommands/GMGreaterThanZeroCommands.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dGame/dUtilities/SlashCommandHandler.cpp b/dGame/dUtilities/SlashCommandHandler.cpp index 20f2634a..477044b1 100644 --- a/dGame/dUtilities/SlashCommandHandler.cpp +++ b/dGame/dUtilities/SlashCommandHandler.cpp @@ -931,7 +931,7 @@ void SlashCommandHandler::Startup() { Command SpectateCommand{ .help = "Spectate a player", - .info = "Specify a player name to spectate. They must be in the same world as you", + .info = "Specify a player name to spectate. They must be in the same world as you. Leave blank to stop spectating", .aliases = { "spectate", "follow" }, .handle = GMGreaterThanZeroCommands::Spectate, .requiredLevel = eGameMasterLevel::JUNIOR_MODERATOR diff --git a/dGame/dUtilities/SlashCommands/GMGreaterThanZeroCommands.cpp b/dGame/dUtilities/SlashCommands/GMGreaterThanZeroCommands.cpp index c1cb6b4b..19a40983 100644 --- a/dGame/dUtilities/SlashCommands/GMGreaterThanZeroCommands.cpp +++ b/dGame/dUtilities/SlashCommands/GMGreaterThanZeroCommands.cpp @@ -325,6 +325,7 @@ namespace GMGreaterThanZeroCommands { void Spectate(Entity* entity, const SystemAddress& sysAddr, const std::string args) { if (args.empty()) { + GameMessages::SendForceCameraTargetCycle(entity, false, eCameraTargetCyclingMode::DISALLOW_CYCLING, entity->GetObjectID()); GameMessages::SendSlashCommandFeedbackText(entity, u"No player Given"); return; }