Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gcc build errors & warnings #152

Merged
merged 1 commit into from
Nov 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sp/src/game/client/c_baseviewmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ bool C_BaseViewModel::Interpolate( float currentTime )
}


inline bool C_BaseViewModel::ShouldFlipViewModel()
bool C_BaseViewModel::ShouldFlipViewModel()
{
#if defined(CSTRIKE_DLL) || defined (MAPBASE)
// If cl_righthand is set, then we want them all right-handed.
Expand Down
2 changes: 1 addition & 1 deletion sp/src/game/client/fx_impact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ C_BaseAnimating *FX_AffectRagdolls_GetHit( Vector vecOrigin, Vector vecStart, in
{
// don't do this when lots of ragdolls are simulating
if ( s_RagdollLRU.CountRagdolls(true) > 1 )
return false;
return NULL;
Ray_t shotRay;
shotRay.Init( vecStart, vecOrigin );

Expand Down
2 changes: 1 addition & 1 deletion sp/src/game/client/viewdebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ CON_COMMAND_F( r_screenoverlay_indexed, "Draw specified material as an overlay i
}
else
{
Warning( "Format: r_screenoverlay_indexed <index> <material> %s\n" );
Warning( "Format: r_screenoverlay_indexed <index> [<material>]\n" );
}
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion sp/src/game/server/baseanimating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1948,7 +1948,7 @@ ConVar ai_setupbones_debug( "ai_setupbones_debug", "0", 0, "Shows that bones tha



inline bool CBaseAnimating::CanSkipAnimation( void )
bool CBaseAnimating::CanSkipAnimation( void )
{
if ( !sv_pvsskipanimation.GetBool() )
return false;
Expand Down
13 changes: 7 additions & 6 deletions sp/src/game/server/mapbase/ai_grenade.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "gameweaponmanager.h"
#include "hl2_gamerules.h"
#include "weapon_physcannon.h"
#include "globalstate.h"

#define COMBINE_AE_GREN_TOSS ( 7 )

Expand Down Expand Up @@ -117,7 +118,7 @@ class CAI_GrenadeUser : public BASE_NPC, public CAI_GrenadeUserSink
}

// Use secondary ammo as a way of checking if this is a weapon which can be alt-fired (e.g. AR2 or SMG)
virtual bool IsAltFireCapable() { return (GetActiveWeapon() && GetActiveWeapon()->UsesSecondaryAmmo()); }
virtual bool IsAltFireCapable() { return (this->GetActiveWeapon() && this->GetActiveWeapon()->UsesSecondaryAmmo()); }
virtual bool IsGrenadeCapable() { return true; }
inline bool HasGrenades() { return m_iNumGrenades > 0; }

Expand Down Expand Up @@ -587,9 +588,9 @@ void CAI_GrenadeUser<BASE_NPC>::DropGrenadeItemsOnDeath( const CTakeDamageInfo &
{
CBaseEntity *pItem;
if (this->GetActiveWeapon() && FClassnameIs( this->GetActiveWeapon(), "weapon_smg1" ))
pItem = this->DropItem( "item_ammo_smg1_grenade", WorldSpaceCenter()+RandomVector(-4,4), RandomAngle(0,360) );
pItem = this->DropItem( "item_ammo_smg1_grenade", this->WorldSpaceCenter()+RandomVector(-4,4), RandomAngle(0,360) );
else
pItem = this->DropItem( "item_ammo_ar2_altfire", WorldSpaceCenter() + RandomVector( -4, 4 ), RandomAngle( 0, 360 ) );
pItem = this->DropItem( "item_ammo_ar2_altfire", this->WorldSpaceCenter() + RandomVector( -4, 4 ), RandomAngle( 0, 360 ) );

if ( pItem )
{
Expand Down Expand Up @@ -629,22 +630,22 @@ void CAI_GrenadeUser<BASE_NPC>::DropGrenadeItemsOnDeath( const CTakeDamageInfo &
// Attempt to drop a grenade
if ( pHL2GameRules->NPC_ShouldDropGrenade( pPlayer ) )
{
this->DropItem( "weapon_frag", WorldSpaceCenter()+RandomVector(-4,4), RandomAngle(0,360) );
this->DropItem( "weapon_frag", this->WorldSpaceCenter()+RandomVector(-4,4), RandomAngle(0,360) );
pHL2GameRules->NPC_DroppedGrenade();
}
}

// if I was killed before I could finish throwing my grenade, drop
// a grenade item that the player can retrieve.
if (GetActivity() == ACT_RANGE_ATTACK2 && ShouldDropInterruptedGrenades())
if (this->GetActivity() == ACT_RANGE_ATTACK2 && ShouldDropInterruptedGrenades())
{
if( m_iLastAnimEventHandled != COMBINE_AE_GREN_TOSS )
{
// Drop the grenade as an item.
Vector vecStart;
this->GetAttachment( GetGrenadeAttachment(), vecStart );

CBaseEntity *pItem = DropItem( "weapon_frag", vecStart, RandomAngle(0,360) );
CBaseEntity *pItem = this->DropItem( "weapon_frag", vecStart, RandomAngle(0,360) );

if ( pItem )
{
Expand Down