+
+ prvm_prog_t *prog = SVVM_prog;
+ if (PRVM_serverfunction(RestartTriggered))
+ {
+ Con_DPrint("Calling RestartTriggered\n");
+ PRVM_serverglobalfloat(time) = sv.time;
+ prog->ExecuteProgram(prog, PRVM_serverfunction(RestartTriggered), "QC function RestartTriggered is missing");
+ }
print ("version: %s build %s (gamename %s)\n", gamename, buildstring, gamenetworkfiltername);
print ("protocol: %i (%s)\n", Protocol_NumberForEnum(sv.protocol), Protocol_NameForEnum(sv.protocol));
print ("map: %s\n", sv.name);
print ("version: %s build %s (gamename %s)\n", gamename, buildstring, gamenetworkfiltername);
print ("protocol: %i (%s)\n", Protocol_NumberForEnum(sv.protocol), Protocol_NameForEnum(sv.protocol));
print ("map: %s\n", sv.name);
- if(!(key = PRVM_ED_FindField(prog, Cmd_Argv(cmd, i))))
- {
- print("Key %s not found!\n", Cmd_Argv(cmd, i));
- PRVM_ED_Free(prog, ed);
- return;
- }
+ print("Key %s not found!\n", Cmd_Argv(cmd, i));
+ PRVM_ED_Free(prog, ed);
+ return;
+ }
- /*
- * This is mostly for dedicated server console, but if the
- * player gave a custom origin, we can ignore the traceline.
- */
- if(!strcmp(Cmd_Argv(cmd, i), "origin"))
- haveorigin = true;
+ /*
+ * This is mostly for dedicated server console, but if the
+ * player gave a custom origin, we can ignore the traceline.
+ */
+ if(!strcmp(Cmd_Argv(cmd, i), "origin"))
+ haveorigin = true;
- expectval = true;
- }
- else
- {
- PRVM_ED_ParseEpair(prog, ed, key, Cmd_Argv(cmd, i), false);
- expectval = false;
- }
+ if (i + 1 < Cmd_Argc(cmd))
+ PRVM_ED_ParseEpair(prog, ed, key, Cmd_Argv(cmd, i+1), false);
Cmd_AddCommand(CF_SHARED, "maxplayers", SV_MaxPlayers_f, "sets limit on how many players (or bots) may be connected to the server at once");
host.hook.SV_SendCvar = SV_SendCvar_f;
Cmd_AddCommand(CF_SHARED, "maxplayers", SV_MaxPlayers_f, "sets limit on how many players (or bots) may be connected to the server at once");
host.hook.SV_SendCvar = SV_SendCvar_f;
- // commands that do not have automatic forwarding from cmd_client, these are internal details of the network protocol and not of interest to users (if they know what they are doing they can still use a generic "cmd prespawn" or similar)
+ // commands that do not have automatic forwarding from cmd_local, these are internal details of the network protocol and not of interest to users (if they know what they are doing they can still use a generic "cmd prespawn" or similar)
Cmd_AddCommand(CF_SERVER_FROM_CLIENT, "prespawn", SV_PreSpawn_f, "internal use - signon 1 (client acknowledges that server information has been received)");
Cmd_AddCommand(CF_SERVER_FROM_CLIENT, "spawn", SV_Spawn_f, "internal use - signon 2 (client has sent player information, and is asking server to send scoreboard rankings)");
Cmd_AddCommand(CF_SERVER_FROM_CLIENT, "begin", SV_Begin_f, "internal use - signon 3 (client asks server to start sending entities, and will go to signon 4 (playing) when the first entity update is received)");
Cmd_AddCommand(CF_SERVER_FROM_CLIENT, "prespawn", SV_PreSpawn_f, "internal use - signon 1 (client acknowledges that server information has been received)");
Cmd_AddCommand(CF_SERVER_FROM_CLIENT, "spawn", SV_Spawn_f, "internal use - signon 2 (client has sent player information, and is asking server to send scoreboard rankings)");
Cmd_AddCommand(CF_SERVER_FROM_CLIENT, "begin", SV_Begin_f, "internal use - signon 3 (client asks server to start sending entities, and will go to signon 4 (playing) when the first entity update is received)");