]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
cloned and rewrote Collision_TraceLineTriangleFloat to optimize it slightly
[xonotic/darkplaces.git] / host_cmd.c
index 6272c143bbcd7adf500944fb9c373eb045997021..0ab60c24e8490e0beeefe64a1e9926a26e948c01 100644 (file)
@@ -276,7 +276,6 @@ void Host_Map_f (void)
        if (cmd_source != src_command)
                return;
 
-       SCR_BeginLoadingPlaque ();
        cls.demonum = -1;               // stop demo loop in case this fails
 
        CL_Disconnect ();
@@ -323,7 +322,6 @@ void Host_Changelevel_f (void)
        key_consoleactive = 0;
 
        SV_SaveSpawnparms ();
-       SCR_BeginLoadingPlaque();
        allowcheats = sv_cheats.integer != 0;
        strcpy(level, Cmd_Argv(1));
        SV_SpawnServer(level);
@@ -359,7 +357,6 @@ void Host_Restart_f (void)
        key_dest = key_game;
        key_consoleactive = 0;
 
-       SCR_BeginLoadingPlaque();
        allowcheats = sv_cheats.integer != 0;
        strcpy(mapname, sv.name);
        SV_SpawnServer(mapname);
@@ -387,7 +384,6 @@ void Host_Reconnect_f (void)
                //Con_Print("reconnect: no signon, ignoring reconnect\n");
                return;
        }
-       SCR_BeginLoadingPlaque();
        cls.signon = 0;         // need new connection messages
 }
 
@@ -596,8 +592,6 @@ void Host_Loadgame_f (void)
                return;
        }
 
-       SCR_BeginLoadingPlaque ();
-
        str = FS_Getline (f);
        for (i = 0;i < NUM_SPAWN_PARMS;i++)
        {
@@ -812,7 +806,8 @@ void Host_Playermodel_f (void)
 
        // point the string back at updateclient->name to keep it safe
        strlcpy (host_client->playermodel, newPath, sizeof (host_client->playermodel));
-       host_client->edict->v->playermodel = PR_SetString(host_client->playermodel);
+       if( eval_playermodel )
+               GETEDICTFIELDVALUE(host_client->edict, eval_playermodel)->string = PR_SetString(host_client->playermodel);
        if (strcmp(host_client->old_model, host_client->playermodel))
        {
                if (host_client->spawned)
@@ -872,7 +867,8 @@ void Host_Playerskin_f (void)
 
        // point the string back at updateclient->name to keep it safe
        strlcpy (host_client->playerskin, newPath, sizeof (host_client->playerskin));
-       host_client->edict->v->playerskin = PR_SetString(host_client->playerskin);
+       if( eval_playerskin )
+               GETEDICTFIELDVALUE(host_client->edict, eval_playerskin)->string = PR_SetString(host_client->playerskin);
        if (strcmp(host_client->old_skin, host_client->playerskin))
        {
                if (host_client->spawned)
@@ -1926,14 +1922,12 @@ void Host_InitCommands (void)
                Cvar_RegisterVariable (&cl_pmodel);
                Cmd_AddCommand ("pmodel", Host_PModel_f);
        }
-       // FIXME: Do this only for GAME_NEXUIZ?
-       else if (gamemode == GAME_NEXUIZ) 
-       {
-               Cvar_RegisterVariable (&cl_playermodel);
-               Cmd_AddCommand ("playermodel", Host_Playermodel_f);
-               Cvar_RegisterVariable (&cl_playerskin);
-               Cmd_AddCommand ("playerskin", Host_Playerskin_f);
-       }
+
+       // BLACK: This isnt game specific anymore (it was GAME_NEXUIZ at first)
+       Cvar_RegisterVariable (&cl_playermodel);
+       Cmd_AddCommand ("playermodel", Host_Playermodel_f);
+       Cvar_RegisterVariable (&cl_playerskin);
+       Cmd_AddCommand ("playerskin", Host_Playerskin_f);
 
        Cmd_AddCommand ("prespawn", Host_PreSpawn_f);
        Cmd_AddCommand ("spawn", Host_Spawn_f);