// ==========================================
// used by CommonCommand_timeout() and CommonCommand_timein() to handle game pausing and messaging and such.
-void timeout_handler_reset()
+void timeout_handler_reset(entity this)
{
- SELFPARAM();
- timeout_caller = world;
+ timeout_caller = NULL;
timeout_time = 0;
timeout_leadtime = 0;
- remove(self);
+ remove(this);
}
-void timeout_handler_think()
+void timeout_handler_think(entity this)
{
- SELFPARAM();
switch (timeout_status)
{
case TIMEOUT_ACTIVE:
it.fixangle = false;
));
- timeout_handler_reset();
+ timeout_handler_reset(this);
}
return;
case TIMEOUT_INACTIVE:
default:
{
- timeout_handler_reset();
+ timeout_handler_reset(this);
return;
}
}
void CommonCommand_editmob(int request, entity caller, int argc)
{
- SELFPARAM();
switch (request)
{
case CMD_REQUEST_COMMAND:
{
string command = builtin_cvar_string(strcat("sv_info_", argv(1)));
- if (command) wordwrap_sprint(command, 1000);
+ if (command) wordwrap_sprint(caller, command, 1000);
else print_to(caller, "ERROR: unsupported info command");
return; // never fall through to usage
timeout_leadtime = autocvar_sv_timeout_leadtime;
timeout_handler = spawn();
- timeout_handler.think = timeout_handler_think;
+ setthink(timeout_handler, timeout_handler_think);
timeout_handler.nextthink = time; // always let the entity think asap
Send_Notification(NOTIF_ALL, world, MSG_ANNCE, ANNCE_TIMEOUT);