while (entnum >= prog->max_edicts)
PRVM_MEM_IncreaseEdicts(prog);
ent = PRVM_EDICT_NUM(entnum);
- memset(ent->fields.vp, 0, prog->entityfields * 4);
+ memset(ent->fields.fp, 0, prog->entityfields * sizeof(prvm_vec_t));
ent->priv.server->free = false;
if(developer_entityparsing.integer)
if (host_client->edict && PRVM_serverfunction(SV_ChangeTeam))
{
Con_DPrint("Calling SV_ChangeTeam\n");
- prog->globals.generic[OFS_PARM0] = playercolor;
+ prog->globals.fp[OFS_PARM0] = playercolor;
PRVM_serverglobalfloat(time) = sv.time;
PRVM_serverglobaledict(self) = PRVM_EDICT_TO_PROG(host_client->edict);
prog->ExecuteProgram(prog, PRVM_serverfunction(SV_ChangeTeam), "QC function SV_ChangeTeam is missing");
*/
static void Host_Pause_f (void)
{
- if (!pausable.integer)
- SV_ClientPrint("Pause not allowed.\n");
+ void (*print) (const char *fmt, ...);
+ if (cmd_source == src_command)
+ {
+ // if running a client, try to send over network so the pause is handled by the server
+ if (cls.state == ca_connected)
+ {
+ Cmd_ForwardToServer ();
+ return;
+ }
+ print = Con_Printf;
+ }
else
+ print = SV_ClientPrintf;
+
+ if (!pausable.integer)
{
- sv.paused ^= 1;
- SV_BroadcastPrintf("%s %spaused the game\n", host_client->name, sv.paused ? "" : "un");
- // send notification to all clients
- MSG_WriteByte(&sv.reliable_datagram, svc_setpause);
- MSG_WriteByte(&sv.reliable_datagram, sv.paused);
+ if (cmd_source == src_client)
+ {
+ if(cls.state == ca_dedicated || host_client != &svs.clients[0]) // non-admin
+ {
+ print("Pause not allowed.\n");
+ return;
+ }
+ }
}
+
+ sv.paused ^= 1;
+ SV_BroadcastPrintf("%s %spaused the game\n", host_client->name, sv.paused ? "" : "un");
+ // send notification to all clients
+ MSG_WriteByte(&sv.reliable_datagram, svc_setpause);
+ MSG_WriteByte(&sv.reliable_datagram, sv.paused);
}
/*
case '8':
case '9':
// MED 01/04/97 added hipnotic give stuff
- if (gamemode == GAME_HIPNOTIC)
+ if (gamemode == GAME_HIPNOTIC || gamemode == GAME_QUOTH)
{
if (t[0] == '6')
{
lhnetsocket_t *mysocket;
char peer_address[64];
+ if (Cmd_Argc() == 1)
+ {
+ Con_Printf("%s: Usage: %s command\n", Cmd_Argv(0), Cmd_Argv(0));
+ return;
+ }
+
if (!rcon_password.string || !rcon_password.string[0] || rcon_secure.integer > 0)
{
Con_Printf ("You must set rcon_password before issuing an pqrcon command, and rcon_secure must be 0.\n");
lhnetsocket_t *mysocket;
char vabuf[1024];
+ if (Cmd_Argc() == 1)
+ {
+ Con_Printf("%s: Usage: %s command\n", Cmd_Argv(0), Cmd_Argv(0));
+ return;
+ }
+
if (!rcon_password.string || !rcon_password.string[0])
{
Con_Printf ("You must set rcon_password before issuing an rcon command.\n");
Cmd_AddCommand_WithClientCommand ("say_team", Host_Say_Team_f, Host_Say_Team_f, "send a chat message to your team on the server");
Cmd_AddCommand_WithClientCommand ("tell", Host_Tell_f, Host_Tell_f, "send a chat message to only one person on the server");
Cmd_AddCommand_WithClientCommand ("kill", NULL, Host_Kill_f, "die instantly");
- Cmd_AddCommand_WithClientCommand ("pause", NULL, Host_Pause_f, "pause the game (if the server allows pausing)");
+ Cmd_AddCommand_WithClientCommand ("pause", Host_Pause_f, Host_Pause_f, "pause the game (if the server allows pausing)");
Cmd_AddCommand ("kick", Host_Kick_f, "kick a player off the server by number or name");
Cmd_AddCommand_WithClientCommand ("ping", Host_Ping_f, Host_Ping_f, "print ping times of all players on the server");
Cmd_AddCommand ("load", Host_Loadgame_f, "load a saved game file");