Skip to content

Commit

Permalink
Merge branch 'master' into dmc
Browse files Browse the repository at this point in the history
  • Loading branch information
nekonomicon committed Jan 18, 2025
2 parents 2eaaf12 + 0dd8f1b commit d3399b1
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ option(BUILD_SERVER "Build server dll" ON)
option(LTO "Enable interprocedural optimization" OFF)
option(POLLY "Enable pollyhedral optimization" OFF)

if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "")
endif()

if(CMAKE_SIZEOF_VOID_P EQUAL 4 OR
((WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
AND (CMAKE_SYSTEM_PROCESSOR STREQUAL "x64"
Expand Down
2 changes: 1 addition & 1 deletion cl_dll/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ set_target_properties (${CLDLL_LIBRARY} PROPERTIES
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Android")
set(CLDLL_NAME "client")
set_target_properties(${CLDLL_LIBRARY} PROPERTIES
OUTPUT_NAME ${CLDLL_NAME}
OUTPUT_NAME "${CLDLL_NAME}${POSTFIX}"
PREFIX "")
endif()

Expand Down
1 change: 1 addition & 0 deletions cl_dll/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def build(bld):

if bld.env.GOLDSOURCE_SUPPORT:
defines += ['GOLDSOURCE_SUPPORT']
includes += ['../external/']

if bld.env.DEST_OS == 'win32':
libs += ["WINMM"]
Expand Down
6 changes: 0 additions & 6 deletions cmake/LibraryNaming.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,3 @@ else()
endif()

message(STATUS "Library postfix: " ${POSTFIX})

set(CMAKE_RELEASE_POSTFIX ${POSTFIX})
set(CMAKE_DEBUG_POSTFIX ${POSTFIX})
set(CMAKE_RELWITHDEBINFO_POSTFIX ${POSTFIX})
set(CMAKE_MINSIZEREL_POSTFIX ${POSTFIX})
set(CMAKE_POSTFIX ${POSTFIX})
2 changes: 1 addition & 1 deletion dlls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Android")
set(SVDLL_NAME "${SERVER_LIBRARY_NAME}")

set_target_properties(${SVDLL_LIBRARY} PROPERTIES
OUTPUT_NAME ${SVDLL_NAME}
OUTPUT_NAME "${SVDLL_NAME}${POSTFIX}"
PREFIX "")
endif()

Expand Down
10 changes: 10 additions & 0 deletions dlls/func_break.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,8 @@ class CPushable : public CBreakable
// breakables use an overridden takedamage
virtual int TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType );

int DamageDecal(int bitsDamageType);

static TYPEDESCRIPTION m_SaveData[];

static const char *m_soundNames[3];
Expand Down Expand Up @@ -1044,3 +1046,11 @@ int CPushable::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, floa

return 1;
}

int CPushable::DamageDecal(int bitsDamageType)
{
if (FBitSet(pev->spawnflags, SF_PUSH_BREAKABLE))
return CBreakable::DamageDecal(bitsDamageType);

return CBaseEntity::DamageDecal(bitsDamageType);
}
3 changes: 2 additions & 1 deletion dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2772,7 +2772,6 @@ void CBasePlayer::Precache( void )
m_flgeigerRange = 1000;
m_igeigerRangePrev = 1000;

m_bitsDamageType = 0;
m_bitsHUDDamage = -1;

m_iClientBattery = -1;
Expand All @@ -2786,6 +2785,8 @@ void CBasePlayer::Precache( void )

m_iUpdateTime = 5; // won't update for 1/2 a second

m_nCustomSprayFrames = -1;

if( gInitHUD )
m_fInitHUD = TRUE;

Expand Down
16 changes: 13 additions & 3 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,26 @@ def options(opt):
grp.add_option('--enable-voicemgr', action = 'store_true', dest = 'USE_VOICEMGR', default = False,
help = 'Enable VOICE MANAGER')

opt.add_subproject('dlls')
opt.add_subproject('cl_dll')
# a1ba: hidden option for CI
grp.add_option('--enable-msvcdeps', action='store_true', dest='MSVCDEPS', default=False, help='')

opt.add_subproject('cl_dll dlls')

def configure(conf):
conf.load('fwgslib reconfigure compiler_optimizations')
conf.env.MSVC_TARGETS = ['x86' if not conf.options.ALLOW64 else 'x64']
if conf.options.ALLOW64:
conf.env.MSVC_TARGETS = ['x64']
elif sys.maxsize > 2 ** 32 and not conf.options.MSVC_WINE:
conf.env.MSVC_TARGETS = ['amd64_x86', 'x86']
else:
conf.env.MSVC_TARGETS = ['x86']

# Load compilers early
conf.load('xcompile compiler_c compiler_cxx gccdeps')

if conf.options.MSVCDEPS:
conf.load('msvcdeps')

# HACKHACK: override msvc DEST_CPU value by something that we understand
if conf.env.DEST_CPU == 'amd64':
conf.env.DEST_CPU = 'x86_64'
Expand Down

0 comments on commit d3399b1

Please sign in to comment.