]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - pr_edict.c
-Removed the NG Menu part, since it isnt used anymore (the old layout
[xonotic/darkplaces.git] / pr_edict.c
index 007e6b4bda0d858f1c027d177fc7f79406fe9f25..0e8fbc6db55d805ba03db37a742a44e3ca2c1a59 100644 (file)
@@ -209,9 +209,16 @@ void ED_ClearEdict (edict_t *e)
        num = NUM_FOR_EDICT(e) - 1;
        if (num >= 0 && num < svs.maxclients)
        {
+               eval_t *val;
+               // set colormap and team on newly created player entity
                e->v->colormap = num + 1;
                e->v->team = (svs.clients[num].colors & 15) + 1;
+               // set netname/clientcolors back to client values so that
+               // DP_SV_CLIENTNAME and DPV_SV_CLIENTCOLORS will not immediately
+               // reset them
                e->v->netname = PR_SetString(svs.clients[num].name);
+               if ((val = GETEDICTFIELDVALUE(e, eval_clientcolors)))
+                       val->_float = svs.clients[num].colors;
        }
 }
 
@@ -1176,7 +1183,7 @@ void ED_LoadFromFile (const char *data)
                }
 
                pr_global_struct->self = EDICT_TO_PROG(ent);
-               PR_ExecuteProgram (func - pr_functions, "");
+               PR_ExecuteProgram (func - pr_functions, "QC function spawn is missing");
                spawned++;
                if (ent->e->free)
                        died++;