#include "../mutators/mutators_include.qh"
#ifdef SVQC
- #include "../vehicles/vehicle.qh"
+ #include "../../common/vehicles/all.qh"
#endif
#include "../../common/constants.qh"
#include "../../common/teams.qh"
#include "../../common/util.qh"
+#include "../../common/monsters/all.qc"
+#include "../../common/monsters/spawn.qh"
+#include "../../common/monsters/sv_monsters.qh"
+
#include "../../warpzonelib/common.qh"
void ClientKill_TeamChange (float targetteam); // 0 = don't change, -1 = auto, -2 = spec
{
case CMD_REQUEST_COMMAND:
{
- printf("CHECKFAIL: %s (%s) epically failed check %s\n", self.netname, self.netaddress, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)));
+ LOG_INFOF("CHECKFAIL: %s (%s) epically failed check %s\n", self.netname, self.netaddress, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)));
self.checkfail = 1;
return; // never fall through to usage
}
case CMD_REQUEST_COMMAND:
{
string command = strtolower(argv(1));
-
+
if(!autocvar_g_physics_clientselect)
{
sprint(self, "Client physics selection is currently disabled.\n");
sprint(self, strcat("Available physics sets: \n\n", autocvar_g_physics_clientselect_options, " default\n"));
return;
}
-
+
if(Physics_Valid(command) || command == "default")
{
stuffcmd(self, strcat("\nseta cl_physics ", command, "\nsendcvar cl_physics\n"));
return;
}
}
-
+
default:
sprint(self, strcat("Current physics set: ^3", self.cvar_cl_physics, "\n"));
case CMD_REQUEST_USAGE:
{
if(tell_to != self) // and we're allowed to send to them :D
{
- Say(self, false, tell_to, substring(command, argv_start_index(next_token), argv_end_index(-1) - argv_start_index(next_token)), true);
+ // workaround for argv indexes indexing ascii chars instead of utf8 chars
+ // In this case when the player name contains utf8 chars
+ // the message gets partially trimmed in the beginning.
+ // Potentially this bug affects any substring call that uses
+ // argv_start_index and argv_end_index.
+
+ string utf8_enable_save = cvar_string("utf8_enable");
+ cvar_set("utf8_enable", "0");
+ string msg = substring(command, argv_start_index(next_token), argv_end_index(-1) - argv_start_index(next_token));
+ cvar_set("utf8_enable", utf8_enable_save);
+
+ Say(self, false, tell_to, msg, true);
return;
}
else { print_to(self, "You can't ^2tell^7 a message to yourself."); return; }
CLIENT_COMMAND("suggestmap", ClientCommand_suggestmap(request, arguments), "Suggest a map to the mapvote at match end") \
CLIENT_COMMAND("tell", ClientCommand_tell(request, arguments, command), "Send a message directly to a player") \
CLIENT_COMMAND("voice", ClientCommand_voice(request, arguments, command), "Send voice message via sound") \
+ CLIENT_COMMAND("minigame", ClientCommand_minigame(request, arguments, command), "Start a minigame") \
/* nothing */
void ClientCommand_macro_help()
float argc = tokenize_console(command);
- // for the mutator hook system
- cmd_name = strtolower(argv(0));
- cmd_argc = argc;
- cmd_string = command;
-
// Guide for working with argc arguments by example:
// argc: 1 - 2 - 3 - 4
// argv: 0 - 1 - 2 - 3
return;
}
}
- else if(MUTATOR_CALLHOOK(SV_ParseClientCommand))
+ else if(MUTATOR_CALLHOOK(SV_ParseClientCommand, strtolower(argv(0)), argc, command))
{
return; // handled by a mutator
}