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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ src/CMakeCache.txt
src/cmake_install.cmake
src/Makefile
src/lib*
src/Build/*
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
from tick.delays import TickDelays
# Translations
from translations.strings import LangStrings
# Paths
from paths import SP_DATA_PATH


# =============================================================================
Expand Down Expand Up @@ -341,7 +343,7 @@ def _print_credits():

# Get the credits information
groups = ConfigObj(
DATA_PATH.joinpath('credits.ini'), encoding='unicode_escape')
SP_DATA_PATH.joinpath('credits.ini'), encoding='unicode_escape')

# Loop through all groups in the credits
for group in groups:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# Source.Python Imports
from core import GAME_NAME
from paths import DATA_PATH
from paths import SP_DATA_PATH
# DynCall
from dyncall.signature import Signature

Expand All @@ -18,7 +18,7 @@
# >> GLOBAL VARIABLES
# =============================================================================
# Store the game's ini file's path
_inipath = DATA_PATH.joinpath('dyncall', GAME_NAME)
_inipath = SP_DATA_PATH.joinpath('dyncall', GAME_NAME)


# =============================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

# Source.Python Imports
from core import GAME_NAME
from paths import DATA_PATH
from paths import SP_DATA_PATH
from public import public


# =============================================================================
# >> GLOBAL VARIABLES
# =============================================================================
_entity_values = ConfigObj(
DATA_PATH.joinpath('entities', GAME_NAME + '.ini'), unrepr=True)
SP_DATA_PATH.joinpath('entities', GAME_NAME + '.ini'), unrepr=True)


# =============================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# Source.Python Imports
from core import GAME_NAME
from paths import DATA_PATH
from paths import SP_DATA_PATH
# DynCall
from dyncall.dictionary import SignatureDictionary

Expand All @@ -25,7 +25,7 @@
# >> GLOBAL VARIABLES
# =============================================================================
# Store the base "functions" path
_basepath = DATA_PATH.joinpath('functions')
_basepath = SP_DATA_PATH.joinpath('functions')


# =============================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# Source.Python Imports
from core import GAME_NAME
from paths import DATA_PATH
from paths import SP_DATA_PATH


# =============================================================================
Expand All @@ -23,7 +23,7 @@
# >> GLOBAL VARIABLES
# =============================================================================
# Store the base "keyvalues" path
_basepath = DATA_PATH.joinpath('keyvalues')
_basepath = SP_DATA_PATH.joinpath('keyvalues')


# =============================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# Source.Python Imports
from core import GAME_NAME
from paths import DATA_PATH
from paths import SP_DATA_PATH


# =============================================================================
Expand All @@ -27,7 +27,7 @@
# >> GLOBAL VARIABLES
# =============================================================================
# Store the base "offsets" path
_basepath = DATA_PATH.joinpath('offsets')
_basepath = SP_DATA_PATH.joinpath('offsets')


# =============================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# Source.Python Imports
from core import GAME_NAME
from paths import DATA_PATH
from paths import SP_DATA_PATH


# =============================================================================
Expand All @@ -23,7 +23,7 @@
# >> GLOBAL VARIABLES
# =============================================================================
# Store the base "properties" path
_basepath = DATA_PATH.joinpath('properties')
_basepath = SP_DATA_PATH.joinpath('properties')


# =============================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from player_c import CPlayerGenerator
from core import GameEngine
from core import GAME_NAME
from paths import DATA_PATH
from paths import SP_DATA_PATH
from public import public
# Filters
from filters.iterator import _IterObject
Expand All @@ -33,7 +33,7 @@
# =============================================================================
# Get the team's file for the current game
_game_teams = ConfigObj(
DATA_PATH.joinpath('players', 'teams', GAME_NAME + '.ini'), unrepr=True)
SP_DATA_PATH.joinpath('players', 'teams', GAME_NAME + '.ini'), unrepr=True)


# =============================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Source.Python Imports
from core import GAME_NAME
from loggers import _SPLogger
from paths import DATA_PATH
from paths import SP_DATA_PATH
# Messages
from messages.base import _UserMessages

Expand All @@ -22,8 +22,8 @@
# >> INITIALIZATION
# ============================================================================
# Loop trough all message classes
for message_name, message_class in _UserMessages(DATA_PATH.joinpath(
'messages', 'usermessages.ini'), DATA_PATH.joinpath('messages',
for message_name, message_class in _UserMessages(SP_DATA_PATH.joinpath(
'messages', 'usermessages.ini'), SP_DATA_PATH.joinpath('messages',
'games', GAME_NAME + '.ini')).items():

# Globalize the current message class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Source.Python Imports
from core import GAME_NAME
from cvars import ServerVar
from paths import DATA_PATH
from paths import SP_DATA_PATH
from public import public
# Weapons
from weapons.default import NoWeaponManager
Expand All @@ -20,7 +20,7 @@
# >> GLOBAL VARIABLES
# =============================================================================
# Get the game's ini path
_gamepath = DATA_PATH.joinpath('weapons', GAME_NAME + '.ini')
_gamepath = SP_DATA_PATH.joinpath('weapons', GAME_NAME + '.ini')


# =============================================================================
Expand Down
6 changes: 6 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,12 @@ Add_Library(source-python SHARED
${SOURCEPYTHON_LOADER_FILES}
)

# ------------------------------------------------------------------
# Remove prefixes for core and source-python
# ------------------------------------------------------------------
Set_Target_Properties(core PROPERTIES PREFIX "")
Set_Target_Properties(source-python PROPERTIES PREFIX "")

# ------------------------------------------------------------------
# Include the base makefile.
# ------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion src/configure-csgo-debug.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
cmake -DGAME=csgo -DCMAKE_BUILD_TYPE=Debug
mkdir Build
cd Build
cmake .. -DGAME=csgo -DCMAKE_BUILD_TYPE=Debug
4 changes: 3 additions & 1 deletion src/configure-csgo-release.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
cmake -DGAME=csgo
mkdir Build
cd Build
cmake .. -DGAME=csgo
4 changes: 3 additions & 1 deletion src/configure-csgo.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
cmake -G"Visual Studio 10" -DGAME=csgo
mkdir Build
cd Build
cmake .. -G"Visual Studio 10" -DGAME=csgo
pause
4 changes: 3 additions & 1 deletion src/configure-ob-debug.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
cmake -DGAME=ob-valve -DCMAKE_BUILD_TYPE=Debug
mkdir Build
cd Build
cmake .. -DGAME=ob-valve -DCMAKE_BUILD_TYPE=Debug
4 changes: 3 additions & 1 deletion src/configure-ob-release.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
cmake -DGAME=ob-valve
mkdir Build
cd Build
cmake .. -DGAME=ob-valve
5 changes: 3 additions & 2 deletions src/configure-ob.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
cmake -G"Visual Studio 10" -DGAME=ob-valve

mkdir Build
cd Build
cmake .. -G"Visual Studio 10" -DGAME=ob-valve
pause
5 changes: 5 additions & 0 deletions src/core/core/sp_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
#include "edict.h"
#include "convar.h"

#include "DynamicHooks.h"
extern DynamicHooks::CHookManager* g_pHookMngr;

//---------------------------------------------------------------------------------
// Disable warnings.
//---------------------------------------------------------------------------------
Expand Down Expand Up @@ -241,6 +244,8 @@ void CSourcePython::Unload( void )
DisconnectTier2Libraries( );
DisconnectTier1Libraries( );
#endif

g_pHookMngr->UnhookAllFunctions();
}

//---------------------------------------------------------------------------------
Expand Down
Loading