Remove ability for gmlevel 0 to use /playanim (#391)

This commit is contained in:
Avery 2022-03-29 13:06:28 -07:00 committed by GitHub
parent acb7ad78e8
commit 75fd425ef6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()) {