]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
fix a warning that was there for a while
[xonotic/darkplaces.git] / host_cmd.c
index f2d6af53dc5b54caa621c608c9c0960337fc01f0..4d2b93b6eb76617231bf405b14151e017e68a1fa 100644 (file)
@@ -945,7 +945,7 @@ static void Host_Loadgame_f (void)
                        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)
@@ -1579,7 +1579,7 @@ static void Host_Color(int changetop, int changebottom)
        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");
@@ -1698,6 +1698,7 @@ Host_Pause_f
 */
 static void Host_Pause_f (void)
 {
+       void (*print) (const char *fmt, ...);
        if (cmd_source == src_command)
        {
                // if running a client, try to send over network so the pause is handled by the server
@@ -1715,7 +1716,7 @@ static void Host_Pause_f (void)
        {
                if (cmd_source == src_client)
                {
-                       if(cls.state == ca_dedicated || host_client == &svs.clients[0]) // non-admin
+                       if(cls.state == ca_dedicated || host_client != &svs.clients[0]) // non-admin
                        {
                                print("Pause not allowed.\n");
                                return;