From: Dave B. <dbr...@us...> - 2005-01-23 20:44:47
|
Update of /cvsroot/bzflag/bzflag/src/bzflag In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29192/src/bzflag Modified Files: AutoPilot.cxx ControlPanel.cxx LocalPlayer.cxx Plan.cxx Log Message: the little people can be silly sometimes, too! Index: AutoPilot.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzflag/AutoPilot.cxx,v retrieving revision 2.1 retrieving revision 2.2 diff -w -u -r2.1 -r2.2 --- AutoPilot.cxx 17 Jan 2005 23:43:51 -0000 2.1 +++ AutoPilot.cxx 23 Jan 2005 20:44:30 -0000 2.2 @@ -210,17 +210,10 @@ float trueVec[2] = {(pos[0]-shotPos[0])/minDistance,(pos[1]-shotPos[1])/minDistance}; float dotProd = trueVec[0]*shotUnitVec[0]+trueVec[1]*shotUnitVec[1]; -#ifdef _MSC_VER if (((World::getWorld()->allowJumping() || (myTank->getFlag()) == Flags::Jumping || (myTank->getFlag()) == Flags::Wings)) - && (minDistance < (max(dotProd,0.5f) * BZDBCache::tankLength * 2.25f)) + && (minDistance < (std_max(dotProd,0.5f) * BZDBCache::tankLength * 2.25f)) && (myTank->getFlag() != Flags::NoJumping)) { -#else - if (((World::getWorld()->allowJumping() || (myTank->getFlag()) == Flags::Jumping - || (myTank->getFlag()) == Flags::Wings)) - && (minDistance < (std::max(dotProd,0.5f) * BZDBCache::tankLength * 2.25f)) - && (myTank->getFlag() != Flags::NoJumping)) { -#endif wantJump = true; return (myTank->getFlag() != Flags::Wings); } else if (dotProd > 0.96f) { Index: ControlPanel.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzflag/ControlPanel.cxx,v retrieving revision 2.4 retrieving revision 2.5 diff -w -u -r2.4 -r2.5 --- ControlPanel.cxx 22 Jan 2005 01:51:31 -0000 2.4 +++ ControlPanel.cxx 23 Jan 2005 20:44:30 -0000 2.5 @@ -356,7 +356,8 @@ { int lines = int(messages[messageMode].size()); if (lines > 0) { - const float size = std::max(float(maxLines) / lines, 0.02f); + + const float size = std_max(float(maxLines) / lines, 0.02f); const float offset = float(messagesOffset) / lines; const int maxTop = messageAreaPixels[1] + messageAreaPixels[3]; int top = messageAreaPixels[1] + int((offset + size) * (float)messageAreaPixels[3]); Index: LocalPlayer.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzflag/LocalPlayer.cxx,v retrieving revision 2.1 retrieving revision 2.2 diff -w -u -r2.1 -r2.2 --- LocalPlayer.cxx 17 Jan 2005 23:44:19 -0000 2.1 +++ LocalPlayer.cxx 23 Jan 2005 20:44:31 -0000 2.2 @@ -11,6 +11,7 @@ */ /* interface header */ +#include "common.h" #include "LocalPlayer.h" /* system headers */ @@ -365,11 +366,7 @@ // below the ground: however I got there, creep up if (oldPosition[2] < groundLimit) { -#ifdef _MSC_VER - newVelocity[2] = max(newVelocity[2], -oldPosition[2] / 2.0f + 0.5f); -#else - newVelocity[2] = std::max(newVelocity[2], -oldPosition[2] / 2.0f + 0.5f); -#endif + newVelocity[2] = std_max(newVelocity[2], -oldPosition[2] / 2.0f + 0.5f); } } @@ -575,11 +572,7 @@ newPos[1] = tmpPos[1] + (searchTime * newVelocity[1]); newPos[2] = tmpPos[2] + (searchTime * newVelocity[2]); if (oldPosition[2] < groundLimit) { -#ifdef _MSC_VER - newVelocity[2] = max(newVelocity[2], -oldPosition[2] / 2.0f + 0.5f); -#else - newVelocity[2] = std::max(newVelocity[2], -oldPosition[2] / 2.0f + 0.5f); -#endif + newVelocity[2] = std_max(newVelocity[2], -oldPosition[2] / 2.0f + 0.5f); } Index: Plan.cxx =================================================================== RCS file: /cvsroot/bzflag/bzflag/src/bzflag/Plan.cxx,v retrieving revision 2.1 retrieving revision 2.2 diff -w -u -r2.1 -r2.2 --- Plan.cxx 17 Jan 2005 23:44:36 -0000 2.1 +++ Plan.cxx 23 Jan 2005 20:44:31 -0000 2.2 @@ -167,17 +167,10 @@ float trueVec[2] = {(pos[0]-shotPos[0])/minDistance,(pos[1]-shotPos[1])/minDistance}; float dotProd = trueVec[0]*shotUnitVec[0]+trueVec[1]*shotUnitVec[1]; -#ifdef _MSC_VER if (((World::getWorld()->allowJumping() || (myTank->getFlag()) == Flags::Jumping || (myTank->getFlag()) == Flags::Wings)) - && (minDistance < (max(dotProd,0.5f) * BZDBCache::tankLength * 2.25f)) + && (minDistance < (std_max(dotProd,0.5f) * BZDBCache::tankLength * 2.25f)) && (myTank->getFlag() != Flags::NoJumping)) { -#else - if (((World::getWorld()->allowJumping() || (myTank->getFlag()) == Flags::Jumping - || (myTank->getFlag()) == Flags::Wings)) - && (minDistance < (std::max(dotProd,0.5f) * BZDBCache::tankLength * 2.25f)) - && (myTank->getFlag() != Flags::NoJumping)) { -#endif myTank->setJump(); return (myTank->getFlag() != Flags::Wings); } else if (dotProd > 0.96f) { |