Fixed glows, improved hitmarker, HUD is being redone, using skins

We use the community mods to make the game better
This commit is contained in:
Kamay Xutax 2024-09-14 00:49:26 +02:00
parent 31f376ed14
commit 82ab3ba890
4 changed files with 23 additions and 18 deletions

View file

@ -6361,11 +6361,11 @@ void C_BaseEntity::AddVar( void *data, IInterpolatedVar *watcher, int type, bool
if ( cl_interp_no_hermite.GetBool() ) if ( cl_interp_no_hermite.GetBool() )
{ {
type |= INTERPOLATE_LINEAR_ONLY; type |= INTERPOLATE_LINEAR_ONLY;
DevMsg( "Linear only interpolation enabled for entity %i (varname: %s) !\n", index, watcher->GetDebugName()); DevMsg( 3, "Linear only interpolation enabled for entity %p (varname: %s) !\n", this, watcher->GetDebugName());
} }
else else
{ {
DevMsg( "Hermite interpolation enabled for entity: %i (varname: %s) !\n", index, watcher->GetDebugName()); DevMsg( 3, "Hermite interpolation enabled for entity: %p (varname: %s) !\n", this, watcher->GetDebugName());
} }
for ( int i=0; i < m_VarMap.m_Entries.Count(); i++ ) for ( int i=0; i < m_VarMap.m_Entries.Count(); i++ )

View file

@ -2516,7 +2516,7 @@ void C_CSPlayer::FireGameEvent( IGameEvent* event )
{ {
auto health_damages = event->GetInt( "dmg_health" ); auto health_damages = event->GetInt( "dmg_health" );
auto armor_damages = event->GetInt( "dmg_armor" ); auto armor_damages = event->GetInt( "dmg_armor" );
auto hitgroup = event->GetInt( "hitgroup" ); // auto hitgroup = event->GetInt( "hitgroup" );
CLocalPlayerFilter filter; CLocalPlayerFilter filter;
EmitSound( filter, GetSoundSourceIndex(), "Player.Hitmark" ); EmitSound( filter, GetSoundSourceIndex(), "Player.Hitmark" );
@ -2525,31 +2525,36 @@ void C_CSPlayer::FireGameEvent( IGameEvent* event )
if ( hudChat ) if ( hudChat )
{ {
char buffer_armor[256]; char buffer_armor[32];
if ( armor_damages > 0 ) if ( armor_damages > 0 )
{ {
V_sprintf_safe( buffer_armor, V_sprintf_safe( buffer_armor,
" and \x7" " & \x7"
"FF0000%i \x7" "00FFFF%i AP \x7"
"FFFFFFarmor damage.", "FFFFFF",
armor_damages ); armor_damages );
} }
else else
{ {
buffer_armor[0] = '.'; buffer_armor[0] = 0;
buffer_armor[1] = 0;
} }
auto realAP = max( player->GetHealth() - health_damages, 0 );
auto realHP = max( player->ArmorValue() - armor_damages, 0 );
hudChat->Printf( CHAT_FILTER_NONE, hudChat->Printf( CHAT_FILTER_NONE,
"\7FFFFFFYou hit \x7" "\7FFFFFF\x7"
"FF00FF%s\x7" "FF00FF%s\x7"
"FFFFFF with \x7" "FFFFFF => \x7"
"FF0000%i \x7" "FF0000%i HP \x7"
"FFFFFFhealth damage%s", "FFFFFF%s \7FFFFFF(\7FF0000%i HP \7FFFFFF- \x7"
"00FFFF%i AP\7FFFFFF)",
player->GetPlayerName(), player->GetPlayerName(),
health_damages, health_damages,
buffer_armor ); buffer_armor,
realHP,
realAP );
m_bHasHitPlayer = true; m_bHasHitPlayer = true;
} }
@ -2954,8 +2959,8 @@ void C_CSPlayer::GetGlowEffectColor( float* r, float* g, float* b )
if ( cl_cs_render_glow_behind_walls.GetInt() == 1 ) if ( cl_cs_render_glow_behind_walls.GetInt() == 1 )
{ {
m_bGlowOccluded = false; m_bGlowOccluded = true;
m_bGlowNonOccluded = true; m_bGlowNonOccluded = false;
} }
else if ( cl_cs_render_glow_behind_walls.GetInt() == 2 ) else if ( cl_cs_render_glow_behind_walls.GetInt() == 2 )
{ {

View file

@ -43,7 +43,7 @@ Color g_ColorBlue( 153, 204, 255, 255 );
Color g_ColorRed( 255, 63, 63, 255 ); Color g_ColorRed( 255, 63, 63, 255 );
Color g_ColorGreen( 153, 255, 153, 255 ); Color g_ColorGreen( 153, 255, 153, 255 );
Color g_ColorDarkGreen( 64, 255, 64, 255 ); Color g_ColorDarkGreen( 64, 255, 64, 255 );
Color g_ColorYellow( 255, 178, 0, 255 ); Color g_ColorYellow( 255, 255, 255, 255 );
Color g_ColorGrey( 204, 204, 204, 255 ); Color g_ColorGrey( 204, 204, 204, 255 );

@ -1 +1 @@
Subproject commit 84f80d684bcc0c097d130cda7ad93cc37e5216e3 Subproject commit ac577d892ceda11ddcba2606e4f2be3716849098