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)
PRVM_serveredictstring(host_client->edict, netname) = PRVM_SetEngineString(prog, host_client->name);
if (strcmp(host_client->old_name, host_client->name))
{
- if (host_client->spawned)
+ if (host_client->begun)
SV_BroadcastPrintf("%s ^7changed name to %s\n", host_client->old_name, host_client->name);
strlcpy(host_client->old_name, host_client->name, sizeof(host_client->old_name));
// send notification to all clients
PRVM_serveredictstring(host_client->edict, playerskin) = PRVM_SetEngineString(prog, host_client->playerskin);
if (strcmp(host_client->old_skin, host_client->playerskin))
{
- //if (host_client->spawned)
+ //if (host_client->begun)
// SV_BroadcastPrintf("%s changed skin to %s\n", host_client->name, host_client->playerskin);
strlcpy(host_client->old_skin, host_client->playerskin, sizeof(host_client->old_skin));
/*// send notification to all clients
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_PreSpawn_f (void)
{
- if (host_client->spawned)
+ if (host_client->prespawned)
{
- Con_Print("prespawn not valid -- already spawned\n");
+ Con_Print("prespawn not valid -- already prespawned\n");
return;
}
+ host_client->prespawned = true;
if (host_client->netconnection)
{
client_t *client;
int stats[MAX_CL_STATS];
+ if (!host_client->prespawned)
+ {
+ Con_Print("Spawn not valid -- not yet prespawned\n");
+ return;
+ }
if (host_client->spawned)
{
Con_Print("Spawn not valid -- already spawned\n");
return;
}
+ host_client->spawned = true;
// reset name change timer again because they might want to change name
// again in the first 5 seconds after connecting
*/
static void Host_Begin_f (void)
{
- host_client->spawned = true;
+ if (!host_client->spawned)
+ {
+ Con_Print("Begin not valid -- not yet spawned\n");
+ return;
+ }
+ if (host_client->begun)
+ {
+ Con_Print("Begin not valid -- already begun\n");
+ return;
+ }
+ host_client->begun = true;
// LordHavoc: note: this code also exists in SV_DropClient
if (sv.loadgame)
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");