]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_main.c
cleaned up shadow volume culling somewhat
[xonotic/darkplaces.git] / sv_main.c
index cd283f9e295033955ed3a6583af001d2654da5da..74530b3952d845222465779a04a8ef7418cb0f2a 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -260,7 +260,7 @@ void SV_SendServerinfo (client_t *client)
        else
                MSG_WriteByte (&client->message, GAME_COOP);
 
-       sprintf (message, pr_strings+sv.edicts->v->message);
+       sprintf (message, PR_GetString(sv.edicts->v->message));
 
        MSG_WriteString (&client->message,message);
 
@@ -586,7 +586,7 @@ void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg)
                if (val->_float != 0)
                        bits |= U_GLOWTRAIL;
 
-               if (ent->v->modelindex >= 0 && ent->v->modelindex < MAX_MODELS && pr_strings[ent->v->model])
+               if (ent->v->modelindex >= 0 && ent->v->modelindex < MAX_MODELS && *PR_GetString(ent->v->model))
                {
                        model = sv.models[(int)ent->v->modelindex];
                        Mod_CheckLoaded(model);
@@ -970,7 +970,7 @@ void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg)
                }
 
                modelindex = 0;
-               if (ent->v->modelindex >= 0 && ent->v->modelindex < MAX_MODELS && pr_strings[ent->v->model])
+               if (ent->v->modelindex >= 0 && ent->v->modelindex < MAX_MODELS && *PR_GetString(ent->v->model))
                {
                        modelindex = ent->v->modelindex;
                        model = sv.models[(int)ent->v->modelindex];
@@ -1346,7 +1346,7 @@ void SV_WriteClientdataToMessage (edict_t *ent, sizebuf_t *msg)
        if (bits & SU_ARMOR)
                MSG_WriteByte (msg, ent->v->armorvalue);
        if (bits & SU_WEAPON)
-               MSG_WriteByte (msg, SV_ModelIndex(pr_strings+ent->v->weaponmodel));
+               MSG_WriteByte (msg, SV_ModelIndex(PR_GetString(ent->v->weaponmodel)));
 
        MSG_WriteShort (msg, ent->v->health);
        MSG_WriteByte (msg, ent->v->currentammo);
@@ -1820,9 +1820,9 @@ void SV_SpawnServer (const char *server)
 //
        SV_ClearWorld ();
 
-       sv.sound_precache[0] = pr_strings;
+       sv.sound_precache[0] = "";
 
-       sv.model_precache[0] = pr_strings;
+       sv.model_precache[0] = "";
        sv.model_precache[1] = sv.modelname;
        for (i = 1;i < sv.worldmodel->numsubmodels;i++)
        {
@@ -1836,7 +1836,7 @@ void SV_SpawnServer (const char *server)
        ent = EDICT_NUM(0);
        memset (ent->v, 0, progs->entityfields * 4);
        ent->free = false;
-       ent->v->model = sv.worldmodel->name - pr_strings;
+       ent->v->model = PR_SetString(sv.modelname);
        ent->v->modelindex = 1;         // world model
        ent->v->solid = SOLID_BSP;
        ent->v->movetype = MOVETYPE_PUSH;
@@ -1846,7 +1846,7 @@ void SV_SpawnServer (const char *server)
        else
                pr_global_struct->deathmatch = deathmatch.integer;
 
-       pr_global_struct->mapname = sv.name - pr_strings;
+       pr_global_struct->mapname = PR_SetString(sv.name);
 
 // serverflags are for cross level information (sigils)
        pr_global_struct->serverflags = svs.serverflags;