From 75fd425ef69965cbb4bcfa660ac1aa3493aac3d8 Mon Sep 17 00:00:00 2001 From: Avery Date: Tue, 29 Mar 2022 13:06:28 -0700 Subject: [PATCH] Remove ability for gmlevel 0 to use /playanim (#391) --- dGame/dUtilities/SlashCommandHandler.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dGame/dUtilities/SlashCommandHandler.cpp b/dGame/dUtilities/SlashCommandHandler.cpp index 67336eb7..901bccbf 100644 --- a/dGame/dUtilities/SlashCommandHandler.cpp +++ b/dGame/dUtilities/SlashCommandHandler.cpp @@ -363,11 +363,6 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit } if (user->GetMaxGMLevel() == 0 || entity->GetGMLevel() >= 0) { - if ((chatCommand == "playanimation" || chatCommand == "playanim") && args.size() == 1) { - std::u16string anim = GeneralUtils::ASCIIToUTF16(args[0], args[0].size()); - GameMessages::SendPlayAnimation(entity, anim); - } - if (chatCommand == "die") { entity->Smash(entity->GetObjectID()); } @@ -446,6 +441,11 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit GameMessages::SendToggleGMInvis(entity->GetObjectID(), false, UNASSIGNED_SYSTEM_ADDRESS); // need to retoggle because it gets reenabled on creation of new character } + + if ((chatCommand == "playanimation" || chatCommand == "playanim") && args.size() == 1 && entity->GetGMLevel() >= GAME_MASTER_LEVEL_DEVELOPER) { + std::u16string anim = GeneralUtils::ASCIIToUTF16(args[0], args[0].size()); + GameMessages::SendPlayAnimation(entity, anim); + } if (chatCommand == "list-spawns" && entity->GetGMLevel() >= GAME_MASTER_LEVEL_DEVELOPER) { for (const auto& pair : EntityManager::Instance()->GetSpawnPointEntities()) {