mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-11 06:24:30 +00:00
Merge branch 'master' into mobile_hacks
This commit is contained in:
commit
a602a557c9
@ -335,7 +335,7 @@ int CCrowbar::Swing( int fFirst )
|
||||
m_pPlayer->m_iWeaponVolume = (int)( flVol * CROWBAR_WALLHIT_VOLUME );
|
||||
|
||||
SetThink( &CCrowbar::Smack );
|
||||
pev->nextthink = UTIL_WeaponTimeBase() + 0.2f;
|
||||
pev->nextthink = gpGlobals->time + 0.2f;
|
||||
#endif
|
||||
#ifdef CROWBAR_DELAY_FIX
|
||||
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.25f;
|
||||
|
@ -1110,13 +1110,13 @@ int CBasePlayerWeapon::ExtractAmmo( CBasePlayerWeapon *pWeapon )
|
||||
{
|
||||
// blindly call with m_iDefaultAmmo. It's either going to be a value or zero. If it is zero,
|
||||
// we only get the ammo in the weapon's clip, which is what we want.
|
||||
iReturn = pWeapon->AddPrimaryAmmo( m_iDefaultAmmo, (char *)pszAmmo1(), iMaxClip(), iMaxAmmo1() );
|
||||
iReturn |= pWeapon->AddPrimaryAmmo( m_iDefaultAmmo, (char *)pszAmmo1(), iMaxClip(), iMaxAmmo1() );
|
||||
m_iDefaultAmmo = 0;
|
||||
}
|
||||
|
||||
if( pszAmmo2() != NULL )
|
||||
{
|
||||
iReturn = pWeapon->AddSecondaryAmmo( 0, (char *)pszAmmo2(), iMaxAmmo2() );
|
||||
iReturn |= pWeapon->AddSecondaryAmmo( 0, (char *)pszAmmo2(), iMaxAmmo2() );
|
||||
}
|
||||
|
||||
return iReturn;
|
||||
|
43
wscript
43
wscript
@ -46,13 +46,14 @@ def options(opt):
|
||||
grp.add_option('--enable-simple-mod-hacks', action = 'store_true', dest = 'SIMPLE_MOD_HACKS', default = False,
|
||||
help = 'enable hacks for simple mods that don\'t touch HL game logic so much but still require small patches. Enforced for Android. [default: %default]')
|
||||
|
||||
opt.load('xcompile compiler_cxx compiler_c clang_compilation_database strip_on_install')
|
||||
opt.load('subproject')
|
||||
|
||||
opt.add_subproject(['cl_dll', 'dlls'])
|
||||
|
||||
opt.load('xcompile compiler_cxx compiler_c clang_compilation_database strip_on_install msdev msvs')
|
||||
if sys.platform == 'win32':
|
||||
opt.load('msvc msdev msvs')
|
||||
|
||||
opt.load('reconfigure subproject')
|
||||
opt.add_subproject(["cl_dll", "dlls"])
|
||||
opt.load('msvc')
|
||||
opt.load('reconfigure')
|
||||
|
||||
def configure(conf):
|
||||
# Configuration
|
||||
@ -62,7 +63,7 @@ def configure(conf):
|
||||
conf.env.SERVER_NAME = 'hl'
|
||||
conf.env.PREFIX = ''
|
||||
|
||||
conf.load('fwgslib reconfigure')
|
||||
conf.load('fwgslib reconfigure enforce_pic')
|
||||
|
||||
enforce_pic = True # modern defaults
|
||||
valid_build_types = ['fastnative', 'fast', 'release', 'debug', 'nooptimize', 'sanitize', 'none']
|
||||
@ -87,10 +88,19 @@ def configure(conf):
|
||||
# subsystem=bld.env.MSVC_SUBSYSTEM
|
||||
# TODO: wrapper around bld.stlib, bld.shlib and so on?
|
||||
conf.env.MSVC_SUBSYSTEM = 'WINDOWS,5.01'
|
||||
conf.env.MSVC_TARGETS = ['x86'] # explicitly request x86 target for MSVC
|
||||
if sys.platform == 'win32':
|
||||
conf.load('msvc msdev')
|
||||
conf.load('xcompile compiler_c compiler_cxx strip_on_install')
|
||||
conf.env.MSVC_TARGETS = ['x86' if not conf.options.ALLOW64 else 'x64']
|
||||
|
||||
# Load compilers early
|
||||
conf.load('xcompile compiler_c compiler_cxx')
|
||||
|
||||
# HACKHACK: override msvc DEST_CPU value by something that we understand
|
||||
if conf.env.DEST_CPU == 'amd64':
|
||||
conf.env.DEST_CPU = 'x86_64'
|
||||
|
||||
if conf.env.COMPILER_CC == 'msvc':
|
||||
conf.load('msvc_pdb')
|
||||
|
||||
conf.load('msvs msdev strip_on_install')
|
||||
|
||||
try:
|
||||
conf.env.CC_VERSION[0]
|
||||
@ -104,17 +114,8 @@ def configure(conf):
|
||||
conf.env.MAGX = conf.options.MAGX
|
||||
if conf.options.MAGX:
|
||||
enforce_pic = False
|
||||
|
||||
if enforce_pic:
|
||||
# Every static library must have fPIC
|
||||
if conf.env.DEST_OS != 'win32' and '-fPIC' in conf.env.CFLAGS_cshlib:
|
||||
conf.env.append_unique('CFLAGS_cstlib', '-fPIC')
|
||||
conf.env.append_unique('CXXFLAGS_cxxstlib', '-fPIC')
|
||||
else:
|
||||
conf.env.CFLAGS_cshlib.remove('-fPIC')
|
||||
conf.env.CXXFLAGS_cxxshlib.remove('-fPIC')
|
||||
conf.env.CFLAGS_MACBUNDLE.remove('-fPIC')
|
||||
conf.env.CXXFLAGS_MACBUNDLE.remove('-fPIC')
|
||||
|
||||
conf.check_pic(enforce_pic)
|
||||
|
||||
# We restrict 64-bit builds ONLY for Win/Linux/OSX running on Intel architecture
|
||||
# Because compatibility with original GoldSrc
|
||||
|
Loading…
x
Reference in New Issue
Block a user