gl_model.c:

sprintf -> snprintf
gl_rmain.c:
	slight optimisation (thanks, LordHavoc)
This commit is contained in:
Bill Currie 2000-08-27 11:05:11 +00:00
parent a2129d7f66
commit 7e6d2f95c5
2 changed files with 2 additions and 2 deletions

View file

@ -1253,7 +1253,7 @@ void Mod_LoadBrushModel (model_t *mod, void *buffer)
{ // duplicate the basic information
char name[10];
sprintf (name, "*%i", i+1);
snprintf (name, sizeof(name), "*%i", i+1);
loadmodel = Mod_FindName (name);
*loadmodel = *mod;
strcpy (loadmodel->name, name);

View file

@ -578,7 +578,7 @@ static void R_DrawAliasModel (entity_t *e)
VectorSubtract (currententity->origin,
cl_dlights[lnum].origin,
dist);
add = (cl_dlights[lnum].radius * cl_dlights[lnum].radius * 8) / (Length(dist) * Length(dist)); // FIXME Deek
add = (cl_dlights[lnum].radius * cl_dlights[lnum].radius * 8) / (DotProduct(dist, dist)); // FIXME Deek
if (add > 0)
{