From 30b2f0350767d4d0e78d27b9a1fd33e2095171b9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 8 Feb 2012 04:54:13 +0300 Subject: Add chat command /setdrop N to set change drop counter. --- src/commandhandler.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/commandhandler.cpp') diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index 4022d8d58..9f832c021 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -201,6 +201,8 @@ void CommandHandler::handleCommand(const std::string &command, ChatTab *tab) handleServerIgnoreAll(args, tab); else if (type == "serverunignoreall") handleServerUnIgnoreAll(args, tab); + else if (type == "setdrop") + handleSetDrop(args, tab); else if (type == "dumpg") handleDumpGraphics(args, tab); else if (type == "dumpt") @@ -1187,6 +1189,13 @@ void CommandHandler::outStringNormal(ChatTab *tab, const std::string &str, } } +void CommandHandler::handleSetDrop(const std::string &args, + ChatTab *tab A_UNUSED) +{ + if (player_node) + player_node->setQuickDropCounter(atoi(args.c_str())); +} + #ifdef DEBUG_DUMP_LEAKS void showRes(std::string str, ResourceManager::Resources *res); -- cgit v1.2.3-70-g09d2