From a5b9bd93e92eb1687125c6e49f9b1a2204b1961b Mon Sep 17 00:00:00 2001 From: Night Owl Date: Mon, 9 Apr 2018 20:44:31 +0500 Subject: [PATCH 1/4] Update Android.mk. --- cl_dll/Android.mk | 3 +++ dlls/Android.mk | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cl_dll/Android.mk b/cl_dll/Android.mk index df6130ed..f15563a0 100755 --- a/cl_dll/Android.mk +++ b/cl_dll/Android.mk @@ -75,6 +75,9 @@ SRCS+=./menu.cpp SRCS+=./message.cpp SRCS+=./overview.cpp SRCS+=./parsemsg.cpp +SRCS+=./particlemgr.cpp +SRCS+=./particlemsg.cpp +SRCS+=./particlesys.cpp SRCS_C+=../pm_shared/pm_debug.c SRCS_C+=../pm_shared/pm_math.c SRCS_C+=../pm_shared/pm_shared.c diff --git a/dlls/Android.mk b/dlls/Android.mk index 9b3e842a..7630779c 100644 --- a/dlls/Android.mk +++ b/dlls/Android.mk @@ -11,7 +11,7 @@ include $(XASH3D_CONFIG) LOCAL_CFLAGS += -D_LINUX -DCLIENT_WEAPONS \ -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf \ - -Wno-write-strings -Wno-invalid-offsetof -Wno-conversion-null + -Wno-write-strings -Wno-invalid-offsetof -Wno-conversion-null -DNO_VOICEGAMEMGR LOCAL_C_INCLUDES := $(LOCAL_PATH)/. \ $(LOCAL_PATH)/../common \ @@ -21,7 +21,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/. \ $(LOCAL_PATH)/../pm_shared \ $(LOCAL_PATH)/../game_shared -LOCAL_SRC_FILES := aflock.cpp agrunt.cpp AI_BaseNPC_Schedule.cpp airtank.cpp \ +LOCAL_SRC_FILES := aflock.cpp agrunt.cpp schedule.cpp airtank.cpp \ alias.cpp animating.cpp animation.cpp apache.cpp barnacle.cpp barney.cpp \ bigmomma.cpp bloater.cpp bmodels.cpp bullsquid.cpp buttons.cpp cbase.cpp \ client.cpp combat.cpp controller.cpp crossbow.cpp crowbar.cpp defaultai.cpp \ @@ -32,12 +32,12 @@ LOCAL_SRC_FILES := aflock.cpp agrunt.cpp AI_BaseNPC_Schedule.cpp airtank.cpp \ hgrunt.cpp hornet.cpp hornetgun.cpp houndeye.cpp ichthyosaur.cpp islave_deamon.cpp \ items.cpp leech.cpp lights.cpp locus.cpp maprules.cpp monstermaker.cpp monsters.cpp \ monsterstate.cpp mortar.cpp movewith.cpp mp5.cpp multiplay_gamerules.cpp nihilanth.cpp \ - nodes.cpp osprey.cpp pathcorner.cpp plane.cpp plats.cpp player.cpp playermonster.cpp \ + nodes.cpp observer.cpp osprey.cpp pathcorner.cpp plane.cpp plats.cpp player.cpp playermonster.cpp \ python.cpp rat.cpp roach.cpp rpg.cpp satchel.cpp scientist.cpp scripted.cpp shotgun.cpp \ singleplay_gamerules.cpp skill.cpp sound.cpp soundent.cpp spectator.cpp squadmonster.cpp \ squeakgrenade.cpp stats.cpp subs.cpp talkmonster.cpp teamplay_gamerules.cpp tempmonster.cpp \ tentacle.cpp triggers.cpp tripmine.cpp turret.cpp util.cpp weapons.cpp world.cpp xen.cpp \ - zombie.cpp wpn_shared/hl_wpn_glock.cpp \ + zombie.cpp glock.cpp \ ../pm_shared/pm_debug.c ../pm_shared/pm_math.c ../pm_shared/pm_shared.c From 65cb1f54f467b225949fab42b75a10a4bd202466 Mon Sep 17 00:00:00 2001 From: Jonathan Poncelet Date: Tue, 7 Aug 2018 08:24:04 +0100 Subject: [PATCH 2/4] Made library functions hidden by default on Mac/Linux This resolves an issue where the server library was calling client library functions in error. --- cl_dll/CMakeLists.txt | 1 + dlls/CMakeLists.txt | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cl_dll/CMakeLists.txt b/cl_dll/CMakeLists.txt index 323d156f..1143eefe 100644 --- a/cl_dll/CMakeLists.txt +++ b/cl_dll/CMakeLists.txt @@ -31,6 +31,7 @@ add_definitions(-DCLIENT_WEAPONS -DCLIENT_DLL) if(NOT MSVC) add_compile_options(-fno-exceptions) # GCC/Clang flag add_compile_options(-Wno-write-strings) # GCC/Clang flag + add_compile_options(-fvisibility=hidden) # GCC/Clang flag add_definitions(-D_LINUX -DLINUX) # It seems enough for all non-Win32 systems add_definitions(-Dstricmp=strcasecmp -Dstrnicmp=strncasecmp) if(NOT MINGW) diff --git a/dlls/CMakeLists.txt b/dlls/CMakeLists.txt index 55370eeb..ccaa0279 100644 --- a/dlls/CMakeLists.txt +++ b/dlls/CMakeLists.txt @@ -30,13 +30,14 @@ add_definitions(-DCLIENT_WEAPONS) if(NOT MSVC) add_compile_options(-fno-exceptions) # GCC/Clang flag add_compile_options(-Wno-invalid-offsetof) # GCC/Clang flag + add_compile_options(-fvisibility=hidden) # GCC/Clang flag add_definitions(-D_LINUX) # It seems enough for all non-Win32 systems add_definitions(-Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf ) else() add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE) endif() -set (SVDLL_SOURCES +set (SVDLL_SOURCES agrunt.cpp airtank.cpp aflock.cpp @@ -140,7 +141,7 @@ set (SVDLL_SOURCES ../pm_shared/pm_math.c ../pm_shared/pm_shared.c ) - + include_directories (. wpn_shared ../common ../engine ../pm_shared ../game_shared ../public) if(USE_VOICEMGR) From ec5cb8c6eb00bd0d890798f47f91582ab6a62a6f Mon Sep 17 00:00:00 2001 From: Night Owl Date: Thu, 23 Aug 2018 05:57:15 +0500 Subject: [PATCH 3/4] Fix train sounds. --- dlls/plats.cpp | 10 ++++++++++ dlls/shotgun.cpp | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/plats.cpp b/dlls/plats.cpp index 58af47f7..5bd2d976 100644 --- a/dlls/plats.cpp +++ b/dlls/plats.cpp @@ -164,6 +164,16 @@ void CBasePlatTrain::KeyValue( KeyValueData *pkvd ) m_bStopSnd = atoi( pkvd->szValue ); pkvd->fHandled = TRUE; } + else if( FStrEq( pkvd->szKeyName, "custommovesnd" ) ) + { + pev->noise = ALLOC_STRING( pkvd->szValue ); + pkvd->fHandled = TRUE; + } + else if( FStrEq( pkvd->szKeyName, "customstopsnd" ) ) + { + pev->noise1 = ALLOC_STRING(pkvd->szValue); + pkvd->fHandled = TRUE; + } else if( FStrEq( pkvd->szKeyName, "volume" ) ) { m_volume = atof( pkvd->szValue ); diff --git a/dlls/shotgun.cpp b/dlls/shotgun.cpp index 229956f1..659e4d98 100644 --- a/dlls/shotgun.cpp +++ b/dlls/shotgun.cpp @@ -116,7 +116,6 @@ BOOL CShotgun::Deploy() void CShotgun::PrimaryAttack() { // don't fire underwater - if( m_pPlayer->pev->waterlevel == 3 ) if (m_pPlayer->pev->waterlevel == 3 && m_pPlayer->pev->watertype > CONTENT_FLYFIELD) { PlayEmptySound(); From b423cac3de4336e47c7379d04652275c5a0bd7c8 Mon Sep 17 00:00:00 2001 From: Night Owl Date: Wed, 12 Sep 2018 05:05:55 +0500 Subject: [PATCH 4/4] Use CMAKE_C_FLAGS value for C++ compilers. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 64c48928..918449e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,8 +55,8 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT 64BIT) if(MSVC) error("UNDONE: set 32 build flags") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32") endif() set(CMAKE_SIZEOF_VOID_P 4)