Skip to content
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
4 changes: 2 additions & 2 deletions game/neo/scripts/HudLayout.res
Original file line number Diff line number Diff line change
Expand Up @@ -963,9 +963,9 @@
"text_y_offset" "420"
}

neo_iff
NHudFriendlyMarker
{
"fieldName" "neo_iff"
"fieldName" "NHudFriendlyMarker"
"xpos" "0"
"ypos" "0"
"wide" "640"
Expand Down
15 changes: 1 addition & 14 deletions src/game/client/c_baseanimating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,14 +386,9 @@ void C_ClientRagdoll::OnRestore( void )
}

#ifdef NEO
extern ConVar glow_outline_effect_enable;
int C_ClientRagdoll::DrawModel(int flags)
{
#ifdef GLOWS_ENABLE
auto pTargetPlayer = glow_outline_effect_enable.GetBool() ? C_NEO_Player::GetLocalNEOPlayer() : C_NEO_Player::GetVisionTargetNEOPlayer();
#else
auto pTargetPlayer = C_NEO_Player::GetVisionTargetNEOPlayer();
#endif // GLOWS_ENABLE
if (!pTargetPlayer)
{
Assert(false);
Expand Down Expand Up @@ -3226,9 +3221,6 @@ void C_BaseAnimating::UpdateVisibility()

ConVar r_drawothermodels( "r_drawothermodels", "1", FCVAR_CHEAT, "0=Off, 1=Normal, 2=Wireframe" );

#if defined NEO && defined GLOWS_ENABLE
extern ConVar glow_outline_effect_enable;
#endif // NEO && GLOWS_ENABLE
//-----------------------------------------------------------------------------
// Purpose: Draws the object
// Input : flags -
Expand Down Expand Up @@ -3276,12 +3268,7 @@ int C_BaseAnimating::DrawModel( int flags )
extraFlags |= STUDIO_IGNORE_NEO_EFFECTS;
}

#ifdef GLOWS_ENABLE
auto pTargetPlayer = glow_outline_effect_enable.GetBool() ? C_NEO_Player::GetLocalNEOPlayer() : C_NEO_Player::GetVisionTargetNEOPlayer();
#else
auto pTargetPlayer = C_NEO_Player::GetVisionTargetNEOPlayer();
#endif // GLOWS_ENABLE

const bool inMotionVision = pTargetPlayer->IsInVision() && pTargetPlayer->GetClass() == NEO_CLASS_ASSAULT;
auto rootMoveParent = GetRootMoveParent();
Vector vel;
Expand All @@ -3299,7 +3286,7 @@ int C_BaseAnimating::DrawModel( int flags )
}
bool isMoving = false;
bool isHot = false;
if (inMotionVision && vel.LengthSqr() > 0.25 && !IsViewModel() && !(extraFlags & STUDIO_IGNORE_NEO_EFFECTS)) // MOVING_SPEED_MINIMUM ^2
if (inMotionVision && vel.LengthSqr() > 0.25 && !IsViewModel() && !(extraFlags & STUDIO_IGNORE_NEO_EFFECTS) && flags & STUDIO_RENDER) // MOVING_SPEED_MINIMUM ^2
{
isMoving = true;
if (!IsFollowingEntity())
Expand Down
4 changes: 0 additions & 4 deletions src/game/client/c_basecombatcharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,7 @@ void C_BaseCombatCharacter::UpdateGlowEffect( void )
{
float r, g, b;
GetGlowEffectColor( &r, &g, &b );
#ifdef NEO
m_pGlowEffect = new CGlowObject( this, Vector( r, g, b ), 1.0, true, true );
#else
m_pGlowEffect = new CGlowObject( this, Vector( r, g, b ), 1.0, true );
#endif
}
}

Expand Down
11 changes: 11 additions & 0 deletions src/game/client/c_world.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
#include "eventlist.h"
// NVNT haptic include for notification of world precache
#include "haptics/haptic_utils.h"
#if defined NEO && defined GLOWS_ENABLE
#include "c_neo_player.h"
#endif // NEO && GLOWS_ENABLE
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

Expand Down Expand Up @@ -119,6 +122,14 @@ void C_World::OnDataChanged( DataUpdateType_t updateType )
engine->SetOcclusionParameters( params );

