fix some errors and warnings for GCC 6
* do not use std::abs() because math.h includes one, that converts ints to double. Use own iabs(), which directly uses labs() instead. * don't use the word "gamma" as name for variables * don't use a homebrew round() function
This commit is contained in:
@@ -297,10 +297,10 @@ void distlod(int &low, int &high, int angle, float widef)
|
||||
void render_world(float vx, float vy, float vh, float changelod, int yaw, int pitch, float fov, float fovy, int w, int h)
|
||||
{
|
||||
loopi(LARGEST_FACTOR) stats[i] = 0;
|
||||
min_lod = minimap || (player1->isspectating() && player1->spectatemode == SM_OVERVIEW) ? MAX_LOD : MIN_LOD+abs(pitch)/12;
|
||||
min_lod = minimap || (player1->isspectating() && player1->spectatemode == SM_OVERVIEW) ? MAX_LOD : MIN_LOD+iabs(pitch)/12;
|
||||
yaw = 360-yaw;
|
||||
float widef = fov/75.0f;
|
||||
int cdist = abs(yaw%90-45);
|
||||
int cdist = iabs(yaw%90-45);
|
||||
if(cdist<7) // hack to avoid popup at high fovs at 45 yaw
|
||||
{
|
||||
min_lod = max(min_lod, (int)(MIN_LOD+(10-cdist)/1.0f*widef)); // less if lod worked better
|
||||
|
||||
Reference in New Issue
Block a user