Skip to content
Draft
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
964 changes: 839 additions & 125 deletions game/neo/resource/ClientScheme.res

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions game/neo/resource/neo_ui/Neo_ClassMenu.res
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"textAlignment" "center"
"dulltext" "0"
"brighttext" "1"
"font" "Default"
"font" "CLTDefault"
"wrap" "0"
}
"Scout_Button"
Expand All @@ -153,7 +153,7 @@
"textAlignment" "center"
"dulltext" "0"
"brighttext" "0"
"font" "Default"
"font" "CLTDefault"
"wrap" "0"
"Command" "setclass 1"
"Default" "0"
Expand All @@ -175,7 +175,7 @@
"textAlignment" "center"
"dulltext" "0"
"brighttext" "1"
"font" "Default"
"font" "CLTDefault"
"wrap" "0"
}
"Assault_Button"
Expand Down Expand Up @@ -216,7 +216,7 @@
"textAlignment" "center"
"dulltext" "0"
"brighttext" "1"
"font" "Default"
"font" "CLTDefault"
"wrap" "0"
}
"Heavy_Button"
Expand Down Expand Up @@ -308,7 +308,7 @@
"textAlignment" "center"
"dulltext" "0"
"brighttext" "0"
"font" "Default"
"font" "CLTDefault"
"wrap" "0"
"Command" "playerstate_reverse"
"Default" "0"
Expand Down
2 changes: 1 addition & 1 deletion game/neo/resource/neo_ui/Neo_LoadoutMenu_Other.res
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@
"textAlignment" "center"
"dulltext" "0"
"brighttext" "0"
"font" "Default"
"font" "CLTDefault"
"wrap" "0"
"Command" "playerstate_reverse"
"Default" "0"
Expand Down
20 changes: 10 additions & 10 deletions game/neo/resource/neo_ui/Neo_TeamMenu.res
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"textAlignment" "east"
"dulltext" "0"
"brighttext" "0"
"font" "DefaultBold"
"font" "CLTDefaultBold"
"wrap" "0"
}
"neo_IconPanel4"
Expand Down Expand Up @@ -151,7 +151,7 @@
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"font" "DefaultBold"
"font" "CLTDefaultBold"
"wrap" "0"
}
"neo_jscorelabel"
Expand All @@ -171,7 +171,7 @@
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"font" "DefaultBold"
"font" "CLTDefaultBold"
"wrap" "0"
}
"neo_Divider1"
Expand Down Expand Up @@ -205,7 +205,7 @@
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"font" "DefaultBold"
"font" "CLTDefaultBold"
"wrap" "0"
}
"neo_nscorelabel"
Expand All @@ -225,7 +225,7 @@
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"font" "DefaultBold"
"font" "CLTDefaultBold"
"wrap" "0"
}
"neo_jinraibutton"
Expand All @@ -245,7 +245,7 @@
"textAlignment" "center"
"dulltext" "0"
"brighttext" "0"
"font" "DefaultBold"
"font" "CLTDefaultBold"
"wrap" "0"
"command" "jointeam 2"
"Default" "0"
Expand All @@ -267,7 +267,7 @@
"textAlignment" "center"
"dulltext" "0"
"brighttext" "0"
"font" "DefaultBold"
"font" "CLTDefaultBold"
"wrap" "0"
"command" "jointeam 3"
"Default" "0"
Expand All @@ -289,7 +289,7 @@
"textAlignment" "center"
"dulltext" "0"
"brighttext" "0"
"font" "DefaultBold"
"font" "CLTDefaultBold"
"wrap" "0"
"command" "jointeam a"
"Default" "0"
Expand All @@ -311,7 +311,7 @@
"textAlignment" "center"
"dulltext" "0"
"brighttext" "0"
"font" "DefaultBold"
"font" "CLTDefaultBold"
"wrap" "0"
"command" "jointeam 1"
"Default" "0"
Expand All @@ -333,7 +333,7 @@
"textAlignment" "center"
"dulltext" "0"
"brighttext" "0"
"font" "DefaultBold"
"font" "CLTDefaultBold"
"wrap" "0"
"command" "vguicancel"
"Default" "1"
Expand Down
13 changes: 13 additions & 0 deletions game/neo/scripts/HudLayout.res
Original file line number Diff line number Diff line change
Expand Up @@ -1013,4 +1013,17 @@
"box_color" "20 20 20 0"
"text_color" "255 255 255 255"
}

neo_spectator_overlay
{
"fieldName" "neo_spectator_overlay"
"NameFont" "NHudSpectatorOverlayName"
"InfoFont" "NHudSpectatorOverlayInfo"
"ClassFont" "NHudSpectatorOverlayClass"
"RKHPFont" "NHudSpectatorOverlayRoundKillHPFront"
"RKHPBackFont" "NHudSpectatorOverlayRoundKillHPBack"
"GhostFont" "NHudSpectatorOverlayGhost"
"SmallWeaponsFont" "NHudSpectatorOverlaySmallWeapons"
"DeadTexture" "vgui/hud/kill_kill"
}
}
4 changes: 4 additions & 0 deletions src/game/client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1667,11 +1667,13 @@ set(UNITY_SOURCE_NEO_UI
neo/ui/neo_hud_message.cpp
neo/ui/neo_hud_player_ping.cpp
neo/ui/neo_hud_round_state.cpp
neo/ui/neo_hud_spectator_overlay.cpp
neo/ui/neo_hud_startup_sequence.cpp
neo/ui/neo_hud_worldpos_marker.cpp
neo/ui/neo_hud_worldpos_marker_generic.cpp
neo/ui/neo_scoreboard.cpp
neo/ui/neo_hud_context_hint.cpp
neo/ui/neo_spec_player_by_hud.cpp
)

