]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_shadow.c
physics: fix and refactor unsticking
[xonotic/darkplaces.git] / r_shadow.c
index 8d24ebce7db48068f5393721b60a9225122886d9..2c5cecd34b75bbf65a2017dce825bf46ede3f39b 100644 (file)
@@ -2996,7 +2996,7 @@ void R_RTLight_Update(rtlight_t *rtlight, int isstatic, matrix4x4_t *matrix, vec
        VectorCopy(color, rtlight->color);
        rtlight->cubemapname[0] = 0;
        if (cubemapname && cubemapname[0])
-               strlcpy(rtlight->cubemapname, cubemapname, sizeof(rtlight->cubemapname));
+               dp_strlcpy(rtlight->cubemapname, cubemapname, sizeof(rtlight->cubemapname));
        rtlight->shadow = shadow;
        rtlight->corona = corona;
        rtlight->style = style;
@@ -4676,7 +4676,7 @@ static void R_Shadow_UpdateWorldLight(dlight_t *light, vec3_t origin, vec3_t ang
        light->style = style;
        light->shadow = shadowenable;
        light->corona = corona;
-       strlcpy(light->cubemapname, cubemapname, sizeof(light->cubemapname));
+       dp_strlcpy(light->cubemapname, cubemapname, sizeof(light->cubemapname));
        light->coronasizescale = coronasizescale;
        light->ambientscale = ambientscale;
        light->diffusescale = diffusescale;
@@ -5100,14 +5100,14 @@ void R_Shadow_LoadWorldLightsFromMap_LightArghliteTyrlite(void)
                        if (com_token[0] == '}')
                                break; // end of entity
                        if (com_token[0] == '_')
-                               strlcpy(key, com_token + 1, sizeof(key));
+                               dp_strlcpy(key, com_token + 1, sizeof(key));
                        else
-                               strlcpy(key, com_token, sizeof(key));
+                               dp_strlcpy(key, com_token, sizeof(key));
                        while (key[strlen(key)-1] == ' ') // remove trailing spaces
                                key[strlen(key)-1] = 0;
                        if (!COM_ParseToken_Simple(&data, false, false, true))
                                break; // error
-                       strlcpy(value, com_token, sizeof(value));
+                       dp_strlcpy(value, com_token, sizeof(value));
 
                        // now that we have the key pair worked out...
                        if (!strcmp("light", key))
@@ -5319,7 +5319,7 @@ void R_Shadow_EditLights_Reload_f(cmd_state_t *cmd)
 {
        if (!cl.worldmodel)
                return;
-       strlcpy(r_shadow_mapname, cl.worldname, sizeof(r_shadow_mapname));
+       dp_strlcpy(r_shadow_mapname, cl.worldname, sizeof(r_shadow_mapname));
        R_Shadow_ClearWorldLights();
        if (r_shadow_realtime_world_importlightentitiesfrommap.integer <= 1)
        {
@@ -5392,7 +5392,7 @@ static void R_Shadow_EditLights_Edit_f(cmd_state_t *cmd)
        radius = r_shadow_selectedlight->radius;
        style = r_shadow_selectedlight->style;
        if (*r_shadow_selectedlight->cubemapname)
-               strlcpy(cubemapname, r_shadow_selectedlight->cubemapname, sizeof(cubemapname));
+               dp_strlcpy(cubemapname, r_shadow_selectedlight->cubemapname, sizeof(cubemapname));
        else
                cubemapname[0] = 0;
        shadows = r_shadow_selectedlight->shadow;
@@ -5596,7 +5596,7 @@ static void R_Shadow_EditLights_Edit_f(cmd_state_t *cmd)
                        return;
                }
                if (Cmd_Argc(cmd) == 3)
-                       strlcpy(cubemapname, Cmd_Argv(cmd, 2), sizeof(cubemapname));
+                       dp_strlcpy(cubemapname, Cmd_Argv(cmd, 2), sizeof(cubemapname));
                else
                        cubemapname[0] = 0;
        }
@@ -5927,7 +5927,7 @@ static void R_Shadow_EditLights_CopyInfo_f(cmd_state_t *cmd)
        r_shadow_bufferlight.radius = r_shadow_selectedlight->radius;
        r_shadow_bufferlight.style = r_shadow_selectedlight->style;
        if (*r_shadow_selectedlight->cubemapname)
-               strlcpy(r_shadow_bufferlight.cubemapname, r_shadow_selectedlight->cubemapname, sizeof(r_shadow_bufferlight.cubemapname));
+               dp_strlcpy(r_shadow_bufferlight.cubemapname, r_shadow_selectedlight->cubemapname, sizeof(r_shadow_bufferlight.cubemapname));
        else
                r_shadow_bufferlight.cubemapname[0] = 0;
        r_shadow_bufferlight.shadow = r_shadow_selectedlight->shadow;