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
# 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

View File

@ -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

View File

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

View File

@ -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"

View File

@ -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 {

View File

@ -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)

View File

@ -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
{

View File

@ -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);