now load waypoints from memory as well
changed versioning scheme updated linux makefiles
This commit is contained in:
parent
730ce7a1d4
commit
a61cd3b021
9 changed files with 20 additions and 44 deletions
|
|
@ -469,7 +469,7 @@ enum WaypointFlag
|
||||||
// defines for waypoint connection flags field (16 bits are available)
|
// defines for waypoint connection flags field (16 bits are available)
|
||||||
enum PathFlag
|
enum PathFlag
|
||||||
{
|
{
|
||||||
PATHFLAG_JUMP = (1 << 0), // must jump for this connection
|
PATHFLAG_JUMP = (1 << 0) // must jump for this connection
|
||||||
};
|
};
|
||||||
|
|
||||||
// enum pathfind search type
|
// enum pathfind search type
|
||||||
|
|
|
||||||
|
|
@ -69,20 +69,15 @@ typedef enum
|
||||||
{
|
{
|
||||||
print_console,
|
print_console,
|
||||||
print_center,
|
print_center,
|
||||||
print_chat,
|
print_chat
|
||||||
} PRINT_TYPE;
|
} PRINT_TYPE;
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
print_withtag = print_console | 0x3ff,
|
|
||||||
} PRINT_TYPE_EX; // (dz): added for bots needs
|
|
||||||
|
|
||||||
// For integrity checking of content on clients
|
// For integrity checking of content on clients
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
force_exactfile, // File on client must exactly match server's file
|
force_exactfile, // File on client must exactly match server's file
|
||||||
force_model_samebounds, // For model files only, the geometry must fit in the same bbox
|
force_model_samebounds, // For model files only, the geometry must fit in the same bbox
|
||||||
force_model_specifybounds, // For model files only, the geometry must fit in the specified bbox
|
force_model_specifybounds // For model files only, the geometry must fit in the specified bbox
|
||||||
} FORCE_TYPE;
|
} FORCE_TYPE;
|
||||||
|
|
||||||
// Returned by TraceLine
|
// Returned by TraceLine
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ typedef enum
|
||||||
PT_STARTUP,
|
PT_STARTUP,
|
||||||
PT_CHANGELEVEL,
|
PT_CHANGELEVEL,
|
||||||
PT_ANYTIME,
|
PT_ANYTIME,
|
||||||
PT_ANYPAUSE,
|
PT_ANYPAUSE
|
||||||
} PLUG_LOADTIME;
|
} PLUG_LOADTIME;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -64,7 +64,7 @@ typedef enum
|
||||||
PNL_DELAYED,
|
PNL_DELAYED,
|
||||||
PNL_PLUGIN,
|
PNL_PLUGIN,
|
||||||
PNL_PLG_FORCED,
|
PNL_PLG_FORCED,
|
||||||
PNL_RELOAD,
|
PNL_RELOAD
|
||||||
} PL_UNLOAD_REASON;
|
} PL_UNLOAD_REASON;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
@ -73,7 +73,7 @@ typedef enum
|
||||||
MRES_IGNORED,
|
MRES_IGNORED,
|
||||||
MRES_HANDLED,
|
MRES_HANDLED,
|
||||||
MRES_OVERRIDE,
|
MRES_OVERRIDE,
|
||||||
MRES_SUPERCEDE,
|
MRES_SUPERCEDE
|
||||||
} META_RES;
|
} META_RES;
|
||||||
|
|
||||||
typedef struct meta_globals_s
|
typedef struct meta_globals_s
|
||||||
|
|
@ -121,7 +121,7 @@ typedef enum
|
||||||
GINFO_GAMEDIR,
|
GINFO_GAMEDIR,
|
||||||
GINFO_DLL_FULLPATH,
|
GINFO_DLL_FULLPATH,
|
||||||
GINFO_DLL_FILENAME,
|
GINFO_DLL_FILENAME,
|
||||||
GINFO_REALDLL_FULLPATH,
|
GINFO_REALDLL_FULLPATH
|
||||||
} ginfo_t;
|
} ginfo_t;
|
||||||
|
|
||||||
// Meta Utility Function table type.
|
// Meta Utility Function table type.
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
// general product information
|
// general product information
|
||||||
#define PRODUCT_NAME "Yet Another POD-Bot"
|
#define PRODUCT_NAME "Yet Another POD-Bot"
|
||||||
#define PRODUCT_VERSION "2.7.3"
|
#define PRODUCT_VERSION "2.73"
|
||||||
#define PRODUCT_AUTHOR "YaPB Dev Team"
|
#define PRODUCT_AUTHOR "YaPB Dev Team"
|
||||||
#define PRODUCT_URL "https://yapb.jeefo.net"
|
#define PRODUCT_URL "https://yapb.jeefo.net"
|
||||||
#define PRODUCT_EMAIL "dmitry@jeefo.net"
|
#define PRODUCT_EMAIL "dmitry@jeefo.net"
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
#define PRODUCT_LEGAL "Half-Life, Counter-Strike, Counter-Strike: Condition Zero, Steam, Valve is a trademark of Valve Corporation"
|
#define PRODUCT_LEGAL "Half-Life, Counter-Strike, Counter-Strike: Condition Zero, Steam, Valve is a trademark of Valve Corporation"
|
||||||
#define PRODUCT_ORIGINAL_NAME "yapb.dll"
|
#define PRODUCT_ORIGINAL_NAME "yapb.dll"
|
||||||
#define PRODUCT_INTERNAL_NAME "skybot"
|
#define PRODUCT_INTERNAL_NAME "skybot"
|
||||||
#define PRODUCT_VERSION_DWORD_INTERNAL 2,7,3
|
#define PRODUCT_VERSION_DWORD_INTERNAL 2,73
|
||||||
#define PRODUCT_VERSION_DWORD PRODUCT_VERSION_DWORD_INTERNAL,0
|
#define PRODUCT_VERSION_DWORD PRODUCT_VERSION_DWORD_INTERNAL,0
|
||||||
#define PRODUCT_SUPPORT_VERSION "1.0 - CZ"
|
#define PRODUCT_SUPPORT_VERSION "1.0 - CZ"
|
||||||
#define PRODUCT_COMMENTS "http://github.com/jeefo/yapb/"
|
#define PRODUCT_COMMENTS "http://github.com/jeefo/yapb/"
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ OBJECTS = $(SRC_DIR)/basecode.cpp \
|
||||||
$(SRC_DIR)/support.cpp \
|
$(SRC_DIR)/support.cpp \
|
||||||
$(SRC_DIR)/waypoint.cpp \
|
$(SRC_DIR)/waypoint.cpp \
|
||||||
|
|
||||||
C_OPT_FLAGS = -O3 -DNDEBUG=1 -fno-exceptions -fno-rtti -funroll-loops -fomit-frame-pointer -pipe
|
C_OPT_FLAGS = -O3 -DNDEBUG=1 -fno-exceptions -fno-rtti -funroll-loops -fomit-frame-pointer -pipe -mtune=native
|
||||||
C_DEBUG_FLAGS = -D_DEBUG -DDEBUG -g -ggdb3
|
C_DEBUG_FLAGS = -D_DEBUG -DDEBUG -g -ggdb3
|
||||||
C_GCC4_FLAGS = -fvisibility=hidden
|
C_GCC4_FLAGS = -fvisibility=hidden
|
||||||
CPP_GCC4_FLAGS = -fvisibility-inlines-hidden
|
CPP_GCC4_FLAGS = -fvisibility-inlines-hidden
|
||||||
|
|
@ -50,10 +50,10 @@ else
|
||||||
LINK += -shared
|
LINK += -shared
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LINK += -m32 -lm -ldl
|
LINK += -m32 -lm -ldl -lsupc++
|
||||||
|
|
||||||
CFLAGS += -DHAVE_STDINT_H -D__extern_always_inline=inline -D_strdup=strdup -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -fno-strict-aliasing -m32 -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-c++11-compat-deprecated-writable-strings
|
CFLAGS += -DHAVE_STDINT_H -D__extern_always_inline=inline -D_strdup=strdup -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -fno-strict-aliasing -m32 -Wall -Werror -Wextra -pedantic -Wno-c++11-long-long
|
||||||
CPPFLAGS += -Wno-invalid-offsetof -fno-exceptions -fno-rtti
|
CPPFLAGS += -fno-exceptions -fno-rtti -fno-builtin
|
||||||
|
|
||||||
BINARY = $(PROJECT).$(LIB_EXT)
|
BINARY = $(PROJECT).$(LIB_EXT)
|
||||||
|
|
||||||
|
|
@ -72,30 +72,10 @@ endif
|
||||||
IS_CLANG := $(shell $(CPP) --version | head -1 | grep clang > /dev/null && echo "1" || echo "0")
|
IS_CLANG := $(shell $(CPP) --version | head -1 | grep clang > /dev/null && echo "1" || echo "0")
|
||||||
|
|
||||||
ifeq "$(IS_CLANG)" "1"
|
ifeq "$(IS_CLANG)" "1"
|
||||||
CPP_MAJOR := $(shell $(CPP) --version | grep clang | sed "s/.*version \([0-9]\)*\.[0-9]*.*/\1/")
|
|
||||||
CPP_MINOR := $(shell $(CPP) --version | grep clang | sed "s/.*version [0-9]*\.\([0-9]\)*.*/\1/")
|
|
||||||
else
|
|
||||||
CPP_MAJOR := $(shell $(CPP) -dumpversion >&1 | cut -b1)
|
|
||||||
CPP_MINOR := $(shell $(CPP) -dumpversion >&1 | cut -b3)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Clang || GCC >= 4
|
|
||||||
ifeq "$(shell expr $(IS_CLANG) \| $(CPP_MAJOR) \>= 4)" "1"
|
|
||||||
CFLAGS += $(C_GCC4_FLAGS)
|
CFLAGS += $(C_GCC4_FLAGS)
|
||||||
CPPFLAGS += $(CPP_GCC4_FLAGS)
|
CPPFLAGS += $(CPP_GCC4_FLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq "$(IS_CLANG)" "1"
|
|
||||||
CFLAGS += -Wno-logical-op-parentheses
|
|
||||||
else
|
|
||||||
CFLAGS += -Wno-parentheses
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Clang >= 3 || GCC >= 4.7
|
|
||||||
ifeq "$(shell expr $(IS_CLANG) \& $(CPP_MAJOR) \>= 3 \| $(CPP_MAJOR) \>= 4 \& $(CPP_MINOR) \>= 7)" "1"
|
|
||||||
CFLAGS += -Wno-delete-non-virtual-dtor
|
|
||||||
endif
|
|
||||||
|
|
||||||
# OS is Linux and not using clang
|
# OS is Linux and not using clang
|
||||||
ifeq "$(shell expr $(OS) \= Linux \& $(IS_CLANG) \= 0)" "1"
|
ifeq "$(shell expr $(OS) \= Linux \& $(IS_CLANG) \= 0)" "1"
|
||||||
LINK += -static-libgcc
|
LINK += -static-libgcc
|
||||||
|
|
@ -142,3 +122,4 @@ default: all
|
||||||
clean:
|
clean:
|
||||||
rm -rf release
|
rm -rf release
|
||||||
rm -rf debug
|
rm -rf debug
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ LOCAL_SRC_FILES := \
|
||||||
support.cpp \
|
support.cpp \
|
||||||
waypoint.cpp \
|
waypoint.cpp \
|
||||||
|
|
||||||
LOCAL_CFLAGS += -O2 -DLINUX -D_LINUX -DPOSIX -DHAVE_STDINT_H -D__extern_always_inline=inline -D_strdup=strdup -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-c++11-compat-deprecated-writable-strings
|
LOCAL_CFLAGS += -O2 -DLINUX -D_LINUX -DPOSIX -DHAVE_STDINT_H -D__extern_always_inline=inline -D_strdup=strdup -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -fno-strict-aliasing -Wall -Werror
|
||||||
LOCAL_CPPFLAGS += -w -Wno-invalid-offsetof -fno-exceptions -fno-rtti
|
LOCAL_CPPFLAGS += -w -fno-exceptions -fno-rtti
|
||||||
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,8 @@ void Engine::Printf (const char *fmt, ...)
|
||||||
vsnprintf (string, SIZEOF_CHAR (string), TraslateMessage (fmt), ap);
|
vsnprintf (string, SIZEOF_CHAR (string), TraslateMessage (fmt), ap);
|
||||||
va_end (ap);
|
va_end (ap);
|
||||||
|
|
||||||
|
strcat (string, "\n");
|
||||||
g_engfuncs.pfnServerPrint (string);
|
g_engfuncs.pfnServerPrint (string);
|
||||||
g_engfuncs.pfnServerPrint ("\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Engine::ChatPrintf (const char *fmt, ...)
|
void Engine::ChatPrintf (const char *fmt, ...)
|
||||||
|
|
|
||||||
|
|
@ -485,12 +485,12 @@ MemoryFile::MF_Unloader MemoryFile::Unloader = NULL;
|
||||||
|
|
||||||
void InitConfig (void)
|
void InitConfig (void)
|
||||||
{
|
{
|
||||||
// assign engine loaders to memoryfile handler
|
if (!MemoryFile::Loader && !MemoryFile::Unloader)
|
||||||
if (MemoryFile::Loader == NULL || MemoryFile::Unloader == NULL)
|
|
||||||
{
|
{
|
||||||
MemoryFile::Loader = reinterpret_cast <MemoryFile::MF_Loader> (g_engfuncs.pfnLoadFileForMe);
|
MemoryFile::Loader = reinterpret_cast <MemoryFile::MF_Loader> (g_engfuncs.pfnLoadFileForMe);
|
||||||
MemoryFile::Unloader = reinterpret_cast <MemoryFile::MF_Unloader> (g_engfuncs.pfnFreeFile);
|
MemoryFile::Unloader = reinterpret_cast <MemoryFile::MF_Unloader> (g_engfuncs.pfnFreeFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
MemoryFile fp;
|
MemoryFile fp;
|
||||||
char line[512];
|
char line[512];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1056,7 +1056,7 @@ void Waypoint::InitTypes (void)
|
||||||
|
|
||||||
bool Waypoint::Load (void)
|
bool Waypoint::Load (void)
|
||||||
{
|
{
|
||||||
File fp (CheckSubfolderFile (), "rb");
|
MemoryFile fp (CheckSubfolderFile ());
|
||||||
|
|
||||||
WaypointHeader header;
|
WaypointHeader header;
|
||||||
memset (&header, 0, sizeof (header));
|
memset (&header, 0, sizeof (header));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue