move Mod_RadiusFromBounds to shared code

This commit is contained in:
Denis Pauk 2018-08-01 18:04:04 +03:00
parent 78383add97
commit d9eb925b33
4 changed files with 15 additions and 28 deletions

View file

@ -74,3 +74,17 @@ Mod_DecompressVis(byte *in, int row)
return decompressed;
}
float
Mod_RadiusFromBounds(const vec3_t mins, const vec3_t maxs)
{
int i;
vec3_t corner;
for (i = 0; i < 3; i++)
{
corner[i] = fabs(mins[i]) > fabs(maxs[i]) ? fabs(mins[i]) : fabs(maxs[i]);
}
return VectorLength(corner);
}

View file

@ -303,20 +303,6 @@ Mod_LoadVertexes(lump_t *l)
}
}
float
Mod_RadiusFromBounds(vec3_t mins, vec3_t maxs)
{
int i;
vec3_t corner;
for (i = 0; i < 3; i++)
{
corner[i] = fabs(mins[i]) > fabs(maxs[i]) ? fabs(mins[i]) : fabs(maxs[i]);
}
return VectorLength(corner);
}
void
Mod_LoadSubmodels(lump_t *l)
{

View file

@ -184,20 +184,6 @@ Mod_LoadVertexes(lump_t *l)
}
}
static float
Mod_RadiusFromBounds(vec3_t mins, vec3_t maxs)
{
int i;
vec3_t corner;
for (i = 0; i < 3; i++)
{
corner[i] = fabs(mins[i]) > fabs(maxs[i]) ? fabs(mins[i]) : fabs(maxs[i]);
}
return VectorLength(corner);
}
static void
Mod_LoadSubmodels(lump_t *l)
{

View file

@ -67,5 +67,6 @@ extern qboolean LoadSTB(const char *origname, const char* type, byte **pic, int
extern void GetWalInfo(char *name, int *width, int *height);
extern float Mod_RadiusFromBounds(const vec3_t mins, const vec3_t maxs);
extern byte* Mod_DecompressVis(byte *in, int row);
#endif /* SRC_CLIENT_REFRESH_REF_SHARED_H_ */