set_source_files_properties(
Expand All @@ -1694,6 +1696,7 @@ target_sources_grouped(
neo/ui/neo_hud_ammo.h
neo/ui/neo_hud_childelement.h
neo/ui/neo_hud_compass.h
neo/ui/neo_hud_deathnotice.h
neo/ui/neo_hud_friendly_marker.h
neo/ui/neo_hud_game_event.h
neo/ui/neo_hud_ghost_beacons.h
Expand All @@ -1706,6 +1709,7 @@ target_sources_grouped(
neo/ui/neo_hud_message.h
neo/ui/neo_hud_player_ping.h
neo/ui/neo_hud_round_state.h
neo/ui/neo_hud_spectator_overlay.h
neo/ui/neo_hud_startup_sequence.h
neo/ui/neo_hud_worldpos_marker.h
neo/ui/neo_hud_worldpos_marker_generic.h
Expand Down
2 changes: 1 addition & 1 deletion src/game/client/hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ void CHud::InitFonts()

#ifdef NEO
g_hFontKillfeed = pScheme->GetFont("NHudOCRSmallNoAdditive", true);
g_hFontKillfeedIcons = pScheme->GetFont("NHudKillFeedIcons", true);
g_hFontKillfeedIcons = pScheme->GetFont("NHudKillfeedIcons", true);

if (g_hFontKillfeed == vgui::INVALID_FONT)
{
Expand Down
2 changes: 0 additions & 2 deletions src/game/client/neo/c_neo_killer_damage_infos.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#include "shareddefs.h"
#include "neo_player_shared.h"

static constexpr const int WEP_NAME_MAXSTRLEN = 32;

struct CNEOKillerInfos
{
bool bHasDmgInfos = false;
Expand Down
55 changes: 9 additions & 46 deletions src/game/client/neo/ui/neo_hud_deathnotice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@
#include "takedamageinfo.h"
#include "c_neo_killer_damage_infos.h"
#include "neo_scoreboard.h"
#include "neo_hud_deathnotice.h"

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

static ConVar hud_deathnotice_time( "hud_deathnotice_time", "20", 0 );
extern ConVar cl_neo_hud_scoreboard_hide_others;

inline int gRoundKillerUserIDs[MAX_PLAYERS_ARRAY_SAFE];
inline int gRoundKillerUserIDsSize;

// Player entries in a death notice
struct DeathNoticePlayer
{
Expand Down Expand Up @@ -145,52 +149,6 @@ void CNEOHud_DeathNotice::UpdateStateForNeoHudElementDraw()

}

enum NeoHudDeathNoticeIcon : wchar_t
{
NEO_HUD_DEATHNOTICEICON_EXPLODE = '!',
NEO_HUD_DEATHNOTICEICON_GUN,
NEO_HUD_DEATHNOTICEICON_HEADSHOT,
NEO_HUD_DEATHNOTICEICON_KILL,
NEO_HUD_DEATHNOTICEICON_MELEE,
NEO_HUD_DEATHNOTICEICON_SHORTBUS,

NEO_HUD_DEATHNOTICEICON_RANKUP = '(',
NEO_HUD_DEATHNOTICEICON_RANKDOWN,
NEO_HUD_DEATHNOTICEICON_RANKLESS_DOG,
NEO_HUD_DEATHNOTICEICON_PVT,
NEO_HUD_DEATHNOTICEICON_CPL,
NEO_HUD_DEATHNOTICEICON_SGT,
NEO_HUD_DEATHNOTICEICON_LT,

NEO_HUD_DEATHNOTICEICON_AA12 = '0',
NEO_HUD_DEATHNOTICEICON_GHOST,
NEO_HUD_DEATHNOTICEICON_GRENADE,
NEO_HUD_DEATHNOTICEICON_JITTE,
NEO_HUD_DEATHNOTICEICON_JITTESCOPED,
NEO_HUD_DEATHNOTICEICON_KNIFE,
NEO_HUD_DEATHNOTICEICON_KYLA,
NEO_HUD_DEATHNOTICEICON_M41,
NEO_HUD_DEATHNOTICEICON_M41L,
NEO_HUD_DEATHNOTICEICON_M41S,
NEO_HUD_DEATHNOTICEICON_MILSO,
NEO_HUD_DEATHNOTICEICON_MPN,
NEO_HUD_DEATHNOTICEICON_MPN_UNSUPRESSED,
NEO_HUD_DEATHNOTICEICON_MX,
NEO_HUD_DEATHNOTICEICON_MX_SILENCED,
NEO_HUD_DEATHNOTICEICON_PBK56S,
NEO_HUD_DEATHNOTICEICON_PZ,
NEO_HUD_DEATHNOTICEICON_REMOTEDET,
NEO_HUD_DEATHNOTICEICON_SMAC,
NEO_HUD_DEATHNOTICEICON_SMOKEGRENADE,
NEO_HUD_DEATHNOTICEICON_SRM,
NEO_HUD_DEATHNOTICEICON_SRM_S,
NEO_HUD_DEATHNOTICEICON_SRS,
NEO_HUD_DEATHNOTICEICON_SUPA7,
NEO_HUD_DEATHNOTICEICON_ZR68C,
NEO_HUD_DEATHNOTICEICON_ZR68L,
NEO_HUD_DEATHNOTICEICON_ZR68S,
};

//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -798,6 +756,11 @@ void CNEOHud_DeathNotice::AddPlayerDeath(IGameEvent* event)
C_NEO_Player* pVictim = ToNEOPlayer(UTIL_PlayerByIndex(victim));
C_NEO_Player* pAssist = ToNEOPlayer(UTIL_PlayerByIndex(assist));

if (pKiller && gRoundKillerUserIDsSize < MAX_PLAYERS_ARRAY_SAFE)
{
gRoundKillerUserIDs[gRoundKillerUserIDsSize++] = pKiller->GetUserID();
}

// Special case: Spectator assisted their own bot-takeover kill
// Simplify to "Bot Name + Player Name"
if (pKiller && pAssist && killer == assist && killer > 0)
Expand Down
51 changes: 51 additions & 0 deletions src/game/client/neo/ui/neo_hud_deathnotice.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#pragma once

extern int gRoundKillerUserIDs[MAX_PLAYERS_ARRAY_SAFE];
extern int gRoundKillerUserIDsSize;

enum NeoHudDeathNoticeIcon : wchar_t
{
NEO_HUD_DEATHNOTICEICON_EXPLODE = '!',
NEO_HUD_DEATHNOTICEICON_GUN,
NEO_HUD_DEATHNOTICEICON_HEADSHOT,
NEO_HUD_DEATHNOTICEICON_KILL,
NEO_HUD_DEATHNOTICEICON_MELEE,
NEO_HUD_DEATHNOTICEICON_SHORTBUS,

NEO_HUD_DEATHNOTICEICON_RANKUP = '(',
NEO_HUD_DEATHNOTICEICON_RANKDOWN,
NEO_HUD_DEATHNOTICEICON_RANKLESS_DOG,
NEO_HUD_DEATHNOTICEICON_PVT,
NEO_HUD_DEATHNOTICEICON_CPL,
NEO_HUD_DEATHNOTICEICON_SGT,
NEO_HUD_DEATHNOTICEICON_LT,

NEO_HUD_DEATHNOTICEICON_AA13 = '0',
NEO_HUD_DEATHNOTICEICON_GHOST,
NEO_HUD_DEATHNOTICEICON_GRENADE,
NEO_HUD_DEATHNOTICEICON_JITTE,
NEO_HUD_DEATHNOTICEICON_JITTESCOPED,
NEO_HUD_DEATHNOTICEICON_KNIFE,
NEO_HUD_DEATHNOTICEICON_KYLA,
NEO_HUD_DEATHNOTICEICON_M41,
NEO_HUD_DEATHNOTICEICON_M41L,
NEO_HUD_DEATHNOTICEICON_M41S,
NEO_HUD_DEATHNOTICEICON_MILSO,
NEO_HUD_DEATHNOTICEICON_MPN,
NEO_HUD_DEATHNOTICEICON_MPN_UNSUPRESSED,
NEO_HUD_DEATHNOTICEICON_MX,
NEO_HUD_DEATHNOTICEICON_MX_SILENCED,
NEO_HUD_DEATHNOTICEICON_PBK56S,
NEO_HUD_DEATHNOTICEICON_PZ,
NEO_HUD_DEATHNOTICEICON_REMOTEDET,
NEO_HUD_DEATHNOTICEICON_SMAC,
NEO_HUD_DEATHNOTICEICON_SMOKEGRENADE,
NEO_HUD_DEATHNOTICEICON_SRM,
NEO_HUD_DEATHNOTICEICON_SRM_S,
NEO_HUD_DEATHNOTICEICON_SRS,
NEO_HUD_DEATHNOTICEICON_SUPA7,
NEO_HUD_DEATHNOTICEICON_ZR68C,
NEO_HUD_DEATHNOTICEICON_ZR68L,
NEO_HUD_DEATHNOTICEICON_ZR68S,
};

1 change: 1 addition & 0 deletions src/game/client/neo/ui/neo_hud_killer_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ void CNEOHud_KillerInfo::DrawNeoHudElement()

if (pAvatarImg)
{
pAvatarImg->m_bDeadAvatar = false;
pAvatarImg->SetPos(rect.x0 + iMargin, rect.y0 + iMargin);
pAvatarImg->SetSize(iAvatarWT, iAvatarWT);
pAvatarImg->Paint();
Expand Down
Loading