Merge branch 'master' into opfor

This commit is contained in:
Andrey Akhmichin 2023-04-29 19:20:39 +05:00
commit 51f214fb02
No known key found for this signature in database
GPG Key ID: BE329F7886439BC8
3 changed files with 30 additions and 23 deletions

View File

@ -212,7 +212,7 @@ void CHGrunt::GibMonster( void )
Vector vecGunPos;
Vector vecGunAngles;
if( GetBodygroup( 2 ) != 2 )
if( GetBodygroup( GUN_GROUP ) != GUN_NONE )
{
// throw a gun if the grunt has one
GetAttachment( 0, vecGunPos, vecGunAngles );
@ -543,7 +543,7 @@ void CHGrunt::TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vecDir
if( ptr->iHitgroup == 11 )
{
// make sure we're wearing one
if( GetBodygroup( 1 ) == HEAD_GRUNT && ( bitsDamageType & (DMG_BULLET | DMG_SLASH | DMG_BLAST | DMG_CLUB ) ) )
if( GetBodygroup( HEAD_GROUP ) == HEAD_GRUNT && ( bitsDamageType & (DMG_BULLET | DMG_SLASH | DMG_BLAST | DMG_CLUB ) ) )
{
// absorb damage
flDamage -= 20;
@ -787,6 +787,8 @@ void CHGrunt::HandleAnimEvent( MonsterEvent_t *pEvent )
switch( pEvent->event )
{
case HGRUNT_AE_DROP_GUN:
{
if ( GetBodygroup( GUN_GROUP ) != GUN_NONE )
{
Vector vecGunPos;
Vector vecGunAngles;
@ -811,6 +813,7 @@ void CHGrunt::HandleAnimEvent( MonsterEvent_t *pEvent )
DropItem( "ammo_ARgrenades", BodyTarget( pev->origin ), vecGunAngles );
}
}
}
break;
case HGRUNT_AE_RELOAD:
EMIT_SOUND( ENT( pev ), CHAN_WEAPON, "hgrunt/gr_reload1.wav", 1, ATTN_NORM );

View File

@ -20,7 +20,7 @@ def configure(conf):
conf.fatal("Could not find hl.def")
def build(bld):
excluded_files = ['mpstubb.cpp', 'stats.cpp', 'prop.cpp', 'Wxdebug.cpp', 'gearbox/gearbox_client.cpp']
excluded_files = ['mpstubb.cpp', 'stats.cpp', 'Wxdebug.cpp', 'gearbox/gearbox_client.cpp']
source = bld.path.ant_glob('**/*.cpp', excl=excluded_files)
source += bld.path.parent.ant_glob('pm_shared/*.c')

View File

@ -10,6 +10,7 @@ import re
VERSION = '2.4'
APPNAME = 'hlsdk-portable'
top = '.'
default_prefix = '/'
Context.Context.line_just = 60 # should fit for everything on 80x26
@ -238,6 +239,9 @@ def configure(conf):
conf.add_subproject('cl_dll')
def build(bld):
if bld.is_install and not bld.options.destdir:
bld.fatal('Set the install destination directory using --destdir option')
# don't clean QtCreator files and reconfigure saved options
bld.clean_files = bld.bldnode.ant_glob('**',
excl='*.user configuration.py .lock* *conf_check_*/** config.log %s/*' % Build.CACHE_DIR,