Clean up some misc building stuff. Based on input by BartoCH, many thanks!

I'd like to make the gmake check nicer when I have more time.
This commit is contained in:
Marco Cawthorne 2022-06-06 19:58:29 -07:00
parent 14518aabf0
commit ad093548b5
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
8 changed files with 62 additions and 26 deletions

View File

@ -68,16 +68,31 @@ else
fi fi
fi fi
# GNU Make is _not_ make!...
if [ "$COMPILE_OS" = "Msys" ]; then if [ "$COMPILE_OS" = "Msys" ]; then
MAKE=make
WS_CC=cc WS_CC=cc
WS_CXX=c++ WS_CXX=c++
WS_CFLAGS="$CFLAGS -static-libgcc -static-libstdc++" WS_CFLAGS="$CFLAGS -static-libgcc -static-libstdc++"
WS_LDFLAGS="$LDFLAGS -lws2_32" WS_LDFLAGS="$LDFLAGS -lws2_32"
WS_LIB_EXT=dll WS_LIB_EXT=dll
fi
# GNU Make is _not_ make!...
if [ "$COMPILE_OS" = "Msys" ]; then
MAKE=make
PLATFORM=win64
else 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 fi
mkdir -p ./bin mkdir -p ./bin

View File

@ -87,7 +87,18 @@ if [ "$COMPILE_OS" = "Msys" ]; then
MAKE=make MAKE=make
PLATFORM=win64 PLATFORM=win64
else 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 fi
mkdir -p ./bin mkdir -p ./bin

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
. ./build.cfg . ./build.cfg
if [ "$SKIP_UPDATE" == "1" ]; then if [ "$SKIP_UPDATE" = "1" ]; then
BUILD_UPDATE=0 BUILD_UPDATE=0
fi fi

View File

@ -41,6 +41,25 @@ else
fi fi
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 mkdir -p ./bin
if [ -f "$VVM_MAKEFILE" ] if [ -f "$VVM_MAKEFILE" ]
@ -62,10 +81,10 @@ fi
if [ "$BUILD_CLEAN" -eq 1 ] if [ "$BUILD_CLEAN" -eq 1 ]
then then
gmake clean $MAKE clean
fi 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" printf "Built vvmtool successfully.\n"
cp -v vvmtool ../../bin/vvmtool cp -v vvmtool ../../bin/vvmtool
printf "DONE. Built ALL components successfully.\n" printf "DONE. Built ALL components successfully.\n"

View File

@ -192,8 +192,8 @@ bot::CheckRoute(void)
vecEndPos = m_vecLastNode; vecEndPos = m_vecLastNode;
flRadius = 128; /* destination is not a node, therefore has a virtual radius */ flRadius = 128; /* destination is not a node, therefore has a virtual radius */
} else { } else {
vecEndPos = m_pRoute[m_iCurNode].m_vecDest; vecEndPos = m_pRoute[m_iCurNode].dest;
flRadius = m_pRoute[m_iCurNode].m_flRadius; flRadius = m_pRoute[m_iCurNode].radius;
} }
/* we need to have a sensible radius */ /* we need to have a sensible radius */
@ -216,7 +216,7 @@ bot::CheckRoute(void)
/* if a node is flagged as jumpy, jump! */ /* if a node is flagged as jumpy, jump! */
if (Route_GetNodeFlags(&m_pRoute[m_iCurNode]) & LF_JUMP) { if (Route_GetNodeFlags(&m_pRoute[m_iCurNode]) & LF_JUMP) {
//input_buttons |= INPUT_BUTTON2; //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 */ /* find the nearest usable item (func_button) and use them */
@ -374,9 +374,9 @@ bot::RunAI(void)
aimpos = m_vecLastNode; aimpos = m_vecLastNode;
else { else {
if (m_iCurNode > 0 && !(Route_GetNodeFlags(&m_pRoute[m_iCurNode]) & LF_AIM)) 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 else
aimpos = m_pRoute[m_iCurNode].m_vecDest; aimpos = m_pRoute[m_iCurNode].dest;
} }
} else { } else {
/* aim towards the enemy */ /* aim towards the enemy */
@ -464,7 +464,7 @@ bot::RunAI(void)
aimpos = m_vecLastNode; aimpos = m_vecLastNode;
//printf("going to last node\n"); //printf("going to last node\n");
} else { } else {
aimpos = m_pRoute[m_iCurNode].m_vecDest; aimpos = m_pRoute[m_iCurNode].dest;
//printf("going to next node\n"); //printf("going to next node\n");
} }
} else { } else {

View File

@ -283,7 +283,7 @@ Route_SelectDestination(bot target)
int int
Route_GetNodeFlags(nodeslist_t *node) Route_GetNodeFlags(nodeslist_t *node)
{ {
int fl = node.m_iFlags; int fl = node.linkflags;
/* to avoid random buttons being pressed */ /* to avoid random buttons being pressed */
if (fl < 0) if (fl < 0)

View File

@ -94,15 +94,6 @@ typedef enum {
ACT_FLINCH_RIGHTLEG, ACT_FLINCH_RIGHTLEG,
} monster_activity_e; } 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 */ /* monster flags, these are defined by the level designers */
typedef enumflags typedef enumflags
{ {

View File

@ -400,7 +400,7 @@ NSMonster::CheckRoute(void)
evenpos = m_vecLastNode; evenpos = m_vecLastNode;
evenpos[2] = origin[2]; evenpos[2] = origin[2];
} else { } else {
evenpos = m_pRoute[m_iCurNode].m_vecDest; evenpos = m_pRoute[m_iCurNode].dest;
evenpos[2] = origin[2]; evenpos[2] = origin[2];
} }
@ -503,7 +503,7 @@ NSMonster::WalkRoute(void)
if (m_iCurNode < 0) { if (m_iCurNode < 0) {
endangles = vectoangles(m_vecLastNode - origin); endangles = vectoangles(m_vecLastNode - origin);
} else { } else {
endangles = vectoangles(m_pRoute[m_iCurNode].m_vecDest - origin); endangles = vectoangles(m_pRoute[m_iCurNode].dest - origin);
} }
m_vecTurnAngle[1] = endangles[1]; m_vecTurnAngle[1] = endangles[1];
input_movevalues = [m_flSequenceSpeed, 0, 0]; input_movevalues = [m_flSequenceSpeed, 0, 0];
@ -560,7 +560,7 @@ NSMonster::NewRoute(vector destination)
/* run through all nodes, mark the closest direct path possible */ /* run through all nodes, mark the closest direct path possible */
for (int i = 0; i < p.m_iNodes; i++) { 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); tracebox(p.origin, p.mins, p.maxs, vecDest, TRUE, p);
//traceline(p.origin, vecDest, MOVE_NORMAL, this); //traceline(p.origin, vecDest, MOVE_NORMAL, this);