Fixed some asserts

This commit is contained in:
Kamay Xutax 2024-09-07 12:41:56 +02:00
parent eeed4b8ada
commit 97bf5252e8
3 changed files with 12 additions and 6 deletions

6
.gitignore vendored
View file

@ -46,3 +46,9 @@ gamedata/css_enhanced/game/cstrike/download/*
*.tmp *.tmp
*.lst *.lst
gamedata/css_enhanced/game/cstrike/textwindow_temp.html gamedata/css_enhanced/game/cstrike/textwindow_temp.html
*.so
gamedata/css_enhanced/game/cstrike/videoconfig_linux.cfg
gamedata/css_enhanced/game/cstrike/cfg/autoexec.cfg
gamedata/css_enhanced/game/cstrike/glshaders.cfg
gamedata/css_enhanced/game/cstrike/gamestate.txt
gamedata/css_enhanced/game/cstrike/serverconfig.vdf

View file

@ -2151,7 +2151,7 @@ void C_CSPlayer::FireGameEvent( IGameEvent* event )
QAngle angles[MAXSTUDIOBONES]; QAngle angles[MAXSTUDIOBONES];
Vector positions[MAXSTUDIOBONES]; Vector positions[MAXSTUDIOBONES];
AssertFatal( numhitboxes == pStudioHdr->numbones() ); AssertFatal( numhitboxes == pStudioHdr->pHitboxSet( player->m_nHitboxSet )->numhitboxes );
for ( int i = 0; i < numhitboxes; i++ ) for ( int i = 0; i < numhitboxes; i++ )
{ {

View file

@ -541,9 +541,9 @@ void CCSPlayer::FireBullet(
#endif #endif
#ifndef CLIENT_DLL #ifndef CLIENT_DLL
auto WritePlayerHitboxEvent = [&]( CBasePlayer* lagPlayer ) auto WritePlayerHitboxEvent = [&]( CBasePlayer* lagPlayer, const char* context )
{ {
IGameEvent* event = gameeventmanager->CreateEvent( "bullet_player_hitboxes" ); IGameEvent* event = gameeventmanager->CreateEvent( context );
if ( event ) if ( event )
{ {
event->SetInt( "userid", GetUserID() ); event->SetInt( "userid", GetUserID() );
@ -658,7 +658,7 @@ void CCSPlayer::FireBullet(
lagPlayer->DrawClientHitboxes( cl_debug_duration.GetFloat(), true ); lagPlayer->DrawClientHitboxes( cl_debug_duration.GetFloat(), true );
} }
#else #else
WritePlayerHitboxEvent( lagPlayer ); WritePlayerHitboxEvent( lagPlayer, "bullet_player_hitboxes" );
#endif #endif
} }
} }
@ -757,7 +757,7 @@ void CCSPlayer::FireBullet(
lagPlayer->DrawClientHitboxes( cl_debug_duration.GetFloat(), true ); lagPlayer->DrawClientHitboxes( cl_debug_duration.GetFloat(), true );
} }
#else #else
WritePlayerHitboxEvent( lagPlayer ); WritePlayerHitboxEvent( lagPlayer, "bullet_hit_player" );
#endif #endif
} }
} }