mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 22:40:50 +00:00
move Mod_RadiusFromBounds to shared code
This commit is contained in:
parent
78383add97
commit
d9eb925b33
4 changed files with 15 additions and 28 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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_ */
|
||||
|
|
Loading…
Reference in a new issue