modelinfo->SetLevelScreenFadeRange( m_flMinPropScreenSpaceWidth, m_flMaxPropScreenSpaceWidth );

#if defined NEO && defined GLOWS_ENABLE
// Likely lost connection, update glow effects of all players
C_NEO_Player* pLocalPlayer = C_NEO_Player::GetLocalNEOPlayer();
if (pLocalPlayer) {
pLocalPlayer->UpdateGlowEffects(pLocalPlayer->GetTeamNumber());
}
#endif // NEO && GLOWS_ENABLE
}
}

Expand Down
26 changes: 11 additions & 15 deletions src/game/client/clientmode_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ CLIENTEFFECT_REGISTER_BEGIN(PrecachePostProcessingEffectsGlow)
CLIENTEFFECT_MATERIAL("dev/glow_color")
CLIENTEFFECT_MATERIAL("dev/halo_add_to_screen")
CLIENTEFFECT_MATERIAL("dev/halo_add_to_screen_outline")
CLIENTEFFECT_MATERIAL("dev/halo_textured_add_to_screen")
CLIENTEFFECT_REGISTER_END_CONDITIONAL(engine->GetDXSupportLevel() >= 90)
#endif
#define ACHIEVEMENT_ANNOUNCEMENT_MIN_TIME 10
Expand Down Expand Up @@ -782,9 +783,9 @@ int ClientModeShared::KeyInput( int down, ButtonCode_t keynum, const char *pszCu
return 1;
}

#ifdef NEO
#if defined NEO && defined GLOWS_ENABLE
extern ConVar glow_outline_effect_enable;
#endif // NEO
#endif // NEO && GLOWS_ENABLE
//-----------------------------------------------------------------------------
// Purpose: See if spectator input occurred. Return 0 if the key is swallowed.
//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -835,13 +836,13 @@ int ClientModeShared::HandleSpectatorKeyInput( int down, ButtonCode_t keynum, co
#endif
return 0;
}
#ifdef GLOWS_ENABLE
#if defined NEO && defined GLOWS_ENABLE
else if (down && pszCurrentBinding && Q_strcmp(pszCurrentBinding, "+attack2") == 0)
{
glow_outline_effect_enable.SetValue(!glow_outline_effect_enable.GetBool());
return 0;
}
#endif // GLOWS_ENABLE
#endif // NEO && GLOWS_ENABLE
#ifdef NEO
else if (down && pszCurrentBinding && Q_strcmp(pszCurrentBinding, "+use") == 0)
{
Expand Down Expand Up @@ -1217,17 +1218,6 @@ void ClientModeShared::FireGameEvent( IGameEvent *event )
else if ( Q_strcmp( "player_team", eventname ) == 0 )
{
C_BasePlayer *pPlayer = USERID2PLAYER( event->GetInt("userid") );
#ifdef NEO
#ifdef GLOWS_ENABLE
if (pPlayer && glow_outline_effect_enable.GetBool())
{ // NEO JANK (Adam) bots join their final team before they are created client side, so pPlayer here will be null for them, and setting clientsideglow on them in c_neo_player::Spawn() results in an incorrect glow colour. This works for players though
float r, g, b;
NEORules()->GetTeamGlowColor(event->GetInt("team"), r, g, b);
pPlayer->SetGlowEffectColor(r, g, b);
pPlayer->SetClientSideGlowEnabled(true);
}
#endif // GLOWS_ENABLE
#endif // NEO

if ( !hudChat )
return;
Expand Down Expand Up @@ -1317,6 +1307,12 @@ void ClientModeShared::FireGameEvent( IGameEvent *event )
// that's me
pPlayer->TeamChange( team );
}
#if defined NEO && defined GLOWS_ENABLE
if (auto pNeoPlayer = static_cast<C_NEO_Player*>(pPlayer))
{
pNeoPlayer->UpdateGlowEffects(team);
}
#endif // NEO && GLOWS_ENABLE
}
#ifdef NEO
else if (Q_strcmp("player_changename", eventname) == 0 || Q_strcmp("player_changeneoname", eventname) == 0)
Expand Down
Loading