Cvar_RegisterVariable (&sv_edgefriction);
Cvar_RegisterVariable (&sv_stopspeed);
Cvar_RegisterVariable (&sv_maxspeed);
+ Cvar_RegisterVariable (&sv_maxairspeed);
Cvar_RegisterVariable (&sv_accelerate);
Cvar_RegisterVariable (&sv_idealpitchscale);
Cvar_RegisterVariable (&sv_aim);
// stuff the sigil bits into the high bits of items for sbar, or else
// mix in items2
val = PRVM_GETEDICTFIELDVALUE(ent, eval_items2);
- if (val)
+ if (gamemode == GAME_HIPNOTIC || gamemode == GAME_ROGUE)
items = (int)ent->fields.server->items | ((int)val->_float << 23);
else
items = (int)ent->fields.server->items | ((int)prog->globals.server->serverflags << 28);
*/
void SV_SendReconnect (void)
{
- char data[128];
- sizebuf_t msg;
+ qbyte data[128];
+ sizebuf_t msg;
msg.data = data;
msg.cursize = 0;
{
prvm_edict_t *ent;
int i;
- qbyte *entities;
+ char *entities;
model_t *worldmodel;
char modelname[sizeof(sv.modelname)];
memset (&sv, 0, sizeof(sv));
+ SV_VM_Setup();
+
sv.active = true;
strlcpy (sv.name, server, sizeof (sv.name));
sv.protocol = PROTOCOL_QUAKE;
}
- SV_VM_Setup();
-
SV_VM_Begin();
// load progs to get entity field count
// progs fields, often accessed by server
prog->edictsfields = PR_Alloc(prog->max_edicts * prog->edict_size);*/
// used by PushMove to move back pushed entities
- sv.moved_edicts = PRVM_Alloc(prog->max_edicts * sizeof(prvm_edict_t *));
+ sv.moved_edicts = (prvm_edict_t **)PRVM_Alloc(prog->max_edicts * sizeof(prvm_edict_t *));
/*for (i = 0;i < prog->max_edicts;i++)
{
ent = prog->edicts + i;
// load replacement entity file if found
entities = NULL;
if (sv_entpatch.integer)
- entities = FS_LoadFile(va("maps/%s.ent", sv.name), tempmempool, true);
+ entities = (char *)FS_LoadFile(va("maps/%s.ent", sv.name), tempmempool, true);
if (entities)
{
Con_Printf("Loaded maps/%s.ent\n", sv.name);
sv.state = ss_active;
prog->allowworldwrites = false;
+ // we need to reset the spawned flag on all connected clients here so that
+ // their thinks don't run during startup (before PutClientInServer)
+ for (i = 0, host_client = svs.clients;i < svs.maxclients;i++, host_client++)
+ host_client->spawned = false;
+
// run two frames to allow everything to settle
for (i = 0;i < 2;i++)
{
prvm_edict_t *ent;
PRVM_Free( sv.moved_edicts );
- sv.moved_edicts = PRVM_Alloc(prog->max_edicts * sizeof(prvm_edict_t *));
+ sv.moved_edicts = (prvm_edict_t **)PRVM_Alloc(prog->max_edicts * sizeof(prvm_edict_t *));
// links don't survive the transition, so unlink everything
for (i = 0, ent = prog->edicts;i < prog->max_edicts;i++, ent++)