diff --git a/build_editor.sh b/build_editor.sh index d90f782a..31a4d946 100755 --- a/build_editor.sh +++ b/build_editor.sh @@ -68,16 +68,31 @@ else fi fi -# GNU Make is _not_ make!... if [ "$COMPILE_OS" = "Msys" ]; then - MAKE=make WS_CC=cc WS_CXX=c++ WS_CFLAGS="$CFLAGS -static-libgcc -static-libstdc++" WS_LDFLAGS="$LDFLAGS -lws2_32" WS_LIB_EXT=dll +fi + +# GNU Make is _not_ make!... +if [ "$COMPILE_OS" = "Msys" ]; then + MAKE=make + PLATFORM=win64 else - MAKE=gmake + if ! [ -x "$(command -v gmake)" ] + then + # only assume that Linux may not ship with a gmake... HACK! + if [ "$COMPILE_SYS" = "Linux" ] + then + MAKE=make + else + printf "You need to install GNU make.\n" + fi + else + MAKE=gmake + fi fi mkdir -p ./bin diff --git a/build_engine.sh b/build_engine.sh index 9c0c7bd6..c141acd5 100755 --- a/build_engine.sh +++ b/build_engine.sh @@ -87,7 +87,18 @@ if [ "$COMPILE_OS" = "Msys" ]; then MAKE=make PLATFORM=win64 else - MAKE=gmake + if ! [ -x "$(command -v gmake)" ] + then + # only assume that Linux may not ship with a gmake... HACK! + if [ "$COMPILE_SYS" = "Linux" ] + then + MAKE=make + else + printf "You need to install GNU make.\n" + fi + else + MAKE=gmake + fi fi mkdir -p ./bin diff --git a/build_game.sh b/build_game.sh index 9bf3f7b5..e213a8f3 100755 --- a/build_game.sh +++ b/build_game.sh @@ -1,7 +1,7 @@ #!/bin/sh . ./build.cfg -if [ "$SKIP_UPDATE" == "1" ]; then +if [ "$SKIP_UPDATE" = "1" ]; then BUILD_UPDATE=0 fi diff --git a/build_tools.sh b/build_tools.sh index e57c9236..c5785200 100755 --- a/build_tools.sh +++ b/build_tools.sh @@ -41,6 +41,25 @@ else fi fi +# GNU Make is _not_ make!... +if [ "$COMPILE_OS" = "Msys" ]; then + MAKE=make + PLATFORM=win64 +else + if ! [ -x "$(command -v gmake)" ] + then + # only assume that Linux may not ship with a gmake... HACK! + if [ "$COMPILE_SYS" = "Linux" ] + then + MAKE=make + else + printf "You need to install GNU make.\n" + fi + else + MAKE=gmake + fi +fi + mkdir -p ./bin if [ -f "$VVM_MAKEFILE" ] @@ -62,10 +81,10 @@ fi if [ "$BUILD_CLEAN" -eq 1 ] then - gmake clean + $MAKE clean fi -gmake -j $BUILD_PROC CC=$ENGINE_CC CXX=$ENGINE_CXX +$MAKE -j $BUILD_PROC CC=$ENGINE_CC CXX=$ENGINE_CXX printf "Built vvmtool successfully.\n" cp -v vvmtool ../../bin/vvmtool printf "DONE. Built ALL components successfully.\n" diff --git a/src/botlib/bot.qc b/src/botlib/bot.qc index da66bc5c..918a5049 100644 --- a/src/botlib/bot.qc +++ b/src/botlib/bot.qc @@ -192,8 +192,8 @@ bot::CheckRoute(void) vecEndPos = m_vecLastNode; flRadius = 128; /* destination is not a node, therefore has a virtual radius */ } else { - vecEndPos = m_pRoute[m_iCurNode].m_vecDest; - flRadius = m_pRoute[m_iCurNode].m_flRadius; + vecEndPos = m_pRoute[m_iCurNode].dest; + flRadius = m_pRoute[m_iCurNode].radius; } /* we need to have a sensible radius */ @@ -216,7 +216,7 @@ bot::CheckRoute(void) /* if a node is flagged as jumpy, jump! */ if (Route_GetNodeFlags(&m_pRoute[m_iCurNode]) & LF_JUMP) { //input_buttons |= INPUT_BUTTON2; - velocity = Route_GetJumpVelocity(origin, m_pRoute[m_iCurNode].m_vecDest, gravity); + velocity = Route_GetJumpVelocity(origin, m_pRoute[m_iCurNode].dest, gravity); } /* find the nearest usable item (func_button) and use them */ @@ -374,9 +374,9 @@ bot::RunAI(void) aimpos = m_vecLastNode; else { if (m_iCurNode > 0 && !(Route_GetNodeFlags(&m_pRoute[m_iCurNode]) & LF_AIM)) - aimpos = m_pRoute[m_iCurNode - 1].m_vecDest; + aimpos = m_pRoute[m_iCurNode - 1].dest; else - aimpos = m_pRoute[m_iCurNode].m_vecDest; + aimpos = m_pRoute[m_iCurNode].dest; } } else { /* aim towards the enemy */ @@ -464,7 +464,7 @@ bot::RunAI(void) aimpos = m_vecLastNode; //printf("going to last node\n"); } else { - aimpos = m_pRoute[m_iCurNode].m_vecDest; + aimpos = m_pRoute[m_iCurNode].dest; //printf("going to next node\n"); } } else { diff --git a/src/botlib/route.qc b/src/botlib/route.qc index b6c44692..829d436c 100644 --- a/src/botlib/route.qc +++ b/src/botlib/route.qc @@ -283,7 +283,7 @@ Route_SelectDestination(bot target) int Route_GetNodeFlags(nodeslist_t *node) { - int fl = node.m_iFlags; + int fl = node.linkflags; /* to avoid random buttons being pressed */ if (fl < 0) diff --git a/src/gs-entbase/shared/NSMonster.h b/src/gs-entbase/shared/NSMonster.h index 611c3cdf..ecca13be 100644 --- a/src/gs-entbase/shared/NSMonster.h +++ b/src/gs-entbase/shared/NSMonster.h @@ -94,15 +94,6 @@ typedef enum { ACT_FLINCH_RIGHTLEG, } monster_activity_e; -/* if this is changed, it needs to be changed in the engine (server/sv_move.c) - * as well. */ -typedef struct -{ - vector m_vecDest; - int m_iFlags; - float m_flRadius; -} nodeslist_t; - /* monster flags, these are defined by the level designers */ typedef enumflags { diff --git a/src/gs-entbase/shared/NSMonster.qc b/src/gs-entbase/shared/NSMonster.qc index 71828968..d9535722 100644 --- a/src/gs-entbase/shared/NSMonster.qc +++ b/src/gs-entbase/shared/NSMonster.qc @@ -400,7 +400,7 @@ NSMonster::CheckRoute(void) evenpos = m_vecLastNode; evenpos[2] = origin[2]; } else { - evenpos = m_pRoute[m_iCurNode].m_vecDest; + evenpos = m_pRoute[m_iCurNode].dest; evenpos[2] = origin[2]; } @@ -503,7 +503,7 @@ NSMonster::WalkRoute(void) if (m_iCurNode < 0) { endangles = vectoangles(m_vecLastNode - origin); } else { - endangles = vectoangles(m_pRoute[m_iCurNode].m_vecDest - origin); + endangles = vectoangles(m_pRoute[m_iCurNode].dest - origin); } m_vecTurnAngle[1] = endangles[1]; input_movevalues = [m_flSequenceSpeed, 0, 0]; @@ -560,7 +560,7 @@ NSMonster::NewRoute(vector destination) /* run through all nodes, mark the closest direct path possible */ for (int i = 0; i < p.m_iNodes; i++) { - vector vecDest = p.m_pRoute[i].m_vecDest; + vector vecDest = p.m_pRoute[i].dest; tracebox(p.origin, p.mins, p.maxs, vecDest, TRUE, p); //traceline(p.origin, vecDest, MOVE_NORMAL, this);