diff --git a/src/client/refresh/files/models.c b/src/client/refresh/files/models.c index ca0175ca..1ad44b11 100644 --- a/src/client/refresh/files/models.c +++ b/src/client/refresh/files/models.c @@ -606,6 +606,17 @@ Mod_LoadModel_MDL(const char *mod_name, const void *buffer, int modfilelen, } } + { + int i; + + for (i = 0; i < pheader->num_skins; i++) + { + R_Printf(PRINT_DEVELOPER, "%s: %s #%d: Should load internal '%s'\n", + __func__, mod_name, i, + (char *)pheader + pheader->ofs_skins + i*MAX_SKINNAME); + } + } + *type = mod_alias; mins[0] = -32; @@ -789,9 +800,16 @@ Mod_LoadModel_MD2(const char *mod_name, const void *buffer, int modfilelen, pincmd = (int *)((byte *)buffer + pinmodel.ofs_glcmds); Mod_LoadCmdList(mod_name, pheader, pincmd); - // register all skins + /* register all skins */ memcpy((char *)pheader + pheader->ofs_skins, (char *)buffer + pinmodel.ofs_skins, - pheader->num_skins*MAX_SKINNAME); + pheader->num_skins * MAX_SKINNAME); + + for (i = 0; i < pheader->num_skins; i++) + { + R_Printf(PRINT_DEVELOPER, "%s: %s #%d: Should load external '%s'\n", + __func__, mod_name, i, + (char *)pheader + pheader->ofs_skins + i*MAX_SKINNAME); + } *type = mod_alias; @@ -1093,6 +1111,17 @@ Mod_LoadModel_Flex(const char *mod_name, const void *buffer, int modfilelen, src += size; } + { + int i; + + for (i = 0; i < pheader->num_skins; i++) + { + R_Printf(PRINT_DEVELOPER, "%s: %s #%d: Should load external '%s'\n", + __func__, mod_name, i, + (char *)pheader + pheader->ofs_skins + i * MAX_SKINNAME); + } + } + *type = mod_alias; mins[0] = -32; @@ -1225,6 +1254,13 @@ Mod_LoadModel_DKM(const char *mod_name, const void *buffer, int modfilelen, Mod_LoadDkmTriangleList (pheader, (dkmtriangle_t *)((byte *)buffer + header.ofs_tris)); + for (i = 0; i < pheader->num_skins; i++) + { + R_Printf(PRINT_DEVELOPER, "%s: %s #%d: Should load external '%s'\n", + __func__, mod_name, i, + (char *)pheader + pheader->ofs_skins + i * MAX_SKINNAME); + } + *type = mod_alias; mins[0] = -32; @@ -1282,6 +1318,13 @@ Mod_LoadSprite_SP2 (const char *mod_name, const void *buffer, int modfilelen, memcpy(sprout->frames[i].name, sprin->frames[i].name, MAX_SKINNAME); } + for (i = 0; i < sprout->numframes; i++) + { + R_Printf(PRINT_DEVELOPER, "%s: %s #%d: Should load external '%s'\n", + __func__, mod_name, i, + sprout->frames[i].name); + } + *type = mod_sprite; return extradata; diff --git a/src/client/refresh/files/stb.c b/src/client/refresh/files/stb.c index 36c955d1..8a00cd21 100644 --- a/src/client/refresh/files/stb.c +++ b/src/client/refresh/files/stb.c @@ -698,7 +698,8 @@ R_FindPic(const char *name, findimage_t find_image) if(!ext[0]) { /* file has no extension */ - strncpy(namewe, name, MAX_QPATH); + strncpy(namewe, name, sizeof(namewe) - 1); + namewe[sizeof(namewe) - 1] = 0; } else { @@ -709,6 +710,7 @@ R_FindPic(const char *name, findimage_t find_image) /* Remove the extension */ memset(namewe, 0, MAX_QPATH); memcpy(namewe, name, len - (strlen(ext) + 1)); + namewe[len - (strlen(ext))] = 0; } /* Quake 2 */ diff --git a/src/client/refresh/soft/sw_sprite.c b/src/client/refresh/soft/sw_sprite.c index 475353ef..0ed1c686 100644 --- a/src/client/refresh/soft/sw_sprite.c +++ b/src/client/refresh/soft/sw_sprite.c @@ -40,7 +40,7 @@ R_DrawSprite(entity_t *currententity, const model_t *currentmodel) vec3_t left, up, right, down; dsprite_t *s_psprite; dsprframe_t *s_psprframe; - image_t *skin; + image_t *skin = NULL; s_psprite = (dsprite_t *)currentmodel->extradata; currententity->frame %= s_psprite->numframes; diff --git a/src/game/player/chase.c b/src/game/player/chase.c index 98d69cd0..244addfc 100644 --- a/src/game/player/chase.c +++ b/src/game/player/chase.c @@ -308,8 +308,6 @@ Cmd_Chasecam_Toggle(edict_t *ent) void CheckChasecam_Viewent(edict_t *ent) { - vec3_t angles; - /* Oldplayer is the fake player that everyone else sees. Assign the same client as the ent we're following so the game @@ -323,6 +321,8 @@ CheckChasecam_Viewent(edict_t *ent) * Even though people can't see us we still have all this stuff */ if ((ent->client->chasetoggle == 1) && (ent->client->oldplayer)) { + vec3_t angles = {0}; + if (ent->client->use) { VectorCopy(ent->client->oldplayer->s.angles, angles);