diff --git a/source/src/bot/bot_ai.cpp b/source/src/bot/bot_ai.cpp index 234977fd..6f9f5b44 100644 --- a/source/src/bot/bot_ai.cpp +++ b/source/src/bot/bot_ai.cpp @@ -1730,17 +1730,18 @@ bool CBot::WaterNav() if (hdr.waterlevel < (v.z - 2.0f)) continue; // Cube is too high // Check if the bot 'can fit' on the cube(no near obstacles) - bool small = false; + bool small_ = false; + for (int a=(x-2);a<=(x+2);a++) { - if (small) break; + if (small_) break; for (int b=(y-2);b<=(y+2);b++) { if ((x==a) && (y==b)) continue; vec v2(a, b, GetCubeFloor(a, b)); if (v.z < (v2.z-1-JUMP_HEIGHT)) { - small=true; + small_=true; break; } @@ -1748,7 +1749,7 @@ bool CBot::WaterNav() { if ((v2.z) < (v.z-2.0f)) { - small = true; + small_ = true; break; } } @@ -1757,13 +1758,13 @@ bool CBot::WaterNav() TraceLine(v, v2, NULL, false, &tr); if (tr.collided) { - small=true; + small_=true; break; } } - if (small) break; + if (small_) break; } - if (small) + if (small_) { debugbeam(m_pMyEnt->o, v); continue; diff --git a/source/src/rendercubes.cpp b/source/src/rendercubes.cpp index c170eb21..d42b3f82 100644 --- a/source/src/rendercubes.cpp +++ b/source/src/rendercubes.cpp @@ -121,7 +121,12 @@ enum }; int nquads; -const float TEXTURESCALE = 32.0f; + +// for testing purpose. UNDOME on release. +//const float TEXTURESCALE = 32.0f; +VARP(texturescale, 16, 32, 64); +#define TEXTURESCALE float(texturescale) + int striptype = 0, striptex, oh, oy, ox, odir; // the o* vars are used by the stripification int ol1r, ol1g, ol1b, ol2r, ol2g, ol2b; float ofloor, oceil; diff --git a/source/src/worldio.cpp b/source/src/worldio.cpp index 75321bbb..4f59e960 100644 --- a/source/src/worldio.cpp +++ b/source/src/worldio.cpp @@ -16,7 +16,7 @@ static string cgzname, ocgzname, bakname, pcfname, mcfname, omcfname; const char *setnames(const char *name) { string pakname, mapname; - char *slash = strpbrk(name, "/\\"); + const char *slash = strpbrk(name, "/\\"); if(slash) { s_strncpy(pakname, name, slash-name+1);