Skip to content
Open
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,12 @@ shaders\fxc\sdk_screenspaceeffect_vs20.vcs
10.41
```
## Unity build
By default, this project uses Unity Build to speed up compilation times. However, if you need to disable it for development
reasons, set the CMake options `NEO_UNITY_BUILD_CLIENT_SERVER` or `NEO_UNITY_BUILD_OTHERS` to `OFF`. This will disable
Unity Build for client/server libraries and vgui2/tier1/mathlib libraries, respectively.
## Credits
* [NeotokyoRevamp/neo](https://github.com/NeotokyoRevamp/neo) - Original fork source
* [ValveSoftware/source-sdk-2013](https://github.com/ValveSoftware/source-sdk-2013) - Source SDK 2013 (2025 TF2 SDK Update)
Expand Down
14 changes: 14 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ option(NEO_ENABLE_CPACK "Enable CPack" OFF)
option(NEO_USE_MEM_DEBUG "Enable USE_MEM_DEBUG defines" OFF)
option(NEO_GENERATE_GAMEDATA "Generate SourceMod gamedata" ${NEO_DEDICATED})
option(NEO_BUILD_LAUNCHER "Build the Steam mod launcher" ON)
option(NEO_UNITY_BUILD_CLIENT_SERVER "Enable unity build for client/server libraries" ON)
option(NEO_UNITY_BUILD_OTHERS "Enable unity build for vgui2, tier1, and mathlib libraries" ON)
set(NEO_MOD_APPID "3172910" CACHE STRING "Steam appid for the mod launcher's steam_appid.txt")

message(STATUS "Treat compile warnings as errors: ${CMAKE_COMPILE_WARNING_AS_ERROR}")
Expand Down Expand Up @@ -80,8 +82,20 @@ message(STATUS "Use separate build info on Linux: ${NEO_USE_SEPARATE_BUILD_INFO}
message(STATUS "Enable CPack: ${NEO_ENABLE_CPACK}")
message(STATUS "Build the Steam mod launcher: ${NEO_BUILD_LAUNCHER}")
message(STATUS "Mod launcher appid override: ${NEO_MOD_APPID}")
message(STATUS "Enable unity build for client/server libraries (NEO_UNITY_BUILD_CLIENT_SERVER): ${NEO_UNITY_BUILD_CLIENT_SERVER}")
message(STATUS "Enable unity build for vgui2, tier1, and mathlib libraries (NEO_UNITY_BUILD_OTHERS): ${NEO_UNITY_BUILD_OTHERS}")
message("")

set(UNITY_BUILD_DEF_OTHERS)
if (NEO_UNITY_BUILD_OTHERS)
set(UNITY_BUILD_DEF_OTHERS NEO_UNITY)
endif ()

set(UNITY_BUILD_DEF_CLIENT_SERVER)
if (NEO_UNITY_BUILD_CLIENT_SERVER)
set(UNITY_BUILD_DEF_CLIENT_SERVER NEO_UNITY)
endif ()

if(NEO_COPY_LIBRARIES)
file(MAKE_DIRECTORY "${NEO_OUTPUT_LIBRARY_PATH}")
endif()
Expand Down
3 changes: 2 additions & 1 deletion src/game/client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ add_library(client SHARED)

set_target_properties(client PROPERTIES
PREFIX ""
UNITY_BUILD ON
UNITY_BUILD ${NEO_UNITY_BUILD_CLIENT_SERVER}
UNITY_BUILD_MODE GROUP
)

Expand Down Expand Up @@ -49,6 +49,7 @@ target_compile_definitions(client
VECTOR
VERSION_SAFE_STEAM_API_INTERFACES
NEXT_BOT
${UNITY_BUILD_DEF_CLIENT_SERVER}
)

target_link_libraries(client
Expand Down
2 changes: 2 additions & 0 deletions src/game/client/neo/c_neo_killer_damage_infos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#include <cbase.h>
#include "strtools.h"
#include "vgui/ILocalize.h"
#include "tier3/tier3.h"

#include "c_neo_player.h"
#include "neo_gamerules.h"
Expand Down
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 @@ -7,6 +7,7 @@
#include "c_neo_player.h"
#include "neo_gamerules.h"
#include "vgui/ILocalize.h"
#include "ui/neo_theme.h"
#include "inputsystem/iinputsystem.h"
#include "IGameUIFuncs.h"
#include "igamesystem.h"
Expand Down
2 changes: 1 addition & 1 deletion src/game/client/viewpostprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ ConVar mat_tonemap_algorithm( "mat_tonemap_algorithm", "1", FCVAR_CHEAT, "0 = Or
ConVar mat_tonemap_percent_target( "mat_tonemap_percent_target", "60.0", FCVAR_CHEAT );
ConVar mat_tonemap_percent_bright_pixels( "mat_tonemap_percent_bright_pixels", "2.0", FCVAR_CHEAT );
ConVar mat_tonemap_min_avglum( "mat_tonemap_min_avglum", "3.0", FCVAR_CHEAT );
#ifdef NEO // Unity build
#ifdef NEO_UNITY // Unity build

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment still needed?

extern ConVar mat_fullbright;
#else
ConVar mat_fullbright( "mat_fullbright", "0", FCVAR_CHEAT );
Expand Down
3 changes: 2 additions & 1 deletion src/game/server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ add_library(server SHARED)

set_target_properties(server PROPERTIES
PREFIX ""
UNITY_BUILD ON
UNITY_BUILD ${NEO_UNITY_BUILD_CLIENT_SERVER}
UNITY_BUILD_MODE GROUP
)

Expand Down Expand Up @@ -65,6 +65,7 @@ target_compile_definitions(server
sprintf=use_Q_snprintf_instead_of_sprintf
strncpy=use_Q_strncpy_instead
NEXT_BOT
${UNITY_BUILD_DEF_CLIENT_SERVER}
)

target_link_libraries(server
Expand Down
1 change: 1 addition & 0 deletions src/game/server/NextBot/Player/NextBotPlayerLocomotion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "NextBotUtil.h"
#include "NextBotPlayer.h"
#include "NextBotPlayerLocomotion.h"
#include "bot/neo_bot.h"

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "bot/neo_bot.h"
#include "bot/behavior/neo_bot_command_follow.h"
#include "bot/behavior/neo_bot_throw_weapon_at_player.h"
#include "bot/behavior/neo_bot_attack.h"
#include "nav_mesh.h"

// memdbgon must be the last include file in a .cpp file!!!
Expand Down
1 change: 1 addition & 0 deletions src/game/server/neo/bot/behavior/neo_bot_ctg_enemy.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define NEO_BOT_CTG_ENEMY_H

#include "bot/neo_bot.h"
#include "Path/NextBotChasePath.h"

//--------------------------------------------------------------------------------------------------------
class CNEOBotCtgEnemy : public Action< CNEOBot >
Expand Down
5 changes: 3 additions & 2 deletions src/mathlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ add_library(mathlib::mathlib ALIAS mathlib)

set_target_properties(mathlib PROPERTIES
PREFIX ""
UNITY_BUILD ON
UNITY_BUILD ${NEO_UNITY_BUILD_OTHERS}
UNITY_BUILD_MODE GROUP
)

Expand All @@ -18,7 +18,8 @@ target_include_directories(mathlib

target_compile_definitions(mathlib
PRIVATE
MATHLIB_LIB
MATHLIB_LIB
${UNITY_BUILD_DEF_OTHERS}
)

target_link_libraries(mathlib
Expand Down
8 changes: 6 additions & 2 deletions src/tier1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ add_library(tier1 STATIC)

add_library(tier1::tier1 ALIAS tier1)

target_compile_definitions(tier1 PRIVATE TIER1_STATIC_LIB)
target_compile_definitions(tier1
PRIVATE
TIER1_STATIC_LIB
${UNITY_BUILD_DEF_OTHERS}
)

set(unity_before [[
#include "tier0/memdbgoff.h"
]])

set_target_properties(tier1 PROPERTIES
UNITY_BUILD ON
UNITY_BUILD ${NEO_UNITY_BUILD_OTHERS}
UNITY_BUILD_MODE GROUP
UNITY_BUILD_CODE_BEFORE_INCLUDE "${unity_before}"
)
Expand Down
7 changes: 6 additions & 1 deletion src/vgui2/vgui_controls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ add_library(vgui_controls::vgui_controls ALIAS vgui_controls)

set_target_properties(vgui_controls PROPERTIES
PREFIX ""
UNITY_BUILD ON
UNITY_BUILD ${NEO_UNITY_BUILD_OTHERS}
UNITY_BUILD_MODE GROUP
)

target_compile_definitions(vgui_controls
PRIVATE
${UNITY_BUILD_DEF_OTHERS}
)

target_include_directories(vgui_controls
PRIVATE
${CMAKE_SOURCE_DIR}/common
Expand Down
10 changes: 5 additions & 5 deletions src/vgui2/vgui_controls/FileOpenDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#include <vgui_controls/ImageList.h>
#include <vgui_controls/MenuItem.h>
#include <vgui_controls/Tooltip.h>
#ifdef NEO // Unity build
#ifdef NEO_UNITY // Unity build
#include "Common.h"
#endif

Expand All @@ -63,7 +63,7 @@ using namespace vgui;

static int s_nLastSortColumn = 0;

#ifndef NEO // Unity build
#ifndef NEO_UNITY // Unity build
static int ListFileNameSortFunc([[maybe_unused]] ListPanel *pPanel, const ListPanelItem &item1, const ListPanelItem &item2 )
{
bool dir1 = item1.kv->GetInt("directory") == 1;
Expand Down Expand Up @@ -180,7 +180,7 @@ static int ListBaseInteger64SortFunc(ListPanel *pPanel, const ListPanelItem &ite
return ( i1 < i2 ) ? -1 : 1;
}

#ifndef NEO // Unity build
#ifndef NEO_UNITY // Unity build
static int ListFileSizeSortFunc(ListPanel *pPanel, const ListPanelItem &item1, const ListPanelItem &item2 )
{
return ListBaseIntegerSortFunc( pPanel, item1, item2, "filesizeint" );
Expand All @@ -197,7 +197,7 @@ static int ListFileCreatedSortFunc(ListPanel *pPanel, const ListPanelItem &item1
// NOTE: Backward order to get most recent files first
return ListBaseInteger64SortFunc( pPanel, item2, item1, "createdint_low", "createdint_high" );
}
#ifndef NEO // Unity build
#ifndef NEO_UNITY // Unity build
static int ListFileAttributesSortFunc(ListPanel *pPanel, const ListPanelItem &item1, const ListPanelItem &item2 )
{
return ListBaseStringSortFunc( pPanel, item1, item2, "attributes" );
Expand Down Expand Up @@ -469,7 +469,7 @@ void FileCompletionEdit::OnMenuItemHighlight( int itemID )
//-----------------------------------------------------------------------------
static CUtlDict< CUtlString, unsigned short > s_StartDirContexts;

#ifndef NEO // Unity build
#ifndef NEO_UNITY // Unity build
struct ColumnInfo_t
{
char const *columnName;
Expand Down
4 changes: 2 additions & 2 deletions src/vgui2/vgui_controls/KeyBindingHelpDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "vgui/Cursor.h"
#include "tier1/utldict.h"
#include "vgui_controls/KeyBoardEditorDialog.h"
#ifdef NEO // Unity build
#ifdef NEO_UNITY // Unity build
#include "Common.h"
#endif

Expand All @@ -28,7 +28,7 @@ using namespace vgui;
// If the user holds the key bound to help down for this long, then the dialog will stay on automatically
#define KB_HELP_CONTINUE_SHOWING_TIME 1.0

#ifndef NEO // Unity build
#ifndef NEO_UNITY // Unity build
static bool BindingLessFunc( KeyValues * const & lhs, KeyValues * const &rhs )
{
KeyValues *p1, *p2;
Expand Down
6 changes: 3 additions & 3 deletions src/vgui2/vgui_controls/KeyBoardEditorDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "KeyValues.h"
#include "vgui/Cursor.h"
#include "tier1/utldict.h"
#ifdef NEO // Unity build
#ifdef NEO_UNITY // Unity build
#include "Common.h"
#endif

Expand All @@ -25,7 +25,7 @@

using namespace vgui;

#ifndef NEO // Unity build
#ifndef NEO_UNITY // Unity build
static char *CopyString( const char *in )
{
if ( !in )
Expand Down Expand Up @@ -554,7 +554,7 @@ void CKeyBoardEditorPage::GetMappingList( Panel *panel, CUtlVector< PanelKeyBind
}
}

#ifndef NEO // Unity build
#ifndef NEO_UNITY // Unity build
static bool BindingLessFunc( KeyValues * const & lhs, KeyValues * const &rhs )
{
KeyValues *p1, *p2;
Expand Down
4 changes: 2 additions & 2 deletions src/vgui2/vgui_controls/ListPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
#include <vgui_controls/TextImage.h>
#include <vgui_controls/Menu.h>
#include <vgui_controls/Tooltip.h>
#ifdef NEO // Unity build
#ifdef NEO_UNITY // Unity build
#include "Common.h"
#endif

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

using namespace vgui;
#ifndef NEO // Unity build
#ifndef NEO_UNITY // Unity build
enum
{
WINDOW_BORDER_WIDTH=2 // the width of the window's border
Expand Down
4 changes: 2 additions & 2 deletions src/vgui2/vgui_controls/ListViewPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
#include <vgui_controls/Label.h>
#include <vgui_controls/TextImage.h>
#include <vgui_controls/ListViewPanel.h>
#ifdef NEO // Unity build
#ifdef NEO_UNITY // Unity build
#include "Common.h"
#endif

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

using namespace vgui;
#ifndef NEO // Unity build
#ifndef NEO_UNITY // Unity build
enum
{
WINDOW_BORDER_WIDTH=2 // the width of the window's border
Expand Down
4 changes: 2 additions & 2 deletions src/vgui2/vgui_controls/Panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

#include "tier0/vprof.h"

#ifdef NEO // Unity build
#ifdef NEO_UNITY // Unity build
#include "Common.h"
#endif

Expand Down Expand Up @@ -72,7 +72,7 @@ COMPILE_TIME_ASSERT( Panel::PIN_LAST == ARRAYSIZE( g_PinCornerStrings ) );

extern int GetBuildModeDialogCount();

#ifndef NEO // Unity build
#ifndef NEO_UNITY // Unity build
static char *CopyString( const char *in )
{
if ( !in )
Expand Down
6 changes: 3 additions & 3 deletions src/vgui2/vgui_controls/PerforceFileList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "filesystem.h"
#include "p4lib/ip4.h"
#include "tier2/tier2.h"
#ifdef NEO // Unity build
#ifdef NEO_UNITY // Unity build
#include "Common.h"
#endif

Expand All @@ -25,7 +25,7 @@
using namespace vgui;


#ifndef NEO // Unity build
#ifndef NEO_UNITY // Unity build
static int ListFileNameSortFunc([[maybe_unused]] ListPanel *pPanel, const ListPanelItem &item1, const ListPanelItem &item2 )
{
bool dir1 = item1.kv->GetInt("directory") == 1;
Expand Down Expand Up @@ -133,7 +133,7 @@ static int ListFileTypeSortFunc(ListPanel *pPanel, const ListPanelItem &item1, c
//-----------------------------------------------------------------------------
// Dictionary of start dir contexts
//-----------------------------------------------------------------------------
#ifndef NEO // Unity build
#ifndef NEO_UNITY // Unity build
struct ColumnInfo_t
{
char const *columnName;
Expand Down
2 changes: 1 addition & 1 deletion src/vgui2/vgui_controls/PropertyDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ PropertyDialog::~PropertyDialog()
// Purpose: Returns a pointer to the PropertySheet this dialog encapsulates
// Output : PropertySheet *
//-----------------------------------------------------------------------------
#ifdef NEO // Unity build
#ifdef NEO_UNITY // Unity build
vgui::PropertySheet *PropertyDialog::GetPropertySheet()
#else
PropertySheet *PropertyDialog::GetPropertySheet()
Expand Down
2 changes: 1 addition & 1 deletion src/vgui2/vgui_controls/ToolWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ bool ToolWindow::IsDraggableTabContainer() const
// Purpose: Returns a pointer to the PropertySheet this dialog encapsulates
// Output : PropertySheet *
//-----------------------------------------------------------------------------
#ifdef NEO // Unity build
#ifdef NEO_UNITY // Unity build
vgui::PropertySheet *ToolWindow::GetPropertySheet()
#else
PropertySheet *ToolWindow::GetPropertySheet()
Expand Down
4 changes: 2 additions & 2 deletions src/vgui2/vgui_controls/TreeView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <vgui_controls/TextImage.h>
#include <vgui_controls/ImageList.h>
#include <vgui_controls/ImagePanel.h>
#ifdef NEO // Unity build
#ifdef NEO_UNITY // Unity build
#include "Common.h"
#endif

Expand All @@ -42,7 +42,7 @@
#endif

using namespace vgui;
#ifndef NEO // Unity build
#ifndef NEO_UNITY // Unity build
enum
{
WINDOW_BORDER_WIDTH=2 // the width of the window's border
Expand Down