mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-06-02 01:21:17 +00:00
must set the data field in ALL edicts, not just player edicts :)
This commit is contained in:
parent
cc43c91c89
commit
c2213f2366
1 changed files with 6 additions and 1 deletions
|
@ -345,11 +345,16 @@ SV_SpawnServer (char *server)
|
||||||
sv_pr_state.pr_edictareasize = sv_pr_state.pr_edict_size * MAX_EDICTS;
|
sv_pr_state.pr_edictareasize = sv_pr_state.pr_edict_size * MAX_EDICTS;
|
||||||
sv.edicts = Hunk_AllocName (sv_pr_state.pr_edictareasize, "edicts");
|
sv.edicts = Hunk_AllocName (sv_pr_state.pr_edictareasize, "edicts");
|
||||||
|
|
||||||
|
// init the data field of the edicts
|
||||||
|
for (i = 0; i < MAX_EDICTS; i++) {
|
||||||
|
ent = EDICT_NUM (&sv_pr_state, i);
|
||||||
|
ent->data = &baselines[i];
|
||||||
|
}
|
||||||
|
|
||||||
// leave slots at start for clients only
|
// leave slots at start for clients only
|
||||||
sv.num_edicts = MAX_CLIENTS + 1;
|
sv.num_edicts = MAX_CLIENTS + 1;
|
||||||
for (i = 0; i < MAX_CLIENTS; i++) {
|
for (i = 0; i < MAX_CLIENTS; i++) {
|
||||||
ent = EDICT_NUM (&sv_pr_state, i + 1);
|
ent = EDICT_NUM (&sv_pr_state, i + 1);
|
||||||
ent->data = &baselines[i];
|
|
||||||
svs.clients[i].edict = ent;
|
svs.clients[i].edict = ent;
|
||||||
//ZOID - make sure we update frags right
|
//ZOID - make sure we update frags right
|
||||||
svs.clients[i].old_frags = 0;
|
svs.clients[i].old_frags = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue