Skip to content

Commit

Permalink
Merge branch 'master' into mobile_hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
nekonomicon committed Dec 31, 2024
2 parents 3f44531 + cadcac4 commit c8a89c3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ endif()

if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT 64BIT)
if(MSVC)
error("UNDONE: set 32 build flags")
message(FATAL_ERROR "Add \"-D64BIT=ON\" to build 64-bit version of SDK or add \"-A Win32\" if you want to build a 32-bit version")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
Expand Down
11 changes: 4 additions & 7 deletions dlls/crossbow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void CCrossbowBolt::BoltTouch( CBaseEntity *pOther )
pev->angles.z = RANDOM_LONG( 0, 360 );
pev->nextthink = gpGlobals->time + 10.0f;
}
else if( pOther->pev->movetype == MOVETYPE_PUSH || pOther->pev->movetype == MOVETYPE_PUSHSTEP )
else if( g_fIsXash3D && (pOther->pev->movetype == MOVETYPE_PUSH || pOther->pev->movetype == MOVETYPE_PUSHSTEP) )
{
Vector vecDir = pev->velocity.Normalize();
UTIL_SetOrigin( pev, pev->origin - vecDir * 12.0f );
Expand All @@ -167,12 +167,9 @@ void CCrossbowBolt::BoltTouch( CBaseEntity *pOther )
pev->angles.z = RANDOM_LONG( 0, 360 );
pev->nextthink = gpGlobals->time + 10.0f;

if( g_fIsXash3D )
{
// g-cont. Setup movewith feature
pev->movetype = MOVETYPE_COMPOUND; // set movewith type
pev->aiment = ENT( pOther->pev ); // set parent
}
// g-cont. Setup movewith feature
pev->movetype = MOVETYPE_COMPOUND; // set movewith type
pev->aiment = ENT( pOther->pev ); // set parent
}

if( UTIL_PointContents( pev->origin ) != CONTENTS_WATER )
Expand Down
2 changes: 1 addition & 1 deletion dlls/ggrenade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ CGrenade *CGrenade::ShootTimed( entvars_t *pevOwner, Vector vecStart, Vector vec
pGrenade->pev->gravity = 0.5f;
pGrenade->pev->friction = 0.8f;

pGrenade->pev->dmg = 100;
pGrenade->pev->dmg = gSkillData.plrDmgHandGrenade;

return pGrenade;
}
Expand Down
4 changes: 4 additions & 0 deletions dlls/maprules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,10 @@ void CGamePlayerEquip::EquipPlayer( CBaseEntity *pEntity )
{
if( !m_weaponNames[i] )
break;

if( g_pGameRules->IsBustingGame() && !strcmp( STRING( m_weaponNames[i] ), "weapon_egon" ))
continue;

for( int j = 0; j < m_weaponCount[i]; j++ )
{
pPlayer->GiveNamedItem( STRING( m_weaponNames[i] ) );
Expand Down
9 changes: 8 additions & 1 deletion dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,8 @@ void CBasePlayer::RemoveAllItems( BOOL removeSuit )
pev->weapons &= ~WEAPON_ALLWEAPONS;

// Turn off flashlight
ClearBits( pev->effects, EF_DIMLIGHT );
if (removeSuit)
ClearBits( pev->effects, EF_DIMLIGHT );

for( i = 0; i < MAX_AMMO_SLOTS; i++ )
m_rgAmmo[i] = 0;
Expand Down Expand Up @@ -3203,6 +3204,9 @@ void CBasePlayer::SelectItem( const char *pstr )
if( pItem == m_pActiveItem )
return;

if( !pItem->CanDeploy())
return;

ResetAutoaim();

// FIX, this needs to queue them up and delay
Expand Down Expand Up @@ -3233,6 +3237,9 @@ void CBasePlayer::SelectLastItem( void )
return;
}

if( !m_pLastItem->CanDeploy())
return;

ResetAutoaim();

// FIX, this needs to queue them up and delay
Expand Down

0 comments on commit c8a89c3

Please sign in to comment.