From 32df585edc1dacd46ec7b5a6a518a55ab7b3e901 Mon Sep 17 00:00:00 2001 From: s1lent Date: Fri, 20 Oct 2017 00:12:02 +0700 Subject: [PATCH] Remove hookers stuff Refactoring & cleanup code --- dep/cppunitlite/msvc/cppunitlite.vcxproj | 120 - msvc/ReGameDLL.sln | 24 +- publish.gradle | 14 +- regamedll/build.gradle | 60 +- regamedll/common/mathlib.h | 16 - regamedll/common/winsani_in.h | 7 - regamedll/common/winsani_out.h | 4 - .../API/CAPI_Impl.cpp} | 38 +- .../API/CAPI_Impl.h} | 109 +- regamedll/dlls/API/CSEntity.cpp | 39 + .../API/CSPlayer.cpp} | 249 +- regamedll/dlls/API/CSPlayerItem.cpp | 46 + regamedll/dlls/airtank.cpp | 7 - regamedll/dlls/airtank.h | 2 +- regamedll/dlls/animating.cpp | 7 - regamedll/dlls/animation.cpp | 15 +- regamedll/dlls/basemonster.cpp | 2 +- regamedll/dlls/bmodels.cpp | 49 +- regamedll/dlls/bmodels.h | 4 +- regamedll/dlls/bot/cs_bot.cpp | 38 +- regamedll/dlls/bot/cs_bot.h | 6 - regamedll/dlls/bot/cs_bot_chatter.cpp | 85 +- regamedll/dlls/bot/cs_bot_chatter.h | 14 +- regamedll/dlls/bot/cs_bot_event.cpp | 28 + regamedll/dlls/bot/cs_bot_init.cpp | 95 +- regamedll/dlls/bot/cs_bot_init.h | 64 + regamedll/dlls/bot/cs_bot_learn.cpp | 28 + regamedll/dlls/bot/cs_bot_listen.cpp | 28 + regamedll/dlls/bot/cs_bot_manager.cpp | 190 +- regamedll/dlls/bot/cs_bot_manager.h | 34 +- regamedll/dlls/bot/cs_bot_nav.cpp | 36 +- regamedll/dlls/bot/cs_bot_pathfind.cpp | 102 +- regamedll/dlls/bot/cs_bot_radio.cpp | 30 +- regamedll/dlls/bot/cs_bot_statemachine.cpp | 28 + regamedll/dlls/bot/cs_bot_update.cpp | 28 + regamedll/dlls/bot/cs_bot_vision.cpp | 32 +- regamedll/dlls/bot/cs_bot_weapon.cpp | 48 +- regamedll/dlls/bot/cs_gamestate.cpp | 32 +- regamedll/dlls/bot/states/cs_bot_attack.cpp | 28 + regamedll/dlls/bot/states/cs_bot_buy.cpp | 65 +- .../dlls/bot/states/cs_bot_defuse_bomb.cpp | 28 + .../bot/states/cs_bot_escape_from_bomb.cpp | 28 + .../dlls/bot/states/cs_bot_fetch_bomb.cpp | 28 + regamedll/dlls/bot/states/cs_bot_follow.cpp | 30 +- regamedll/dlls/bot/states/cs_bot_hide.cpp | 28 + regamedll/dlls/bot/states/cs_bot_hunt.cpp | 28 + regamedll/dlls/bot/states/cs_bot_idle.cpp | 28 + .../bot/states/cs_bot_investigate_noise.cpp | 28 + regamedll/dlls/bot/states/cs_bot_move_to.cpp | 28 + .../dlls/bot/states/cs_bot_plant_bomb.cpp | 28 + .../dlls/bot/states/cs_bot_use_entity.cpp | 28 + regamedll/dlls/buttons.cpp | 82 +- regamedll/dlls/buttons.h | 10 +- regamedll/dlls/career_tasks.cpp | 75 +- regamedll/dlls/career_tasks.h | 22 +- regamedll/dlls/cbase.cpp | 79 +- regamedll/dlls/cbase.h | 26 +- regamedll/dlls/client.cpp | 324 +- regamedll/dlls/client.h | 1 + regamedll/dlls/debug.cpp | 9 +- regamedll/dlls/doors.cpp | 17 +- regamedll/dlls/doors.h | 4 +- regamedll/dlls/effects.cpp | 126 +- regamedll/dlls/effects.h | 20 +- regamedll/dlls/ehandle.h | 2 +- regamedll/dlls/explode.cpp | 19 +- regamedll/dlls/explode.h | 2 +- regamedll/dlls/extdll.h | 7 +- regamedll/dlls/func_break.cpp | 205 +- regamedll/dlls/func_break.h | 18 +- regamedll/dlls/func_tank.cpp | 73 +- regamedll/dlls/func_tank.h | 7 +- regamedll/dlls/game.cpp | 231 +- regamedll/dlls/game.h | 5 +- regamedll/dlls/gamerules.cpp | 9 - regamedll/dlls/gamerules.h | 20 +- regamedll/dlls/ggrenade.cpp | 7 - regamedll/dlls/globals.cpp | 7 - regamedll/dlls/h_battery.cpp | 7 - regamedll/dlls/h_battery.h | 2 +- regamedll/dlls/h_cycler.cpp | 53 +- regamedll/dlls/h_cycler.h | 10 +- regamedll/dlls/h_export.cpp | 29 +- regamedll/dlls/healthkit.cpp | 29 +- regamedll/dlls/healthkit.h | 2 +- regamedll/dlls/hostage/hostage.cpp | 268 +- regamedll/dlls/hostage/hostage.h | 53 +- regamedll/dlls/hostage/hostage_improv.cpp | 28 + regamedll/dlls/hostage/hostage_localnav.cpp | 310 +- regamedll/dlls/hostage/hostage_localnav.h | 68 +- .../dlls/hostage/states/hostage_animate.cpp | 28 + .../dlls/hostage/states/hostage_escape.cpp | 28 + .../dlls/hostage/states/hostage_follow.cpp | 28 + .../dlls/hostage/states/hostage_idle.cpp | 28 + .../dlls/hostage/states/hostage_retreat.cpp | 28 + regamedll/dlls/items.cpp | 4 +- regamedll/dlls/lights.cpp | 7 - regamedll/dlls/lights.h | 2 +- regamedll/dlls/maprules.cpp | 37 +- regamedll/dlls/maprules.h | 6 +- regamedll/dlls/mortar.cpp | 7 - regamedll/dlls/mortar.h | 2 +- regamedll/dlls/multiplay_gamerules.cpp | 28 +- regamedll/dlls/pathcorner.cpp | 39 +- regamedll/dlls/pathcorner.h | 2 +- regamedll/dlls/plats.cpp | 104 +- regamedll/dlls/plats.h | 12 +- regamedll/dlls/player.cpp | 381 +- regamedll/dlls/player.h | 21 +- regamedll/dlls/revert_saved.cpp | 95 + regamedll/dlls/revert_saved.h | 2 +- regamedll/dlls/saverestore.cpp | 1085 +++ regamedll/dlls/saverestore.h | 73 +- regamedll/dlls/sound.cpp | 90 +- regamedll/dlls/sound.h | 6 +- regamedll/dlls/soundent.cpp | 49 +- regamedll/dlls/soundent.h | 2 +- regamedll/dlls/subs.cpp | 74 +- regamedll/dlls/training_gamerules.cpp | 149 +- regamedll/dlls/training_gamerules.h | 4 +- regamedll/dlls/trains.h | 8 +- regamedll/dlls/triggers.cpp | 133 +- regamedll/dlls/triggers.h | 14 +- regamedll/dlls/tutor.cpp | 31 +- regamedll/dlls/tutor.h | 2 +- regamedll/dlls/tutor_base_states.cpp | 24 + regamedll/dlls/tutor_base_states.h | 1 + regamedll/dlls/tutor_cs_states.cpp | 35 +- regamedll/dlls/tutor_cs_tutor.cpp | 11 +- regamedll/dlls/tutor_cs_tutor.h | 4 +- regamedll/dlls/util.cpp | 871 +-- regamedll/dlls/vehicle.cpp | 7 - regamedll/dlls/weapons.cpp | 355 +- regamedll/dlls/weapons.h | 55 +- regamedll/dlls/weapontype.cpp | 9 - regamedll/dlls/world.cpp | 210 +- regamedll/dlls/world.h | 4 - regamedll/dlls/wpn_shared/wpn_ak47.cpp | 1 + regamedll/dlls/wpn_shared/wpn_aug.cpp | 1 + regamedll/dlls/wpn_shared/wpn_awp.cpp | 1 + regamedll/dlls/wpn_shared/wpn_c4.cpp | 1 + regamedll/dlls/wpn_shared/wpn_deagle.cpp | 1 + regamedll/dlls/wpn_shared/wpn_elite.cpp | 1 + regamedll/dlls/wpn_shared/wpn_famas.cpp | 1 + regamedll/dlls/wpn_shared/wpn_fiveseven.cpp | 1 + regamedll/dlls/wpn_shared/wpn_flashbang.cpp | 1 + regamedll/dlls/wpn_shared/wpn_g3sg1.cpp | 1 + regamedll/dlls/wpn_shared/wpn_galil.cpp | 1 + regamedll/dlls/wpn_shared/wpn_glock18.cpp | 1 + regamedll/dlls/wpn_shared/wpn_hegrenade.cpp | 1 + regamedll/dlls/wpn_shared/wpn_knife.cpp | 1 + regamedll/dlls/wpn_shared/wpn_m249.cpp | 1 + regamedll/dlls/wpn_shared/wpn_m3.cpp | 1 + regamedll/dlls/wpn_shared/wpn_m4a1.cpp | 1 + regamedll/dlls/wpn_shared/wpn_mac10.cpp | 1 + regamedll/dlls/wpn_shared/wpn_mp5navy.cpp | 1 + regamedll/dlls/wpn_shared/wpn_p228.cpp | 1 + regamedll/dlls/wpn_shared/wpn_p90.cpp | 1 + regamedll/dlls/wpn_shared/wpn_scout.cpp | 1 + regamedll/dlls/wpn_shared/wpn_sg550.cpp | 1 + regamedll/dlls/wpn_shared/wpn_sg552.cpp | 1 + .../dlls/wpn_shared/wpn_smokegrenade.cpp | 1 + regamedll/dlls/wpn_shared/wpn_tmp.cpp | 1 + regamedll/dlls/wpn_shared/wpn_ump45.cpp | 1 + regamedll/dlls/wpn_shared/wpn_usp.cpp | 1 + regamedll/dlls/wpn_shared/wpn_xm1014.cpp | 1 + .../GameDefinitionFile/regamedll-cs.fgd | 12 +- regamedll/game_shared/GameEvent.h | 2 +- regamedll/game_shared/bitvec.h | 2 +- regamedll/game_shared/bot/bot.cpp | 37 +- regamedll/game_shared/bot/bot.h | 9 +- regamedll/game_shared/bot/bot_manager.cpp | 10 +- regamedll/game_shared/bot/bot_manager.h | 2 +- regamedll/game_shared/bot/bot_profile.cpp | 11 +- regamedll/game_shared/bot/bot_profile.h | 30 +- regamedll/game_shared/bot/bot_util.cpp | 60 +- regamedll/game_shared/bot/bot_util.h | 79 +- regamedll/game_shared/bot/nav.h | 2 +- regamedll/game_shared/bot/nav_area.cpp | 68 +- regamedll/game_shared/bot/nav_area.h | 59 +- regamedll/game_shared/bot/nav_file.cpp | 6 +- regamedll/game_shared/bot/nav_node.cpp | 24 +- regamedll/game_shared/bot/nav_node.h | 12 +- regamedll/game_shared/shared_util.cpp | 15 +- regamedll/game_shared/simple_checksum.h | 6 - regamedll/game_shared/voice_gamemgr.cpp | 33 +- regamedll/hookers/helper.h | 174 - regamedll/hookers/hooker.cpp | 273 - regamedll/hookers/hooker.h | 31 - regamedll/hookers/hooker_impl.cpp | 661 -- regamedll/hookers/hooker_impl.h | 949 --- regamedll/hookers/hooklist.cpp | 6184 ----------------- regamedll/hookers/hooklist.h | 26 - regamedll/hookers/main.cpp | 159 - regamedll/hookers/memory.cpp | 924 --- regamedll/hookers/memory.h | 159 - regamedll/hookers/stl/iosfwd | 311 - regamedll/hookers/stl/iterator | 255 - regamedll/hookers/stl/list | 445 -- regamedll/hookers/stl/memory | 166 - regamedll/hookers/stl/use_ansi.h | 25 - regamedll/hookers/stl/utility | 342 - regamedll/hookers/stl/vector | 595 -- regamedll/hookers/stl/xmemory | 85 - regamedll/hookers/stl/xstddef | 52 - regamedll/hookers/stl/xutility | 103 - regamedll/msvc/PostBuild.bat | 14 +- regamedll/msvc/PostBuild_mp.bat | 45 - regamedll/msvc/ReGameDLL.vcxproj | 1078 +-- regamedll/msvc/ReGameDLL.vcxproj.filters | 123 +- regamedll/msvc/Новая папка/ReGameDLL.vcxproj | 1672 +++++ regamedll/pm_shared/pm_debug.cpp | 2 +- regamedll/pm_shared/pm_debug.h | 6 - regamedll/pm_shared/pm_info.h | 8 +- regamedll/pm_shared/pm_materials.h | 37 +- regamedll/pm_shared/pm_math.cpp | 9 +- regamedll/pm_shared/pm_math.h | 14 +- regamedll/pm_shared/pm_movevars.h | 14 +- regamedll/pm_shared/pm_shared.cpp | 98 +- regamedll/pm_shared/pm_shared.h | 76 +- regamedll/public/MemPool.cpp | 8 +- regamedll/public/interface.cpp | 2 +- regamedll/public/regamedll/API/CSEntity.h | 65 + .../CSInterfaces.h} | 80 +- regamedll/public/regamedll/API/CSPlayer.h | 94 + .../regamedll/API/CSPlayerItem.h} | 110 +- regamedll/public/regamedll/regamedll_api.h | 13 +- regamedll/regamedll/classes_dummy.cpp | 4 +- regamedll/regamedll/dlls.h | 18 +- regamedll/regamedll/hookchains_impl.cpp | 6 +- regamedll/regamedll/hookchains_impl.h | 26 +- regamedll/regamedll/precompiled.h | 8 +- .../regamedll/regamedll_interfaces_impl.h | 112 - regamedll/unittests/TestRunner.cpp | 3 +- regamedll/unittests/struct_offsets_tests.cpp | 37 - 235 files changed, 7287 insertions(+), 17544 deletions(-) delete mode 100644 regamedll/common/winsani_in.h delete mode 100644 regamedll/common/winsani_out.h rename regamedll/{regamedll/regamedll_api_impl.cpp => dlls/API/CAPI_Impl.cpp} (81%) rename regamedll/{regamedll/regamedll_api_impl.h => dlls/API/CAPI_Impl.h} (89%) create mode 100644 regamedll/dlls/API/CSEntity.cpp rename regamedll/{regamedll/regamedll_interfaces_impl.cpp => dlls/API/CSPlayer.cpp} (58%) create mode 100644 regamedll/dlls/API/CSPlayerItem.cpp create mode 100644 regamedll/dlls/bot/cs_bot_init.h create mode 100644 regamedll/dlls/revert_saved.cpp create mode 100644 regamedll/dlls/saverestore.cpp delete mode 100644 regamedll/hookers/helper.h delete mode 100644 regamedll/hookers/hooker.cpp delete mode 100644 regamedll/hookers/hooker.h delete mode 100644 regamedll/hookers/hooker_impl.cpp delete mode 100644 regamedll/hookers/hooker_impl.h delete mode 100644 regamedll/hookers/hooklist.cpp delete mode 100644 regamedll/hookers/hooklist.h delete mode 100644 regamedll/hookers/main.cpp delete mode 100644 regamedll/hookers/memory.cpp delete mode 100644 regamedll/hookers/memory.h delete mode 100644 regamedll/hookers/stl/iosfwd delete mode 100644 regamedll/hookers/stl/iterator delete mode 100644 regamedll/hookers/stl/list delete mode 100644 regamedll/hookers/stl/memory delete mode 100644 regamedll/hookers/stl/use_ansi.h delete mode 100644 regamedll/hookers/stl/utility delete mode 100644 regamedll/hookers/stl/vector delete mode 100644 regamedll/hookers/stl/xmemory delete mode 100644 regamedll/hookers/stl/xstddef delete mode 100644 regamedll/hookers/stl/xutility delete mode 100644 regamedll/msvc/PostBuild_mp.bat create mode 100644 regamedll/msvc/Новая папка/ReGameDLL.vcxproj create mode 100644 regamedll/public/regamedll/API/CSEntity.h rename regamedll/public/regamedll/{regamedll_interfaces.h => API/CSInterfaces.h} (75%) create mode 100644 regamedll/public/regamedll/API/CSPlayer.h rename regamedll/{hookers/main_mp.cpp => public/regamedll/API/CSPlayerItem.h} (75%) delete mode 100644 regamedll/regamedll/regamedll_interfaces_impl.h diff --git a/dep/cppunitlite/msvc/cppunitlite.vcxproj b/dep/cppunitlite/msvc/cppunitlite.vcxproj index 402859c5..e9ee206a 100644 --- a/dep/cppunitlite/msvc/cppunitlite.vcxproj +++ b/dep/cppunitlite/msvc/cppunitlite.vcxproj @@ -1,26 +1,10 @@  - - Debug MP Play - Win32 - - - Debug MP - Win32 - Debug Win32 - - Release MP Play - Win32 - - - Release MP - Win32 - Release Win32 @@ -55,34 +39,6 @@ v140 MultiByte - - StaticLibrary - true - v120 - v140 - MultiByte - - - StaticLibrary - true - v120 - v140 - MultiByte - - - StaticLibrary - true - v120 - v140 - MultiByte - - - StaticLibrary - true - v120 - v140 - MultiByte - StaticLibrary true @@ -104,18 +60,6 @@ - - - - - - - - - - - - @@ -137,70 +81,6 @@ true - - - - - Level3 - Disabled - WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_LIB;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) - MultiThreadedDebug - $(ProjectDir)..\include\ - CompileAsCpp - - - Windows - true - - - - - - - Level3 - Disabled - WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_LIB;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) - MultiThreadedDebug - $(ProjectDir)..\include\ - CompileAsCpp - - - Windows - true - - - - - - - Level3 - Disabled - WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_LIB;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) - MultiThreadedDebug - $(ProjectDir)..\include\ - CompileAsCpp - - - Windows - true - - - - - - - Level3 - Disabled - WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_LIB;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) - MultiThreadedDebug - $(ProjectDir)..\include\ - CompileAsCpp - - - Windows - true - - Level3 diff --git a/msvc/ReGameDLL.sln b/msvc/ReGameDLL.sln index f0416c2e..3f0131dd 100644 --- a/msvc/ReGameDLL.sln +++ b/msvc/ReGameDLL.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReGameDLL", "..\regamedll\msvc\ReGameDLL.vcxproj", "{70A2B904-B7DB-4C48-8DE0-AF567360D572}" ProjectSection(ProjectDependencies) = postProject @@ -20,47 +20,27 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gradle", "gradle", "{DB5703 EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug MP Play|Win32 = Debug MP Play|Win32 - Debug MP|Win32 = Debug MP|Win32 Debug Play|Win32 = Debug Play|Win32 Debug|Win32 = Debug|Win32 - Release MP Play|Win32 = Release MP Play|Win32 - Release MP|Win32 = Release MP|Win32 Release Play|Win32 = Release Play|Win32 Release|Win32 = Release|Win32 Tests|Win32 = Tests|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug MP Play|Win32.ActiveCfg = Debug MP Play|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug MP Play|Win32.Build.0 = Debug MP Play|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug MP|Win32.ActiveCfg = Debug MP|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug MP|Win32.Build.0 = Debug MP|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug Play|Win32.ActiveCfg = Debug Play|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug Play|Win32.Build.0 = Debug Play|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug|Win32.ActiveCfg = Debug|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Debug|Win32.Build.0 = Debug|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release MP Play|Win32.ActiveCfg = Release MP Play|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release MP Play|Win32.Build.0 = Release MP Play|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release MP|Win32.ActiveCfg = Release MP|Win32 - {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release MP|Win32.Build.0 = Release MP|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release Play|Win32.ActiveCfg = Release Play|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release Play|Win32.Build.0 = Release Play|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release|Win32.ActiveCfg = Release|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Release|Win32.Build.0 = Release|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Tests|Win32.ActiveCfg = Tests|Win32 {70A2B904-B7DB-4C48-8DE0-AF567360D572}.Tests|Win32.Build.0 = Tests|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug MP Play|Win32.ActiveCfg = Debug MP Play|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug MP Play|Win32.Build.0 = Debug MP Play|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug MP|Win32.ActiveCfg = Debug MP|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug MP|Win32.Build.0 = Debug MP|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug Play|Win32.ActiveCfg = Debug|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug Play|Win32.Build.0 = Debug|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug|Win32.ActiveCfg = Debug|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Debug|Win32.Build.0 = Debug|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Release MP Play|Win32.ActiveCfg = Release MP Play|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Release MP Play|Win32.Build.0 = Release MP Play|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Release MP|Win32.ActiveCfg = Release MP|Win32 - {CEB94F7C-E459-4673-AABB-36E2074396C0}.Release MP|Win32.Build.0 = Release MP|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Release Play|Win32.ActiveCfg = Release|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Release Play|Win32.Build.0 = Release|Win32 {CEB94F7C-E459-4673-AABB-36E2074396C0}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/publish.gradle b/publish.gradle index 828d58bb..580b6337 100644 --- a/publish.gradle +++ b/publish.gradle @@ -21,31 +21,25 @@ task publishPrepareFiles { pubRootDir.mkdirs() - // hookers binaries - //project.file('publish/publishRoot/bin/hookers').mkdirs() - //_copyFileToDir('publish/releaseRegamedllNofixes/filesystem_stdio.dll', 'publish/publishRoot/bin/hookers/') - //_copyFileToDir('publish/releaseRegamedllNofixes/filesystem_stdio.pdb', 'publish/publishRoot/bin/hookers/') - //_copyFile('publish/releaseRegamedllNofixes/libfilesystem_stdio.so', 'publish/publishRoot/bin/hookers/filesystem_stdio.so') - - //bugfixed binaries + // bugfixed binaries project.file('publish/publishRoot/bin/bugfixed').mkdirs() _copyFileToDir('publish/releaseRegamedllFixes/mp.dll', 'publish/publishRoot/bin/bugfixed/') _copyFileToDir('publish/releaseRegamedllFixes/mp.pdb', 'publish/publishRoot/bin/bugfixed/') _copyFile('publish/releaseRegamedllFixes/libcs.so', 'publish/publishRoot/bin/bugfixed/cs.so') - //pure binaries + // pure binaries project.file('publish/publishRoot/bin/pure').mkdirs() _copyFileToDir('publish/releaseRegamedllNofixes/mp.dll', 'publish/publishRoot/bin/pure/') _copyFileToDir('publish/releaseRegamedllNofixes/mp.pdb', 'publish/publishRoot/bin/pure/') _copyFile('publish/releaseRegamedllNofixes/libcs.so', 'publish/publishRoot/bin/pure/cs.so') - //copy files from folder dist + // copy files from folder dist copy { from('dist') into 'publish/publishRoot' } - //cssdk + // cssdk project.file('publish/publishRoot/cssdk').mkdirs() copy { from 'regamedll/extra/cssdk' diff --git a/regamedll/build.gradle b/regamedll/build.gradle index 7d71b778..7f4bf4da 100644 --- a/regamedll/build.gradle +++ b/regamedll/build.gradle @@ -45,12 +45,10 @@ project.ext.dep_cppunitlite = project(':dep/cppunitlite') void createIntergrationTestTask(NativeBinarySpec b) { boolean regamedllFixes = b.flavor.name.contains('regamedllFixes') - boolean mpLib = b.name.toLowerCase().contains('mp') if (!(b instanceof SharedLibraryBinarySpec)) return if (!GradleCppUtils.windows) return if (regamedllFixes) return - if (!mpLib) return String unitTestTask = b.hasProperty('cppUnitTestTask') ? b.cppUnitTestTask : null @@ -93,11 +91,10 @@ void postEvaluate(NativeBinarySpec b) { void setupToolchain(NativeBinarySpec b) { boolean unitTestExecutable = b.component.name.endsWith('_tests') - boolean mpLib = b.name.toLowerCase().contains('mp') boolean regamedllFixes = b.flavor.name.contains('regamedllFixes') ToolchainConfig cfg = rootProject.createToolchainConfig(b) - cfg.projectInclude(project, '', '/engine', '/common', '/dlls', '/game_shared', '/pm_shared', '/regamedll', '/hookers', '/public', '/public/regamedll') + cfg.projectInclude(project, '', '/engine', '/common', '/dlls', '/game_shared', '/pm_shared', '/regamedll', '/public', '/public/regamedll') if (unitTestExecutable) { @@ -125,11 +122,6 @@ void setupToolchain(NativeBinarySpec b) cfg.compilerOptions.args '/Oi', '/GF', '/GS-', '/GR-' } - if (mpLib) - { - cfg.linkerOptions.randomizedBaseAddress = false - cfg.linkerOptions.baseAddress = '0x4970000' - } cfg.projectLibpath(project, '/lib') cfg.extraLibs 'libacof32.lib' } @@ -159,14 +151,12 @@ void setupToolchain(NativeBinarySpec b) cfg.extraLibs 'dl', 'm', 'stdc++', 'aelf32' } - if (mpLib && GradleCppUtils.windows && !unitTestExecutable) { + if (GradleCppUtils.windows && !unitTestExecutable) { cfg.linkerOptions.definitionFile = "${projectDir}\\msvc\\mp.def"; } if (unitTestExecutable) { cfg.singleDefines 'REGAMEDLL_UNIT_TESTS' - } else if (!mpLib) { - cfg.singleDefines 'HOOK_GAMEDLL' } if (regamedllFixes) { @@ -186,7 +176,7 @@ class RegamedllSrc { h.regamedll_src(CppSourceSet) { source { - srcDirs "engine", "dlls", "dlls/addons", "game_shared", "pm_shared", "regamedll", "public", "version" + srcDirs "engine", "dlls", "dlls/API", "dlls/addons", "game_shared", "pm_shared", "regamedll", "public", "version" include "**/*.cpp" exclude "precompiled.cpp" @@ -214,24 +204,6 @@ class RegamedllSrc { } } - static void regamedll_hooker_src(def h) { - h.regamedll_hooker_src(CppSourceSet) { - source { - srcDirs "hookers" - include "main.cpp", "6153_hooker.cpp", "hooker.cpp", "memory.cpp", "hooker_impl.cpp", "RegameDLLRuntimeConfig.cpp" - } - } - } - - static void regamedll_mp_src(def h) { - h.regamedll_mp_src(CppSourceSet) { - source { - srcDirs "hookers" - include "main_mp.cpp" - } - } - } - static void regamedll_tests_src(def h) { h.regamedll_tests_src(CppSourceSet) { source { @@ -267,18 +239,6 @@ model { } components { - regamedll_hooker_gamedll(NativeLibrarySpec) { - targetPlatform 'x86' - baseName 'filesystem_stdio' - - sources { - RegamedllSrc.regamedll_pch(it) - RegamedllSrc.regamedll_src(it) - RegamedllSrc.regamedll_hooker_src(it) - } - - binaries.all { NativeBinarySpec b -> project.setupToolchain(b) } - } regamedll_mp_gamedll(NativeLibrarySpec) { targetPlatform 'x86' @@ -286,22 +246,10 @@ model { sources { RegamedllSrc.regamedll_pch(it) RegamedllSrc.regamedll_src(it) - RegamedllSrc.regamedll_mp_src(it) } binaries.all { NativeBinarySpec b -> project.setupToolchain(b) } } - regamedll_hooker_gamedll_tests(NativeExecutableSpec) { - targetPlatform 'x86' - sources { - RegamedllSrc.regamedll_pch(it) - RegamedllSrc.regamedll_src(it) - RegamedllSrc.regamedll_tests_src(it) - } - - binaries.all { NativeBinarySpec b -> project.setupToolchain(b) } - } - regamedll_mp_gamedll_tests(NativeExecutableSpec) { targetPlatform 'x86' sources { @@ -317,7 +265,7 @@ model { task buildRelease { dependsOn binaries.withType(SharedLibraryBinarySpec).matching { SharedLibraryBinarySpec blib -> - blib.buildable && blib.buildType.name == 'release' && !blib.name.contains('Regamedll_hooker_gamedll') + blib.buildable && blib.buildType.name == 'release' } } diff --git a/regamedll/common/mathlib.h b/regamedll/common/mathlib.h index 3e582310..12d20263 100644 --- a/regamedll/common/mathlib.h +++ b/regamedll/common/mathlib.h @@ -90,22 +90,6 @@ const T& clamp(const T& a, const T& min, const T& max) { return (a > max) ? max #define clamp(val, min, max) (((val) > (max)) ? (max) : (((val) < (min)) ? (min) : (val))) #endif // __cplusplus -// bitwise operators templates -//template::type> -//inline T operator~ (T a) { return (T)~(type)a; } -//template::type> -//inline T operator| (T a, T b) { return (T)((type)a | (type)b); } -//template::type> -//inline T operator& (T a, T b) { return (T)((type)a & (type)b); } -//template::type> -//inline T operator^ (T a, T b) { return (T)((type)a ^ (type)b); } -//template::type> -//inline T& operator|= (T& a, T b) { return (T&)((type&)a |= (type)b); } -//template::type> -//inline T& operator&= (T& a, T b) { return (T&)((type&)a &= (type)b); } -//template::type> -//inline T& operator^= (T& a, T b) { return (T&)((type&)a ^= (type)b); } - inline float M_sqrt(float value) { return _mm_cvtss_f32(_mm_sqrt_ss(_mm_load_ss(&value))); } diff --git a/regamedll/common/winsani_in.h b/regamedll/common/winsani_in.h deleted file mode 100644 index e2bb5994..00000000 --- a/regamedll/common/winsani_in.h +++ /dev/null @@ -1,7 +0,0 @@ -#if _MSC_VER >= 1500 // MSVC++ 9.0 (Visual Studio 2008) -#pragma push_macro("ARRAYSIZE") -#ifdef ARRAYSIZE -#undef ARRAYSIZE -#endif -#define HSPRITE WINDOWS_HSPRITE -#endif diff --git a/regamedll/common/winsani_out.h b/regamedll/common/winsani_out.h deleted file mode 100644 index 3d9cef01..00000000 --- a/regamedll/common/winsani_out.h +++ /dev/null @@ -1,4 +0,0 @@ -#if _MSC_VER >= 1500 // MSVC++ 9.0 (Visual Studio 2008) -#undef HSPRITE -#pragma pop_macro("ARRAYSIZE") -#endif diff --git a/regamedll/regamedll/regamedll_api_impl.cpp b/regamedll/dlls/API/CAPI_Impl.cpp similarity index 81% rename from regamedll/regamedll/regamedll_api_impl.cpp rename to regamedll/dlls/API/CAPI_Impl.cpp index ef1b4d6b..f9844764 100644 --- a/regamedll/regamedll/regamedll_api_impl.cpp +++ b/regamedll/dlls/API/CAPI_Impl.cpp @@ -143,48 +143,48 @@ GAMEHOOK_REGISTRY(CSGameRules_OnRoundFreezeEnd); GAMEHOOK_REGISTRY(PM_UpdateStepSound); GAMEHOOK_REGISTRY(CBasePlayer_StartDeathCam); -int EXT_FUNC CReGameApi::GetMajorVersion() { +int CReGameApi::GetMajorVersion() { return REGAMEDLL_API_VERSION_MAJOR; } -int EXT_FUNC CReGameApi::GetMinorVersion() { +int CReGameApi::GetMinorVersion() { return REGAMEDLL_API_VERSION_MINOR; } -const EXT_FUNC ReGameFuncs_t *CReGameApi::GetFuncs() { +const ReGameFuncs_t *CReGameApi::GetFuncs() { return &g_ReGameApiFuncs; } -IReGameHookchains *EXT_FUNC CReGameApi::GetHookchains() { +IReGameHookchains *CReGameApi::GetHookchains() { return &g_ReGameHookchains; } -CGameRules *EXT_FUNC CReGameApi::GetGameRules() { +CGameRules *CReGameApi::GetGameRules() { return g_pGameRules; } -WeaponInfoStruct *EXT_FUNC CReGameApi::GetWeaponInfo(int weaponID) { +WeaponInfoStruct *CReGameApi::GetWeaponInfo(int weaponID) { return ::GetWeaponInfo(weaponID); } -WeaponInfoStruct *EXT_FUNC CReGameApi::GetWeaponInfo(const char *weaponName) { +WeaponInfoStruct *CReGameApi::GetWeaponInfo(const char *weaponName) { return ::GetWeaponInfo(weaponName); } -playermove_t *EXT_FUNC CReGameApi::GetPlayerMove() { +playermove_t *CReGameApi::GetPlayerMove() { return pmove; } -WeaponSlotInfo *EXT_FUNC CReGameApi::GetWeaponSlot(WeaponIdType weaponID) { return ::GetWeaponSlot(weaponID); } -WeaponSlotInfo *EXT_FUNC CReGameApi::GetWeaponSlot(const char *weaponName) { return ::GetWeaponSlot(weaponName); } +WeaponSlotInfo *CReGameApi::GetWeaponSlot(WeaponIdType weaponID) { return ::GetWeaponSlot(weaponID); } +WeaponSlotInfo *CReGameApi::GetWeaponSlot(const char *weaponName) { return ::GetWeaponSlot(weaponName); } -ItemInfo *EXT_FUNC CReGameApi::GetItemInfo(WeaponIdType weaponID) { return &IMPL_CLASS(CBasePlayerItem, m_ItemInfoArray)[weaponID]; } -AmmoInfo *EXT_FUNC CReGameApi::GetAmmoInfo(AmmoType ammoID) { return &IMPL_CLASS(CBasePlayerItem, m_AmmoInfoArray)[ammoID]; } +ItemInfo *CReGameApi::GetItemInfo(WeaponIdType weaponID) { return &CBasePlayerItem::m_ItemInfoArray[weaponID]; } +AmmoInfo *CReGameApi::GetAmmoInfo(AmmoType ammoID) { return &CBasePlayerItem::m_AmmoInfoArray[ammoID]; } -AmmoInfoStruct *EXT_FUNC CReGameApi::GetAmmoInfoEx(AmmoType ammoID) { return ::GetAmmoInfo(ammoID); } -AmmoInfoStruct *EXT_FUNC CReGameApi::GetAmmoInfoEx(const char *ammoName) { return ::GetAmmoInfo(ammoName); } +AmmoInfoStruct *CReGameApi::GetAmmoInfoEx(AmmoType ammoID) { return ::GetAmmoInfo(ammoID); } +AmmoInfoStruct *CReGameApi::GetAmmoInfoEx(const char *ammoName) { return ::GetAmmoInfo(ammoName); } -void EXT_FUNC Regamedll_ChangeString_api(char *&dest, const char *source) +EXT_FUNC void Regamedll_ChangeString_api(char *&dest, const char *source) { size_t len = Q_strlen(source); if (dest == nullptr || Q_strlen(dest) != len) { @@ -195,22 +195,22 @@ void EXT_FUNC Regamedll_ChangeString_api(char *&dest, const char *source) Q_strcpy(dest, source); } -void EXT_FUNC RadiusDamage_api(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, float flRadius, int iClassIgnore, int bitsDamageType) +EXT_FUNC void RadiusDamage_api(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, float flRadius, int iClassIgnore, int bitsDamageType) { RadiusDamage(vecSrc, pevInflictor, pevAttacker, flDamage, flRadius, iClassIgnore, bitsDamageType); } -void EXT_FUNC ClearMultiDamage_api() +EXT_FUNC void ClearMultiDamage_api() { ClearMultiDamage(); } -void EXT_FUNC ApplyMultiDamage_api(entvars_t *pevInflictor, entvars_t *pevAttacker) +EXT_FUNC void ApplyMultiDamage_api(entvars_t *pevInflictor, entvars_t *pevAttacker) { ApplyMultiDamage(pevInflictor, pevAttacker); } -void EXT_FUNC AddMultiDamage_api(entvars_t *pevInflictor, CBaseEntity *pEntity, float flDamage, int bitsDamageType) +EXT_FUNC void AddMultiDamage_api(entvars_t *pevInflictor, CBaseEntity *pEntity, float flDamage, int bitsDamageType) { AddMultiDamage(pevInflictor, pEntity, flDamage, bitsDamageType); } diff --git a/regamedll/regamedll/regamedll_api_impl.h b/regamedll/dlls/API/CAPI_Impl.h similarity index 89% rename from regamedll/regamedll/regamedll_api_impl.h rename to regamedll/dlls/API/CAPI_Impl.h index 0f206da1..8682cfda 100644 --- a/regamedll/regamedll/regamedll_api_impl.h +++ b/regamedll/dlls/API/CAPI_Impl.h @@ -30,7 +30,86 @@ #include "archtypes.h" #include "regamedll_api.h" -#include "regamedll_interfaces_impl.h" + +#ifdef REGAMEDLL_API + +#define __API_HOOK(fname)\ + fname##_OrigFunc + +#define LINK_HOOK_CLASS_VOID_CHAIN(className, functionName, args, ...)\ + void className::functionName args {\ + g_ReGameHookchains.m_##className##_##functionName.callChain(&className::functionName##_OrigFunc, this, __VA_ARGS__);\ + } +#define LINK_HOOK_CLASS_VOID_CHAIN2(className, functionName)\ + void EXT_FUNC className::functionName() {\ + g_ReGameHookchains.m_##className##_##functionName.callChain(&className::functionName##_OrigFunc, this);\ + } + +#define LINK_HOOK_CLASS_CHAIN(ret, className, functionName, args, ...)\ + ret className::functionName args {\ + return g_ReGameHookchains.m_##className##_##functionName.callChain(&className::functionName##_OrigFunc, this, __VA_ARGS__);\ + } +#define LINK_HOOK_CLASS_CHAIN2(ret, className, functionName)\ + ret className::functionName() {\ + return g_ReGameHookchains.m_##className##_##functionName.callChain(&className::functionName##_OrigFunc, this);\ + } + +#define LINK_HOOK_CLASS_VOID_CUSTOM_CHAIN(className, customPrefix, functionName, args, ...)\ + void className::functionName args {\ + g_ReGameHookchains.m_##customPrefix##_##functionName.callChain(&className::functionName##_OrigFunc, this, __VA_ARGS__);\ + } +#define LINK_HOOK_CLASS_VOID_CUSTOM_CHAIN2(className, customPrefix, functionName)\ + void className::functionName() {\ + g_ReGameHookchains.m_##customPrefix##_##functionName.callChain(&className::functionName##_OrigFunc, this);\ + } + +#define LINK_HOOK_CLASS_CUSTOM_CHAIN(ret, className, customPrefix, functionName, args, ...)\ + ret className::functionName args {\ + return g_ReGameHookchains.m_##customPrefix##_##functionName.callChain(&className::functionName##_OrigFunc, this, __VA_ARGS__);\ + } +#define LINK_HOOK_CLASS_CUSTOM_CHAIN2(ret, className, customPrefix, functionName)\ + ret className::functionName() {\ + return g_ReGameHookchains.m_##customPrefix##_##functionName.callChain(&className::functionName##_OrigFunc, this);\ + } + +#define LINK_HOOK_VOID_CHAIN(functionName, args, ...)\ + void functionName args {\ + g_ReGameHookchains.m_##functionName.callChain(functionName##_OrigFunc, __VA_ARGS__);\ + } + +#define LINK_HOOK_CHAIN(ret, functionName, args, ...)\ + ret functionName args {\ + return g_ReGameHookchains.m_##functionName.callChain(functionName##_OrigFunc, __VA_ARGS__);\ + } + +#define LINK_HOOK_VOID_CHAIN2(functionName)\ + void functionName() {\ + g_ReGameHookchains.m_##functionName.callChain(functionName##_OrigFunc);\ + } + +#define LINK_HOOK_CHAIN2(ret, functionName)\ + ret functionName() {\ + return g_ReGameHookchains.m_##functionName.callChain(functionName##_OrigFunc);\ + } +#else + +#define __API_HOOK(fname)\ + fname + +#define LINK_HOOK_CLASS_VOID_CHAIN(...) +#define LINK_HOOK_CLASS_VOID_CHAIN2(...) +#define LINK_HOOK_CLASS_CHAIN(...) +#define LINK_HOOK_CLASS_CHAIN2(...) +#define LINK_HOOK_CLASS_VOID_CUSTOM_CHAIN(...) +#define LINK_HOOK_CLASS_VOID_CUSTOM_CHAIN2(...) +#define LINK_HOOK_CLASS_CUSTOM_CHAIN(...) +#define LINK_HOOK_CLASS_CUSTOM_CHAIN2(...) +#define LINK_HOOK_VOID_CHAIN(...) +#define LINK_HOOK_VOID_CHAIN2(...) +#define LINK_HOOK_CHAIN(...) +#define LINK_HOOK_CHAIN2(...) + +#endif // REGAMEDLL_API #define GAMEHOOK_REGISTRY(func)\ IReGameHookRegistry_##func *CReGameHookchains::func() { return &m_##func; } @@ -541,22 +620,22 @@ extern ReGameFuncs_t g_ReGameApiFuncs; class CReGameApi: public IReGameApi { public: - virtual int GetMajorVersion(); - virtual int GetMinorVersion(); + EXT_FUNC virtual int GetMajorVersion(); + EXT_FUNC virtual int GetMinorVersion(); - virtual const ReGameFuncs_t *GetFuncs(); - virtual IReGameHookchains *GetHookchains(); + EXT_FUNC virtual const ReGameFuncs_t *GetFuncs(); + EXT_FUNC virtual IReGameHookchains *GetHookchains(); - virtual CGameRules *GetGameRules(); - virtual WeaponInfoStruct *GetWeaponInfo(int weaponID); - virtual WeaponInfoStruct *GetWeaponInfo(const char *weaponName); - virtual playermove_t *GetPlayerMove(); - virtual WeaponSlotInfo *GetWeaponSlot(WeaponIdType weaponID); - virtual WeaponSlotInfo *GetWeaponSlot(const char *weaponName); - virtual ItemInfo *GetItemInfo(WeaponIdType weaponID); - virtual AmmoInfo *GetAmmoInfo(AmmoType ammoID); - virtual AmmoInfoStruct *GetAmmoInfoEx(AmmoType ammoID); - virtual AmmoInfoStruct *GetAmmoInfoEx(const char *ammoName); + EXT_FUNC virtual CGameRules *GetGameRules(); + EXT_FUNC virtual WeaponInfoStruct *GetWeaponInfo(int weaponID); + EXT_FUNC virtual WeaponInfoStruct *GetWeaponInfo(const char *weaponName); + EXT_FUNC virtual playermove_t *GetPlayerMove(); + EXT_FUNC virtual WeaponSlotInfo *GetWeaponSlot(WeaponIdType weaponID); + EXT_FUNC virtual WeaponSlotInfo *GetWeaponSlot(const char *weaponName); + EXT_FUNC virtual ItemInfo *GetItemInfo(WeaponIdType weaponID); + EXT_FUNC virtual AmmoInfo *GetAmmoInfo(AmmoType ammoID); + EXT_FUNC virtual AmmoInfoStruct *GetAmmoInfoEx(AmmoType ammoID); + EXT_FUNC virtual AmmoInfoStruct *GetAmmoInfoEx(const char *ammoName); }; void Regamedll_ChangeString_api(char *&dest, const char *source); diff --git a/regamedll/dlls/API/CSEntity.cpp b/regamedll/dlls/API/CSEntity.cpp new file mode 100644 index 00000000..9a58268e --- /dev/null +++ b/regamedll/dlls/API/CSEntity.cpp @@ -0,0 +1,39 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + +#include "precompiled.h" + +void CCSEntity::FireBullets(int iShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker) +{ + m_pContainingEntity->FireBullets(iShots, vecSrc, vecDirShooting, vecSpread, flDistance, iBulletType, iTracerFreq, iDamage, pevAttacker); +} + +Vector CCSEntity::FireBullets3(Vector &vecSrc, Vector &vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand) +{ + return m_pContainingEntity->FireBullets3(vecSrc, vecDirShooting, vecSpread, flDistance, iPenetration, iBulletType, iDamage, flRangeModifier, pevAttacker, bPistol, shared_rand); +} diff --git a/regamedll/regamedll/regamedll_interfaces_impl.cpp b/regamedll/dlls/API/CSPlayer.cpp similarity index 58% rename from regamedll/regamedll/regamedll_interfaces_impl.cpp rename to regamedll/dlls/API/CSPlayer.cpp index c8c76fcf..20f6e4ea 100644 --- a/regamedll/regamedll/regamedll_interfaces_impl.cpp +++ b/regamedll/dlls/API/CSPlayer.cpp @@ -28,15 +28,7 @@ #include "precompiled.h" -void EXT_FUNC CCSEntity::FireBullets(int iShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker) { - m_pContainingEntity->FireBullets(iShots, vecSrc, vecDirShooting, vecSpread, flDistance, iBulletType, iTracerFreq, iDamage, pevAttacker); -}; - -Vector EXT_FUNC CCSEntity::FireBullets3(Vector &vecSrc, Vector &vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand) { - return m_pContainingEntity->FireBullets3(vecSrc, vecDirShooting, vecSpread, flDistance, iPenetration, iBulletType, iDamage, flRangeModifier, pevAttacker, bPistol, shared_rand); -}; - -bool EXT_FUNC CCSPlayer::JoinTeam(TeamName team) +EXT_FUNC bool CCSPlayer::JoinTeam(TeamName team) { CBasePlayer *pPlayer = BasePlayer(); switch (team) @@ -140,7 +132,7 @@ bool EXT_FUNC CCSPlayer::JoinTeam(TeamName team) return true; } -bool EXT_FUNC CCSPlayer::RemovePlayerItem(const char *pszItemName) +EXT_FUNC bool CCSPlayer::RemovePlayerItem(const char *pszItemName) { if (!pszItemName) return false; @@ -148,7 +140,8 @@ bool EXT_FUNC CCSPlayer::RemovePlayerItem(const char *pszItemName) CBasePlayer *pPlayer = BasePlayer(); // if it item_ ? - if (pszItemName[0] == 'i') { + if (pszItemName[0] == 'i') + { pszItemName += sizeof("item_") - 1; // item_thighpack @@ -208,7 +201,8 @@ bool EXT_FUNC CCSPlayer::RemovePlayerItem(const char *pszItemName) return true; } - else if (FStrEq(pszItemName, "weapon_shield")) { + else if (FStrEq(pszItemName, "weapon_shield")) + { if (!pPlayer->HasShield()) return false; @@ -223,7 +217,7 @@ bool EXT_FUNC CCSPlayer::RemovePlayerItem(const char *pszItemName) if (pWeapon->m_iId == WEAPON_HEGRENADE || pWeapon->m_iId == WEAPON_FLASHBANG || pWeapon->m_iId == WEAPON_SMOKEGRENADE) { - if (pPlayer->m_rgAmmo[ pWeapon->m_iPrimaryAmmoType ] <= 0) + if (pPlayer->m_rgAmmo[pWeapon->m_iPrimaryAmmoType] <= 0) g_pGameRules->GetNextBestWeapon(pPlayer, pWeapon); } @@ -274,7 +268,7 @@ bool EXT_FUNC CCSPlayer::RemovePlayerItem(const char *pszItemName) return false; } -CBaseEntity *EXT_FUNC CCSPlayer::GiveNamedItemEx(const char *pszName) +EXT_FUNC CBaseEntity *CCSPlayer::GiveNamedItemEx(const char *pszName) { CBasePlayer *pPlayer = BasePlayer(); @@ -294,41 +288,192 @@ CBaseEntity *EXT_FUNC CCSPlayer::GiveNamedItemEx(const char *pszName) return pPlayer->GiveNamedItemEx(pszName); } -bool EXT_FUNC CCSPlayer::IsConnected() const { return m_pContainingEntity->has_disconnected == false; } -void EXT_FUNC CCSPlayer::SetAnimation(PLAYER_ANIM playerAnim) { BasePlayer()->SetAnimation(playerAnim); } -void EXT_FUNC CCSPlayer::AddAccount(int amount, RewardType type, bool bTrackChange) { BasePlayer()->AddAccount(amount, type, bTrackChange); } -CBaseEntity *EXT_FUNC CCSPlayer::GiveNamedItem(const char *pszName) { return BasePlayer()->GiveNamedItem(pszName); } -void EXT_FUNC CCSPlayer::GiveDefaultItems() { BasePlayer()->GiveDefaultItems(); } -void EXT_FUNC CCSPlayer::GiveShield(bool bDeploy) { BasePlayer()->GiveShield(bDeploy); } -void EXT_FUNC CCSPlayer::DropShield(bool bDeploy) { BasePlayer()->DropShield(bDeploy); } -void EXT_FUNC CCSPlayer::DropPlayerItem(const char *pszItemName) { BasePlayer()->DropPlayerItem(pszItemName); } -void EXT_FUNC CCSPlayer::RemoveShield() { BasePlayer()->RemoveShield(); } -void EXT_FUNC CCSPlayer::RemoveAllItems(bool bRemoveSuit) { BasePlayer()->RemoveAllItems(bRemoveSuit ? TRUE : FALSE); } -void EXT_FUNC CCSPlayer::SetPlayerModel(bool bHasC4) { BasePlayer()->SetPlayerModel(bHasC4 ? TRUE : FALSE); } -void EXT_FUNC CCSPlayer::SetPlayerModelEx(const char *modelName) { Q_strncpy(m_szModel, modelName, sizeof(m_szModel) - 1); m_szModel[sizeof(m_szModel) - 1] = '\0'; }; -void EXT_FUNC CCSPlayer::SetNewPlayerModel(const char *modelName) { BasePlayer()->SetNewPlayerModel(STRING(ALLOC_STRING(modelName))); } -void EXT_FUNC CCSPlayer::ClientCommand(const char *cmd, const char *arg1, const char *arg2, const char *arg3) { BasePlayer()->ClientCommand(cmd, arg1, arg2, arg3); } -void EXT_FUNC CCSPlayer::SetProgressBarTime(int time) { BasePlayer()->SetProgressBarTime(time); } -void EXT_FUNC CCSPlayer::SetProgressBarTime2(int time, float timeElapsed) { BasePlayer()->SetProgressBarTime2(time, timeElapsed); } -edict_t *EXT_FUNC CCSPlayer::EntSelectSpawnPoint() { return BasePlayer()->EntSelectSpawnPoint(); } -void EXT_FUNC CCSPlayer::SendItemStatus() { BasePlayer()->SendItemStatus(); } -void EXT_FUNC CCSPlayer::SetBombIcon(bool bFlash) { BasePlayer()->SetBombIcon(bFlash ? TRUE : FALSE); } -void EXT_FUNC CCSPlayer::SetScoreAttrib(CBasePlayer *dest) { BasePlayer()->SetScoreAttrib(dest); } -void EXT_FUNC CCSPlayer::ReloadWeapons(CBasePlayerItem *pWeapon, bool bForceReload, bool bForceRefill) { BasePlayer()->ReloadWeapons(pWeapon, bForceReload, bForceRefill); } -void EXT_FUNC CCSPlayer::Observer_SetMode(int iMode) { BasePlayer()->Observer_SetMode(iMode); } -bool EXT_FUNC CCSPlayer::SelectSpawnSpot(const char *pEntClassName, CBaseEntity *&pSpot) { return BasePlayer()->SelectSpawnSpot(pEntClassName, pSpot); } -bool EXT_FUNC CCSPlayer::SwitchWeapon(CBasePlayerItem *pWeapon) { return BasePlayer()->SwitchWeapon(pWeapon) != FALSE; } -void EXT_FUNC CCSPlayer::SwitchTeam() { BasePlayer()->SwitchTeam(); } -void EXT_FUNC CCSPlayer::StartObserver(Vector& vecPosition, Vector& vecViewAngle) { BasePlayer()->StartObserver(vecPosition, vecViewAngle); } -void EXT_FUNC CCSPlayer::TeamChangeUpdate() { BasePlayer()->TeamChangeUpdate(); } -void EXT_FUNC CCSPlayer::DropSecondary() { BasePlayer()->DropSecondary(); } -void EXT_FUNC CCSPlayer::DropPrimary() { BasePlayer()->DropPrimary(); } -bool EXT_FUNC CCSPlayer::HasPlayerItem(CBasePlayerItem *pCheckItem) { return BasePlayer()->HasPlayerItem(pCheckItem); } -bool EXT_FUNC CCSPlayer::HasNamedPlayerItem(const char *pszItemName) { return BasePlayer()->HasNamedPlayerItem(pszItemName); } -CBasePlayerItem *EXT_FUNC CCSPlayer::GetItemById(WeaponIdType weaponID) { return BasePlayer()->GetItemById(weaponID); } -CBasePlayerItem *EXT_FUNC CCSPlayer::GetItemByName(const char *itemName) { return BasePlayer()->GetItemByName(itemName); } -void EXT_FUNC CCSPlayer::Disappear() { BasePlayer()->Disappear(); } -void EXT_FUNC CCSPlayer::MakeVIP() { BasePlayer()->MakeVIP(); } -bool EXT_FUNC CCSPlayer::MakeBomber() { return BasePlayer()->MakeBomber(); } -void EXT_FUNC CCSPlayer::ResetSequenceInfo() { BasePlayer()->ResetSequenceInfo(); } -void EXT_FUNC CCSPlayer::StartDeathCam() { BasePlayer()->StartDeathCam(); } +EXT_FUNC bool CCSPlayer::IsConnected() const +{ + return m_pContainingEntity->has_disconnected == false; +} + +EXT_FUNC void CCSPlayer::SetAnimation(PLAYER_ANIM playerAnim) +{ + BasePlayer()->SetAnimation(playerAnim); +} + +EXT_FUNC void CCSPlayer::AddAccount(int amount, RewardType type, bool bTrackChange) +{ + BasePlayer()->AddAccount(amount, type, bTrackChange); +} + +EXT_FUNC CBaseEntity *CCSPlayer::GiveNamedItem(const char *pszName) +{ + return BasePlayer()->GiveNamedItem(pszName); +} + +EXT_FUNC void CCSPlayer::GiveDefaultItems() +{ + BasePlayer()->GiveDefaultItems(); +} + +EXT_FUNC void CCSPlayer::GiveShield(bool bDeploy) +{ + BasePlayer()->GiveShield(bDeploy); +} + +EXT_FUNC void CCSPlayer::DropShield(bool bDeploy) +{ + BasePlayer()->DropShield(bDeploy); +} + +EXT_FUNC void CCSPlayer::DropPlayerItem(const char *pszItemName) +{ + BasePlayer()->DropPlayerItem(pszItemName); +} + +EXT_FUNC void CCSPlayer::RemoveShield() +{ + BasePlayer()->RemoveShield(); +} + +EXT_FUNC void CCSPlayer::RemoveAllItems(bool bRemoveSuit) +{ + BasePlayer()->RemoveAllItems(bRemoveSuit ? TRUE : FALSE); +} + +EXT_FUNC void CCSPlayer::SetPlayerModel(bool bHasC4) +{ + BasePlayer()->SetPlayerModel(bHasC4 ? TRUE : FALSE); +} + +EXT_FUNC void CCSPlayer::SetPlayerModelEx(const char *modelName) +{ + Q_strlcpy(m_szModel, modelName); +} + +EXT_FUNC void CCSPlayer::SetNewPlayerModel(const char *modelName) +{ + BasePlayer()->SetNewPlayerModel(STRING(ALLOC_STRING(modelName))); +} + +EXT_FUNC void CCSPlayer::ClientCommand(const char *cmd, const char *arg1, const char *arg2, const char *arg3) +{ + BasePlayer()->ClientCommand(cmd, arg1, arg2, arg3); +} + +EXT_FUNC void CCSPlayer::SetProgressBarTime(int time) +{ + BasePlayer()->SetProgressBarTime(time); +} + +EXT_FUNC void CCSPlayer::SetProgressBarTime2(int time, float timeElapsed) +{ + BasePlayer()->SetProgressBarTime2(time, timeElapsed); +} + +EXT_FUNC edict_t *CCSPlayer::EntSelectSpawnPoint() +{ + return BasePlayer()->EntSelectSpawnPoint(); +} + +EXT_FUNC void CCSPlayer::SendItemStatus() +{ + BasePlayer()->SendItemStatus(); +} + +EXT_FUNC void CCSPlayer::SetBombIcon(bool bFlash) +{ + BasePlayer()->SetBombIcon(bFlash ? TRUE : FALSE); +} + +EXT_FUNC void CCSPlayer::SetScoreAttrib(CBasePlayer *dest) +{ + BasePlayer()->SetScoreAttrib(dest); +} + +EXT_FUNC void CCSPlayer::ReloadWeapons(CBasePlayerItem *pWeapon, bool bForceReload, bool bForceRefill) +{ + BasePlayer()->ReloadWeapons(pWeapon, bForceReload, bForceRefill); +} + +EXT_FUNC void CCSPlayer::Observer_SetMode(int iMode) +{ + BasePlayer()->Observer_SetMode(iMode); +} + +EXT_FUNC bool CCSPlayer::SelectSpawnSpot(const char *pEntClassName, CBaseEntity *&pSpot) +{ + return BasePlayer()->SelectSpawnSpot(pEntClassName, pSpot); +} + +EXT_FUNC bool CCSPlayer::SwitchWeapon(CBasePlayerItem *pWeapon) +{ + return BasePlayer()->SwitchWeapon(pWeapon) != FALSE; +} + +EXT_FUNC void CCSPlayer::SwitchTeam() +{ + BasePlayer()->SwitchTeam(); +} + +EXT_FUNC void CCSPlayer::StartObserver(Vector& vecPosition, Vector& vecViewAngle) +{ + BasePlayer()->StartObserver(vecPosition, vecViewAngle); +} + +EXT_FUNC void CCSPlayer::TeamChangeUpdate() +{ + BasePlayer()->TeamChangeUpdate(); +} + +EXT_FUNC void CCSPlayer::DropSecondary() +{ + BasePlayer()->DropSecondary(); +} + +EXT_FUNC void CCSPlayer::DropPrimary() +{ + BasePlayer()->DropPrimary(); +} + +EXT_FUNC bool CCSPlayer::HasPlayerItem(CBasePlayerItem *pCheckItem) +{ + return BasePlayer()->HasPlayerItem(pCheckItem); +} + +EXT_FUNC bool CCSPlayer::HasNamedPlayerItem(const char *pszItemName) +{ + return BasePlayer()->HasNamedPlayerItem(pszItemName); +} + +EXT_FUNC CBasePlayerItem *CCSPlayer::GetItemById(WeaponIdType weaponID) +{ + return BasePlayer()->GetItemById(weaponID); +} + +EXT_FUNC CBasePlayerItem *CCSPlayer::GetItemByName(const char *itemName) +{ + return BasePlayer()->GetItemByName(itemName); +} + +EXT_FUNC void CCSPlayer::Disappear() +{ + BasePlayer()->Disappear(); +} + +EXT_FUNC void CCSPlayer::MakeVIP() +{ + BasePlayer()->MakeVIP(); +} + +EXT_FUNC bool CCSPlayer::MakeBomber() +{ + return BasePlayer()->MakeBomber(); +} + +EXT_FUNC void CCSPlayer::ResetSequenceInfo() +{ + BasePlayer()->ResetSequenceInfo(); +} + +EXT_FUNC void CCSPlayer::StartDeathCam() +{ + BasePlayer()->StartDeathCam(); +} diff --git a/regamedll/dlls/API/CSPlayerItem.cpp b/regamedll/dlls/API/CSPlayerItem.cpp new file mode 100644 index 00000000..cab6817c --- /dev/null +++ b/regamedll/dlls/API/CSPlayerItem.cpp @@ -0,0 +1,46 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + +#include "precompiled.h" + +EXT_FUNC void CCSPlayerItem::SetItemInfo(ItemInfo *pInfo) +{ + Q_memcpy(&m_ItemInfo, pInfo, sizeof(m_ItemInfo)); +} + +#ifdef REGAMEDLL_API +int CBasePlayerItem::iPosition() const { return CSPlayerItem()->m_ItemInfo.iPosition; } +const char *CBasePlayerItem::pszAmmo1() const { return CSPlayerItem()->m_ItemInfo.pszAmmo1; } +int CBasePlayerItem::iMaxAmmo1() const { return CSPlayerItem()->m_ItemInfo.iMaxAmmo1; } +const char *CBasePlayerItem::pszAmmo2() const { return CSPlayerItem()->m_ItemInfo.pszAmmo2; } +int CBasePlayerItem::iMaxAmmo2() const { return CSPlayerItem()->m_ItemInfo.iMaxAmmo2; } +const char *CBasePlayerItem::pszName() const { return CSPlayerItem()->m_ItemInfo.pszName; } +int CBasePlayerItem::iMaxClip() const { return CSPlayerItem()->m_ItemInfo.iMaxClip; } +int CBasePlayerItem::iWeight() const { return CSPlayerItem()->m_ItemInfo.iWeight; } +int CBasePlayerItem::iFlags() const { return CSPlayerItem()->m_ItemInfo.iFlags; } +#endif diff --git a/regamedll/dlls/airtank.cpp b/regamedll/dlls/airtank.cpp index 330cc15f..6c3d9459 100644 --- a/regamedll/dlls/airtank.cpp +++ b/regamedll/dlls/airtank.cpp @@ -1,17 +1,10 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - TYPEDESCRIPTION CAirtank::m_SaveData[] = { DEFINE_FIELD(CAirtank, m_state, FIELD_INTEGER) }; -#endif - LINK_ENTITY_TO_CLASS(item_airtank, CAirtank, CCSAirtank) IMPLEMENT_SAVERESTORE(CAirtank, CGrenade) diff --git a/regamedll/dlls/airtank.h b/regamedll/dlls/airtank.h index 3b756d07..a58a87d4 100644 --- a/regamedll/dlls/airtank.h +++ b/regamedll/dlls/airtank.h @@ -43,7 +43,7 @@ public: void EXPORT TankTouch(CBaseEntity *pOther); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[1]; + static TYPEDESCRIPTION m_SaveData[]; private: int m_state; diff --git a/regamedll/dlls/animating.cpp b/regamedll/dlls/animating.cpp index 52c575f8..2cde162a 100644 --- a/regamedll/dlls/animating.cpp +++ b/regamedll/dlls/animating.cpp @@ -1,10 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - TYPEDESCRIPTION CBaseAnimating::m_SaveData[] = { DEFINE_FIELD(CBaseMonster, m_flFrameRate, FIELD_FLOAT), @@ -14,8 +9,6 @@ TYPEDESCRIPTION CBaseAnimating::m_SaveData[] = DEFINE_FIELD(CBaseMonster, m_fSequenceLoops, FIELD_BOOLEAN), }; -#endif - IMPLEMENT_SAVERESTORE(CBaseAnimating, CBaseDelay) float CBaseAnimating::StudioFrameAdvance(float flInterval) diff --git a/regamedll/dlls/animation.cpp b/regamedll/dlls/animation.cpp index 162336e2..d51bd7ae 100644 --- a/regamedll/dlls/animation.cpp +++ b/regamedll/dlls/animation.cpp @@ -1,10 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - void EXT_FUNC SV_StudioSetupBones(model_t *pModel, float frame, int sequence, const vec_t *angles, const vec_t *origin, const byte *pcontroller, const byte *pblending, int iBone, const edict_t *pEdict); sv_blending_interface_t svBlending = @@ -13,8 +8,6 @@ sv_blending_interface_t svBlending = SV_StudioSetupBones }; -#endif - server_studio_api_t IEngineStudio; studiohdr_t *g_pstudiohdr; @@ -361,7 +354,7 @@ float SetController(void *pmodel, entvars_t *pev, int iController, float flValue int setting = int64(255.0f * (flValue - pbonecontroller->start) / (pbonecontroller->end - pbonecontroller->start)); setting = Q_clamp(setting, 0, 255); - pev->controller[ iController ] = setting; + pev->controller[iController] = setting; return setting * (1.0f / 255.0f) * (pbonecontroller->end - pbonecontroller->start) + pbonecontroller->start; } @@ -693,12 +686,12 @@ mstudioanim_t *StudioGetAnim(model_t *m_pSubModel, mstudioseqdesc_t *pseqdesc) m_pSubModel->submodels = (dmodel_t *)paSequences; } - if (!IEngineStudio.Cache_Check((struct cache_user_s *)&(paSequences[ pseqdesc->seqgroup ]))) + if (!IEngineStudio.Cache_Check((struct cache_user_s *)&(paSequences[pseqdesc->seqgroup]))) { - IEngineStudio.LoadCacheFile(pseqgroup->name, (struct cache_user_s *)&paSequences[ pseqdesc->seqgroup ]); + IEngineStudio.LoadCacheFile(pseqgroup->name, (struct cache_user_s *)&paSequences[pseqdesc->seqgroup]); } - return (mstudioanim_t *)((byte *)paSequences[ pseqdesc->seqgroup ].data + pseqdesc->animindex); + return (mstudioanim_t *)((byte *)paSequences[pseqdesc->seqgroup].data + pseqdesc->animindex); } mstudioanim_t *LookupAnimation(model_t *model, mstudioseqdesc_t *pseqdesc, int index) diff --git a/regamedll/dlls/basemonster.cpp b/regamedll/dlls/basemonster.cpp index e2f7be80..d056e996 100644 --- a/regamedll/dlls/basemonster.cpp +++ b/regamedll/dlls/basemonster.cpp @@ -812,7 +812,7 @@ int CBaseMonster::IRelationship(CBaseEntity *pTarget) { R_NO, R_NO, R_DL, R_DL, R_DL, R_AL, R_NO, R_DL, R_DL, R_NO, R_NO, R_DL, R_DL, R_NO }, // ABIOWEAPON }; - return iEnemy[ Classify() ][ pTarget->Classify() ]; + return iEnemy[Classify()][pTarget->Classify()]; } // Base class monster function to find enemies or food by sight. diff --git a/regamedll/dlls/bmodels.cpp b/regamedll/dlls/bmodels.cpp index b837be23..47c27e14 100644 --- a/regamedll/dlls/bmodels.cpp +++ b/regamedll/dlls/bmodels.cpp @@ -1,33 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - -TYPEDESCRIPTION CFuncRotating::m_SaveData[] = -{ - DEFINE_FIELD(CFuncRotating, m_flFanFriction, FIELD_FLOAT), - DEFINE_FIELD(CFuncRotating, m_flAttenuation, FIELD_FLOAT), - DEFINE_FIELD(CFuncRotating, m_flVolume, FIELD_FLOAT), - DEFINE_FIELD(CFuncRotating, m_pitch, FIELD_FLOAT), - DEFINE_FIELD(CFuncRotating, m_sounds, FIELD_INTEGER) -}; - -TYPEDESCRIPTION CPendulum::m_SaveData[] = -{ - DEFINE_FIELD(CPendulum, m_accel, FIELD_FLOAT), - DEFINE_FIELD(CPendulum, m_distance, FIELD_FLOAT), - DEFINE_FIELD(CPendulum, m_time, FIELD_TIME), - DEFINE_FIELD(CPendulum, m_damp, FIELD_FLOAT), - DEFINE_FIELD(CPendulum, m_maxSpeed, FIELD_FLOAT), - DEFINE_FIELD(CPendulum, m_dampSpeed, FIELD_FLOAT), - DEFINE_FIELD(CPendulum, m_center, FIELD_VECTOR), - DEFINE_FIELD(CPendulum, m_start, FIELD_VECTOR), -}; - -#endif - // BModelOrigin - calculates origin of a bmodel from absmin/size because all bmodel origins are 0 0 0 Vector VecBModelOrigin(entvars_t *pevBModel) { @@ -223,6 +195,15 @@ void CFuncMonsterClip::Spawn() pev->flags |= FL_MONSTERCLIP; } +TYPEDESCRIPTION CFuncRotating::m_SaveData[] = +{ + DEFINE_FIELD(CFuncRotating, m_flFanFriction, FIELD_FLOAT), + DEFINE_FIELD(CFuncRotating, m_flAttenuation, FIELD_FLOAT), + DEFINE_FIELD(CFuncRotating, m_flVolume, FIELD_FLOAT), + DEFINE_FIELD(CFuncRotating, m_pitch, FIELD_FLOAT), + DEFINE_FIELD(CFuncRotating, m_sounds, FIELD_INTEGER) +}; + LINK_ENTITY_TO_CLASS(func_rotating, CFuncRotating, CCSFuncRotating) IMPLEMENT_SAVERESTORE(CFuncRotating, CBaseEntity) @@ -687,6 +668,18 @@ void CFuncRotating::Blocked(CBaseEntity *pOther) pOther->TakeDamage(pev, pev, pev->dmg, DMG_CRUSH); } +TYPEDESCRIPTION CPendulum::m_SaveData[] = +{ + DEFINE_FIELD(CPendulum, m_accel, FIELD_FLOAT), + DEFINE_FIELD(CPendulum, m_distance, FIELD_FLOAT), + DEFINE_FIELD(CPendulum, m_time, FIELD_TIME), + DEFINE_FIELD(CPendulum, m_damp, FIELD_FLOAT), + DEFINE_FIELD(CPendulum, m_maxSpeed, FIELD_FLOAT), + DEFINE_FIELD(CPendulum, m_dampSpeed, FIELD_FLOAT), + DEFINE_FIELD(CPendulum, m_center, FIELD_VECTOR), + DEFINE_FIELD(CPendulum, m_start, FIELD_VECTOR), +}; + LINK_ENTITY_TO_CLASS(func_pendulum, CPendulum, CCSPendulum) IMPLEMENT_SAVERESTORE(CPendulum, CBaseEntity) diff --git a/regamedll/dlls/bmodels.h b/regamedll/dlls/bmodels.h index ea370e02..b63584a2 100644 --- a/regamedll/dlls/bmodels.h +++ b/regamedll/dlls/bmodels.h @@ -144,7 +144,7 @@ public: void RampPitchVol(BOOL fUp); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[5]; + static TYPEDESCRIPTION m_SaveData[]; float m_flFanFriction; float m_flAttenuation; @@ -183,7 +183,7 @@ public: void EXPORT RopeTouch(CBaseEntity *pOther); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[8]; + static TYPEDESCRIPTION m_SaveData[]; float m_accel; // acceleration float m_distance; diff --git a/regamedll/dlls/bot/cs_bot.cpp b/regamedll/dlls/bot/cs_bot.cpp index e64704ca..db69829f 100644 --- a/regamedll/dlls/bot/cs_bot.cpp +++ b/regamedll/dlls/bot/cs_bot.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" #ifdef REGAMEDLL_ADD @@ -565,15 +593,15 @@ void CCSBot::SetHidingSpotCheckTimestamp(HidingSpot *spot) // if there is room for more spots, append this one if (m_checkedHidingSpotCount < MAX_CHECKED_SPOTS) { - m_checkedHidingSpot[ m_checkedHidingSpotCount ].spot = spot; - m_checkedHidingSpot[ m_checkedHidingSpotCount ].timestamp = gpGlobals->time; + m_checkedHidingSpot[m_checkedHidingSpotCount].spot = spot; + m_checkedHidingSpot[m_checkedHidingSpotCount].timestamp = gpGlobals->time; m_checkedHidingSpotCount++; } else { // replace the least recent spot - m_checkedHidingSpot[ leastRecent ].spot = spot; - m_checkedHidingSpot[ leastRecent ].timestamp = gpGlobals->time; + m_checkedHidingSpot[leastRecent].spot = spot; + m_checkedHidingSpot[leastRecent].timestamp = gpGlobals->time; } } @@ -840,7 +868,7 @@ const Vector *FindNearbyRetreatSpot(CCSBot *me, float maxRange) // select a hiding spot at random int which = RANDOM_LONG(0, collector.m_count - 1); - return collector.m_spot[ which ]; + return collector.m_spot[which]; } // Return euclidean distance to farthest escorted hostage. diff --git a/regamedll/dlls/bot/cs_bot.h b/regamedll/dlls/bot/cs_bot.h index dd8953c1..02011b62 100644 --- a/regamedll/dlls/bot/cs_bot.h +++ b/regamedll/dlls/bot/cs_bot.h @@ -45,12 +45,6 @@ enum extern int _navAreaCount; extern int _currentIndex; -extern struct BuyInfo primaryWeaponBuyInfoCT[MAX_BUY_WEAPON_PRIMARY]; -extern struct BuyInfo secondaryWeaponBuyInfoCT[MAX_BUY_WEAPON_SECONDARY]; - -extern struct BuyInfo primaryWeaponBuyInfoT[MAX_BUY_WEAPON_PRIMARY]; -extern struct BuyInfo secondaryWeaponBuyInfoT[MAX_BUY_WEAPON_SECONDARY]; - class CCSBot; class BotChatterInterface; diff --git a/regamedll/dlls/bot/cs_bot_chatter.cpp b/regamedll/dlls/bot/cs_bot_chatter.cpp index 7476a4c4..3282f3c3 100644 --- a/regamedll/dlls/bot/cs_bot_chatter.cpp +++ b/regamedll/dlls/bot/cs_bot_chatter.cpp @@ -1,16 +1,37 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" #include -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - BotPhraseManager *TheBotPhrases = nullptr; CountdownTimer BotChatterInterface::m_encourageTimer; -IntervalTimer BotChatterInterface::m_radioSilenceInterval[ 2 ]; - -#endif +IntervalTimer BotChatterInterface::m_radioSilenceInterval[2]; const Vector *GetRandomSpotAtPlace(Place place) { @@ -297,16 +318,16 @@ char *BotPhrase::GetSpeakable(int bankIndex, float *duration) const } // find phrase that meets the current criteria - int start = m_index[ bankIndex ]; + int start = m_index[bankIndex]; while (true) { - BotSpeakableVector *speakables = m_voiceBank[ bankIndex ]; - int &index = m_index[ bankIndex ]; + BotSpeakableVector *speakables = m_voiceBank[bankIndex]; + int &index = m_index[bankIndex]; const BotSpeakable *speak = (*speakables)[index++]; - if (m_index[ bankIndex ] >= m_count[ bankIndex ]) - m_index[ bankIndex ] = 0; + if (m_index[bankIndex] >= m_count[bankIndex]) + m_index[bankIndex] = 0; // check place criteria // if this speakable has a place criteria, it must match to be used @@ -341,7 +362,6 @@ char *BotPhrase::GetSpeakable(int bankIndex, float *duration) const } // Randomly shuffle the speakable order -#ifndef HOOK_GAMEDLL void BotPhrase::Randomize() { for (size_t i = 0; i < m_voiceBank.size(); i++) @@ -349,7 +369,6 @@ void BotPhrase::Randomize() std::random_shuffle(m_voiceBank[i]->begin(), m_voiceBank[i]->end()); } } -#endif BotPhraseManager::BotPhraseManager() { @@ -617,10 +636,10 @@ bool BotPhraseManager::Initialize(const char *filename, int bankIndex) speak->m_duration = 1.0f; } - BotSpeakableVector *speakables = phrase->m_voiceBank[ bankIndex ]; + BotSpeakableVector *speakables = phrase->m_voiceBank[bankIndex]; speakables->push_back(speak); - phrase->m_count[ bankIndex ]++; + phrase->m_count[bankIndex]++; } if (isDefault) @@ -792,7 +811,7 @@ void BotStatement::AttachMeme(BotMeme *meme) void BotStatement::AddCondition(ConditionType condition) { if (m_conditionCount < MAX_BOT_CONDITIONS) - m_condition[ m_conditionCount++ ] = condition; + m_condition[m_conditionCount++] = condition; } // Return true if this statement is "important" and not personality chatter @@ -938,8 +957,9 @@ void BotStatement::AppendPhrase(const BotPhrase *phrase) if (m_count < MAX_BOT_PHRASES) { - m_statement[ m_count ].isPhrase = true; - m_statement[ m_count++ ].phrase = phrase; + m_statement[m_count].isPhrase = true; + m_statement[m_count].phrase = phrase; + m_count++; } } @@ -948,8 +968,9 @@ void BotStatement::AppendPhrase(ContextType contextPhrase) { if (m_count < MAX_BOT_PHRASES) { - m_statement[ m_count ].isPhrase = false; - m_statement[ m_count++ ].context = contextPhrase; + m_statement[m_count].isPhrase = false; + m_statement[m_count].context = contextPhrase; + m_count++; } } @@ -970,7 +991,7 @@ bool BotStatement::Update() } // special case - context dependent delay - if (m_index >= 0 && m_statement[ m_index ].context == ACCUMULATE_ENEMIES_DELAY) + if (m_index >= 0 && m_statement[m_index].context == ACCUMULATE_ENEMIES_DELAY) { // report if we see a lot of enemies, or if enough time has passed const float reportTime = 2.0f; @@ -999,15 +1020,15 @@ bool BotStatement::Update() float duration = 0.0f; const BotPhrase *phrase = nullptr; - if (m_statement[ m_index ].isPhrase) + if (m_statement[m_index].isPhrase) { // normal phrase - phrase = m_statement[ m_index ].phrase; + phrase = m_statement[m_index].phrase; } else { // context-dependant phrase - switch (m_statement[ m_index ].context) + switch (m_statement[m_index].context) { case CURRENT_ENEMY_COUNT: { @@ -1047,7 +1068,7 @@ bool BotStatement::Update() } else { - phrase = TheBotPhrases->GetPhrase(speak[ enemyCount ]); + phrase = TheBotPhrases->GetPhrase(speak[enemyCount]); } break; } @@ -1247,7 +1268,7 @@ void BotChatterInterface::Reset() m_heardNoiseTimer.Invalidate(); m_scaredInterval.Invalidate(); m_planInterval.Invalidate(); - IMPL(m_encourageTimer).Invalidate(); + m_encourageTimer.Invalidate(); m_escortingHostageTimer.Invalidate(); } @@ -1571,7 +1592,7 @@ float BotChatterInterface::GetRadioSilenceDuration() return 0; #endif - return IMPL(m_radioSilenceInterval)[m_me->m_iTeam - 1].GetElapsedTime(); + return m_radioSilenceInterval[m_me->m_iTeam - 1].GetElapsedTime(); } void BotChatterInterface::ResetRadioSilenceDuration() @@ -1581,7 +1602,7 @@ void BotChatterInterface::ResetRadioSilenceDuration() return; #endif - IMPL(m_radioSilenceInterval)[m_me->m_iTeam - 1].Reset(); + m_radioSilenceInterval[m_me->m_iTeam - 1].Reset(); } inline void SayWhere(BotStatement *say, Place place) @@ -2176,10 +2197,10 @@ NOXREF void BotChatterInterface::HostageDown() void BotChatterInterface::Encourage(const char *phraseName, float repeatInterval, float lifetime) { - if (IMPL(m_encourageTimer).IsElapsed()) + if (m_encourageTimer.IsElapsed()) { Say(phraseName, lifetime); - IMPL(m_encourageTimer).Start(repeatInterval); + m_encourageTimer.Start(repeatInterval); } } diff --git a/regamedll/dlls/bot/cs_bot_chatter.h b/regamedll/dlls/bot/cs_bot_chatter.h index e4aa6894..8cdc2c2f 100644 --- a/regamedll/dlls/bot/cs_bot_chatter.h +++ b/regamedll/dlls/bot/cs_bot_chatter.h @@ -176,8 +176,8 @@ public: CountCriteria m_count; }; -typedef std::STD_VECTOR BotSpeakableVector; -typedef std::STD_VECTOR BotVoiceBankVector; +typedef std::vector BotSpeakableVector; +typedef std::vector BotVoiceBankVector; // The BotPhrase class is a collection of Speakables associated with a name, ID, and criteria class BotPhrase @@ -210,8 +210,8 @@ private: bool m_isImportant; // mission-critical statement mutable BotVoiceBankVector m_voiceBank; // array of voice banks (arrays of speakables) - std::STD_VECTOR m_count; // number of speakables - mutable std::STD_VECTOR< int > m_index; // index of next speakable to return + std::vector m_count; // number of speakables + mutable std::vector< int > m_index; // index of next speakable to return int m_numVoiceBanks; // number of voice banks that have been initialized void InitVoiceBank(int bankIndex); // sets up the vector of voice banks for the first bankIndex voice banks @@ -219,7 +219,7 @@ private: mutable CountCriteria m_countCriteria; }; -typedef std::STD_LIST BotPhraseList; +typedef std::list BotPhraseList; inline void BotPhrase::ClearCriteria() const { @@ -538,7 +538,8 @@ private: int m_pitch; - static IntervalTimer IMPL(m_radioSilenceInterval)[2]; // one timer for each team + static IntervalTimer m_radioSilenceInterval[]; // one timer for each team + static CountdownTimer m_encourageTimer; // timer to know when we can "encourage" the human player again - shared by all bots IntervalTimer m_needBackupInterval; IntervalTimer m_spottedBomberInterval; @@ -547,7 +548,6 @@ private: CountdownTimer m_spottedLooseBombTimer; CountdownTimer m_heardNoiseTimer; CountdownTimer m_escortingHostageTimer; - static CountdownTimer IMPL(m_encourageTimer); // timer to know when we can "encourage" the human player again - shared by all bots }; inline BotChatterInterface::VerbosityType BotChatterInterface::GetVerbosity() const diff --git a/regamedll/dlls/bot/cs_bot_event.cpp b/regamedll/dlls/bot/cs_bot_event.cpp index 50396884..cc591fec 100644 --- a/regamedll/dlls/bot/cs_bot_event.cpp +++ b/regamedll/dlls/bot/cs_bot_event.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" void CCSBot::OnEvent(GameEventType event, CBaseEntity *entity, CBaseEntity *other) diff --git a/regamedll/dlls/bot/cs_bot_init.cpp b/regamedll/dlls/bot/cs_bot_init.cpp index d7185973..85246d25 100644 --- a/regamedll/dlls/bot/cs_bot_init.cpp +++ b/regamedll/dlls/bot/cs_bot_init.cpp @@ -1,45 +1,66 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - -cvar_t cv_bot_traceview = { "bot_traceview", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_stop = { "bot_stop", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_show_nav = { "bot_show_nav", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_show_danger = { "bot_show_danger", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_nav_edit = { "bot_nav_edit", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_nav_zdraw = { "bot_nav_zdraw", "4", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_walk = { "bot_walk", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_difficulty = { "bot_difficulty", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_debug = { "bot_debug", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_quicksave = { "bot_quicksave", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_quota = { "bot_quota", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_quota_match = { "bot_quota_match", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_prefix = { "bot_prefix", "", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_allow_rogues = { "bot_allow_rogues", "1", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_allow_pistols = { "bot_allow_pistols", "1", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_allow_shotguns = { "bot_allow_shotguns", "1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_traceview = { "bot_traceview", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_stop = { "bot_stop", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_show_nav = { "bot_show_nav", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_show_danger = { "bot_show_danger", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_nav_edit = { "bot_nav_edit", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_nav_zdraw = { "bot_nav_zdraw", "4", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_walk = { "bot_walk", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_difficulty = { "bot_difficulty", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_debug = { "bot_debug", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_quicksave = { "bot_quicksave", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_quota = { "bot_quota", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_quota_match = { "bot_quota_match", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_prefix = { "bot_prefix", "", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_allow_rogues = { "bot_allow_rogues", "1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_allow_pistols = { "bot_allow_pistols", "1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_allow_shotguns = { "bot_allow_shotguns", "1", FCVAR_SERVER, 0.0f, nullptr }; cvar_t cv_bot_allow_sub_machine_guns = { "bot_allow_sub_machine_guns", "1", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_allow_rifles = { "bot_allow_rifles", "1", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_allow_machine_guns = { "bot_allow_machine_guns", "1", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_allow_grenades = { "bot_allow_grenades", "1", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_allow_snipers = { "bot_allow_snipers", "1", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_allow_shield = { "bot_allow_shield", "1", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_join_team = { "bot_join_team", "any", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_join_after_player = { "bot_join_after_player", "1", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_auto_vacate = { "bot_auto_vacate", "1", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_zombie = { "bot_zombie", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_defer_to_human = { "bot_defer_to_human", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_chatter = { "bot_chatter", "normal", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_profile_db = { "bot_profile_db", "BotProfile.db", FCVAR_SERVER, 0.0f, nullptr }; - -#endif +cvar_t cv_bot_allow_rifles = { "bot_allow_rifles", "1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_allow_machine_guns = { "bot_allow_machine_guns", "1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_allow_grenades = { "bot_allow_grenades", "1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_allow_snipers = { "bot_allow_snipers", "1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_allow_shield = { "bot_allow_shield", "1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_join_team = { "bot_join_team", "any", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_join_after_player = { "bot_join_after_player", "1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_auto_vacate = { "bot_auto_vacate", "1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_zombie = { "bot_zombie", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_defer_to_human = { "bot_defer_to_human", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_chatter = { "bot_chatter", "normal", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_profile_db = { "bot_profile_db", "BotProfile.db", FCVAR_SERVER, 0.0f, nullptr }; #ifdef REGAMEDLL_ADD -cvar_t cv_bot_deathmatch = { "bot_deathmatch", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_bot_quota_mode = { "bot_quota_mode", "normal", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_deathmatch = { "bot_deathmatch", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_bot_quota_mode = { "bot_quota_mode", "normal", FCVAR_SERVER, 0.0f, nullptr }; #endif void InstallBotControl() diff --git a/regamedll/dlls/bot/cs_bot_init.h b/regamedll/dlls/bot/cs_bot_init.h new file mode 100644 index 00000000..522a062d --- /dev/null +++ b/regamedll/dlls/bot/cs_bot_init.h @@ -0,0 +1,64 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + +#pragma once + +extern cvar_t cv_bot_traceview; +extern cvar_t cv_bot_stop; +extern cvar_t cv_bot_show_nav; +extern cvar_t cv_bot_show_danger; +extern cvar_t cv_bot_nav_edit; +extern cvar_t cv_bot_nav_zdraw; +extern cvar_t cv_bot_walk; +extern cvar_t cv_bot_difficulty; +extern cvar_t cv_bot_debug; +extern cvar_t cv_bot_quicksave; +extern cvar_t cv_bot_quota; +extern cvar_t cv_bot_quota_match; +extern cvar_t cv_bot_prefix; +extern cvar_t cv_bot_allow_rogues; +extern cvar_t cv_bot_allow_pistols; +extern cvar_t cv_bot_allow_shotguns; +extern cvar_t cv_bot_allow_sub_machine_guns; +extern cvar_t cv_bot_allow_rifles; +extern cvar_t cv_bot_allow_machine_guns; +extern cvar_t cv_bot_allow_grenades; +extern cvar_t cv_bot_allow_snipers; +extern cvar_t cv_bot_allow_shield; +extern cvar_t cv_bot_join_team; +extern cvar_t cv_bot_join_after_player; +extern cvar_t cv_bot_auto_vacate; +extern cvar_t cv_bot_zombie; +extern cvar_t cv_bot_defer_to_human; +extern cvar_t cv_bot_chatter; +extern cvar_t cv_bot_profile_db; + +#ifdef REGAMEDLL_ADD +extern cvar_t cv_bot_deathmatch; +extern cvar_t cv_bot_quota_mode; +#endif diff --git a/regamedll/dlls/bot/cs_bot_learn.cpp b/regamedll/dlls/bot/cs_bot_learn.cpp index 82e8e311..3937d656 100644 --- a/regamedll/dlls/bot/cs_bot_learn.cpp +++ b/regamedll/dlls/bot/cs_bot_learn.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" const float updateTimesliceDuration = 0.5f; diff --git a/regamedll/dlls/bot/cs_bot_listen.cpp b/regamedll/dlls/bot/cs_bot_listen.cpp index 920c292f..c9bb5c99 100644 --- a/regamedll/dlls/bot/cs_bot_listen.cpp +++ b/regamedll/dlls/bot/cs_bot_listen.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Listen for enemy noises, and determine if we should react to them. diff --git a/regamedll/dlls/bot/cs_bot_manager.cpp b/regamedll/dlls/bot/cs_bot_manager.cpp index e4c3b1a6..482c3038 100644 --- a/regamedll/dlls/bot/cs_bot_manager.cpp +++ b/regamedll/dlls/bot/cs_bot_manager.cpp @@ -1,9 +1,32 @@ -#include "precompiled.h" - /* -* Globals initialization +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* */ -#ifndef HOOK_GAMEDLL + +#include "precompiled.h" CBotManager *TheBots = nullptr; @@ -13,11 +36,9 @@ bool CCSBotManager::m_isLearningMap = false; bool CCSBotManager::m_isAnalysisRequested = false; NavEditCmdType CCSBotManager::m_editCmd = EDIT_NONE; -#endif - CCSBotManager::CCSBotManager() { - IMPL(m_flNextCVarCheck) = 0.0f; + m_flNextCVarCheck = 0.0f; m_zoneCount = 0; SetLooseBomb(nullptr); @@ -25,9 +46,9 @@ CCSBotManager::CCSBotManager() m_isBombPlanted = false; m_bombDefuser = nullptr; - IMPL(m_isLearningMap) = false; - IMPL(m_isAnalysisRequested) = false; - IMPL(m_editCmd) = EDIT_NONE; + m_isLearningMap = false; + m_isAnalysisRequested = false; + m_editCmd = EDIT_NONE; m_navPlace = 0; m_roundStartTimestamp = 0.0f; @@ -96,7 +117,7 @@ void CCSBotManager::RestartRound() m_earliestBombPlantTimestamp = gpGlobals->time + RANDOM_FLOAT(10.0f, 30.0f); m_bombDefuser = nullptr; - IMPL(m_editCmd) = EDIT_NONE; + m_editCmd = EDIT_NONE; ResetRadioMessageTimestamps(); @@ -114,59 +135,7 @@ void CCSBotManager::RestartRound() m_canRespawn = true; } -void UTIL_DrawBox(Extent *extent, int lifetime, int red, int green, int blue) -{ - Vector v[8]; - v[0].x = extent->lo.x; v[0].y = extent->lo.y; v[0].z = extent->lo.z; - v[1].x = extent->hi.x; v[1].y = extent->lo.y; v[1].z = extent->lo.z; - v[2].x = extent->hi.x; v[2].y = extent->hi.y; v[2].z = extent->lo.z; - v[3].x = extent->lo.x; v[3].y = extent->hi.y; v[3].z = extent->lo.z; - v[4].x = extent->lo.x; v[4].y = extent->lo.y; v[4].z = extent->hi.z; - v[5].x = extent->hi.x; v[5].y = extent->lo.y; v[5].z = extent->hi.z; - v[6].x = extent->hi.x; v[6].y = extent->hi.y; v[6].z = extent->hi.z; - v[7].x = extent->lo.x; v[7].y = extent->hi.y; v[7].z = extent->hi.z; - - static int edge[] = - { - 1, 2, 3, 4, -1, - 5, 6, 7, 8, -5, - 1, -5, - 2, -6, - 3, -7, - 4, -8, - 0 // end iterator - }; - - Vector from, to; - bool restart = true; - - for (int i = 0; edge[i] != 0; i++) - { - if (restart) - { - to = v[ edge[i] - 1 ]; - restart = false; - continue; - } - - from = to; - - int index = edge[i]; - if (index < 0) - { - restart = true; - index = -index; - } - - to = v[ index - 1 ]; - - UTIL_DrawBeamPoints(from, to, lifetime, red, green, blue); - UTIL_DrawBeamPoints(to, from, lifetime, red, green, blue); - } -} - // Called each frame - void CCSBotManager::StartFrame() { // EXTEND @@ -244,7 +213,7 @@ bool CCSBotManager::IsOnOffense(CBasePlayer *player) const void CCSBotManager::ServerActivate() { DestroyNavigationMap(); - IMPL(m_isMapDataLoaded) = false; + m_isMapDataLoaded = false; m_zoneCount = 0; m_gameScenario = SCENARIO_DEATHMATCH; @@ -252,8 +221,8 @@ void CCSBotManager::ServerActivate() ValidateMapData(); RestartRound(); - IMPL(m_isLearningMap) = false; - IMPL(m_isAnalysisRequested) = false; + m_isLearningMap = false; + m_isAnalysisRequested = false; m_bServerActive = true; AddServerCommands(); @@ -510,59 +479,59 @@ void CCSBotManager::ServerCommand(const char *pcmd) } else if (FStrEq(pcmd, "bot_nav_delete")) { - IMPL(m_editCmd) = EDIT_DELETE; + m_editCmd = EDIT_DELETE; } else if (FStrEq(pcmd, "bot_nav_split")) { - IMPL(m_editCmd) = EDIT_SPLIT; + m_editCmd = EDIT_SPLIT; } else if (FStrEq(pcmd, "bot_nav_merge")) { - IMPL(m_editCmd) = EDIT_MERGE; + m_editCmd = EDIT_MERGE; } else if (FStrEq(pcmd, "bot_nav_mark")) { - IMPL(m_editCmd) = EDIT_MARK; + m_editCmd = EDIT_MARK; } else if (FStrEq(pcmd, "bot_nav_begin_area")) { - IMPL(m_editCmd) = EDIT_BEGIN_AREA; + m_editCmd = EDIT_BEGIN_AREA; } else if (FStrEq(pcmd, "bot_nav_end_area")) { - IMPL(m_editCmd) = EDIT_END_AREA; + m_editCmd = EDIT_END_AREA; } else if (FStrEq(pcmd, "bot_nav_connect")) { - IMPL(m_editCmd) = EDIT_CONNECT; + m_editCmd = EDIT_CONNECT; } else if (FStrEq(pcmd, "bot_nav_disconnect")) { - IMPL(m_editCmd) = EDIT_DISCONNECT; + m_editCmd = EDIT_DISCONNECT; } else if (FStrEq(pcmd, "bot_nav_splice")) { - IMPL(m_editCmd) = EDIT_SPLICE; + m_editCmd = EDIT_SPLICE; } else if (FStrEq(pcmd, "bot_nav_crouch")) { - IMPL(m_editCmd) = EDIT_ATTRIB_CROUCH; + m_editCmd = EDIT_ATTRIB_CROUCH; } else if (FStrEq(pcmd, "bot_nav_jump")) { - IMPL(m_editCmd) = EDIT_ATTRIB_JUMP; + m_editCmd = EDIT_ATTRIB_JUMP; } else if (FStrEq(pcmd, "bot_nav_precise")) { - IMPL(m_editCmd) = EDIT_ATTRIB_PRECISE; + m_editCmd = EDIT_ATTRIB_PRECISE; } else if (FStrEq(pcmd, "bot_nav_no_jump")) { - IMPL(m_editCmd) = EDIT_ATTRIB_NO_JUMP; + m_editCmd = EDIT_ATTRIB_NO_JUMP; } else if (FStrEq(pcmd, "bot_nav_analyze")) { - IMPL(m_isAnalysisRequested) = true; + m_isAnalysisRequested = true; } else if (FStrEq(pcmd, "bot_nav_strip")) { @@ -645,19 +614,19 @@ void CCSBotManager::ServerCommand(const char *pcmd) } else if (FStrEq(pcmd, "bot_nav_toggle_place_mode")) { - IMPL(m_editCmd) = EDIT_TOGGLE_PLACE_MODE; + m_editCmd = EDIT_TOGGLE_PLACE_MODE; } else if (FStrEq(pcmd, "bot_nav_place_floodfill")) { - IMPL(m_editCmd) = EDIT_PLACE_FLOODFILL; + m_editCmd = EDIT_PLACE_FLOODFILL; } else if (FStrEq(pcmd, "bot_nav_place_pick")) { - IMPL(m_editCmd) = EDIT_PLACE_PICK; + m_editCmd = EDIT_PLACE_PICK; } else if (FStrEq(pcmd, "bot_nav_toggle_place_painting")) { - IMPL(m_editCmd) = EDIT_TOGGLE_PLACE_PAINTING; + m_editCmd = EDIT_TOGGLE_PLACE_PAINTING; } else if (FStrEq(pcmd, "bot_goto_mark")) { @@ -716,23 +685,23 @@ void CCSBotManager::ServerCommand(const char *pcmd) } else if (FStrEq(pcmd, "bot_nav_mark_unnamed")) { - IMPL(m_editCmd) = EDIT_MARK_UNNAMED; + m_editCmd = EDIT_MARK_UNNAMED; } else if (FStrEq(pcmd, "bot_nav_warp")) { - IMPL(m_editCmd) = EDIT_WARP_TO_MARK; + m_editCmd = EDIT_WARP_TO_MARK; } else if (FStrEq(pcmd, "bot_nav_corner_select")) { - IMPL(m_editCmd) = EDIT_SELECT_CORNER; + m_editCmd = EDIT_SELECT_CORNER; } else if (FStrEq(pcmd, "bot_nav_corner_raise")) { - IMPL(m_editCmd) = EDIT_RAISE_CORNER; + m_editCmd = EDIT_RAISE_CORNER; } else if (FStrEq(pcmd, "bot_nav_corner_lower")) { - IMPL(m_editCmd) = EDIT_LOWER_CORNER; + m_editCmd = EDIT_LOWER_CORNER; } else if (FStrEq(pcmd, "bot_nav_check_consistency")) { @@ -762,11 +731,10 @@ BOOL CCSBotManager::ClientCommand(CBasePlayer *pPlayer, const char *pcmd) bool CCSBotManager::BotAddCommand(BotProfileTeamType team, bool isFromConsole) { // dont allow bots to join if the Navigation Area is being generated - if (IMPL(m_isLearningMap)) + if (m_isLearningMap) return false; const BotProfile *profile = nullptr; - if (!isFromConsole || CMD_ARGC() < 2) { // if team not specified, check cv_bot_join_team cvar for preference @@ -838,7 +806,7 @@ void CCSBotManager::MaintainBotQuota() return; #endif - if (IMPL(m_isLearningMap)) + if (m_isLearningMap) return; int totalHumansInGame = UTIL_HumansInGame(); @@ -961,17 +929,17 @@ void CCSBotManager::MonitorBotCVars() { if (cv_bot_nav_edit.value != 0.0f) { - EditNavAreas(IMPL(m_editCmd)); - IMPL(m_editCmd) = EDIT_NONE; + EditNavAreas(m_editCmd); + m_editCmd = EDIT_NONE; } - if (gpGlobals->time >= IMPL(m_flNextCVarCheck)) + if (gpGlobals->time >= m_flNextCVarCheck) { if (cv_bot_show_danger.value != 0.0f) DrawDanger(); MaintainBotQuota(); - IMPL(m_flNextCVarCheck) = gpGlobals->time + 0.3f; + m_flNextCVarCheck = gpGlobals->time + 0.3f; } } @@ -993,7 +961,7 @@ class CollectOverlappingAreas && areaExtent->hi.z >= m_zone->m_extent.lo.z && areaExtent->lo.z <= m_zone->m_extent.hi.z) { // area overlaps m_zone - m_zone->m_area[ m_zone->m_areaCount++ ] = area; + m_zone->m_area[m_zone->m_areaCount++] = area; if (m_zone->m_areaCount == CCSBotManager::MAX_ZONE_NAV_AREAS) { return false; @@ -1010,10 +978,10 @@ class CollectOverlappingAreas // Search the map entities to determine the game scenario and define important zones. void CCSBotManager::ValidateMapData() { - if (IMPL(m_isMapDataLoaded) || !AreBotsAllowed()) + if (m_isMapDataLoaded || !AreBotsAllowed()) return; - IMPL(m_isMapDataLoaded) = true; + m_isMapDataLoaded = true; if (LoadNavigationMap()) { @@ -1079,10 +1047,10 @@ void CCSBotManager::ValidateMapData() { if (m_zoneCount < MAX_ZONES) { - m_zone[ m_zoneCount ].m_center = isLegacy ? pEntity->pev->origin : (pEntity->pev->absmax + pEntity->pev->absmin) / 2.0f; - m_zone[ m_zoneCount ].m_isLegacy = isLegacy; - m_zone[ m_zoneCount ].m_index = m_zoneCount; - m_zone[ m_zoneCount ].m_entity = pEntity; + m_zone[m_zoneCount].m_center = isLegacy ? pEntity->pev->origin : (pEntity->pev->absmax + pEntity->pev->absmin) / 2.0f; + m_zone[m_zoneCount].m_isLegacy = isLegacy; + m_zone[m_zoneCount].m_index = m_zoneCount; + m_zone[m_zoneCount].m_entity = pEntity; m_zoneCount++; } else @@ -1110,10 +1078,10 @@ void CCSBotManager::ValidateMapData() if (m_zoneCount < MAX_ZONES) { - m_zone[ m_zoneCount ].m_center = pEntity->pev->origin; - m_zone[ m_zoneCount ].m_isLegacy = true; - m_zone[ m_zoneCount ].m_index = m_zoneCount; - m_zone[ m_zoneCount ].m_entity = pEntity; + m_zone[m_zoneCount].m_center = pEntity->pev->origin; + m_zone[m_zoneCount].m_isLegacy = true; + m_zone[m_zoneCount].m_index = m_zoneCount; + m_zone[m_zoneCount].m_entity = pEntity; m_zoneCount++; } else @@ -1306,7 +1274,7 @@ CNavArea *CCSBotManager::GetRandomAreaInZone(const Zone *zone) const if (!zone->m_areaCount) return nullptr; - return zone->m_area[ RANDOM_LONG(0, zone->m_areaCount - 1) ]; + return zone->m_area[RANDOM_LONG(0, zone->m_areaCount - 1)]; } void CCSBotManager::OnEvent(GameEventType event, CBaseEntity *entity, CBaseEntity *other) @@ -1455,7 +1423,7 @@ float CCSBotManager::GetRadioMessageTimestamp(GameEventType event, int teamID) c return 0.0f; int i = (teamID == TERRORIST) ? 0 : 1; - return m_radioMsgTimestamp[ event - EVENT_START_RADIO_1 ][ i ]; + return m_radioMsgTimestamp[event - EVENT_START_RADIO_1][i]; } // Return the interval since the last time this message was sent @@ -1465,7 +1433,7 @@ float CCSBotManager::GetRadioMessageInterval(GameEventType event, int teamID) co return 99999999.9f; int i = (teamID == TERRORIST) ? 0 : 1; - return gpGlobals->time - m_radioMsgTimestamp[ event - EVENT_START_RADIO_1 ][ i ]; + return gpGlobals->time - m_radioMsgTimestamp[event - EVENT_START_RADIO_1][i]; } // Set the given radio message timestamp. @@ -1476,7 +1444,7 @@ void CCSBotManager::SetRadioMessageTimestamp(GameEventType event, int teamID) return; int i = (teamID == TERRORIST) ? 0 : 1; - m_radioMsgTimestamp[ event - EVENT_START_RADIO_1 ][ i ] = gpGlobals->time; + m_radioMsgTimestamp[event - EVENT_START_RADIO_1][i] = gpGlobals->time; } // Reset all radio message timestamps diff --git a/regamedll/dlls/bot/cs_bot_manager.h b/regamedll/dlls/bot/cs_bot_manager.h index 21a55b81..9e0098f0 100644 --- a/regamedll/dlls/bot/cs_bot_manager.h +++ b/regamedll/dlls/bot/cs_bot_manager.h @@ -28,6 +28,8 @@ #pragma once +#include "cs_bot_init.h" + extern CBotManager *TheBots; // The manager for Counter-Strike specific bots @@ -56,11 +58,11 @@ public: public: void ValidateMapData(); void OnFreeEntPrivateData(CBaseEntity *pEntity); - bool IsLearningMap() const { return IMPL(m_isLearningMap); } - void SetLearningMapFlag() { IMPL(m_isLearningMap) = true; } - bool IsAnalysisRequested() const { return IMPL(m_isAnalysisRequested); } - void RequestAnalysis() { IMPL(m_isAnalysisRequested) = true; } - void AckAnalysisRequest() { IMPL(m_isAnalysisRequested) = false; } + bool IsLearningMap() const { return m_isLearningMap; } + void SetLearningMapFlag() { m_isLearningMap = true; } + bool IsAnalysisRequested() const { return m_isAnalysisRequested; } + void RequestAnalysis() { m_isAnalysisRequested = true; } + void AckAnalysisRequest() { m_isAnalysisRequested = false; } // difficulty levels static BotDifficultyType GetDifficultyLevel() @@ -85,6 +87,7 @@ public: SCENARIO_RESCUE_HOSTAGES, SCENARIO_ESCORT_VIP }; + GameScenarioType GetScenario() const { #ifdef REGAMEDLL_ADD @@ -169,16 +172,16 @@ public: CNavArea *GetLooseBombArea() const { return m_looseBombArea; } // return area that bomb is in/near void SetLooseBomb(CBaseEntity *bomb); - float GetRadioMessageTimestamp(GameEventType event, int teamID) const; // return the last time the given radio message was sent for given team - float GetRadioMessageInterval(GameEventType event, int teamID) const; // return the interval since the last time this message was sent + float GetRadioMessageTimestamp(GameEventType event, int teamID) const; // return the last time the given radio message was sent for given team + float GetRadioMessageInterval(GameEventType event, int teamID) const; // return the interval since the last time this message was sent void SetRadioMessageTimestamp(GameEventType event, int teamID); void ResetRadioMessageTimestamps(); - float GetLastSeenEnemyTimestamp() const { return m_lastSeenEnemyTimestamp; } // return the last time anyone has seen an enemy + float GetLastSeenEnemyTimestamp() const { return m_lastSeenEnemyTimestamp; } // return the last time anyone has seen an enemy void SetLastSeenEnemyTimestamp() { m_lastSeenEnemyTimestamp = gpGlobals->time; } float GetRoundStartTime() const { return m_roundStartTimestamp; } - float GetElapsedRoundTime() const { return gpGlobals->time - m_roundStartTimestamp; } // return the elapsed time since the current round began + float GetElapsedRoundTime() const { return gpGlobals->time - m_roundStartTimestamp; } // return the elapsed time since the current round began bool AllowRogues() const { return cv_bot_allow_rogues.value != 0.0f; } bool AllowPistols() const { return cv_bot_allow_pistols.value != 0.0f; } @@ -193,7 +196,7 @@ public: bool IsWeaponUseable(CBasePlayerItem *item) const; // return true if the bot can use this weapon - bool IsDefenseRushing() const { return m_isDefenseRushing; } // returns true if defense team has "decided" to rush this round + bool IsDefenseRushing() const { return m_isDefenseRushing; } // returns true if defense team has "decided" to rush this round bool IsOnDefense(CBasePlayer *player) const; // return true if this player is on "defense" bool IsOnOffense(CBasePlayer *player) const; // return true if this player is on "offense" @@ -213,10 +216,10 @@ public: bool BotAddCommand(BotProfileTeamType team, bool isFromConsole = false); // process the "bot_add" console command private: - static float IMPL(m_flNextCVarCheck); - static bool IMPL(m_isMapDataLoaded); // true if we've attempted to load map data - static bool IMPL(m_isLearningMap); - static bool IMPL(m_isAnalysisRequested); + static float m_flNextCVarCheck; + static bool m_isMapDataLoaded; // true if we've attempted to load map data + static bool m_isLearningMap; + static bool m_isAnalysisRequested; GameScenarioType m_gameScenario; // what kind of game are we playing @@ -239,7 +242,7 @@ private: bool m_isDefenseRushing; // whether defensive team is rushing this round or not - static NavEditCmdType IMPL(m_editCmd); + static NavEditCmdType m_editCmd; unsigned int m_navPlace; CountdownTimer m_respawnTimer; bool m_isRespawnStarted; @@ -264,4 +267,3 @@ inline bool AreBotsAllowed() } void PrintAllEntities(); -void UTIL_DrawBox(Extent *extent, int lifetime, int red, int green, int blue); diff --git a/regamedll/dlls/bot/cs_bot_nav.cpp b/regamedll/dlls/bot/cs_bot_nav.cpp index 0fffeac4..a2b11bfa 100644 --- a/regamedll/dlls/bot/cs_bot_nav.cpp +++ b/regamedll/dlls/bot/cs_bot_nav.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Reset the stuck-checker. @@ -51,7 +79,7 @@ void CCSBot::StuckCheck() float moveDist = vel.Length(); float deltaT = g_flBotFullThinkInterval; - m_avgVel[ m_avgVelIndex++ ] = moveDist / deltaT; + m_avgVel[m_avgVelIndex++] = moveDist / deltaT; if (m_avgVelIndex == MAX_VEL_SAMPLES) m_avgVelIndex = 0; @@ -258,7 +286,7 @@ void CCSBot::MoveTowardsPosition(const Vector *pos) NOXREF void CCSBot::MoveAwayFromPosition(const Vector *pos) { // compute our current forward and lateral vectors - float angle = pev->v_angle[ YAW ]; + float angle = pev->v_angle[YAW]; Vector2D dir(BotCOS(angle), BotSIN(angle)); Vector2D lat(-dir.y, dir.x); @@ -287,7 +315,7 @@ NOXREF void CCSBot::MoveAwayFromPosition(const Vector *pos) void CCSBot::StrafeAwayFromPosition(const Vector *pos) { // compute our current forward and lateral vectors - float angle = pev->v_angle[ YAW ]; + float angle = pev->v_angle[YAW]; Vector2D dir(BotCOS(angle), BotSIN(angle)); Vector2D lat(-dir.y, dir.x); @@ -400,7 +428,7 @@ void CCSBot::ComputeApproachPoints() Vector bendPoint; if (BendLineOfSight(&eye, &ap, &bendPoint)) { - m_approachPoint[ m_approachPointCount++ ] = bendPoint; + m_approachPoint[m_approachPointCount++] = bendPoint; } } } diff --git a/regamedll/dlls/bot/cs_bot_pathfind.cpp b/regamedll/dlls/bot/cs_bot_pathfind.cpp index aaae46c5..a170a4bb 100644 --- a/regamedll/dlls/bot/cs_bot_pathfind.cpp +++ b/regamedll/dlls/bot/cs_bot_pathfind.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Determine actual path positions bot will move between along the path @@ -14,7 +42,7 @@ bool CCSBot::ComputePathPositions() for (int i = 1; i < m_pathLength; i++) { const ConnectInfo *from = &m_path[i - 1]; - ConnectInfo *to = &m_path[ i ]; + ConnectInfo *to = &m_path[i ]; // walk along the floor to the next area if (to->how <= GO_WEST) @@ -128,7 +156,7 @@ void CCSBot::SetupLadderMovement() if (m_pathIndex < 1 || m_pathLength == 0) return; - const ConnectInfo *to = &m_path[ m_pathIndex ]; + const ConnectInfo *to = &m_path[m_pathIndex]; if (to->ladder) { @@ -337,7 +365,7 @@ bool CCSBot::UpdateLadderMovement() PrintIfWatched("Fell from ladder.\n"); m_pathLadderState = MOVE_TO_DESTINATION; - m_path[ m_pathIndex ].area->GetClosestPointOnArea(&m_pathLadder->m_bottom, &m_goalPosition); + m_path[m_pathIndex].area->GetClosestPointOnArea(&m_pathLadder->m_bottom, &m_goalPosition); AddDirectionVector(&m_goalPosition, m_pathLadder->m_dir, HalfHumanWidth); PrintIfWatched("MOVE_TO_DESTINATION\n"); @@ -443,7 +471,7 @@ bool CCSBot::UpdateLadderMovement() PrintIfWatched("Fell from ladder.\n"); m_pathLadderState = MOVE_TO_DESTINATION; - m_path[ m_pathIndex ].area->GetClosestPointOnArea(&m_pathLadder->m_bottom, &m_goalPosition); + m_path[m_pathIndex].area->GetClosestPointOnArea(&m_pathLadder->m_bottom, &m_goalPosition); AddDirectionVector(&m_goalPosition, m_pathLadder->m_dir, HalfHumanWidth); PrintIfWatched("MOVE_TO_DESTINATION\n"); @@ -470,7 +498,7 @@ bool CCSBot::UpdateLadderMovement() Run(); // if our destination area requires us to crouch, do it - if (m_path[ m_pathIndex ].area->GetAttributes() & NAV_CROUCH) + if (m_path[m_pathIndex].area->GetAttributes() & NAV_CROUCH) Crouch(); // did we reach the top? @@ -480,11 +508,11 @@ bool CCSBot::UpdateLadderMovement() m_pathLadderState = DISMOUNT_ASCENDING_LADDER; PrintIfWatched("DISMOUNT_ASCENDING_LADDER\n"); - if (m_path[ m_pathIndex ].area == m_pathLadder->m_topForwardArea) + if (m_path[m_pathIndex].area == m_pathLadder->m_topForwardArea) m_pathLadderDismountDir = FORWARD; - else if (m_path[ m_pathIndex ].area == m_pathLadder->m_topLeftArea) + else if (m_path[m_pathIndex].area == m_pathLadder->m_topLeftArea) m_pathLadderDismountDir = LEFT; - else if (m_path[ m_pathIndex ].area == m_pathLadder->m_topRightArea) + else if (m_path[m_pathIndex].area == m_pathLadder->m_topRightArea) m_pathLadderDismountDir = RIGHT; m_pathLadderDismountTimestamp = gpGlobals->time; @@ -509,7 +537,7 @@ bool CCSBot::UpdateLadderMovement() { // we reached the bottom, or we fell off - dismount m_pathLadderState = MOVE_TO_DESTINATION; - m_path[ m_pathIndex ].area->GetClosestPointOnArea(&m_pathLadder->m_bottom, &m_goalPosition); + m_path[m_pathIndex].area->GetClosestPointOnArea(&m_pathLadder->m_bottom, &m_goalPosition); AddDirectionVector(&m_goalPosition, m_pathLadder->m_dir, HalfHumanWidth); PrintIfWatched("MOVE_TO_DESTINATION\n"); @@ -524,7 +552,7 @@ bool CCSBot::UpdateLadderMovement() if (gpGlobals->time - m_pathLadderDismountTimestamp >= 0.4f) { m_pathLadderState = MOVE_TO_DESTINATION; - m_path[ m_pathIndex ].area->GetClosestPointOnArea(&pev->origin, &m_goalPosition); + m_path[m_pathIndex].area->GetClosestPointOnArea(&pev->origin, &m_goalPosition); PrintIfWatched("MOVE_TO_DESTINATION\n"); } @@ -551,7 +579,7 @@ bool CCSBot::UpdateLadderMovement() } case MOVE_TO_DESTINATION: { - if (m_path[ m_pathIndex ].area->Contains(&pev->origin)) + if (m_path[m_pathIndex].area->Contains(&pev->origin)) { // successfully traversed ladder and reached destination area // exit ladder state machine @@ -796,7 +824,7 @@ int CCSBot::FindPathPoint(float aheadRange, Vector *point, int *prevIndex) if (index >= m_pathLength) index = m_pathLength - 1; - *point = m_path[ index ].pos; + *point = m_path[index].pos; // if we are very close to the next point in the path, skip ahead to the next one to avoid wiggling // we must do a 2D check here, in case the goal point is floating in space due to jump down, etc @@ -811,7 +839,7 @@ int CCSBot::FindPathPoint(float aheadRange, Vector *point, int *prevIndex) break; } - *point = m_path[ index ].pos; + *point = m_path[index].pos; } return index; @@ -820,7 +848,7 @@ int CCSBot::FindPathPoint(float aheadRange, Vector *point, int *prevIndex) // make sure we use a node a minimum distance ahead of us, to avoid wiggling while (startIndex < m_pathLength - 1) { - Vector pos = m_path[ startIndex + 1 ].pos; + Vector pos = m_path[startIndex + 1].pos; // we must do a 2D check here, in case the goal point is floating in space due to jump down, etc const float closeEpsilon = 20.0f; @@ -836,9 +864,9 @@ int CCSBot::FindPathPoint(float aheadRange, Vector *point, int *prevIndex) // if we hit a ladder, stop, or jump area, must stop (dont use ladder behind us) if (startIndex > m_pathIndex && startIndex < m_pathLength - && (m_path[ startIndex ].ladder || (m_path[ startIndex ].area->GetAttributes() & NAV_JUMP))) + && (m_path[startIndex].ladder || (m_path[startIndex].area->GetAttributes() & NAV_JUMP))) { - *point = m_path[ startIndex ].pos; + *point = m_path[startIndex].pos; return startIndex; } @@ -847,14 +875,14 @@ int CCSBot::FindPathPoint(float aheadRange, Vector *point, int *prevIndex) startIndex = m_pathLength - 1; // if we hit a ladder, stop, or jump area, must stop - if (startIndex < m_pathLength && (m_path[ startIndex ].ladder || (m_path[ startIndex ].area->GetAttributes() & NAV_JUMP))) + if (startIndex < m_pathLength && (m_path[startIndex].ladder || (m_path[startIndex].area->GetAttributes() & NAV_JUMP))) { - *point = m_path[ startIndex ].pos; + *point = m_path[startIndex].pos; return startIndex; } // note direction of path segment we are standing on - Vector initDir = m_path[ startIndex ].pos - m_path[ startIndex - 1 ].pos; + Vector initDir = m_path[startIndex].pos - m_path[startIndex - 1].pos; initDir.NormalizeInPlace(); Vector feet(pev->origin.x, pev->origin.y, GetFeetZ()); @@ -902,7 +930,7 @@ int CCSBot::FindPathPoint(float aheadRange, Vector *point, int *prevIndex) } // if we encounter a ladder or jump area, we must stop - if (i < m_pathLength && (m_path[ i ].ladder || (m_path[ i ].area->GetAttributes() & NAV_JUMP))) + if (i < m_pathLength && (m_path[i].ladder || (m_path[i].area->GetAttributes() & NAV_JUMP))) break; // Check straight-line path from our current position to this position @@ -936,8 +964,8 @@ int CCSBot::FindPathPoint(float aheadRange, Vector *point, int *prevIndex) else { // interpolate point along path segment - const Vector *afterPoint = &m_path[ afterIndex ].pos; - const Vector *beforePoint = &m_path[ afterIndex - 1 ].pos; + const Vector *afterPoint = &m_path[afterIndex].pos; + const Vector *beforePoint = &m_path[afterIndex - 1].pos; Vector to = *afterPoint - *beforePoint; float length = to.Length2D(); @@ -1009,7 +1037,7 @@ void CCSBot::SetPathIndex(int newIndex) m_pathIndex = Q_min(newIndex, m_pathLength - 1); m_areaEnteredTimestamp = gpGlobals->time; - if (m_path[ m_pathIndex ].ladder) + if (m_path[m_pathIndex].ladder) { SetupLadderMovement(); } @@ -1017,7 +1045,7 @@ void CCSBot::SetPathIndex(int newIndex) { // get our "encounter spots" for this leg of the path if (m_pathIndex < m_pathLength && m_pathIndex >= 2) - m_spotEncounter = m_path[ m_pathIndex - 1 ].area->GetSpotEncounter(m_path[ m_pathIndex - 2 ].area, m_path[ m_pathIndex ].area); + m_spotEncounter = m_path[m_pathIndex - 1].area->GetSpotEncounter(m_path[m_pathIndex - 2].area, m_path[m_pathIndex].area); else m_spotEncounter = nullptr; @@ -1033,9 +1061,9 @@ bool CCSBot::IsNearJump() const for (int i = m_pathIndex - 1; i < m_pathIndex; i++) { - if (m_path[ i ].area->GetAttributes() & NAV_JUMP) + if (m_path[i].area->GetAttributes() & NAV_JUMP) { - float dz = m_path[ i + 1 ].pos.z - m_path[ i ].pos.z; + float dz = m_path[i + 1].pos.z - m_path[i].pos.z; if (dz > 0.0f) { return true; @@ -1374,11 +1402,11 @@ CCSBot::PathResult CCSBot::UpdatePathMovement(bool allowSpeedChange) } else if (m_pathIndex < m_pathLength) { - toGoal = m_path[ m_pathIndex ].pos - pev->origin; + toGoal = m_path[m_pathIndex].pos - pev->origin; // actually aim our view farther down the path const float lookAheadRange = 500.0f; - if (!m_path[ m_pathIndex ].ladder && !IsNearJump() && toGoal.Make2D().IsLengthLessThan(lookAheadRange)) + if (!m_path[m_pathIndex].ladder && !IsNearJump() && toGoal.Make2D().IsLengthLessThan(lookAheadRange)) { float along = toGoal.Length2D(); int i; @@ -1444,7 +1472,7 @@ CCSBot::PathResult CCSBot::UpdatePathMovement(bool allowSpeedChange) { DrawPath(); - const Vector *pos = &m_path[ m_pathIndex ].pos; + const Vector *pos = &m_path[m_pathIndex].pos; UTIL_DrawBeamPoints(*pos, *pos + Vector(0, 0, 50), 1, 255, 255, 0); UTIL_DrawBeamPoints(adjustedGoal, adjustedGoal + Vector(0, 0, 50), 1, 255, 0, 255); UTIL_DrawBeamPoints(pev->origin, adjustedGoal + Vector(0, 0, 50), 1, 255, 0, 255); @@ -1503,7 +1531,7 @@ CCSBot::PathResult CCSBot::UpdatePathMovement(bool allowSpeedChange) // check if we can reach the next node, in case this was a "jump down" situation if (m_pathIndex < m_pathLength - 1) { - if (m_path[ m_pathIndex + 1 ].pos.z - GetFeetZ() > JumpCrouchHeight) + if (m_path[m_pathIndex + 1].pos.z - GetFeetZ() > JumpCrouchHeight) { // the next node is too high, too - we really did fall of the path didFall = true; @@ -1531,7 +1559,7 @@ CCSBot::PathResult CCSBot::UpdatePathMovement(bool allowSpeedChange) // if we havent made any progress in a long time, give up if (m_pathIndex < m_pathLength - 1) { - PrintIfWatched("Giving up trying to get to area #%d\n", m_path[ m_pathIndex ].area->GetID()); + PrintIfWatched("Giving up trying to get to area #%d\n", m_path[m_pathIndex].area->GetID()); } else { @@ -1648,8 +1676,8 @@ bool CCSBot::ComputePath(CNavArea *goalArea, const Vector *goal, RouteType route for (area = effectiveGoalArea; count && area; area = area->GetParent()) { count--; - m_path[ count ].area = area; - m_path[ count ].how = area->GetParentHow(); + m_path[count].area = area; + m_path[count].how = area->GetParentHow(); } // compute path positions @@ -1681,10 +1709,10 @@ bool CCSBot::ComputePath(CNavArea *goalArea, const Vector *goal, RouteType route } // append path end position - m_path[ m_pathLength ].area = effectiveGoalArea; - m_path[ m_pathLength ].pos = pathEndPosition; - m_path[ m_pathLength ].ladder = nullptr; - m_path[ m_pathLength ].how = NUM_TRAVERSE_TYPES; + m_path[m_pathLength].area = effectiveGoalArea; + m_path[m_pathLength].pos = pathEndPosition; + m_path[m_pathLength].ladder = nullptr; + m_path[m_pathLength].how = NUM_TRAVERSE_TYPES; m_pathLength++; // do movement setup diff --git a/regamedll/dlls/bot/cs_bot_radio.cpp b/regamedll/dlls/bot/cs_bot_radio.cpp index a16465ee..ae971f33 100644 --- a/regamedll/dlls/bot/cs_bot_radio.cpp +++ b/regamedll/dlls/bot/cs_bot_radio.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Returns true if the radio message is an order to do something @@ -286,7 +314,7 @@ void CCSBot::SendRadioMessage(GameEventType event) return; } - PrintIfWatched("%3.1f: SendRadioMessage( %s )\n", gpGlobals->time, GameEventName[ event ]); + PrintIfWatched("%3.1f: SendRadioMessage( %s )\n", gpGlobals->time, GameEventName[event]); // note the time the message was sent TheCSBots()->SetRadioMessageTimestamp(event, m_iTeam); diff --git a/regamedll/dlls/bot/cs_bot_statemachine.cpp b/regamedll/dlls/bot/cs_bot_statemachine.cpp index 7cf323ea..0055a24f 100644 --- a/regamedll/dlls/bot/cs_bot_statemachine.cpp +++ b/regamedll/dlls/bot/cs_bot_statemachine.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // This method is the ONLY legal way to change a bot's current state diff --git a/regamedll/dlls/bot/cs_bot_update.cpp b/regamedll/dlls/bot/cs_bot_update.cpp index d37f6d5c..a362d2c0 100644 --- a/regamedll/dlls/bot/cs_bot_update.cpp +++ b/regamedll/dlls/bot/cs_bot_update.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Lightweight maintenance, invoked frequently diff --git a/regamedll/dlls/bot/cs_bot_vision.cpp b/regamedll/dlls/bot/cs_bot_vision.cpp index 80ba4a83..f11585c7 100644 --- a/regamedll/dlls/bot/cs_bot_vision.cpp +++ b/regamedll/dlls/bot/cs_bot_vision.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Used to update view angles to stay on a ladder @@ -23,7 +51,6 @@ float StayOnLadderLine(CCSBot *me, const CNavLadder *ladder) return 0.0f; } -#ifndef HOOK_GAMEDLL // Move actual view angles towards desired ones. // This is the only place v_angle is altered. // TODO: Make stiffness and turn rate constants timestep invariant. @@ -191,7 +218,6 @@ void CCSBot::UpdateLookAngles() pev->v_angle.z = 0.0f; } -#endif // HOOK_GAMEDLL // Return true if we can see the point bool CCSBot::IsVisible(const Vector *pos, bool testFOV) const @@ -647,7 +673,7 @@ CBasePlayer *CCSBot::FindMostDangerousThreat() if (prevIndex < 0) prevIndex = MAX_ENEMY_QUEUE - 1; - CBasePlayer *currentThreat = m_enemyQueue[ prevIndex ].player; + CBasePlayer *currentThreat = m_enemyQueue[prevIndex].player; #endif m_bomber = nullptr; diff --git a/regamedll/dlls/bot/cs_bot_weapon.cpp b/regamedll/dlls/bot/cs_bot_weapon.cpp index c35f9361..5d70a1c0 100644 --- a/regamedll/dlls/bot/cs_bot_weapon.cpp +++ b/regamedll/dlls/bot/cs_bot_weapon.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Fire our active weapon towards our current enemy @@ -34,7 +62,7 @@ void CCSBot::FireWeaponAtEnemy() float rangeToEnemy = toAimSpot.NormalizeInPlace(); const float_precision halfPI = (M_PI / 180.0f); - float_precision yaw = pev->v_angle[ YAW ] * halfPI; + float_precision yaw = pev->v_angle[YAW] * halfPI; Vector2D dir(Q_cos(yaw), Q_sin(yaw)); float_precision onTarget = DotProduct(toAimSpot, dir); @@ -367,7 +395,7 @@ bool CCSBot::IsPrimaryWeaponEmpty() const // Return true if pistol doesn't exist or is totally out of ammo bool CCSBot::IsPistolEmpty() const { - CBasePlayerWeapon *pCurrentWeapon = static_cast(m_rgpPlayerItems[ PISTOL_SLOT ]); + CBasePlayerWeapon *pCurrentWeapon = static_cast(m_rgpPlayerItems[PISTOL_SLOT]); if (!pCurrentWeapon) return true; @@ -407,7 +435,7 @@ void CCSBot::EquipBestWeapon(bool mustEquip) if (!mustEquip && m_equipTimer.GetElapsedTime() < minEquipInterval) return; - CBasePlayerWeapon *pPrimary = static_cast(m_rgpPlayerItems[ PRIMARY_WEAPON_SLOT ]); + CBasePlayerWeapon *pPrimary = static_cast(m_rgpPlayerItems[PRIMARY_WEAPON_SLOT]); if (pPrimary) { WeaponClassType weaponClass = WeaponIDToWeaponClass(pPrimary->m_iId); @@ -430,7 +458,7 @@ void CCSBot::EquipBestWeapon(bool mustEquip) if (TheCSBots()->AllowPistols()) { - if (DoEquip(static_cast(m_rgpPlayerItems[ PISTOL_SLOT ]))) + if (DoEquip(static_cast(m_rgpPlayerItems[PISTOL_SLOT]))) return; } @@ -447,7 +475,7 @@ void CCSBot::EquipPistol() if (TheCSBots()->AllowPistols() && !IsUsingPistol()) { - CBasePlayerWeapon *pistol = static_cast(m_rgpPlayerItems[ PISTOL_SLOT ]); + CBasePlayerWeapon *pistol = static_cast(m_rgpPlayerItems[PISTOL_SLOT]); DoEquip(pistol); } } @@ -457,7 +485,7 @@ void CCSBot::EquipKnife() { if (!IsUsingKnife()) { - CBasePlayerWeapon *pKnife = static_cast(m_rgpPlayerItems[ KNIFE_SLOT ]); + CBasePlayerWeapon *pKnife = static_cast(m_rgpPlayerItems[KNIFE_SLOT]); if (pKnife) { SelectItem(STRING(pKnife->pev->classname)); @@ -468,7 +496,7 @@ void CCSBot::EquipKnife() // Return true if we have a grenade in our inventory bool CCSBot::HasGrenade() const { - CBasePlayerWeapon *pGrenade = static_cast(m_rgpPlayerItems[ GRENADE_SLOT ]); + CBasePlayerWeapon *pGrenade = static_cast(m_rgpPlayerItems[GRENADE_SLOT]); return pGrenade != nullptr; } @@ -484,7 +512,7 @@ bool CCSBot::EquipGrenade(bool noSmoke) if (HasGrenade()) { - CBasePlayerWeapon *pGrenade = static_cast(m_rgpPlayerItems[ GRENADE_SLOT ]); + CBasePlayerWeapon *pGrenade = static_cast(m_rgpPlayerItems[GRENADE_SLOT]); if (pGrenade) { if (noSmoke && pGrenade->m_iId == WEAPON_SMOKEGRENADE) @@ -774,12 +802,12 @@ void CCSBot::SilencerCheck() // Invoked when in contact with a CWeaponBox void CCSBot::OnTouchingWeapon(CWeaponBox *box) { - auto pDroppedWeapon = box->m_rgpPlayerItems[ PRIMARY_WEAPON_SLOT ]; + auto pDroppedWeapon = box->m_rgpPlayerItems[PRIMARY_WEAPON_SLOT]; // right now we only care about primary weapons on the ground if (pDroppedWeapon) { - CBasePlayerWeapon *pWeapon = (CBasePlayerWeapon *)m_rgpPlayerItems[ PRIMARY_WEAPON_SLOT ]; + CBasePlayerWeapon *pWeapon = static_cast(m_rgpPlayerItems[PRIMARY_WEAPON_SLOT]); // if the gun on the ground is the same one we have, dont bother if (pWeapon && pWeapon->IsWeapon() && pDroppedWeapon->m_iId != pWeapon->m_iId) diff --git a/regamedll/dlls/bot/cs_gamestate.cpp b/regamedll/dlls/bot/cs_gamestate.cpp index c077e4f6..141c66e6 100644 --- a/regamedll/dlls/bot/cs_gamestate.cpp +++ b/regamedll/dlls/bot/cs_gamestate.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" CSGameState::CSGameState(CCSBot *owner) @@ -403,7 +431,7 @@ const Vector *CSGameState::GetRandomFreeHostagePosition() if (info->hostage->IsFollowingSomeone()) continue; - freePos[ freeCount++ ] = &info->hostage->pev->origin; + freePos[freeCount++] = &info->hostage->pev->origin; } else { @@ -411,7 +439,7 @@ const Vector *CSGameState::GetRandomFreeHostagePosition() if (info->isValid == false) continue; - freePos[ freeCount++ ] = &info->knownPos; + freePos[freeCount++] = &info->knownPos; } } diff --git a/regamedll/dlls/bot/states/cs_bot_attack.cpp b/regamedll/dlls/bot/states/cs_bot_attack.cpp index 42e88487..29fb4c76 100644 --- a/regamedll/dlls/bot/states/cs_bot_attack.cpp +++ b/regamedll/dlls/bot/states/cs_bot_attack.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Begin attacking diff --git a/regamedll/dlls/bot/states/cs_bot_buy.cpp b/regamedll/dlls/bot/states/cs_bot_buy.cpp index 594ff06e..3c994dd7 100644 --- a/regamedll/dlls/bot/states/cs_bot_buy.cpp +++ b/regamedll/dlls/bot/states/cs_bot_buy.cpp @@ -1,8 +1,36 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" bool HasDefaultPistol(CCSBot *me) { - CBasePlayerWeapon *pSecondary = static_cast(me->m_rgpPlayerItems[ PISTOL_SLOT ]); + CBasePlayerWeapon *pSecondary = static_cast(me->m_rgpPlayerItems[PISTOL_SLOT]); if (!pSecondary) return false; @@ -73,7 +101,7 @@ void BuyState::OnEnter(CCSBot *me) if (TheCSBots()->AllowPistols()) { - CBasePlayerWeapon *pSecondary = static_cast(me->m_rgpPlayerItems[ PISTOL_SLOT ]); + CBasePlayerWeapon *pSecondary = static_cast(me->m_rgpPlayerItems[PISTOL_SLOT]); // check if we have a pistol if (pSecondary) @@ -130,10 +158,7 @@ struct BuyInfo }; // These tables MUST be kept in sync with the CT and T buy aliases - -#ifndef HOOK_GAMEDLL - -BuyInfo primaryWeaponBuyInfoCT[ MAX_BUY_WEAPON_PRIMARY ] = +BuyInfo primaryWeaponBuyInfoCT[MAX_BUY_WEAPON_PRIMARY] = { { SHOTGUN, false, "m3" }, // WEAPON_M3 { SHOTGUN, false, "xm1014" }, // WEAPON_XM1014 @@ -150,7 +175,7 @@ BuyInfo primaryWeaponBuyInfoCT[ MAX_BUY_WEAPON_PRIMARY ] = { MACHINE_GUN, false, "m249" }, // WEAPON_M249 }; -BuyInfo secondaryWeaponBuyInfoCT[ MAX_BUY_WEAPON_SECONDARY ] = +BuyInfo secondaryWeaponBuyInfoCT[MAX_BUY_WEAPON_SECONDARY] = { // { PISTOL, false, "glock" }, // { PISTOL, false, "usp" }, @@ -159,7 +184,7 @@ BuyInfo secondaryWeaponBuyInfoCT[ MAX_BUY_WEAPON_SECONDARY ] = { PISTOL, true, "fn57" }, }; -BuyInfo primaryWeaponBuyInfoT[ MAX_BUY_WEAPON_PRIMARY ] = +BuyInfo primaryWeaponBuyInfoT[MAX_BUY_WEAPON_PRIMARY] = { { SHOTGUN, false, "m3" }, // WEAPON_M3 { SHOTGUN, false, "xm1014" }, // WEAPON_XM1014 @@ -176,7 +201,7 @@ BuyInfo primaryWeaponBuyInfoT[ MAX_BUY_WEAPON_PRIMARY ] = { MACHINE_GUN, false, "m249" }, // WEAPON_M249 }; -BuyInfo secondaryWeaponBuyInfoT[ MAX_BUY_WEAPON_SECONDARY ] = +BuyInfo secondaryWeaponBuyInfoT[MAX_BUY_WEAPON_SECONDARY] = { // { PISTOL, false, "glock" }, // { PISTOL, false, "usp" }, @@ -185,16 +210,6 @@ BuyInfo secondaryWeaponBuyInfoT[ MAX_BUY_WEAPON_SECONDARY ] = { PISTOL, true, "elites" }, }; -#else // HOOK_GAMEDLL - -BuyInfo primaryWeaponBuyInfoCT[ MAX_BUY_WEAPON_PRIMARY ]; -BuyInfo secondaryWeaponBuyInfoCT[ MAX_BUY_WEAPON_SECONDARY]; - -BuyInfo primaryWeaponBuyInfoT[ MAX_BUY_WEAPON_PRIMARY ]; -BuyInfo secondaryWeaponBuyInfoT[ MAX_BUY_WEAPON_SECONDARY ]; - -#endif // HOOK_GAMEDLL - // Given a weapon alias, return the kind of weapon it is inline WeaponType GetWeaponType(const char *alias) { @@ -373,7 +388,7 @@ void BuyState::OnUpdate(CCSBot *me) { // build list of allowable weapons to buy BuyInfo *masterPrimary = (me->m_iTeam == TERRORIST) ? primaryWeaponBuyInfoT : primaryWeaponBuyInfoCT; - BuyInfo *stockPrimary[ MAX_BUY_WEAPON_PRIMARY ]; + BuyInfo *stockPrimary[MAX_BUY_WEAPON_PRIMARY]; int stockPrimaryCount = 0; // dont choose sniper rifles as often @@ -388,7 +403,7 @@ void BuyState::OnUpdate(CCSBot *me) (masterPrimary[i].type == SNIPER_RIFLE && TheCSBots()->AllowSnipers() && wantSniper) || (masterPrimary[i].type == MACHINE_GUN && TheCSBots()->AllowMachineGuns())) { - stockPrimary[ stockPrimaryCount++ ] = &masterPrimary[i]; + stockPrimary[stockPrimaryCount++] = &masterPrimary[i]; } } @@ -428,8 +443,8 @@ void BuyState::OnUpdate(CCSBot *me) which = RANDOM_LONG(0, stockPrimaryCount - 1); } - me->ClientCommand(stockPrimary[ which ]->buyAlias); - me->PrintIfWatched("Tried to buy %s.\n", stockPrimary[ which ]->buyAlias); + me->ClientCommand(stockPrimary[which]->buyAlias); + me->PrintIfWatched("Tried to buy %s.\n", stockPrimary[which]->buyAlias); } } } @@ -455,9 +470,9 @@ void BuyState::OnUpdate(CCSBot *me) int which = RANDOM_LONG(0, MAX_BUY_WEAPON_SECONDARY - 1); if (me->m_iTeam == TERRORIST) - me->ClientCommand(secondaryWeaponBuyInfoT[ which ].buyAlias); + me->ClientCommand(secondaryWeaponBuyInfoT[which].buyAlias); else - me->ClientCommand(secondaryWeaponBuyInfoCT[ which ].buyAlias); + me->ClientCommand(secondaryWeaponBuyInfoCT[which].buyAlias); // only buy one pistol m_buyPistol = false; diff --git a/regamedll/dlls/bot/states/cs_bot_defuse_bomb.cpp b/regamedll/dlls/bot/states/cs_bot_defuse_bomb.cpp index 1c950dbb..ed68c48c 100644 --- a/regamedll/dlls/bot/states/cs_bot_defuse_bomb.cpp +++ b/regamedll/dlls/bot/states/cs_bot_defuse_bomb.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Begin defusing the bomb diff --git a/regamedll/dlls/bot/states/cs_bot_escape_from_bomb.cpp b/regamedll/dlls/bot/states/cs_bot_escape_from_bomb.cpp index 81d7bd99..fbc0f1c3 100644 --- a/regamedll/dlls/bot/states/cs_bot_escape_from_bomb.cpp +++ b/regamedll/dlls/bot/states/cs_bot_escape_from_bomb.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" void EscapeFromBombState::OnEnter(CCSBot *me) diff --git a/regamedll/dlls/bot/states/cs_bot_fetch_bomb.cpp b/regamedll/dlls/bot/states/cs_bot_fetch_bomb.cpp index 2b8283de..a2561842 100644 --- a/regamedll/dlls/bot/states/cs_bot_fetch_bomb.cpp +++ b/regamedll/dlls/bot/states/cs_bot_fetch_bomb.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Move to the bomb on the floor and pick it up diff --git a/regamedll/dlls/bot/states/cs_bot_follow.cpp b/regamedll/dlls/bot/states/cs_bot_follow.cpp index 055838bd..e95eb270 100644 --- a/regamedll/dlls/bot/states/cs_bot_follow.cpp +++ b/regamedll/dlls/bot/states/cs_bot_follow.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Follow our leader @@ -216,7 +244,7 @@ void FollowState::OnUpdate(CCSBot *me) // if we are idle, pick a random area if (m_idleTimer.IsElapsed()) { - target = collector.m_targetArea[ RANDOM_LONG(0, collector.m_targetAreaCount - 1) ]; + target = collector.m_targetArea[RANDOM_LONG(0, collector.m_targetAreaCount - 1)]; targetPos = *target->GetCenter(); me->PrintIfWatched("%4.1f: Bored. Repathing to a new nearby area\n", gpGlobals->time); } diff --git a/regamedll/dlls/bot/states/cs_bot_hide.cpp b/regamedll/dlls/bot/states/cs_bot_hide.cpp index 2cf631d6..678f0df8 100644 --- a/regamedll/dlls/bot/states/cs_bot_hide.cpp +++ b/regamedll/dlls/bot/states/cs_bot_hide.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Begin moving to a nearby hidey-hole. diff --git a/regamedll/dlls/bot/states/cs_bot_hunt.cpp b/regamedll/dlls/bot/states/cs_bot_hunt.cpp index 0f0c7c05..6a721658 100644 --- a/regamedll/dlls/bot/states/cs_bot_hunt.cpp +++ b/regamedll/dlls/bot/states/cs_bot_hunt.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Begin the hunt diff --git a/regamedll/dlls/bot/states/cs_bot_idle.cpp b/regamedll/dlls/bot/states/cs_bot_idle.cpp index 28db6c2e..c0598577 100644 --- a/regamedll/dlls/bot/states/cs_bot_idle.cpp +++ b/regamedll/dlls/bot/states/cs_bot_idle.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // range for snipers to select a hiding spot diff --git a/regamedll/dlls/bot/states/cs_bot_investigate_noise.cpp b/regamedll/dlls/bot/states/cs_bot_investigate_noise.cpp index cca4ddf6..727a24c1 100644 --- a/regamedll/dlls/bot/states/cs_bot_investigate_noise.cpp +++ b/regamedll/dlls/bot/states/cs_bot_investigate_noise.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Move towards currently heard noise diff --git a/regamedll/dlls/bot/states/cs_bot_move_to.cpp b/regamedll/dlls/bot/states/cs_bot_move_to.cpp index 92a5fd8a..02782006 100644 --- a/regamedll/dlls/bot/states/cs_bot_move_to.cpp +++ b/regamedll/dlls/bot/states/cs_bot_move_to.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Move to a potentially far away position. diff --git a/regamedll/dlls/bot/states/cs_bot_plant_bomb.cpp b/regamedll/dlls/bot/states/cs_bot_plant_bomb.cpp index e3e2200f..b901e86e 100644 --- a/regamedll/dlls/bot/states/cs_bot_plant_bomb.cpp +++ b/regamedll/dlls/bot/states/cs_bot_plant_bomb.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Plant the bomb. diff --git a/regamedll/dlls/bot/states/cs_bot_use_entity.cpp b/regamedll/dlls/bot/states/cs_bot_use_entity.cpp index 0cfb190a..42640bd8 100644 --- a/regamedll/dlls/bot/states/cs_bot_use_entity.cpp +++ b/regamedll/dlls/bot/states/cs_bot_use_entity.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" // Face the entity and "use" it diff --git a/regamedll/dlls/buttons.cpp b/regamedll/dlls/buttons.cpp index 5c9bd10b..d8079af4 100644 --- a/regamedll/dlls/buttons.cpp +++ b/regamedll/dlls/buttons.cpp @@ -1,10 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - TYPEDESCRIPTION CEnvGlobal::m_SaveData[] = { DEFINE_FIELD(CEnvGlobal, m_globalstate, FIELD_STRING), @@ -12,46 +7,6 @@ TYPEDESCRIPTION CEnvGlobal::m_SaveData[] = DEFINE_FIELD(CEnvGlobal, m_initialstate, FIELD_INTEGER), }; -TYPEDESCRIPTION CMultiSource::m_SaveData[] = -{ - // BUGBUG FIX - DEFINE_ARRAY(CMultiSource, m_rgEntities, FIELD_EHANDLE, MAX_MS_TARGETS), - DEFINE_ARRAY(CMultiSource, m_rgTriggered, FIELD_INTEGER, MAX_MS_TARGETS), - DEFINE_FIELD(CMultiSource, m_iTotal, FIELD_INTEGER), - DEFINE_FIELD(CMultiSource, m_globalstate, FIELD_STRING), -}; - -// CBaseButton -TYPEDESCRIPTION CBaseButton::m_SaveData[] = -{ - DEFINE_FIELD(CBaseButton, m_fStayPushed, FIELD_BOOLEAN), - DEFINE_FIELD(CBaseButton, m_fRotating, FIELD_BOOLEAN), - DEFINE_FIELD(CBaseButton, m_sounds, FIELD_INTEGER), - DEFINE_FIELD(CBaseButton, m_bLockedSound, FIELD_CHARACTER), - DEFINE_FIELD(CBaseButton, m_bLockedSentence, FIELD_CHARACTER), - DEFINE_FIELD(CBaseButton, m_bUnlockedSound, FIELD_CHARACTER), - DEFINE_FIELD(CBaseButton, m_bUnlockedSentence, FIELD_CHARACTER), - DEFINE_FIELD(CBaseButton, m_strChangeTarget, FIELD_STRING), -// DEFINE_FIELD(CBaseButton, m_ls, FIELD_???), // This is restored in Precache() -}; - -TYPEDESCRIPTION CMomentaryRotButton::m_SaveData[] = -{ - DEFINE_FIELD(CMomentaryRotButton, m_lastUsed, FIELD_INTEGER), - DEFINE_FIELD(CMomentaryRotButton, m_direction, FIELD_INTEGER), - DEFINE_FIELD(CMomentaryRotButton, m_returnSpeed, FIELD_FLOAT), - DEFINE_FIELD(CMomentaryRotButton, m_start, FIELD_VECTOR), - DEFINE_FIELD(CMomentaryRotButton, m_end, FIELD_VECTOR), - DEFINE_FIELD(CMomentaryRotButton, m_sounds, FIELD_INTEGER), -}; - -TYPEDESCRIPTION CEnvSpark::m_SaveData[] = -{ - DEFINE_FIELD(CEnvSpark, m_flDelay, FIELD_FLOAT), -}; - -#endif // HOOK_GAMEDLL - IMPLEMENT_SAVERESTORE(CEnvGlobal, CBaseEntity) LINK_ENTITY_TO_CLASS(env_global, CEnvGlobal, CCSEnvGlobal) @@ -136,6 +91,15 @@ void CEnvGlobal::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use gGlobalState.EntityAdd(m_globalstate, gpGlobals->mapname, newState); } +TYPEDESCRIPTION CMultiSource::m_SaveData[] = +{ + // BUGBUG FIX + DEFINE_ARRAY(CMultiSource, m_rgEntities, FIELD_EHANDLE, MAX_MS_TARGETS), + DEFINE_ARRAY(CMultiSource, m_rgTriggered, FIELD_INTEGER, MAX_MS_TARGETS), + DEFINE_FIELD(CMultiSource, m_iTotal, FIELD_INTEGER), + DEFINE_FIELD(CMultiSource, m_globalstate, FIELD_STRING), +}; + IMPLEMENT_SAVERESTORE(CMultiSource, CBaseEntity) LINK_ENTITY_TO_CLASS(multisource, CMultiSource, CCSMultiSource) @@ -297,6 +261,19 @@ void CMultiSource::Register() pev->spawnflags &= ~SF_MULTI_INIT; } +TYPEDESCRIPTION CBaseButton::m_SaveData[] = +{ + DEFINE_FIELD(CBaseButton, m_fStayPushed, FIELD_BOOLEAN), + DEFINE_FIELD(CBaseButton, m_fRotating, FIELD_BOOLEAN), + DEFINE_FIELD(CBaseButton, m_sounds, FIELD_INTEGER), + DEFINE_FIELD(CBaseButton, m_bLockedSound, FIELD_CHARACTER), + DEFINE_FIELD(CBaseButton, m_bLockedSentence, FIELD_CHARACTER), + DEFINE_FIELD(CBaseButton, m_bUnlockedSound, FIELD_CHARACTER), + DEFINE_FIELD(CBaseButton, m_bUnlockedSentence, FIELD_CHARACTER), + DEFINE_FIELD(CBaseButton, m_strChangeTarget, FIELD_STRING), +// DEFINE_FIELD(CBaseButton, m_ls, FIELD_???), // This is restored in Precache() +}; + IMPLEMENT_SAVERESTORE(CBaseButton, CBaseToggle) void CBaseButton::Precache() @@ -922,6 +899,16 @@ void CRotButton::Restart() } #endif +TYPEDESCRIPTION CMomentaryRotButton::m_SaveData[] = +{ + DEFINE_FIELD(CMomentaryRotButton, m_lastUsed, FIELD_INTEGER), + DEFINE_FIELD(CMomentaryRotButton, m_direction, FIELD_INTEGER), + DEFINE_FIELD(CMomentaryRotButton, m_returnSpeed, FIELD_FLOAT), + DEFINE_FIELD(CMomentaryRotButton, m_start, FIELD_VECTOR), + DEFINE_FIELD(CMomentaryRotButton, m_end, FIELD_VECTOR), + DEFINE_FIELD(CMomentaryRotButton, m_sounds, FIELD_INTEGER), +}; + IMPLEMENT_SAVERESTORE(CMomentaryRotButton, CBaseToggle) LINK_ENTITY_TO_CLASS(momentary_rot_button, CMomentaryRotButton, CCSMomentaryRotButton) @@ -1137,6 +1124,11 @@ void CMomentaryRotButton::UpdateSelfReturn(float value) } } +TYPEDESCRIPTION CEnvSpark::m_SaveData[] = +{ + DEFINE_FIELD(CEnvSpark, m_flDelay, FIELD_FLOAT), +}; + IMPLEMENT_SAVERESTORE(CEnvSpark, CBaseEntity) LINK_ENTITY_TO_CLASS(env_spark, CEnvSpark, CCSEnvSpark) LINK_ENTITY_TO_CLASS(env_debris, CEnvSpark, CCSEnvSpark) diff --git a/regamedll/dlls/buttons.h b/regamedll/dlls/buttons.h index 7b67aa7f..7638d62a 100644 --- a/regamedll/dlls/buttons.h +++ b/regamedll/dlls/buttons.h @@ -40,7 +40,7 @@ public: virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[3]; + static TYPEDESCRIPTION m_SaveData[]; string_t m_globalstate; int m_triggermode; @@ -59,8 +59,9 @@ public: virtual void Restart(); virtual int Save(CSave &save); virtual int Restore(CRestore &restore); + public: - static TYPEDESCRIPTION m_SaveData[1]; + static TYPEDESCRIPTION m_SaveData[]; Vector m_vecSpawn; #endif @@ -103,7 +104,7 @@ public: public: static CMomentaryRotButton *Instance(edict_t *pent) { return (CMomentaryRotButton *)GET_PRIVATE(pent); } - static TYPEDESCRIPTION IMPL(m_SaveData)[6]; + static TYPEDESCRIPTION m_SaveData[]; int m_lastUsed; int m_direction; @@ -131,7 +132,8 @@ public: void EXPORT SparkStop(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[1]; + static TYPEDESCRIPTION m_SaveData[]; + float m_flDelay; }; diff --git a/regamedll/dlls/career_tasks.cpp b/regamedll/dlls/career_tasks.cpp index d8866396..2714f80c 100644 --- a/regamedll/dlls/career_tasks.cpp +++ b/regamedll/dlls/career_tasks.cpp @@ -1,39 +1,7 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - CCareerTaskManager *TheCareerTasks = nullptr; -const TaskInfo taskInfo[] = -{ - { "defuse", EVENT_BOMB_DEFUSED, &CCareerTask::NewTask }, - { "plant", EVENT_BOMB_PLANTED, &CCareerTask::NewTask }, - { "rescue", EVENT_HOSTAGE_RESCUED, &CCareerTask::NewTask }, - { "killall", EVENT_KILL_ALL, &CCareerTask::NewTask }, - { "kill", EVENT_KILL, &CCareerTask::NewTask }, - { "killwith", EVENT_KILL, &CCareerTask::NewTask }, - { "killblind", EVENT_KILL_FLASHBANGED, &CCareerTask::NewTask }, - { "killvip", EVENT_KILL, &CCareerTask::NewTask }, - { "headshot", EVENT_HEADSHOT, &CCareerTask::NewTask }, - { "headshotwith", EVENT_HEADSHOT, &CCareerTask::NewTask }, - { "winfast", EVENT_ROUND_WIN, &CCareerTask::NewTask }, - { "rescue", EVENT_HOSTAGE_RESCUED, &CCareerTask::NewTask }, - { "rescueall", EVENT_ALL_HOSTAGES_RESCUED, &CCareerTask::NewTask }, - { "injure", EVENT_PLAYER_TOOK_DAMAGE, &CCareerTask::NewTask }, - { "injurewith", EVENT_PLAYER_TOOK_DAMAGE, &CCareerTask::NewTask }, - { "killdefuser", EVENT_KILL, &CCareerTask::NewTask }, - { "stoprescue", EVENT_KILL, &CCareerTask::NewTask }, - { "defendhostages", EVENT_ROUND_WIN, &CCareerTask::NewTask }, - { "hostagessurvive", EVENT_ROUND_WIN, &CCareerTask::NewTask }, - { "preventdefuse", EVENT_ROUND_WIN, &CPreventDefuseTask::NewTask }, - { nullptr, EVENT_INVALID, &CCareerTask::NewTask }, -}; - -#endif - CCareerTask *CPreventDefuseTask::NewTask(const char *taskName, GameEventType event, const char *weaponName, int n, bool mustLive, bool crossRounds, int id, bool isComplete) { CPreventDefuseTask *pNewTask = new CPreventDefuseTask(taskName, event, weaponName, n, mustLive, crossRounds, id, isComplete); @@ -439,22 +407,45 @@ void CCareerTaskManager::SetFinishedTaskTime(int val) m_finishedTaskRound = CSGameRules()->m_iTotalRoundsPlayed; } +const TaskInfo CCareerTaskManager::m_taskInfo[] = +{ + { "defuse", EVENT_BOMB_DEFUSED, &CCareerTask::NewTask }, + { "plant", EVENT_BOMB_PLANTED, &CCareerTask::NewTask }, + { "rescue", EVENT_HOSTAGE_RESCUED, &CCareerTask::NewTask }, + { "killall", EVENT_KILL_ALL, &CCareerTask::NewTask }, + { "kill", EVENT_KILL, &CCareerTask::NewTask }, + { "killwith", EVENT_KILL, &CCareerTask::NewTask }, + { "killblind", EVENT_KILL_FLASHBANGED, &CCareerTask::NewTask }, + { "killvip", EVENT_KILL, &CCareerTask::NewTask }, + { "headshot", EVENT_HEADSHOT, &CCareerTask::NewTask }, + { "headshotwith", EVENT_HEADSHOT, &CCareerTask::NewTask }, + { "winfast", EVENT_ROUND_WIN, &CCareerTask::NewTask }, + { "rescue", EVENT_HOSTAGE_RESCUED, &CCareerTask::NewTask }, + { "rescueall", EVENT_ALL_HOSTAGES_RESCUED, &CCareerTask::NewTask }, + { "injure", EVENT_PLAYER_TOOK_DAMAGE, &CCareerTask::NewTask }, + { "injurewith", EVENT_PLAYER_TOOK_DAMAGE, &CCareerTask::NewTask }, + { "killdefuser", EVENT_KILL, &CCareerTask::NewTask }, + { "stoprescue", EVENT_KILL, &CCareerTask::NewTask }, + { "defendhostages", EVENT_ROUND_WIN, &CCareerTask::NewTask }, + { "hostagessurvive", EVENT_ROUND_WIN, &CCareerTask::NewTask }, + { "preventdefuse", EVENT_ROUND_WIN, &CPreventDefuseTask::NewTask }, + { nullptr, EVENT_INVALID, &CCareerTask::NewTask }, +}; + void CCareerTaskManager::AddTask(const char *taskName, const char *weaponName, int eventCount, bool mustLive, bool crossRounds, bool isComplete) { - ++m_nextId; + m_nextId++; - for (int i = 0; i < ARRAYSIZE(taskInfo); ++i) + for (auto &taskInfo : m_taskInfo) { - const TaskInfo *pTaskInfo = &taskInfo[ i ]; - - if (pTaskInfo->taskName) + if (taskInfo.taskName) { - if (!Q_stricmp(pTaskInfo->taskName, taskName)) + if (!Q_stricmp(taskInfo.taskName, taskName)) { - CCareerTask *newTask = pTaskInfo->factory + CCareerTask *newTask = taskInfo.factory ( - pTaskInfo->taskName, - pTaskInfo->event, + taskInfo.taskName, + taskInfo.event, weaponName, eventCount, mustLive, @@ -465,7 +456,7 @@ void CCareerTaskManager::AddTask(const char *taskName, const char *weaponName, i m_tasks.push_back(newTask); - if (pTaskInfo->event == EVENT_ROUND_WIN && !Q_strcmp(taskName, "winfast")) + if (taskInfo.event == EVENT_ROUND_WIN && !Q_strcmp(taskName, "winfast")) { m_taskTime = eventCount; diff --git a/regamedll/dlls/career_tasks.h b/regamedll/dlls/career_tasks.h index d0c4e229..ca84e79d 100644 --- a/regamedll/dlls/career_tasks.h +++ b/regamedll/dlls/career_tasks.h @@ -35,6 +35,7 @@ class CCareerTask public: CCareerTask() {}; CCareerTask(const char *taskName, GameEventType event, const char *weaponName, int n, bool mustLive, bool crossRounds, int id, bool isComplete); + public: virtual void OnEvent(GameEventType event, CBasePlayer *pAttacker, CBasePlayer *pVictim); virtual void Reset(); @@ -72,15 +73,23 @@ private: bool m_vip; }; -typedef std::STD_LIST CareerTaskList; +typedef std::list CareerTaskList; typedef CareerTaskList::iterator CareerTaskListIt; -typedef CCareerTask *(*TaskFactoryFunction)(const char *taskName, GameEventType event, const char *weaponName, int eventCount, bool mustLive, bool crossRounds, int nextId, bool isComplete); +using TaskFactoryFunction = CCareerTask *(*)(const char *taskName, GameEventType event, const char *weaponName, int eventCount, bool mustLive, bool crossRounds, int nextId, bool isComplete); + +struct TaskInfo +{ + const char *taskName; + GameEventType event; + TaskFactoryFunction factory; +}; class CPreventDefuseTask: public CCareerTask { public: CPreventDefuseTask(const char *taskName, GameEventType event, const char *weaponName, int n, bool mustLive, bool crossRounds, int id, bool isComplete); + public: virtual void OnEvent(GameEventType event, CBasePlayer *pAttacker, CBasePlayer *pVictim); virtual void Reset(); @@ -124,6 +133,8 @@ public: void UnlatchRoundEndMessage(); private: + static const TaskInfo m_taskInfo[]; + CareerTaskList m_tasks; int m_nextId; @@ -136,11 +147,4 @@ private: bool m_shouldLatchRoundEndMessage; }; -struct TaskInfo -{ - const char *taskName; - GameEventType event; - TaskFactoryFunction factory; -}; - extern CCareerTaskManager *TheCareerTasks; diff --git a/regamedll/dlls/cbase.cpp b/regamedll/dlls/cbase.cpp index 352b8262..4db098b0 100644 --- a/regamedll/dlls/cbase.cpp +++ b/regamedll/dlls/cbase.cpp @@ -1,10 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - DLL_FUNCTIONS gFunctionTable = { &GameDLLInit, @@ -68,20 +63,8 @@ NEW_DLL_FUNCTIONS gNewDLLFunctions = nullptr }; -// Global Savedata for Delay -TYPEDESCRIPTION CBaseEntity::m_SaveData[] = -{ - DEFINE_FIELD(CBaseEntity, m_pGoalEnt, FIELD_CLASSPTR), - DEFINE_FIELD(CBaseEntity, m_pfnThink, FIELD_FUNCTION), // UNDONE: Build table of these! - DEFINE_FIELD(CBaseEntity, m_pfnTouch, FIELD_FUNCTION), - DEFINE_FIELD(CBaseEntity, m_pfnUse, FIELD_FUNCTION), - DEFINE_FIELD(CBaseEntity, m_pfnBlocked, FIELD_FUNCTION), -}; - CMemoryPool hashItemMemPool(sizeof(hash_item_t), 64); -#endif // HOOK_GAMEDLL - int CaseInsensitiveHash(const char *string, int iBounds) { unsigned int hash = 0; @@ -107,7 +90,7 @@ void EmptyEntityHashTable() int i; hash_item_t *item, *temp, *free; - for (i = 0; i < stringsHashTable.Count(); ++i) + for (i = 0; i < stringsHashTable.Count(); i++) { item = &stringsHashTable[i]; temp = item->next; @@ -292,7 +275,7 @@ C_DLLEXPORT int GetEntityAPI(DLL_FUNCTIONS *pFunctionTable, int interfaceVersion Q_memcpy(pFunctionTable, &gFunctionTable, sizeof(DLL_FUNCTIONS)); stringsHashTable.AddMultipleToTail(2048); - for (int i = 0; i < stringsHashTable.Count(); ++i) + for (int i = 0; i < stringsHashTable.Count(); i++) { stringsHashTable[i].next = nullptr; } @@ -338,7 +321,7 @@ int DispatchSpawn(edict_t *pent) // Try to get the pointer again, in case the spawn function deleted the entity. // UNDONE: Spawn() should really return a code to ask that the entity be deleted, but // that would touch too much code for me to do that right now. - pEntity = (CBaseEntity *)GET_PRIVATE(pent); + pEntity = GET_PRIVATE(pent); if (pEntity) { @@ -397,7 +380,7 @@ void DispatchKeyValue(edict_t *pentKeyvalue, KeyValueData *pkvd) return; // Get the actualy entity object - CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pentKeyvalue); + CBaseEntity *pEntity = GET_PRIVATE(pentKeyvalue); if (!pEntity) return; @@ -408,8 +391,8 @@ void DispatchKeyValue(edict_t *pentKeyvalue, KeyValueData *pkvd) // while it builds the graph void DispatchTouch(edict_t *pentTouched, edict_t *pentOther) { - CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pentTouched); - CBaseEntity *pOther = (CBaseEntity *)GET_PRIVATE(pentOther); + CBaseEntity *pEntity = GET_PRIVATE(pentTouched); + CBaseEntity *pOther = GET_PRIVATE(pentOther); if (pEntity && pOther && !((pEntity->pev->flags | pOther->pev->flags) & FL_KILLME)) pEntity->Touch(pOther); @@ -417,8 +400,8 @@ void DispatchTouch(edict_t *pentTouched, edict_t *pentOther) void DispatchUse(edict_t *pentUsed, edict_t *pentOther) { - CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pentUsed); - CBaseEntity *pOther = (CBaseEntity *)GET_PRIVATE(pentOther); + CBaseEntity *pEntity = GET_PRIVATE(pentUsed); + CBaseEntity *pOther = GET_PRIVATE(pentOther); if (pEntity && !(pEntity->pev->flags & FL_KILLME)) pEntity->Use(pOther, pOther, USE_TOGGLE, 0); @@ -426,7 +409,7 @@ void DispatchUse(edict_t *pentUsed, edict_t *pentOther) void DispatchThink(edict_t *pent) { - CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent); + CBaseEntity *pEntity = GET_PRIVATE(pent); if (pEntity) { @@ -441,8 +424,8 @@ void DispatchThink(edict_t *pent) void DispatchBlocked(edict_t *pentBlocked, edict_t *pentOther) { - CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pentBlocked); - CBaseEntity *pOther = (CBaseEntity *)GET_PRIVATE(pentOther); + CBaseEntity *pEntity = GET_PRIVATE(pentBlocked); + CBaseEntity *pOther = GET_PRIVATE(pentOther); if (pEntity) { @@ -452,11 +435,11 @@ void DispatchBlocked(edict_t *pentBlocked, edict_t *pentOther) void DispatchSave(edict_t *pent, SAVERESTOREDATA *pSaveData) { - CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent); + CBaseEntity *pEntity = GET_PRIVATE(pent); if (pEntity && pSaveData) { - ENTITYTABLE *pTable = &pSaveData->pTable[ pSaveData->currentIndex ]; + ENTITYTABLE *pTable = &pSaveData->pTable[pSaveData->currentIndex]; if (pTable->pent != pent) { @@ -497,7 +480,7 @@ CBaseEntity *FindGlobalEntity(string_t classname, string_t globalname) if (pReturn) { - if (!FClassnameIs(pReturn->pev, STRING(classname))) + if (!FClassnameIs(pReturn->pev, classname)) { ALERT(at_console, "Global entity found %s, wrong class %s\n", STRING(globalname), STRING(pReturn->pev->classname)); pReturn = nullptr; @@ -509,7 +492,7 @@ CBaseEntity *FindGlobalEntity(string_t classname, string_t globalname) int DispatchRestore(edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity) { - CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent); + CBaseEntity *pEntity = GET_PRIVATE(pent); if (pEntity && pSaveData) { @@ -578,7 +561,7 @@ int DispatchRestore(edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity) } // Again, could be deleted, get the pointer again. - pEntity = (CBaseEntity *)GET_PRIVATE(pent); + pEntity = GET_PRIVATE(pent); // Is this an overriding global entity (coming over the transition), or one restoring in a level if (globalEntity) @@ -623,14 +606,14 @@ int DispatchRestore(edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity) void DispatchObjectCollsionBox(edict_t *pent) { - CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent); + CBaseEntity *pEntity = GET_PRIVATE(pent); if (pEntity) { pEntity->SetObjectCollisionBox(); + return; } - else - SetObjectCollisionBox(&pent->v); + SetObjectCollisionBox(&pent->v); } void SaveWriteFields(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount) @@ -735,11 +718,21 @@ CBaseEntity *CBaseEntity::GetNextTarget() return Instance(pTarget); } +// Global Savedata for Delay +TYPEDESCRIPTION CBaseEntity::m_SaveData[] = +{ + DEFINE_FIELD(CBaseEntity, m_pGoalEnt, FIELD_CLASSPTR), + DEFINE_FIELD(CBaseEntity, m_pfnThink, FIELD_FUNCTION), // UNDONE: Build table of these! + DEFINE_FIELD(CBaseEntity, m_pfnTouch, FIELD_FUNCTION), + DEFINE_FIELD(CBaseEntity, m_pfnUse, FIELD_FUNCTION), + DEFINE_FIELD(CBaseEntity, m_pfnBlocked, FIELD_FUNCTION), +}; + int CBaseEntity::Save(CSave &save) { if (save.WriteEntVars("ENTVARS", pev)) { - return save.WriteFields("BASE", this, IMPL(m_SaveData), ARRAYSIZE(IMPL(m_SaveData))); + return save.WriteFields("BASE", this, m_SaveData, ARRAYSIZE(m_SaveData)); } return 0; @@ -750,7 +743,7 @@ int CBaseEntity::Restore(CRestore &restore) int status = restore.ReadEntVars("ENTVARS", pev); if (status) { - status = restore.ReadFields("BASE", this, IMPL(m_SaveData), ARRAYSIZE(IMPL(m_SaveData))); + status = restore.ReadFields("BASE", this, m_SaveData, ARRAYSIZE(m_SaveData)); } if (pev->modelindex != 0 && !FStringNull(pev->model)) @@ -781,7 +774,7 @@ void SetObjectCollisionBox(entvars_t *pev) int i; max = 0; - for (i = 0; i < 3; ++i) + for (i = 0; i < 3; i++) { v = Q_fabs(float_precision(((float *)pev->mins)[i])); if (v > max) @@ -795,7 +788,7 @@ void SetObjectCollisionBox(entvars_t *pev) max = v; } } - for (i = 0; i < 3; ++i) + for (i = 0; i < 3; i++) { ((float *)pev->absmin)[i] = ((float *)pev->origin)[i] - max; ((float *)pev->absmax)[i] = ((float *)pev->origin)[i] + max; @@ -907,7 +900,7 @@ int CBaseEntity::DamageDecal(int bitsDamageType) // NOTE: szName must be a pointer to constant memory, e.g. "monster_class" because the entity // will keep a pointer to it after this call. -CBaseEntity *CBaseEntity::Create(char *szName, const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner) +CBaseEntity *CBaseEntity::Create(const char *szName, const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner) { edict_t *pent = CREATE_NAMED_ENTITY(MAKE_STRING(szName)); if (FNullEnt(pent)) @@ -1021,7 +1014,7 @@ void CBaseEntity::FireBullets(ULONG cShots, Vector vecSrc, Vector vecDirShooting ClearMultiDamage(); gMultiDamage.type = (DMG_BULLET | DMG_NEVERGIB); - for (ULONG iShot = 1; iShot <= cShots; ++iShot) + for (ULONG iShot = 1; iShot <= cShots; iShot++) { int spark = 0; @@ -1395,7 +1388,7 @@ void CBaseEntity::TraceBleed(float flDamage, Vector vecDir, TraceResult *ptr, in cCount = 4; } - for (i = 0; i < cCount; ++i) + for (i = 0; i < cCount; i++) { // trace in the opposite direction the shot came from (the direction the shot is going) vecTraceDir = vecDir * -1.0f; diff --git a/regamedll/dlls/cbase.h b/regamedll/dlls/cbase.h index 3303ffbb..a4c816f5 100644 --- a/regamedll/dlls/cbase.h +++ b/regamedll/dlls/cbase.h @@ -155,13 +155,12 @@ public: BOOL IsLockedByMaster() { return FALSE; } public: - static CBaseEntity *Instance(edict_t *pent) + static CBaseEntity *Instance(edict_t *pEdict) { - if (!pent) - pent = ENT(0); + if (!pEdict) + pEdict = ENT(0); - CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent); - return pEntity; + return GET_PRIVATE(pEdict); } static CBaseEntity *Instance(entvars_t *pev) { return Instance(ENT(pev)); } @@ -185,7 +184,7 @@ public: return nullptr; } - static CBaseEntity *Create(char *szName, const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner = nullptr); + static CBaseEntity *Create(const char *szName, const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner = nullptr); edict_t *edict() { return ENT(pev); } EOFFSET eoffset() { return OFFSET(pev); } int entindex() { return ENTINDEX(edict()); } @@ -199,7 +198,7 @@ public: CBaseEntity *m_pGoalEnt; // path corner we are heading towards CBaseEntity *m_pLink; // used for temporary link-list operations. - static TYPEDESCRIPTION IMPL(m_SaveData)[5]; + static TYPEDESCRIPTION m_SaveData[]; // fundamental callbacks void (CBaseEntity::*m_pfnThink)(); @@ -330,7 +329,7 @@ public: void SUB_UseTargets(CBaseEntity *pActivator, USE_TYPE useType, float value); void EXPORT DelayThink(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[2]; + static TYPEDESCRIPTION m_SaveData[]; float m_flDelay; string_t m_iszKillTarget; @@ -370,7 +369,7 @@ public: #endif public: - static TYPEDESCRIPTION IMPL(m_SaveData)[5]; + static TYPEDESCRIPTION m_SaveData[]; // animation needs float m_flFrameRate; // computed FPS for current sequence @@ -402,7 +401,7 @@ public: static float AxisDelta(int flags, const Vector &angle1, const Vector &angle2); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[19]; + static TYPEDESCRIPTION m_SaveData[]; TOGGLE_STATE m_toggle_state; float m_flActivateFinished; // like attack_finished, but for doors @@ -501,7 +500,7 @@ public: BUTTON_CODE ButtonResponseToTouch(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[8]; + static TYPEDESCRIPTION m_SaveData[]; BOOL m_fStayPushed; // button stays pushed in until touched again? BOOL m_fRotating; // a rotating button? default is a sliding button. @@ -541,7 +540,7 @@ public: void EXPORT Register(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[4]; + static TYPEDESCRIPTION m_SaveData[]; EHandle m_rgEntities[MAX_MS_TARGETS]; int m_rgTriggered[MAX_MS_TARGETS]; @@ -575,9 +574,6 @@ T *GetClassPtr(T *a) a->m_pEntity->m_pContainingEntity = a; #endif -#if defined(HOOK_GAMEDLL) && defined(_WIN32) && !defined(REGAMEDLL_UNIT_TESTS) - VirtualTableInit((void *)a, stripClass(typeid(T).name())); -#endif } return a; diff --git a/regamedll/dlls/client.cpp b/regamedll/dlls/client.cpp index 7daddf40..3dd2f62f 100644 --- a/regamedll/dlls/client.cpp +++ b/regamedll/dlls/client.cpp @@ -1,13 +1,9 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - int giPrecacheGrunt = 0; int gmsgWeapPickup = 0; int gmsgHudText = 0; +int gmsgHudTextPro = 0; int gmsgHudTextArgs = 0; int gmsgShake = 0; int gmsgFade = 0; @@ -137,8 +133,6 @@ static entity_field_alias_t custom_entity_field_alias[] = { "animtime", 0 }, }; -#endif // HOOK_GAMEDLL - bool g_bServerActive = false; PLAYERPVSSTATUS g_PVSStatus[MAX_CLIENTS]; unsigned short m_usResetDecals; @@ -149,113 +143,112 @@ void LinkUserMessages() if (gmsgCurWeapon) return; - gmsgCurWeapon = REG_USER_MSG("CurWeapon", 3); - gmsgGeigerRange = REG_USER_MSG("Geiger", 1); - gmsgFlashlight = REG_USER_MSG("Flashlight", 2); - gmsgFlashBattery = REG_USER_MSG("FlashBat", 1); - gmsgHealth = REG_USER_MSG("Health", 1); - gmsgDamage = REG_USER_MSG("Damage", 12); - gmsgBattery = REG_USER_MSG("Battery", 2); - gmsgTrain = REG_USER_MSG("Train", 1); - gmsgHudText = REG_USER_MSG("HudTextPro", -1); - REG_USER_MSG("HudText", -1); - gmsgSayText = REG_USER_MSG("SayText", -1); - gmsgTextMsg = REG_USER_MSG("TextMsg", -1); - gmsgWeaponList = REG_USER_MSG("WeaponList", -1); - gmsgResetHUD = REG_USER_MSG("ResetHUD", 0); - gmsgInitHUD = REG_USER_MSG("InitHUD", 0); - gmsgViewMode = REG_USER_MSG("ViewMode", 0); + gmsgCurWeapon = REG_USER_MSG("CurWeapon", 3); + gmsgGeigerRange = REG_USER_MSG("Geiger", 1); + gmsgFlashlight = REG_USER_MSG("Flashlight", 2); + gmsgFlashBattery = REG_USER_MSG("FlashBat", 1); + gmsgHealth = REG_USER_MSG("Health", 1); + gmsgDamage = REG_USER_MSG("Damage", 12); + gmsgBattery = REG_USER_MSG("Battery", 2); + gmsgTrain = REG_USER_MSG("Train", 1); + gmsgHudTextPro = REG_USER_MSG("HudTextPro", -1); + gmsgHudText = REG_USER_MSG("HudText", -1); + gmsgSayText = REG_USER_MSG("SayText", -1); + gmsgTextMsg = REG_USER_MSG("TextMsg", -1); + gmsgWeaponList = REG_USER_MSG("WeaponList", -1); + gmsgResetHUD = REG_USER_MSG("ResetHUD", 0); + gmsgInitHUD = REG_USER_MSG("InitHUD", 0); + gmsgViewMode = REG_USER_MSG("ViewMode", 0); gmsgShowGameTitle = REG_USER_MSG("GameTitle", 1); - gmsgDeathMsg = REG_USER_MSG("DeathMsg", -1); - gmsgScoreAttrib = REG_USER_MSG("ScoreAttrib", 2); - gmsgScoreInfo = REG_USER_MSG("ScoreInfo", 9); - gmsgTeamInfo = REG_USER_MSG("TeamInfo", -1); - gmsgTeamScore = REG_USER_MSG("TeamScore", -1); - gmsgGameMode = REG_USER_MSG("GameMode", 1); - gmsgMOTD = REG_USER_MSG("MOTD", -1); - gmsgServerName = REG_USER_MSG("ServerName", -1); - gmsgAmmoPickup = REG_USER_MSG("AmmoPickup", 2); - gmsgWeapPickup = REG_USER_MSG("WeapPickup", 1); - gmsgItemPickup = REG_USER_MSG("ItemPickup", -1); - gmsgHideWeapon = REG_USER_MSG("HideWeapon", 1); - gmsgSetFOV = REG_USER_MSG("SetFOV", 1); - gmsgShowMenu = REG_USER_MSG("ShowMenu", -1); - gmsgShake = REG_USER_MSG("ScreenShake", 6); - gmsgFade = REG_USER_MSG("ScreenFade", 10); - gmsgAmmoX = REG_USER_MSG("AmmoX", 2); - gmsgSendAudio = REG_USER_MSG("SendAudio", -1); - gmsgRoundTime = REG_USER_MSG("RoundTime", 2); - gmsgMoney = REG_USER_MSG("Money", 5); - gmsgArmorType = REG_USER_MSG("ArmorType", 1); - gmsgBlinkAcct = REG_USER_MSG("BlinkAcct", 1); - gmsgStatusValue = REG_USER_MSG("StatusValue", -1); - gmsgStatusText = REG_USER_MSG("StatusText", -1); - gmsgStatusIcon = REG_USER_MSG("StatusIcon", -1); - gmsgBarTime = REG_USER_MSG("BarTime", 2); - gmsgReloadSound = REG_USER_MSG("ReloadSound", 2); - gmsgCrosshair = REG_USER_MSG("Crosshair", 1); - gmsgNVGToggle = REG_USER_MSG("NVGToggle", 1); - gmsgRadar = REG_USER_MSG("Radar", 7); - gmsgSpectator = REG_USER_MSG("Spectator", 2); - gmsgVGUIMenu = REG_USER_MSG("VGUIMenu", -1); - gmsgTutorText = REG_USER_MSG("TutorText", -1); - gmsgTutorLine = REG_USER_MSG("TutorLine", -1); - gmsgTutorState = REG_USER_MSG("TutorState", -1); - gmsgTutorClose = REG_USER_MSG("TutorClose", -1); - gmsgAllowSpec = REG_USER_MSG("AllowSpec", 1); - gmsgBombDrop = REG_USER_MSG("BombDrop", 7); - gmsgBombPickup = REG_USER_MSG("BombPickup", 0); - gmsgSendCorpse = REG_USER_MSG("ClCorpse", -1); - gmsgHostagePos = REG_USER_MSG("HostagePos", 8); - gmsgHostageK = REG_USER_MSG("HostageK", 1); - gmsgHLTV = REG_USER_MSG("HLTV", 2); - gmsgSpecHealth = REG_USER_MSG("SpecHealth", 1); - gmsgForceCam = REG_USER_MSG("ForceCam", 3); - gmsgADStop = REG_USER_MSG("ADStop", 0); - gmsgReceiveW = REG_USER_MSG("ReceiveW", 1); - gmsgCZCareer = REG_USER_MSG("CZCareer", -1); - gmsgCZCareerHUD = REG_USER_MSG("CZCareerHUD", -1); - gmsgShadowIdx = REG_USER_MSG("ShadowIdx", 4); - gmsgTaskTime = REG_USER_MSG("TaskTime", 4); - gmsgScenarioIcon = REG_USER_MSG("Scenario", -1); - gmsgBotVoice = REG_USER_MSG("BotVoice", 2); - gmsgBuyClose = REG_USER_MSG("BuyClose", 0); - gmsgSpecHealth2 = REG_USER_MSG("SpecHealth2", 2); - gmsgBarTime2 = REG_USER_MSG("BarTime2", 4); - gmsgItemStatus = REG_USER_MSG("ItemStatus", 1); - gmsgLocation = REG_USER_MSG("Location", -1); - gmsgBotProgress = REG_USER_MSG("BotProgress", -1); - gmsgBrass = REG_USER_MSG("Brass", -1); - gmsgFog = REG_USER_MSG("Fog", 7); - gmsgShowTimer = REG_USER_MSG("ShowTimer", 0); - gmsgHudTextArgs = REG_USER_MSG("HudTextArgs", -1); + gmsgDeathMsg = REG_USER_MSG("DeathMsg", -1); + gmsgScoreAttrib = REG_USER_MSG("ScoreAttrib", 2); + gmsgScoreInfo = REG_USER_MSG("ScoreInfo", 9); + gmsgTeamInfo = REG_USER_MSG("TeamInfo", -1); + gmsgTeamScore = REG_USER_MSG("TeamScore", -1); + gmsgGameMode = REG_USER_MSG("GameMode", 1); + gmsgMOTD = REG_USER_MSG("MOTD", -1); + gmsgServerName = REG_USER_MSG("ServerName", -1); + gmsgAmmoPickup = REG_USER_MSG("AmmoPickup", 2); + gmsgWeapPickup = REG_USER_MSG("WeapPickup", 1); + gmsgItemPickup = REG_USER_MSG("ItemPickup", -1); + gmsgHideWeapon = REG_USER_MSG("HideWeapon", 1); + gmsgSetFOV = REG_USER_MSG("SetFOV", 1); + gmsgShowMenu = REG_USER_MSG("ShowMenu", -1); + gmsgShake = REG_USER_MSG("ScreenShake", 6); + gmsgFade = REG_USER_MSG("ScreenFade", 10); + gmsgAmmoX = REG_USER_MSG("AmmoX", 2); + gmsgSendAudio = REG_USER_MSG("SendAudio", -1); + gmsgRoundTime = REG_USER_MSG("RoundTime", 2); + gmsgMoney = REG_USER_MSG("Money", 5); + gmsgArmorType = REG_USER_MSG("ArmorType", 1); + gmsgBlinkAcct = REG_USER_MSG("BlinkAcct", 1); + gmsgStatusValue = REG_USER_MSG("StatusValue", -1); + gmsgStatusText = REG_USER_MSG("StatusText", -1); + gmsgStatusIcon = REG_USER_MSG("StatusIcon", -1); + gmsgBarTime = REG_USER_MSG("BarTime", 2); + gmsgReloadSound = REG_USER_MSG("ReloadSound", 2); + gmsgCrosshair = REG_USER_MSG("Crosshair", 1); + gmsgNVGToggle = REG_USER_MSG("NVGToggle", 1); + gmsgRadar = REG_USER_MSG("Radar", 7); + gmsgSpectator = REG_USER_MSG("Spectator", 2); + gmsgVGUIMenu = REG_USER_MSG("VGUIMenu", -1); + gmsgTutorText = REG_USER_MSG("TutorText", -1); + gmsgTutorLine = REG_USER_MSG("TutorLine", -1); + gmsgTutorState = REG_USER_MSG("TutorState", -1); + gmsgTutorClose = REG_USER_MSG("TutorClose", -1); + gmsgAllowSpec = REG_USER_MSG("AllowSpec", 1); + gmsgBombDrop = REG_USER_MSG("BombDrop", 7); + gmsgBombPickup = REG_USER_MSG("BombPickup", 0); + gmsgSendCorpse = REG_USER_MSG("ClCorpse", -1); + gmsgHostagePos = REG_USER_MSG("HostagePos", 8); + gmsgHostageK = REG_USER_MSG("HostageK", 1); + gmsgHLTV = REG_USER_MSG("HLTV", 2); + gmsgSpecHealth = REG_USER_MSG("SpecHealth", 1); + gmsgForceCam = REG_USER_MSG("ForceCam", 3); + gmsgADStop = REG_USER_MSG("ADStop", 0); + gmsgReceiveW = REG_USER_MSG("ReceiveW", 1); + gmsgCZCareer = REG_USER_MSG("CZCareer", -1); + gmsgCZCareerHUD = REG_USER_MSG("CZCareerHUD", -1); + gmsgShadowIdx = REG_USER_MSG("ShadowIdx", 4); + gmsgTaskTime = REG_USER_MSG("TaskTime", 4); + gmsgScenarioIcon = REG_USER_MSG("Scenario", -1); + gmsgBotVoice = REG_USER_MSG("BotVoice", 2); + gmsgBuyClose = REG_USER_MSG("BuyClose", 0); + gmsgSpecHealth2 = REG_USER_MSG("SpecHealth2", 2); + gmsgBarTime2 = REG_USER_MSG("BarTime2", 4); + gmsgItemStatus = REG_USER_MSG("ItemStatus", 1); + gmsgLocation = REG_USER_MSG("Location", -1); + gmsgBotProgress = REG_USER_MSG("BotProgress", -1); + gmsgBrass = REG_USER_MSG("Brass", -1); + gmsgFog = REG_USER_MSG("Fog", 7); + gmsgShowTimer = REG_USER_MSG("ShowTimer", 0); + gmsgHudTextArgs = REG_USER_MSG("HudTextArgs", -1); } void WriteSigonMessages() { - for (int i = 0; i < MAX_WEAPONS; ++i) + for (int i = 0; i < MAX_WEAPONS; i++) { - ItemInfo &II = IMPL_CLASS(CBasePlayerItem, m_ItemInfoArray)[i]; - - if (!II.iId) + ItemInfo &info = CBasePlayerItem::m_ItemInfoArray[i]; + if (!info.iId) continue; const char *pszName; - if (!II.pszName) + if (!info.pszName) pszName = "Empty"; else - pszName = II.pszName; + pszName = info.pszName; MESSAGE_BEGIN(MSG_INIT, gmsgWeaponList); WRITE_STRING(pszName); - WRITE_BYTE(CBasePlayer::GetAmmoIndex(II.pszAmmo1)); - WRITE_BYTE(II.iMaxAmmo1); - WRITE_BYTE(CBasePlayer::GetAmmoIndex(II.pszAmmo2)); - WRITE_BYTE(II.iMaxAmmo2); - WRITE_BYTE(II.iSlot); - WRITE_BYTE(II.iPosition); - WRITE_BYTE(II.iId); - WRITE_BYTE(II.iFlags); + WRITE_BYTE(CBasePlayer::GetAmmoIndex(info.pszAmmo1)); + WRITE_BYTE(info.iMaxAmmo1); + WRITE_BYTE(CBasePlayer::GetAmmoIndex(info.pszAmmo2)); + WRITE_BYTE(info.iMaxAmmo2); + WRITE_BYTE(info.iSlot); + WRITE_BYTE(info.iPosition); + WRITE_BYTE(info.iId); + WRITE_BYTE(info.iFlags); MESSAGE_END(); } } @@ -1016,10 +1009,10 @@ bool CanBuyThis(CBasePlayer *pPlayer, int iWeapon) if (pPlayer->HasShield() && iWeapon == WEAPON_SHIELDGUN) return false; - if (pPlayer->m_rgpPlayerItems[ PISTOL_SLOT ] && pPlayer->m_rgpPlayerItems[ PISTOL_SLOT ]->m_iId == WEAPON_ELITE && iWeapon == WEAPON_SHIELDGUN) + if (pPlayer->m_rgpPlayerItems[PISTOL_SLOT] && pPlayer->m_rgpPlayerItems[PISTOL_SLOT]->m_iId == WEAPON_ELITE && iWeapon == WEAPON_SHIELDGUN) return false; - if (pPlayer->m_rgpPlayerItems[ PRIMARY_WEAPON_SLOT ] && pPlayer->m_rgpPlayerItems[ PRIMARY_WEAPON_SLOT ]->m_iId == iWeapon) + if (pPlayer->m_rgpPlayerItems[PRIMARY_WEAPON_SLOT] && pPlayer->m_rgpPlayerItems[PRIMARY_WEAPON_SLOT]->m_iId == iWeapon) { if (g_bClientPrintEnable) { @@ -1029,7 +1022,7 @@ bool CanBuyThis(CBasePlayer *pPlayer, int iWeapon) return false; } - if (pPlayer->m_rgpPlayerItems[ PISTOL_SLOT ] && pPlayer->m_rgpPlayerItems[ PISTOL_SLOT ]->m_iId == iWeapon) + if (pPlayer->m_rgpPlayerItems[PISTOL_SLOT] && pPlayer->m_rgpPlayerItems[PISTOL_SLOT]->m_iId == iWeapon) { if (g_bClientPrintEnable) { @@ -1673,7 +1666,7 @@ void EXT_FUNC __API_HOOK(HandleMenu_ChooseAppearance)(CBasePlayer *pPlayer, int pPlayer->m_iModelName = appearance.model_id; pPlayer->SetClientUserInfoModel(GET_INFO_BUFFER(pPlayer->edict()), appearance.model_name); - pPlayer->SetNewPlayerModel(sPlayerModelFiles[ appearance.model_name_index ]); + pPlayer->SetNewPlayerModel(sPlayerModelFiles[appearance.model_name_index]); if (CSGameRules()->m_bMapHasVIPSafetyZone) { @@ -2236,12 +2229,12 @@ bool BuyAmmo(CBasePlayer *pPlayer, int nSlot, bool bBlinkMoney) // nSlot == 1 : Primary weapons // nSlot == 2 : Secondary weapons - CBasePlayerItem *pItem = pPlayer->m_rgpPlayerItems[ nSlot ]; + CBasePlayerItem *pItem = pPlayer->m_rgpPlayerItems[nSlot]; if (pPlayer->HasShield()) { - if (pPlayer->m_rgpPlayerItems[ PISTOL_SLOT ]) - pItem = pPlayer->m_rgpPlayerItems[ PISTOL_SLOT ]; + if (pPlayer->m_rgpPlayerItems[PISTOL_SLOT]) + pItem = pPlayer->m_rgpPlayerItems[PISTOL_SLOT]; } if (pItem) @@ -3625,19 +3618,8 @@ void EXT_FUNC StartFrame() CLocalNav::Think(); - static cvar_t *skill = nullptr; - if (!skill) - { - skill = CVAR_GET_POINTER("skill"); - } - gpGlobals->teamplay = 1.0f; - - if (skill) - g_iSkillLevel = int(skill->value); - - else - g_iSkillLevel = 0; + g_iSkillLevel = g_pskill ? (int)g_pskill->value : 0; if (TheBots) { TheBots->StartFrame(); @@ -4422,12 +4404,12 @@ void EXT_FUNC CreateBaseline(int player, int eindex, struct entity_state_s *base void Entity_FieldInit(struct delta_s *pFields) { - entity_field_alias[ FIELD_ORIGIN0 ].field = DELTA_FINDFIELD(pFields, entity_field_alias[ FIELD_ORIGIN0 ].name); - entity_field_alias[ FIELD_ORIGIN1 ].field = DELTA_FINDFIELD(pFields, entity_field_alias[ FIELD_ORIGIN1 ].name); - entity_field_alias[ FIELD_ORIGIN2 ].field = DELTA_FINDFIELD(pFields, entity_field_alias[ FIELD_ORIGIN2 ].name); - entity_field_alias[ FIELD_ANGLES0 ].field = DELTA_FINDFIELD(pFields, entity_field_alias[ FIELD_ANGLES0 ].name); - entity_field_alias[ FIELD_ANGLES1 ].field = DELTA_FINDFIELD(pFields, entity_field_alias[ FIELD_ANGLES1 ].name); - entity_field_alias[ FIELD_ANGLES2 ].field = DELTA_FINDFIELD(pFields, entity_field_alias[ FIELD_ANGLES2 ].name); + entity_field_alias[FIELD_ORIGIN0].field = DELTA_FINDFIELD(pFields, entity_field_alias[FIELD_ORIGIN0].name); + entity_field_alias[FIELD_ORIGIN1].field = DELTA_FINDFIELD(pFields, entity_field_alias[FIELD_ORIGIN1].name); + entity_field_alias[FIELD_ORIGIN2].field = DELTA_FINDFIELD(pFields, entity_field_alias[FIELD_ORIGIN2].name); + entity_field_alias[FIELD_ANGLES0].field = DELTA_FINDFIELD(pFields, entity_field_alias[FIELD_ANGLES0].name); + entity_field_alias[FIELD_ANGLES1].field = DELTA_FINDFIELD(pFields, entity_field_alias[FIELD_ANGLES1].name); + entity_field_alias[FIELD_ANGLES2].field = DELTA_FINDFIELD(pFields, entity_field_alias[FIELD_ANGLES2].name); } // Callback for sending entity_state_t info over network. @@ -4451,39 +4433,39 @@ void Entity_Encode(struct delta_s *pFields, const unsigned char *from, const uns if (localplayer) { - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN0 ].field); - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN1 ].field); - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN2 ].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN0].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN1].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN2].field); } if (t->impacttime != 0 && t->starttime != 0) { - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN0 ].field); - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN1 ].field); - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN2 ].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN0].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN1].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN2].field); - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ANGLES0 ].field); - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ANGLES1 ].field); - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ANGLES2 ].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ANGLES0].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ANGLES1].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ANGLES2].field); } if (t->movetype == MOVETYPE_FOLLOW && t->aiment != 0) { - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN0 ].field); - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN1 ].field); - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN2 ].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN0].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN1].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN2].field); } else if (t->aiment != f->aiment) { - DELTA_SETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN0 ].field); - DELTA_SETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN1 ].field); - DELTA_SETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN2 ].field); + DELTA_SETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN0].field); + DELTA_SETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN1].field); + DELTA_SETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN2].field); } } void Player_FieldInit(struct delta_s *pFields) { - player_field_alias[ FIELD_ORIGIN0 ].field = DELTA_FINDFIELD(pFields, player_field_alias[ FIELD_ORIGIN0 ].name); - player_field_alias[ FIELD_ORIGIN1 ].field = DELTA_FINDFIELD(pFields, player_field_alias[ FIELD_ORIGIN1 ].name); - player_field_alias[ FIELD_ORIGIN2 ].field = DELTA_FINDFIELD(pFields, player_field_alias[ FIELD_ORIGIN2 ].name); + player_field_alias[FIELD_ORIGIN0].field = DELTA_FINDFIELD(pFields, player_field_alias[FIELD_ORIGIN0].name); + player_field_alias[FIELD_ORIGIN1].field = DELTA_FINDFIELD(pFields, player_field_alias[FIELD_ORIGIN1].name); + player_field_alias[FIELD_ORIGIN2].field = DELTA_FINDFIELD(pFields, player_field_alias[FIELD_ORIGIN2].name); } // Callback for sending entity_state_t for players info over network. @@ -4507,35 +4489,35 @@ void Player_Encode(struct delta_s *pFields, const unsigned char *from, const uns if (localplayer) { - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN0 ].field); - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN1 ].field); - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN2 ].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN0].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN1].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN2].field); } if (t->movetype == MOVETYPE_FOLLOW && t->aiment != 0) { - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN0 ].field); - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN1 ].field); - DELTA_UNSETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN2 ].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN0].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN1].field); + DELTA_UNSETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN2].field); } else if (t->aiment != f->aiment) { - DELTA_SETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN0 ].field); - DELTA_SETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN1 ].field); - DELTA_SETBYINDEX(pFields, entity_field_alias[ FIELD_ORIGIN2 ].field); + DELTA_SETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN0].field); + DELTA_SETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN1].field); + DELTA_SETBYINDEX(pFields, entity_field_alias[FIELD_ORIGIN2].field); } } void Custom_Entity_FieldInit(delta_s *pFields) { - custom_entity_field_alias[ CUSTOMFIELD_ORIGIN0 ].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[ CUSTOMFIELD_ORIGIN0 ].name); - custom_entity_field_alias[ CUSTOMFIELD_ORIGIN1 ].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[ CUSTOMFIELD_ORIGIN1 ].name); - custom_entity_field_alias[ CUSTOMFIELD_ORIGIN2 ].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[ CUSTOMFIELD_ORIGIN2 ].name); - custom_entity_field_alias[ CUSTOMFIELD_ANGLES0 ].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[ CUSTOMFIELD_ANGLES0 ].name); - custom_entity_field_alias[ CUSTOMFIELD_ANGLES1 ].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[ CUSTOMFIELD_ANGLES1 ].name); - custom_entity_field_alias[ CUSTOMFIELD_ANGLES2 ].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[ CUSTOMFIELD_ANGLES2 ].name); - custom_entity_field_alias[ CUSTOMFIELD_SKIN ].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[ CUSTOMFIELD_SKIN ].name); - custom_entity_field_alias[ CUSTOMFIELD_SEQUENCE ].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[ CUSTOMFIELD_SEQUENCE ].name); - custom_entity_field_alias[ CUSTOMFIELD_ANIMTIME ].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[ CUSTOMFIELD_ANIMTIME ].name); + custom_entity_field_alias[CUSTOMFIELD_ORIGIN0].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[CUSTOMFIELD_ORIGIN0].name); + custom_entity_field_alias[CUSTOMFIELD_ORIGIN1].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[CUSTOMFIELD_ORIGIN1].name); + custom_entity_field_alias[CUSTOMFIELD_ORIGIN2].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[CUSTOMFIELD_ORIGIN2].name); + custom_entity_field_alias[CUSTOMFIELD_ANGLES0].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[CUSTOMFIELD_ANGLES0].name); + custom_entity_field_alias[CUSTOMFIELD_ANGLES1].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[CUSTOMFIELD_ANGLES1].name); + custom_entity_field_alias[CUSTOMFIELD_ANGLES2].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[CUSTOMFIELD_ANGLES2].name); + custom_entity_field_alias[CUSTOMFIELD_SKIN].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[CUSTOMFIELD_SKIN].name); + custom_entity_field_alias[CUSTOMFIELD_SEQUENCE].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[CUSTOMFIELD_SEQUENCE].name); + custom_entity_field_alias[CUSTOMFIELD_ANIMTIME].field = DELTA_FINDFIELD(pFields, custom_entity_field_alias[CUSTOMFIELD_ANIMTIME].name); } // Callback for sending entity_state_t info ( for custom entities ) over network. @@ -4560,27 +4542,27 @@ void Custom_Encode(struct delta_s *pFields, const unsigned char *from, const uns { if (beamType != BEAM_ENTPOINT) { - DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[ CUSTOMFIELD_ORIGIN0 ].field); - DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[ CUSTOMFIELD_ORIGIN1 ].field); - DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[ CUSTOMFIELD_ORIGIN2 ].field); + DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[CUSTOMFIELD_ORIGIN0].field); + DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[CUSTOMFIELD_ORIGIN1].field); + DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[CUSTOMFIELD_ORIGIN2].field); } - DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[ CUSTOMFIELD_ANGLES0 ].field); - DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[ CUSTOMFIELD_ANGLES1 ].field); - DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[ CUSTOMFIELD_ANGLES2 ].field); + DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[CUSTOMFIELD_ANGLES0].field); + DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[CUSTOMFIELD_ANGLES1].field); + DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[CUSTOMFIELD_ANGLES2].field); } if (beamType != BEAM_ENTS && beamType != BEAM_ENTPOINT) { - DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[ CUSTOMFIELD_SKIN ].field); - DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[ CUSTOMFIELD_SEQUENCE ].field); + DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[CUSTOMFIELD_SKIN].field); + DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[CUSTOMFIELD_SEQUENCE].field); } // animtime is compared by rounding first // see if we really shouldn't actually send it if (int(f->animtime) == int(t->animtime)) { - DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[ CUSTOMFIELD_ANIMTIME ].field); + DELTA_UNSETBYINDEX(pFields, custom_entity_field_alias[CUSTOMFIELD_ANIMTIME].field); } } @@ -4756,7 +4738,7 @@ void EXT_FUNC UpdateClientData(const edict_t *ent, int sendweapons, struct clien if ((unsigned int)weapon->m_iPrimaryAmmoType < MAX_AMMO_SLOTS) { cd->vuser4.x = weapon->m_iPrimaryAmmoType; - cd->vuser4.y = pPlayer->m_rgAmmo[ weapon->m_iPrimaryAmmoType ]; + cd->vuser4.y = pPlayer->m_rgAmmo[weapon->m_iPrimaryAmmoType]; } else { diff --git a/regamedll/dlls/client.h b/regamedll/dlls/client.h index 146d6827..f5f0b006 100644 --- a/regamedll/dlls/client.h +++ b/regamedll/dlls/client.h @@ -210,6 +210,7 @@ inline const char *GetTeamName(int team) extern int giPrecacheGrunt; extern int gmsgWeapPickup; extern int gmsgHudText; +extern int gmsgHudTextPro; extern int gmsgHudTextArgs; extern int gmsgShake; extern int gmsgFade; diff --git a/regamedll/dlls/debug.cpp b/regamedll/dlls/debug.cpp index cc1cc043..b7a5a406 100644 --- a/regamedll/dlls/debug.cpp +++ b/regamedll/dlls/debug.cpp @@ -1,10 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - DebugOutputLevel outputLevel[] = { { "bot", DEBUG_BOT }, @@ -16,9 +11,7 @@ DebugOutputLevel outputLevel[] = }; unsigned int theDebugOutputTypes; -static char theDebugBuffer[MAX_DEBUG_BUFF_SIZE]; - -#endif +char theDebugBuffer[MAX_DEBUG_BUFF_SIZE]; bool IsDeveloper() { diff --git a/regamedll/dlls/doors.cpp b/regamedll/dlls/doors.cpp index dd806751..dfe21b52 100644 --- a/regamedll/dlls/doors.cpp +++ b/regamedll/dlls/doors.cpp @@ -1,10 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - TYPEDESCRIPTION CBaseDoor::m_SaveData[] = { DEFINE_FIELD(CBaseDoor, m_bHealthValue, FIELD_CHARACTER), @@ -16,13 +11,6 @@ TYPEDESCRIPTION CBaseDoor::m_SaveData[] = DEFINE_FIELD(CBaseDoor, m_bUnlockedSentence, FIELD_CHARACTER), }; -TYPEDESCRIPTION CMomentaryDoor::m_SaveData[] = -{ - DEFINE_FIELD(CMomentaryDoor, m_bMoveSnd, FIELD_CHARACTER), -}; - -#endif - IMPLEMENT_SAVERESTORE(CBaseDoor, CBaseToggle) // play door or button locked or unlocked sounds. @@ -957,6 +945,11 @@ void CRotDoor::SetToggleState(int state) UTIL_SetOrigin(pev, pev->origin); } +TYPEDESCRIPTION CMomentaryDoor::m_SaveData[] = +{ + DEFINE_FIELD(CMomentaryDoor, m_bMoveSnd, FIELD_CHARACTER), +}; + LINK_ENTITY_TO_CLASS(momentary_door, CMomentaryDoor, CCSMomentaryDoor) IMPLEMENT_SAVERESTORE(CMomentaryDoor, CBaseToggle) diff --git a/regamedll/dlls/doors.h b/regamedll/dlls/doors.h index 1c0be5d1..776f51a0 100644 --- a/regamedll/dlls/doors.h +++ b/regamedll/dlls/doors.h @@ -60,7 +60,7 @@ public: virtual void Blocked(CBaseEntity *pOther); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[7]; + static TYPEDESCRIPTION m_SaveData[]; // used to selectivly override defaults void EXPORT DoorTouch(CBaseEntity *pOther); @@ -110,7 +110,7 @@ public: virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[1]; + static TYPEDESCRIPTION m_SaveData[]; byte m_bMoveSnd; // sound a door makes while moving }; diff --git a/regamedll/dlls/effects.cpp b/regamedll/dlls/effects.cpp index be7734b7..21de24b1 100644 --- a/regamedll/dlls/effects.cpp +++ b/regamedll/dlls/effects.cpp @@ -1,10 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - TYPEDESCRIPTION CBubbling::m_SaveData[] = { DEFINE_FIELD(CBubbling, m_density, FIELD_INTEGER), @@ -12,56 +7,6 @@ TYPEDESCRIPTION CBubbling::m_SaveData[] = DEFINE_FIELD(CBubbling, m_state, FIELD_INTEGER), }; -TYPEDESCRIPTION CLightning::m_SaveData[] = -{ - DEFINE_FIELD(CLightning, m_active, FIELD_INTEGER), - DEFINE_FIELD(CLightning, m_iszStartEntity, FIELD_STRING), - DEFINE_FIELD(CLightning, m_iszEndEntity, FIELD_STRING), - DEFINE_FIELD(CLightning, m_life, FIELD_FLOAT), - DEFINE_FIELD(CLightning, m_boltWidth, FIELD_INTEGER), - DEFINE_FIELD(CLightning, m_noiseAmplitude, FIELD_INTEGER), - DEFINE_FIELD(CLightning, m_brightness, FIELD_INTEGER), - DEFINE_FIELD(CLightning, m_speed, FIELD_INTEGER), - DEFINE_FIELD(CLightning, m_restrike, FIELD_FLOAT), - DEFINE_FIELD(CLightning, m_spriteTexture, FIELD_INTEGER), - DEFINE_FIELD(CLightning, m_iszSpriteName, FIELD_STRING), - DEFINE_FIELD(CLightning, m_frameStart, FIELD_INTEGER), - DEFINE_FIELD(CLightning, m_radius, FIELD_FLOAT), -}; - -TYPEDESCRIPTION CLaser::m_SaveData[] = -{ - DEFINE_FIELD(CLaser, m_pSprite, FIELD_CLASSPTR), - DEFINE_FIELD(CLaser, m_iszSpriteName, FIELD_STRING), - DEFINE_FIELD(CLaser, m_firePosition, FIELD_POSITION_VECTOR), -}; - -TYPEDESCRIPTION CGlow::m_SaveData[] = -{ - DEFINE_FIELD(CGlow, m_lastTime, FIELD_TIME), - DEFINE_FIELD(CGlow, m_maxFrame, FIELD_FLOAT), -}; - -TYPEDESCRIPTION CSprite::m_SaveData[] = -{ - DEFINE_FIELD(CSprite, m_lastTime, FIELD_TIME), - DEFINE_FIELD(CSprite, m_maxFrame, FIELD_FLOAT), -}; - -TYPEDESCRIPTION CGibShooter::m_SaveData[] = -{ - DEFINE_FIELD(CGibShooter, m_iGibs, FIELD_INTEGER), - DEFINE_FIELD(CGibShooter, m_iGibCapacity, FIELD_INTEGER), - DEFINE_FIELD(CGibShooter, m_iGibMaterial, FIELD_INTEGER), - DEFINE_FIELD(CGibShooter, m_iGibModelIndex, FIELD_INTEGER), - DEFINE_FIELD(CGibShooter, m_flGibVelocity, FIELD_FLOAT), - DEFINE_FIELD(CGibShooter, m_flVariance, FIELD_FLOAT), - DEFINE_FIELD(CGibShooter, m_flGibLife, FIELD_FLOAT), -}; - -#endif // HOOK_GAMEDLL - -LINK_ENTITY_TO_CLASS(info_target, CPointEntity, CCSPointEntity) LINK_ENTITY_TO_CLASS(env_bubbles, CBubbling, CCSBubbling) IMPLEMENT_SAVERESTORE(CBubbling, CBaseEntity) @@ -352,6 +297,23 @@ void CBeam::DoSparks(const Vector &start, const Vector &end) } } +TYPEDESCRIPTION CLightning::m_SaveData[] = +{ + DEFINE_FIELD(CLightning, m_active, FIELD_INTEGER), + DEFINE_FIELD(CLightning, m_iszStartEntity, FIELD_STRING), + DEFINE_FIELD(CLightning, m_iszEndEntity, FIELD_STRING), + DEFINE_FIELD(CLightning, m_life, FIELD_FLOAT), + DEFINE_FIELD(CLightning, m_boltWidth, FIELD_INTEGER), + DEFINE_FIELD(CLightning, m_noiseAmplitude, FIELD_INTEGER), + DEFINE_FIELD(CLightning, m_brightness, FIELD_INTEGER), + DEFINE_FIELD(CLightning, m_speed, FIELD_INTEGER), + DEFINE_FIELD(CLightning, m_restrike, FIELD_FLOAT), + DEFINE_FIELD(CLightning, m_spriteTexture, FIELD_INTEGER), + DEFINE_FIELD(CLightning, m_iszSpriteName, FIELD_STRING), + DEFINE_FIELD(CLightning, m_frameStart, FIELD_INTEGER), + DEFINE_FIELD(CLightning, m_radius, FIELD_FLOAT), +}; + LINK_ENTITY_TO_CLASS(env_lightning, CLightning, CCSLightning) LINK_ENTITY_TO_CLASS(env_beam, CLightning, CCSLightning) IMPLEMENT_SAVERESTORE(CLightning, CBeam) @@ -850,6 +812,13 @@ void CLightning::BeamUpdateVars() } } +TYPEDESCRIPTION CLaser::m_SaveData[] = +{ + DEFINE_FIELD(CLaser, m_pSprite, FIELD_CLASSPTR), + DEFINE_FIELD(CLaser, m_iszSpriteName, FIELD_STRING), + DEFINE_FIELD(CLaser, m_firePosition, FIELD_POSITION_VECTOR), +}; + LINK_ENTITY_TO_CLASS(env_laser, CLaser, CCSLaser) IMPLEMENT_SAVERESTORE(CLaser, CBeam) @@ -1011,6 +980,12 @@ void CLaser::StrikeThink() pev->nextthink = gpGlobals->time + 0.1f; } +TYPEDESCRIPTION CGlow::m_SaveData[] = +{ + DEFINE_FIELD(CGlow, m_lastTime, FIELD_TIME), + DEFINE_FIELD(CGlow, m_maxFrame, FIELD_FLOAT), +}; + LINK_ENTITY_TO_CLASS(env_glow, CGlow, CCSGlow) IMPLEMENT_SAVERESTORE(CGlow, CPointEntity) @@ -1102,6 +1077,12 @@ void CBombGlow::Think() pev->nextthink = gpGlobals->time + 0.05f; } +TYPEDESCRIPTION CSprite::m_SaveData[] = +{ + DEFINE_FIELD(CSprite, m_lastTime, FIELD_TIME), + DEFINE_FIELD(CSprite, m_maxFrame, FIELD_FLOAT), +}; + LINK_ENTITY_TO_CLASS(env_sprite, CSprite, CCSSprite) IMPLEMENT_SAVERESTORE(CSprite, CPointEntity) @@ -1278,6 +1259,17 @@ void CSprite::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useTyp } } +TYPEDESCRIPTION CGibShooter::m_SaveData[] = +{ + DEFINE_FIELD(CGibShooter, m_iGibs, FIELD_INTEGER), + DEFINE_FIELD(CGibShooter, m_iGibCapacity, FIELD_INTEGER), + DEFINE_FIELD(CGibShooter, m_iGibMaterial, FIELD_INTEGER), + DEFINE_FIELD(CGibShooter, m_iGibModelIndex, FIELD_INTEGER), + DEFINE_FIELD(CGibShooter, m_flGibVelocity, FIELD_FLOAT), + DEFINE_FIELD(CGibShooter, m_flVariance, FIELD_FLOAT), + DEFINE_FIELD(CGibShooter, m_flGibLife, FIELD_FLOAT), +}; + IMPLEMENT_SAVERESTORE(CGibShooter, CBaseDelay) LINK_ENTITY_TO_CLASS(gibshooter, CGibShooter, CCSGibShooter) @@ -2014,3 +2006,27 @@ void CItemSoda::CanTouch(CBaseEntity *pOther) SetThink(&CItemSoda::SUB_Remove); pev->nextthink = gpGlobals->time; } + +LINK_ENTITY_TO_CLASS(info_intermission, CInfoIntermission, CCSInfoIntermission) + +void CInfoIntermission::Spawn() +{ + UTIL_SetOrigin(pev, pev->origin); + + pev->solid = SOLID_NOT; + pev->effects = EF_NODRAW; + pev->v_angle = g_vecZero; + pev->nextthink = gpGlobals->time + 2.0f; // let targets spawn! +} + +void CInfoIntermission::Think() +{ + // find my target + edict_t *pTarget = FIND_ENTITY_BY_TARGETNAME(nullptr, STRING(pev->target)); + + if (!FNullEnt(pTarget)) + { + pev->v_angle = UTIL_VecToAngles((pTarget->v.origin - pev->origin).Normalize()); + pev->v_angle.x = -pev->v_angle.x; + } +} diff --git a/regamedll/dlls/effects.h b/regamedll/dlls/effects.h index 397aa805..a47ae484 100644 --- a/regamedll/dlls/effects.h +++ b/regamedll/dlls/effects.h @@ -99,7 +99,7 @@ public: void EXPORT AnimateUntilDead(); static CSprite *SpriteCreate(const char *pSpriteName, const Vector &origin, BOOL animate); - static TYPEDESCRIPTION IMPL(m_SaveData)[2]; + static TYPEDESCRIPTION m_SaveData[]; private: float m_lastTime; @@ -211,7 +211,7 @@ public: void EXPORT StrikeThink(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[3]; + static TYPEDESCRIPTION m_SaveData[]; CSprite *m_pSprite; int m_iszSpriteName; @@ -235,7 +235,7 @@ public: void EXPORT FizzThink(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[3]; + static TYPEDESCRIPTION m_SaveData[]; int m_density; int m_frequency; @@ -272,7 +272,7 @@ public: void BeamUpdateVars(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[13]; + static TYPEDESCRIPTION m_SaveData[]; int m_active; int m_iszStartEntity; @@ -300,7 +300,7 @@ public: void Animate(float frames); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[2]; + static TYPEDESCRIPTION m_SaveData[]; float m_lastTime; float m_maxFrame; @@ -335,7 +335,7 @@ public: void EXPORT ShootThink(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[7]; + static TYPEDESCRIPTION m_SaveData[]; int m_iGibs; int m_iGibCapacity; @@ -487,4 +487,12 @@ public: void EXPORT CanTouch(CBaseEntity *pOther); }; +// Multiplayer intermission spots. +class CInfoIntermission: public CPointEntity +{ +public: + virtual void Spawn(); + virtual void Think(); +}; + int IsPointEntity(CBaseEntity *pEnt); diff --git a/regamedll/dlls/ehandle.h b/regamedll/dlls/ehandle.h index db4c3633..66897fbb 100644 --- a/regamedll/dlls/ehandle.h +++ b/regamedll/dlls/ehandle.h @@ -189,7 +189,7 @@ inline bool EntityHandle::operator==(T *pEntity) const template inline EntityHandle::operator bool() const { - return Get() != nullptr; + return IsValid(); } // Gets the Entity this handle refers to. diff --git a/regamedll/dlls/explode.cpp b/regamedll/dlls/explode.cpp index 4d07199c..345cf7a7 100644 --- a/regamedll/dlls/explode.cpp +++ b/regamedll/dlls/explode.cpp @@ -1,18 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - -TYPEDESCRIPTION CEnvExplosion::m_SaveData[] = -{ - DEFINE_FIELD(CEnvExplosion, m_iMagnitude, FIELD_INTEGER), - DEFINE_FIELD(CEnvExplosion, m_spriteScale, FIELD_INTEGER), -}; - -#endif - LINK_ENTITY_TO_CLASS(spark_shower, CShower, CCSShower) void CShower::Spawn() @@ -67,6 +54,12 @@ void CShower::Touch(CBaseEntity *pOther) } } +TYPEDESCRIPTION CEnvExplosion::m_SaveData[] = +{ + DEFINE_FIELD(CEnvExplosion, m_iMagnitude, FIELD_INTEGER), + DEFINE_FIELD(CEnvExplosion, m_spriteScale, FIELD_INTEGER), +}; + IMPLEMENT_SAVERESTORE(CEnvExplosion, CBaseMonster) LINK_ENTITY_TO_CLASS(env_explosion, CEnvExplosion, CCSEnvExplosion) diff --git a/regamedll/dlls/explode.h b/regamedll/dlls/explode.h index 9b32d8d8..dcd3ed0d 100644 --- a/regamedll/dlls/explode.h +++ b/regamedll/dlls/explode.h @@ -57,7 +57,7 @@ public: void EXPORT Smoke(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[2]; + static TYPEDESCRIPTION m_SaveData[]; int m_iMagnitude; int m_spriteScale; diff --git a/regamedll/dlls/extdll.h b/regamedll/dlls/extdll.h index 4eb56473..f85b2939 100644 --- a/regamedll/dlls/extdll.h +++ b/regamedll/dlls/extdll.h @@ -39,15 +39,12 @@ #include "strtools.h" #ifdef _WIN32 - #define WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #define NOWINRES #define NOSERVICE #define NOMCX #define NOIME - #include "winsani_in.h" - #include "windows.h" - #include "winsani_out.h" - #undef PlaySound + #include #else #include #include diff --git a/regamedll/dlls/func_break.cpp b/regamedll/dlls/func_break.cpp index b14f0c4a..6fcb8044 100644 --- a/regamedll/dlls/func_break.cpp +++ b/regamedll/dlls/func_break.cpp @@ -1,14 +1,9 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - // Just add more items to the bottom of this array and they will automagically be supported // This is done instead of just a classname in the FGD so we can control which entities can // be spawned, and still remain fairly flexible -const char *CBreakable::pSpawnObjects[] = +const char *CBreakable::m_pszSpawnObjects[] = { nullptr, "item_battery", @@ -44,14 +39,14 @@ const char *CBreakable::pSpawnObjects[] = "weapon_flashbang" }; -const char *CBreakable::pSoundsWood[] = +const char *CBreakable::m_pszSoundsWood[] = { "debris/wood1.wav", "debris/wood2.wav", "debris/wood3.wav" }; -const char *CBreakable::pSoundsFlesh[] = +const char *CBreakable::m_pszSoundsFlesh[] = { "debris/flesh1.wav", "debris/flesh2.wav", @@ -61,34 +56,27 @@ const char *CBreakable::pSoundsFlesh[] = "debris/flesh7.wav" }; -const char *CBreakable::pSoundsMetal[] = +const char *CBreakable::m_pszSoundsMetal[] = { "debris/metal1.wav", "debris/metal2.wav", "debris/metal3.wav" }; -const char *CBreakable::pSoundsConcrete[] = +const char *CBreakable::m_pszSoundsConcrete[] = { "debris/concrete1.wav", "debris/concrete2.wav", "debris/concrete3.wav" }; -const char *CBreakable::pSoundsGlass[] = +const char *CBreakable::m_pszSoundsGlass[] = { "debris/glass1.wav", "debris/glass2.wav", "debris/glass3.wav" }; -char *CPushable::m_soundNames[] = -{ - "debris/pushbox1.wav", - "debris/pushbox2.wav", - "debris/pushbox3.wav" -}; - TYPEDESCRIPTION CBreakable::m_SaveData[] = { DEFINE_FIELD(CBreakable, m_Material, FIELD_INTEGER), @@ -98,80 +86,6 @@ TYPEDESCRIPTION CBreakable::m_SaveData[] = DEFINE_FIELD(CBreakable, m_iszSpawnObject, FIELD_STRING), }; -TYPEDESCRIPTION CPushable::m_SaveData[] = -{ - DEFINE_FIELD(CPushable, m_maxSpeed, FIELD_FLOAT), - DEFINE_FIELD(CPushable, m_soundTime, FIELD_TIME), -}; - -#endif // HOOK_GAMEDLL - -void CBreakable::KeyValue(KeyValueData *pkvd) -{ - // UNDONE_WC: explicitly ignoring these fields, but they shouldn't be in the map file! - if (FStrEq(pkvd->szKeyName, "explosion")) - { - if (!Q_stricmp(pkvd->szValue, "directed")) - m_Explosion = expDirected; - - else if (!Q_stricmp(pkvd->szValue, "random")) - m_Explosion = expRandom; - else - m_Explosion = expRandom; - - pkvd->fHandled = TRUE; - } - else if (FStrEq(pkvd->szKeyName, "material")) - { - Materials type = (Materials)Q_atoi(pkvd->szValue); - - // 0:glass, 1:wood, 2:metal, 3:flesh etc - if (type < 0 || type >= matLastMaterial) - m_Material = matWood; - else - m_Material = type; - - pkvd->fHandled = TRUE; - } - else if (FStrEq(pkvd->szKeyName, "deadmodel")) - { - pkvd->fHandled = TRUE; - } - else if (FStrEq(pkvd->szKeyName, "shards")) - { - //m_iShards = Q_atof(pkvd->szValue); - pkvd->fHandled = TRUE; - } - else if (FStrEq(pkvd->szKeyName, "gibmodel")) - { - m_iszGibModel = ALLOC_STRING(pkvd->szValue); - pkvd->fHandled = TRUE; - } - else if (FStrEq(pkvd->szKeyName, "spawnobject")) - { - int object = Q_atoi(pkvd->szValue); - if (object > 0 && object < ARRAYSIZE(pSpawnObjects)) - { - m_iszSpawnObject = MAKE_STRING(pSpawnObjects[object]); - } - - pkvd->fHandled = TRUE; - } - else if (FStrEq(pkvd->szKeyName, "explodemagnitude")) - { - ExplosionSetMagnitude(Q_atoi(pkvd->szValue)); - pkvd->fHandled = TRUE; - } - else if (FStrEq(pkvd->szKeyName, "lip")) - { - pkvd->fHandled = TRUE; - } - else - { - CBaseDelay::KeyValue(pkvd); - } -} - LINK_ENTITY_TO_CLASS(func_breakable, CBreakable, CCSBreakable) IMPLEMENT_SAVERESTORE(CBreakable, CBaseEntity) @@ -245,6 +159,72 @@ void CBreakable::Restart() } } +void CBreakable::KeyValue(KeyValueData *pkvd) +{ + // UNDONE_WC: explicitly ignoring these fields, but they shouldn't be in the map file! + if (FStrEq(pkvd->szKeyName, "explosion")) + { + if (!Q_stricmp(pkvd->szValue, "directed")) + m_Explosion = expDirected; + + else if (!Q_stricmp(pkvd->szValue, "random")) + m_Explosion = expRandom; + else + m_Explosion = expRandom; + + pkvd->fHandled = TRUE; + } + else if (FStrEq(pkvd->szKeyName, "material")) + { + Materials type = (Materials)Q_atoi(pkvd->szValue); + + // 0:glass, 1:wood, 2:metal, 3:flesh etc + if (type < 0 || type >= matLastMaterial) + m_Material = matWood; + else + m_Material = type; + + pkvd->fHandled = TRUE; + } + else if (FStrEq(pkvd->szKeyName, "deadmodel")) + { + pkvd->fHandled = TRUE; + } + else if (FStrEq(pkvd->szKeyName, "shards")) + { + //m_iShards = Q_atof(pkvd->szValue); + pkvd->fHandled = TRUE; + } + else if (FStrEq(pkvd->szKeyName, "gibmodel")) + { + m_iszGibModel = ALLOC_STRING(pkvd->szValue); + pkvd->fHandled = TRUE; + } + else if (FStrEq(pkvd->szKeyName, "spawnobject")) + { + int object = Q_atoi(pkvd->szValue); + if (object > 0 && object < ARRAYSIZE(m_pszSpawnObjects)) + { + m_iszSpawnObject = MAKE_STRING(m_pszSpawnObjects[object]); + } + + pkvd->fHandled = TRUE; + } + else if (FStrEq(pkvd->szKeyName, "explodemagnitude")) + { + ExplosionSetMagnitude(Q_atoi(pkvd->szValue)); + pkvd->fHandled = TRUE; + } + else if (FStrEq(pkvd->szKeyName, "lip")) + { + pkvd->fHandled = TRUE; + } + else + { + CBaseDelay::KeyValue(pkvd); + } +} + const char **CBreakable::MaterialSoundList(Materials precacheMaterial, int &soundCount) { const char **pSoundList; @@ -253,35 +233,35 @@ const char **CBreakable::MaterialSoundList(Materials precacheMaterial, int &soun { case matWood: { - pSoundList = pSoundsWood; - soundCount = ARRAYSIZE(pSoundsWood); + pSoundList = m_pszSoundsWood; + soundCount = ARRAYSIZE(m_pszSoundsWood); break; } case matFlesh: { - pSoundList = pSoundsFlesh; - soundCount = ARRAYSIZE(pSoundsFlesh); + pSoundList = m_pszSoundsFlesh; + soundCount = ARRAYSIZE(m_pszSoundsFlesh); break; } case matGlass: case matComputer: case matUnbreakableGlass: { - pSoundList = pSoundsGlass; - soundCount = ARRAYSIZE(pSoundsGlass); + pSoundList = m_pszSoundsGlass; + soundCount = ARRAYSIZE(m_pszSoundsGlass); break; } case matMetal: { - pSoundList = pSoundsMetal; - soundCount = ARRAYSIZE(pSoundsMetal); + pSoundList = m_pszSoundsMetal; + soundCount = ARRAYSIZE(m_pszSoundsMetal); break; } case matCinderBlock: case matRocks: { - pSoundList = pSoundsConcrete; - soundCount = ARRAYSIZE(pSoundsConcrete); + pSoundList = m_pszSoundsConcrete; + soundCount = ARRAYSIZE(m_pszSoundsConcrete); break; } case matCeilingTile: @@ -315,7 +295,7 @@ void CBreakable::MaterialSoundRandom(edict_t *pEdict, Materials soundMaterial, f if (soundCount) { - EMIT_SOUND(pEdict, CHAN_BODY, pSoundList[ RANDOM_LONG(0, soundCount - 1) ], volume, 1.0); + EMIT_SOUND(pEdict, CHAN_BODY, pSoundList[RANDOM_LONG(0, soundCount - 1)], volume, 1.0); } } @@ -386,13 +366,13 @@ void CBreakable::Precache() if (pGibName) { - m_idShard = PRECACHE_MODEL((char *)pGibName); + m_idShard = PRECACHE_MODEL(pGibName); } // Precache the spawn item's data if (m_iszSpawnObject) { - UTIL_PrecacheOther((char *)STRING(m_iszSpawnObject)); + UTIL_PrecacheOther(STRING(m_iszSpawnObject)); } } @@ -863,6 +843,19 @@ int CBreakable::DamageDecal(int bitsDamageType) return CBaseEntity::DamageDecal(bitsDamageType); } +TYPEDESCRIPTION CPushable::m_SaveData[] = +{ + DEFINE_FIELD(CPushable, m_maxSpeed, FIELD_FLOAT), + DEFINE_FIELD(CPushable, m_soundTime, FIELD_TIME), +}; + +const char *CPushable::m_soundNames[] = +{ + "debris/pushbox1.wav", + "debris/pushbox2.wav", + "debris/pushbox3.wav" +}; + LINK_ENTITY_TO_CLASS(func_pushable, CPushable, CCSPushable) IMPLEMENT_SAVERESTORE(CPushable, CBreakable) @@ -903,7 +896,7 @@ void CPushable::Spawn() void CPushable::Precache() { - for (int i = 0; i < 3; ++i) + for (int i = 0; i < ARRAYSIZE(m_soundNames); i++) { PRECACHE_SOUND(m_soundNames[i]); } diff --git a/regamedll/dlls/func_break.h b/regamedll/dlls/func_break.h index 259836ce..1a13df85 100644 --- a/regamedll/dlls/func_break.h +++ b/regamedll/dlls/func_break.h @@ -97,14 +97,14 @@ public: static void MaterialSoundRandom(edict_t *pEdict, Materials soundMaterial, float volume); static const char **MaterialSoundList(Materials precacheMaterial, int &soundCount); - static const char *pSoundsWood[3]; - static const char *pSoundsFlesh[6]; - static const char *pSoundsGlass[3]; - static const char *pSoundsMetal[3]; - static const char *pSoundsConcrete[3]; - static const char *pSpawnObjects[32]; + static const char *m_pszSpawnObjects[32]; + static const char *m_pszSoundsWood[3]; + static const char *m_pszSoundsFlesh[6]; + static const char *m_pszSoundsMetal[3]; + static const char *m_pszSoundsConcrete[3]; + static const char *m_pszSoundsGlass[3]; - static TYPEDESCRIPTION IMPL(m_SaveData)[5]; + static TYPEDESCRIPTION m_SaveData[]; public: Materials m_Material; @@ -149,8 +149,8 @@ public: float MaxSpeed() const { return m_maxSpeed; } public: - static TYPEDESCRIPTION IMPL(m_SaveData)[2]; - static char *m_soundNames[3]; + static TYPEDESCRIPTION m_SaveData[]; + static const char *m_soundNames[]; int m_lastSound; float m_maxSpeed; diff --git a/regamedll/dlls/func_tank.cpp b/regamedll/dlls/func_tank.cpp index 2860d3af..6f0ac8a3 100644 --- a/regamedll/dlls/func_tank.cpp +++ b/regamedll/dlls/func_tank.cpp @@ -1,10 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - TYPEDESCRIPTION CFuncTank::m_SaveData[] = { DEFINE_FIELD(CFuncTank, m_yawCenter, FIELD_FLOAT), @@ -35,29 +30,16 @@ TYPEDESCRIPTION CFuncTank::m_SaveData[] = DEFINE_FIELD(CFuncTank, m_iszMaster, FIELD_STRING), }; -TYPEDESCRIPTION CFuncTankLaser::m_SaveData[] = +Vector CFuncTank::m_TankSpread[] = { - DEFINE_FIELD(CFuncTankLaser, m_pLaser, FIELD_CLASSPTR), - DEFINE_FIELD(CFuncTankLaser, m_laserTime, FIELD_TIME), + Vector(0, 0, 0), // perfect + Vector(0.025, 0.025, 0.025), // small cone + Vector(0.05, 0.05, 0.05), // medium cone + Vector(0.1, 0.1, 0.1), // large cone + Vector(0.25, 0.25, 0.25), // extra-large cone }; -TYPEDESCRIPTION CFuncTankControls::m_SaveData[] = -{ - DEFINE_FIELD(CFuncTankControls, m_pTank, FIELD_CLASSPTR), -}; - -Vector gTankSpread[] = -{ - Vector(0, 0, 0), // perfect - Vector(0.025, 0.025, 0.025), // small cone - Vector(0.05, 0.05, 0.05), // medium cone - Vector(0.1, 0.1, 0.1), // large cone - Vector(0.25, 0.25, 0.25), // extra-large cone -}; - -#endif // HOOK_GAMEDLL - -const int MAX_FIRING_SPREADS = ARRAYSIZE(gTankSpread); +constexpr int MAX_FIRING_SPREADS = ARRAYSIZE(CFuncTank::m_TankSpread); IMPLEMENT_SAVERESTORE(CFuncTank, CBaseEntity) @@ -379,7 +361,7 @@ void CFuncTank::Think() pev->avelocity = g_vecZero; TrackTarget(); - if (Q_fabs(float_precision(pev->avelocity.x)) > 1 || Q_fabs(float_precision(pev->avelocity.y)) > 1) + if (fabs(float_precision(pev->avelocity.x)) > 1 || fabs(float_precision(pev->avelocity.y)) > 1) StartRotSound(); else StopRotSound(); @@ -526,7 +508,7 @@ void CFuncTank::TrackTarget() return; } - if (CanFire() && ((Q_fabs(distX) < m_pitchTolerance && Q_fabs(distY) < m_yawTolerance) || (pev->spawnflags & SF_TANK_LINEOFSIGHT))) + if (CanFire() && ((fabs(distX) < m_pitchTolerance && fabs(distY) < m_yawTolerance) || (pev->spawnflags & SF_TANK_LINEOFSIGHT))) { bool fire = false; Vector forward; @@ -569,13 +551,13 @@ void CFuncTank::AdjustAnglesForBarrel(Vector &angles, float distance) if (m_barrelPos.y) { r2 = m_barrelPos.y * m_barrelPos.y; - angles.y += (180.0f / M_PI) * Q_atan2(m_barrelPos.y, Q_sqrt(d2 - r2)); + angles.y += (180.0f / M_PI) * atan2(m_barrelPos.y, Q_sqrt(d2 - r2)); } if (m_barrelPos.z) { r2 = m_barrelPos.z * m_barrelPos.z; - angles.x += (180.0f / M_PI) * Q_atan2(-m_barrelPos.z, Q_sqrt(d2 - r2)); + angles.x += (180.0f / M_PI) * atan2(-m_barrelPos.z, Q_sqrt(d2 - r2)); } } } @@ -665,7 +647,6 @@ void CFuncTankGun::Fire(const Vector &barrelEnd, const Vector &forward, entvars_ UTIL_MakeAimVectors(pev->angles); int bulletCount = int((gpGlobals->time - m_fireLast) * m_fireRate); - if (bulletCount > 0) { for (int i = 0; i < bulletCount; i++) @@ -673,13 +654,13 @@ void CFuncTankGun::Fire(const Vector &barrelEnd, const Vector &forward, entvars_ switch (m_bulletType) { case TANK_BULLET_9MM: - FireBullets(1, barrelEnd, forward, gTankSpread[m_spread], 4096, BULLET_MONSTER_9MM, 1, m_iBulletDamage, pevAttacker); + FireBullets(1, barrelEnd, forward, m_TankSpread[m_spread], 4096, BULLET_MONSTER_9MM, 1, m_iBulletDamage, pevAttacker); break; case TANK_BULLET_MP5: - FireBullets(1, barrelEnd, forward, gTankSpread[m_spread], 4096, BULLET_MONSTER_MP5, 1, m_iBulletDamage, pevAttacker); + FireBullets(1, barrelEnd, forward, m_TankSpread[m_spread], 4096, BULLET_MONSTER_MP5, 1, m_iBulletDamage, pevAttacker); break; case TANK_BULLET_12MM: - FireBullets(1, barrelEnd, forward, gTankSpread[m_spread], 4096, BULLET_MONSTER_12MM, 1, m_iBulletDamage, pevAttacker); + FireBullets(1, barrelEnd, forward, m_TankSpread[m_spread], 4096, BULLET_MONSTER_12MM, 1, m_iBulletDamage, pevAttacker); break; default: case TANK_BULLET_NONE: @@ -696,6 +677,12 @@ void CFuncTankGun::Fire(const Vector &barrelEnd, const Vector &forward, entvars_ } } +TYPEDESCRIPTION CFuncTankLaser::m_SaveData[] = +{ + DEFINE_FIELD(CFuncTankLaser, m_pLaser, FIELD_CLASSPTR), + DEFINE_FIELD(CFuncTankLaser, m_laserTime, FIELD_TIME), +}; + LINK_ENTITY_TO_CLASS(func_tanklaser, CFuncTankLaser, CCSFuncTankLaser) IMPLEMENT_SAVERESTORE(CFuncTankLaser, CFuncTank) @@ -761,22 +748,19 @@ void CFuncTankLaser::Think() void CFuncTankLaser::Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker) { - int i; - TraceResult tr; - if (m_fireLast != 0.0f && GetLaser()) { // TankTrace needs gpGlobals->v_up, etc. UTIL_MakeAimVectors(pev->angles); int bulletCount = int((gpGlobals->time - m_fireLast) * m_fireRate); - if (bulletCount) { - for (i = 0; i < bulletCount; i++) + TraceResult tr; + for (int i = 0; i < bulletCount; i++) { m_pLaser->pev->origin = barrelEnd; - TankTrace(barrelEnd, forward, gTankSpread[m_spread], tr); + TankTrace(barrelEnd, forward, m_TankSpread[m_spread], tr); m_laserTime = gpGlobals->time; m_pLaser->TurnOn(); @@ -804,14 +788,12 @@ void CFuncTankRocket::Precache() void CFuncTankRocket::Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker) { - int i; - if (m_fireLast != 0.0f) { int bulletCount = int((gpGlobals->time - m_fireLast) * m_fireRate); if (bulletCount > 0) { - for (i = 0; i < bulletCount; i++) + for (int i = 0; i < bulletCount; i++) { CBaseEntity *pRocket = CBaseEntity::Create("rpg_rocket", barrelEnd, pev->angles, edict()); } @@ -854,7 +836,7 @@ void CFuncTankMortar::Fire(const Vector &barrelEnd, const Vector &forward, entva // TankTrace needs gpGlobals->v_up, etc. UTIL_MakeAimVectors(pev->angles); - TankTrace(barrelEnd, forward, gTankSpread[m_spread], tr); + TankTrace(barrelEnd, forward, m_TankSpread[m_spread], tr); ExplosionCreate(tr.vecEndPos, pev->angles, edict(), pev->impulse, TRUE); CFuncTank::Fire(barrelEnd, forward, pev); } @@ -865,6 +847,11 @@ void CFuncTankMortar::Fire(const Vector &barrelEnd, const Vector &forward, entva } } +TYPEDESCRIPTION CFuncTankControls::m_SaveData[] = +{ + DEFINE_FIELD(CFuncTankControls, m_pTank, FIELD_CLASSPTR), +}; + LINK_ENTITY_TO_CLASS(func_tankcontrols, CFuncTankControls, CCSFuncTankControls) IMPLEMENT_SAVERESTORE(CFuncTankControls, CBaseEntity) diff --git a/regamedll/dlls/func_tank.h b/regamedll/dlls/func_tank.h index 0df7ba84..4faf676b 100644 --- a/regamedll/dlls/func_tank.h +++ b/regamedll/dlls/func_tank.h @@ -101,7 +101,8 @@ public: void ControllerPostFrame(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[26]; + static TYPEDESCRIPTION m_SaveData[]; + static Vector m_TankSpread[]; protected: CBasePlayer *m_pController; @@ -158,7 +159,7 @@ public: CLaser *GetLaser(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[2]; + static TYPEDESCRIPTION m_SaveData[]; private: CLaser *m_pLaser; @@ -190,6 +191,6 @@ public: virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[1]; + static TYPEDESCRIPTION m_SaveData[]; CFuncTank *m_pTank; }; diff --git a/regamedll/dlls/game.cpp b/regamedll/dlls/game.cpp index ffb4f165..c5ba7358 100644 --- a/regamedll/dlls/game.cpp +++ b/regamedll/dlls/game.cpp @@ -1,123 +1,119 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL +cvar_t *g_pskill = nullptr; +cvar_t *g_psv_gravity = nullptr; +cvar_t *g_psv_aim = nullptr; +cvar_t *g_footsteps = nullptr; +cvar_t *g_psv_accelerate = nullptr; +cvar_t *g_psv_friction = nullptr; +cvar_t *g_psv_stopspeed = nullptr; +cvar_t *g_psv_stepsize = nullptr; +cvar_t *g_psv_clienttrace = nullptr; -cvar_t *g_psv_gravity = NULL; -cvar_t *g_psv_aim = NULL; -cvar_t *g_footsteps = NULL; -cvar_t *g_psv_accelerate = NULL; -cvar_t *g_psv_friction = NULL; -cvar_t *g_psv_stopspeed = NULL; -cvar_t displaysoundlist = { "displaysoundlist", "0", 0, 0.0f, NULL }; -cvar_t timelimit = { "mp_timelimit", "0", FCVAR_SERVER, 0.0f, NULL }; -cvar_t flashlight = { "mp_flashlight", "0", FCVAR_SERVER, 0.0f, NULL }; -cvar_t decalfrequency = { "decalfrequency", "30", FCVAR_SERVER, 0.0f, NULL }; -cvar_t fadetoblack = { "mp_fadetoblack", "0", FCVAR_SERVER, 0.0f, NULL }; +cvar_t displaysoundlist = { "displaysoundlist", "0", 0, 0.0f, nullptr }; +cvar_t timelimit = { "mp_timelimit", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t flashlight = { "mp_flashlight", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t decalfrequency = { "decalfrequency", "30", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t fadetoblack = { "mp_fadetoblack", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t fragsleft = { "mp_fragsleft", "0", FCVAR_SERVER | FCVAR_UNLOGGED, 0.0f, NULL }; // Don't spam console/log files/users with this changing -cvar_t timeleft = { "mp_timeleft", "0", FCVAR_SERVER | FCVAR_UNLOGGED, 0.0f, NULL }; +cvar_t fragsleft = { "mp_fragsleft", "0", FCVAR_SERVER | FCVAR_UNLOGGED, 0.0f, nullptr }; // Don't spam console/log files/users with this changing +cvar_t timeleft = { "mp_timeleft", "0", FCVAR_SERVER | FCVAR_UNLOGGED, 0.0f, nullptr }; -cvar_t friendlyfire = { "mp_friendlyfire", "0", FCVAR_SERVER, 0.0f, NULL }; -cvar_t allowmonsters = { "mp_allowmonsters", "0", FCVAR_SERVER, 0.0f, NULL }; -cvar_t roundtime = { "mp_roundtime", "5", FCVAR_SERVER, 0.0f, NULL }; -cvar_t buytime = { "mp_buytime", "1.5", FCVAR_SERVER, 0.0f, NULL }; -cvar_t freezetime = { "mp_freezetime", "6", FCVAR_SERVER, 0.0f, NULL }; -cvar_t c4timer = { "mp_c4timer", "45", FCVAR_SERVER, 0.0f, NULL }; -cvar_t ghostfrequency = { "mp_ghostfrequency", "0.1", FCVAR_SERVER, 0.0f, NULL }; -cvar_t autokick = { "mp_autokick", "1", FCVAR_SERVER, 0.0f, NULL }; -cvar_t autokick_timeout = { "mp_autokick_timeout", "-1", FCVAR_SERVER, 0.0f, NULL }; -cvar_t restartround = { "sv_restartround", "0", FCVAR_SERVER, 0.0f, NULL }; -cvar_t sv_restart = { "sv_restart", "0", FCVAR_SERVER, 0.0f, NULL }; -cvar_t limitteams = { "mp_limitteams", "2", FCVAR_SERVER, 0.0f, NULL }; -cvar_t autoteambalance = { "mp_autoteambalance", "1", FCVAR_SERVER, 0.0f, NULL }; -cvar_t tkpunish = { "mp_tkpunish", "0", FCVAR_SERVER, 0.0f, NULL }; -cvar_t hostagepenalty = { "mp_hostagepenalty", "13", FCVAR_SERVER, 0.0f, NULL }; -cvar_t mirrordamage = { "mp_mirrordamage", "0", FCVAR_SERVER, 0.0f, NULL }; -cvar_t logmessages = { "mp_logmessages", "1", FCVAR_SERVER, 0.0f, NULL }; -cvar_t forcecamera = { "mp_forcecamera", "0", FCVAR_SERVER, 0.0f, NULL }; -cvar_t forcechasecam = { "mp_forcechasecam", "0", FCVAR_SERVER, 0.0f, NULL }; -cvar_t mapvoteratio = { "mp_mapvoteratio", "0.66", FCVAR_SERVER, 0.0f, NULL }; -cvar_t logdetail = { "mp_logdetail", "0", FCVAR_SERVER, 0.0f, NULL }; -cvar_t startmoney = { "mp_startmoney", "800", FCVAR_SERVER, 0.0f, NULL }; -cvar_t maxrounds = { "mp_maxrounds", "0", FCVAR_SERVER, 0.0f, NULL }; -cvar_t winlimit = { "mp_winlimit", "0", FCVAR_SERVER, 0.0f, NULL }; -cvar_t windifference = { "mp_windifference", "1", FCVAR_SERVER, 0.0f, NULL }; -cvar_t playerid = { "mp_playerid", "0", FCVAR_SERVER, 0.0f, NULL }; -cvar_t allow_spectators = { "allow_spectators", "1.0", FCVAR_SERVER, 0.0f, NULL }; -cvar_t mp_chattime = { "mp_chattime", "10", FCVAR_SERVER, 0.0f, NULL }; -cvar_t kick_percent = { "mp_kickpercent", "0.66", FCVAR_SERVER, 0.0f, NULL }; -cvar_t humans_join_team = { "humans_join_team", "any", FCVAR_SERVER, 0.0f, NULL }; -cvar_t sk_plr_9mm_bullet1 = { "sk_plr_9mm_bullet1", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_9mm_bullet2 = { "sk_plr_9mm_bullet2", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_9mm_bullet3 = { "sk_plr_9mm_bullet3", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_357_bullet1 = { "sk_plr_357_bullet1", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_357_bullet2 = { "sk_plr_357_bullet2", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_357_bullet3 = { "sk_plr_357_bullet3", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_9mmAR_bullet1 = { "sk_plr_9mmAR_bullet1", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_9mmAR_bullet2 = { "sk_plr_9mmAR_bullet2", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_9mmAR_bullet3 = { "sk_plr_9mmAR_bullet3", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_9mmAR_grenade1 = { "sk_plr_9mmAR_grenade1", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_9mmAR_grenade2 = { "sk_plr_9mmAR_grenade2", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_9mmAR_grenade3 = { "sk_plr_9mmAR_grenade3", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_buckshot1 = { "sk_plr_buckshot1", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_buckshot2 = { "sk_plr_buckshot2", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_buckshot3 = { "sk_plr_buckshot3", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_rpg1 = { "sk_plr_rpg1", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_rpg2 = { "sk_plr_rpg2", "0", 0, 0.0f, NULL }; -cvar_t sk_plr_rpg3 = { "sk_plr_rpg3", "0", 0, 0.0f, NULL }; -cvar_t sk_12mm_bullet1 = { "sk_12mm_bullet1", "0", 0, 0.0f, NULL }; -cvar_t sk_12mm_bullet2 = { "sk_12mm_bullet2", "0", 0, 0.0f, NULL }; -cvar_t sk_12mm_bullet3 = { "sk_12mm_bullet3", "0", 0, 0.0f, NULL }; -cvar_t sk_9mmAR_bullet1 = { "sk_9mmAR_bullet1", "0", 0, 0.0f, NULL }; -cvar_t sk_9mmAR_bullet2 = { "sk_9mmAR_bullet2", "0", 0, 0.0f, NULL }; -cvar_t sk_9mmAR_bullet3 = { "sk_9mmAR_bullet3", "0", 0, 0.0f, NULL }; -cvar_t sk_9mm_bullet1 = { "sk_9mm_bullet1", "0", 0, 0.0f, NULL }; -cvar_t sk_9mm_bullet2 = { "sk_9mm_bullet2", "0", 0, 0.0f, NULL }; -cvar_t sk_9mm_bullet3 = { "sk_9mm_bullet3", "0", 0, 0.0f, NULL }; -cvar_t sk_suitcharger1 = { "sk_suitcharger1", "0", 0, 0.0f, NULL }; -cvar_t sk_suitcharger2 = { "sk_suitcharger2", "0", 0, 0.0f, NULL }; -cvar_t sk_suitcharger3 = { "sk_suitcharger3", "0", 0, 0.0f, NULL }; -cvar_t sk_battery1 = { "sk_battery1", "0", 0, 0.0f, NULL }; -cvar_t sk_battery2 = { "sk_battery2", "0", 0, 0.0f, NULL }; -cvar_t sk_battery3 = { "sk_battery3", "0", 0, 0.0f, NULL }; -cvar_t sk_healthcharger1 = { "sk_healthcharger1", "0", 0, 0.0f, NULL }; -cvar_t sk_healthcharger2 = { "sk_healthcharger2", "0", 0, 0.0f, NULL }; -cvar_t sk_healthcharger3 = { "sk_healthcharger3", "0", 0, 0.0f, NULL }; -cvar_t sk_healthkit1 = { "sk_healthkit1", "0", 0, 0.0f, NULL }; -cvar_t sk_healthkit2 = { "sk_healthkit2", "0", 0, 0.0f, NULL }; -cvar_t sk_healthkit3 = { "sk_healthkit3", "0", 0, 0.0f, NULL }; -cvar_t sk_scientist_heal1 = { "sk_scientist_heal1", "0", 0, 0.0f, NULL }; -cvar_t sk_scientist_heal2 = { "sk_scientist_heal2", "0", 0, 0.0f, NULL }; -cvar_t sk_scientist_heal3 = { "sk_scientist_heal3", "0", 0, 0.0f, NULL }; - -#endif // HOOK_GAMEDLL +cvar_t friendlyfire = { "mp_friendlyfire", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t allowmonsters = { "mp_allowmonsters", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t roundtime = { "mp_roundtime", "5", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t buytime = { "mp_buytime", "1.5", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t freezetime = { "mp_freezetime", "6", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t c4timer = { "mp_c4timer", "45", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t ghostfrequency = { "mp_ghostfrequency", "0.1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t autokick = { "mp_autokick", "1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t autokick_timeout = { "mp_autokick_timeout", "-1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t restartround = { "sv_restartround", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t sv_restart = { "sv_restart", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t limitteams = { "mp_limitteams", "2", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t autoteambalance = { "mp_autoteambalance", "1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t tkpunish = { "mp_tkpunish", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t hostagepenalty = { "mp_hostagepenalty", "13", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t mirrordamage = { "mp_mirrordamage", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t logmessages = { "mp_logmessages", "1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t forcecamera = { "mp_forcecamera", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t forcechasecam = { "mp_forcechasecam", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t mapvoteratio = { "mp_mapvoteratio", "0.66", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t logdetail = { "mp_logdetail", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t startmoney = { "mp_startmoney", "800", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t maxrounds = { "mp_maxrounds", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t winlimit = { "mp_winlimit", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t windifference = { "mp_windifference", "1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t playerid = { "mp_playerid", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t allow_spectators = { "allow_spectators", "1.0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t mp_chattime = { "mp_chattime", "10", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t kick_percent = { "mp_kickpercent", "0.66", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t humans_join_team = { "humans_join_team", "any", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t sk_plr_9mm_bullet1 = { "sk_plr_9mm_bullet1", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_9mm_bullet2 = { "sk_plr_9mm_bullet2", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_9mm_bullet3 = { "sk_plr_9mm_bullet3", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_357_bullet1 = { "sk_plr_357_bullet1", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_357_bullet2 = { "sk_plr_357_bullet2", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_357_bullet3 = { "sk_plr_357_bullet3", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_9mmAR_bullet1 = { "sk_plr_9mmAR_bullet1", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_9mmAR_bullet2 = { "sk_plr_9mmAR_bullet2", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_9mmAR_bullet3 = { "sk_plr_9mmAR_bullet3", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_9mmAR_grenade1 = { "sk_plr_9mmAR_grenade1", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_9mmAR_grenade2 = { "sk_plr_9mmAR_grenade2", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_9mmAR_grenade3 = { "sk_plr_9mmAR_grenade3", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_buckshot1 = { "sk_plr_buckshot1", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_buckshot2 = { "sk_plr_buckshot2", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_buckshot3 = { "sk_plr_buckshot3", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_rpg1 = { "sk_plr_rpg1", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_rpg2 = { "sk_plr_rpg2", "0", 0, 0.0f, nullptr }; +cvar_t sk_plr_rpg3 = { "sk_plr_rpg3", "0", 0, 0.0f, nullptr }; +cvar_t sk_12mm_bullet1 = { "sk_12mm_bullet1", "0", 0, 0.0f, nullptr }; +cvar_t sk_12mm_bullet2 = { "sk_12mm_bullet2", "0", 0, 0.0f, nullptr }; +cvar_t sk_12mm_bullet3 = { "sk_12mm_bullet3", "0", 0, 0.0f, nullptr }; +cvar_t sk_9mmAR_bullet1 = { "sk_9mmAR_bullet1", "0", 0, 0.0f, nullptr }; +cvar_t sk_9mmAR_bullet2 = { "sk_9mmAR_bullet2", "0", 0, 0.0f, nullptr }; +cvar_t sk_9mmAR_bullet3 = { "sk_9mmAR_bullet3", "0", 0, 0.0f, nullptr }; +cvar_t sk_9mm_bullet1 = { "sk_9mm_bullet1", "0", 0, 0.0f, nullptr }; +cvar_t sk_9mm_bullet2 = { "sk_9mm_bullet2", "0", 0, 0.0f, nullptr }; +cvar_t sk_9mm_bullet3 = { "sk_9mm_bullet3", "0", 0, 0.0f, nullptr }; +cvar_t sk_suitcharger1 = { "sk_suitcharger1", "0", 0, 0.0f, nullptr }; +cvar_t sk_suitcharger2 = { "sk_suitcharger2", "0", 0, 0.0f, nullptr }; +cvar_t sk_suitcharger3 = { "sk_suitcharger3", "0", 0, 0.0f, nullptr }; +cvar_t sk_battery1 = { "sk_battery1", "0", 0, 0.0f, nullptr }; +cvar_t sk_battery2 = { "sk_battery2", "0", 0, 0.0f, nullptr }; +cvar_t sk_battery3 = { "sk_battery3", "0", 0, 0.0f, nullptr }; +cvar_t sk_healthcharger1 = { "sk_healthcharger1", "0", 0, 0.0f, nullptr }; +cvar_t sk_healthcharger2 = { "sk_healthcharger2", "0", 0, 0.0f, nullptr }; +cvar_t sk_healthcharger3 = { "sk_healthcharger3", "0", 0, 0.0f, nullptr }; +cvar_t sk_healthkit1 = { "sk_healthkit1", "0", 0, 0.0f, nullptr }; +cvar_t sk_healthkit2 = { "sk_healthkit2", "0", 0, 0.0f, nullptr }; +cvar_t sk_healthkit3 = { "sk_healthkit3", "0", 0, 0.0f, nullptr }; +cvar_t sk_scientist_heal1 = { "sk_scientist_heal1", "0", 0, 0.0f, nullptr }; +cvar_t sk_scientist_heal2 = { "sk_scientist_heal2", "0", 0, 0.0f, nullptr }; +cvar_t sk_scientist_heal3 = { "sk_scientist_heal3", "0", 0, 0.0f, nullptr }; #ifdef REGAMEDLL_ADD -cvar_t game_version = { "game_version", APP_VERSION, FCVAR_SERVER, 0.0f, nullptr }; -cvar_t maxmoney = { "mp_maxmoney", "16000", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t round_infinite = { "mp_round_infinite", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t game_version = { "game_version", APP_VERSION, FCVAR_SERVER, 0.0f, nullptr }; +cvar_t maxmoney = { "mp_maxmoney", "16000", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t round_infinite = { "mp_round_infinite", "0", FCVAR_SERVER, 0.0f, nullptr }; cvar_t hegrenade_penetration = { "mp_hegrenade_penetration", "0", 0, 0.0f, nullptr }; -cvar_t nadedrops = { "mp_nadedrops", "0", 0, 0.0f, nullptr }; -cvar_t roundrespawn_time = { "mp_roundrespawn_time", "20", 0, 20.0f, nullptr }; -cvar_t auto_reload_weapons = { "mp_auto_reload_weapons", "0", 0, 0.0f, nullptr }; -cvar_t refill_bpammo_weapons = { "mp_refill_bpammo_weapons", "0", 0, 0.0f, nullptr }; // Useful for mods like DeathMatch, GunGame, ZombieMod etc -cvar_t freeforall = { "mp_freeforall", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t auto_join_team = { "mp_auto_join_team", "0", 0, 0.0f, nullptr }; -cvar_t max_teamkills = { "mp_max_teamkills", "3", 0, 3.0f, nullptr }; -cvar_t fraglimit = { "mp_fraglimit", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t round_restart_delay = { "mp_round_restart_delay", "5", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t nadedrops = { "mp_nadedrops", "0", 0, 0.0f, nullptr }; +cvar_t roundrespawn_time = { "mp_roundrespawn_time", "20", 0, 20.0f, nullptr }; +cvar_t auto_reload_weapons = { "mp_auto_reload_weapons", "0", 0, 0.0f, nullptr }; +cvar_t refill_bpammo_weapons = { "mp_refill_bpammo_weapons", "0", 0, 0.0f, nullptr }; // Useful for mods like DeathMatch, GunGame, ZombieMod etc +cvar_t freeforall = { "mp_freeforall", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t auto_join_team = { "mp_auto_join_team", "0", 0, 0.0f, nullptr }; +cvar_t max_teamkills = { "mp_max_teamkills", "3", 0, 3.0f, nullptr }; +cvar_t fraglimit = { "mp_fraglimit", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t round_restart_delay = { "mp_round_restart_delay", "5", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t showtriggers = { "showtriggers", "0", 0, 0.0f, nullptr }; // debug cvar shows triggers + // TODO: Maybe it's better to register in the engine? -cvar_t showtriggers = { "showtriggers", "0", 0, 0.0f, nullptr }; // debug cvar shows triggers - // TODO: Maybe it's better to register in the engine? - -cvar_t hostagehurtable = { "mp_hostage_hurtable", "1", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t roundover = { "mp_roundover", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t forcerespawn = { "mp_forcerespawn", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t show_radioicon = { "mp_show_radioicon", "1", FCVAR_SERVER, 1.0f, nullptr }; +cvar_t hostagehurtable = { "mp_hostage_hurtable", "1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t roundover = { "mp_roundover", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t forcerespawn = { "mp_forcerespawn", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t show_radioicon = { "mp_show_radioicon", "1", FCVAR_SERVER, 1.0f, nullptr }; void GameDLL_Version_f() { @@ -141,12 +137,15 @@ void GameDLL_EndRound_f() void EXT_FUNC GameDLLInit() { - g_psv_gravity = CVAR_GET_POINTER("sv_gravity"); - g_psv_aim = CVAR_GET_POINTER("sv_aim"); - g_footsteps = CVAR_GET_POINTER("mp_footsteps"); - g_psv_accelerate = CVAR_GET_POINTER("sv_accelerate"); - g_psv_friction = CVAR_GET_POINTER("sv_friction"); - g_psv_stopspeed = CVAR_GET_POINTER("sv_stopspeed"); + g_pskill = CVAR_GET_POINTER("skill"); + g_psv_gravity = CVAR_GET_POINTER("sv_gravity"); + g_psv_aim = CVAR_GET_POINTER("sv_aim"); + g_footsteps = CVAR_GET_POINTER("mp_footsteps"); + g_psv_accelerate = CVAR_GET_POINTER("sv_accelerate"); + g_psv_friction = CVAR_GET_POINTER("sv_friction"); + g_psv_stopspeed = CVAR_GET_POINTER("sv_stopspeed"); + g_psv_stepsize = CVAR_GET_POINTER("sv_stepsize"); + g_psv_clienttrace = CVAR_GET_POINTER("sv_clienttrace"); CVAR_REGISTER(&displaysoundlist); CVAR_REGISTER(&timelimit); diff --git a/regamedll/dlls/game.h b/regamedll/dlls/game.h index c838be13..b361f36e 100644 --- a/regamedll/dlls/game.h +++ b/regamedll/dlls/game.h @@ -40,12 +40,15 @@ #define PLAYERID_TEAMONLY 1 #define PLAYERID_OFF 2 +extern cvar_t *g_pskill; extern cvar_t *g_psv_gravity; extern cvar_t *g_psv_aim; -extern cvar_t *g_footsteps; extern cvar_t *g_psv_accelerate; extern cvar_t *g_psv_friction; extern cvar_t *g_psv_stopspeed; +extern cvar_t *g_psv_stepsize; +extern cvar_t *g_psv_clienttrace; +extern cvar_t *g_footsteps; extern cvar_t displaysoundlist; extern cvar_t timelimit; diff --git a/regamedll/dlls/gamerules.cpp b/regamedll/dlls/gamerules.cpp index e4d4781f..f3e562ad 100644 --- a/regamedll/dlls/gamerules.cpp +++ b/regamedll/dlls/gamerules.cpp @@ -1,14 +1,7 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - CGameRules *g_pGameRules = nullptr; -#endif - CGameRules::CGameRules() { m_bFreezePeriod = FALSE; @@ -19,13 +12,11 @@ CGameRules::CGameRules() Q_strcpy(m_GameDesc, AreRunningCZero() ? "Condition Zero" : "Counter-Strike"); } -#ifndef HOOK_GAMEDLL CGameRules::~CGameRules() { delete[] m_GameDesc; m_GameDesc = nullptr; } -#endif // this is the game name that gets seen in the server browser const char *CGameRules::GetGameDescription() diff --git a/regamedll/dlls/gamerules.h b/regamedll/dlls/gamerules.h index e70eee4a..258ef742 100644 --- a/regamedll/dlls/gamerules.h +++ b/regamedll/dlls/gamerules.h @@ -217,10 +217,7 @@ class CGameRules { public: CGameRules(); - -#ifndef HOOK_GAMEDLL virtual ~CGameRules(); -#endif virtual void RefreshSkillData(); // fill skill data struct with proper values virtual void Think() = 0; // runs every server frame, should handle any timer tasks, periodic events, etc. @@ -335,8 +332,8 @@ public: BOOL m_bBombDropped; // custom - CUSTOM_MEMBER char *m_GameDesc; - CUSTOM_MEMBER bool m_bGameOver; // intermission or finale (deprecated name g_fGameOver) + char *m_GameDesc; + bool m_bGameOver; // intermission or finale (deprecated name g_fGameOver) }; // CHalfLifeRules - rules for the single player Half-Life game. @@ -344,10 +341,7 @@ class CHalfLifeRules: public CGameRules { public: CHalfLifeRules(); - -#ifndef HOOK_GAMEDLL virtual ~CHalfLifeRules() {}; -#endif virtual void Think(); virtual BOOL IsAllowedToSpawn(CBaseEntity *pEntity); @@ -773,11 +767,11 @@ protected: bool m_bSkipSpawn; // custom - CUSTOM_MEMBER bool m_bSkipShowMenu; - CUSTOM_MEMBER bool m_bNeededPlayers; - CUSTOM_MEMBER float m_flEscapeRatio; - CUSTOM_MEMBER float m_flTimeLimit; - CUSTOM_MEMBER float m_flGameStartTime; + bool m_bSkipShowMenu; + bool m_bNeededPlayers; + float m_flEscapeRatio; + float m_flTimeLimit; + float m_flGameStartTime; }; typedef struct mapcycle_item_s diff --git a/regamedll/dlls/ggrenade.cpp b/regamedll/dlls/ggrenade.cpp index 8a3bb2d0..e78f317c 100644 --- a/regamedll/dlls/ggrenade.cpp +++ b/regamedll/dlls/ggrenade.cpp @@ -1,10 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - TYPEDESCRIPTION CGrenade::m_SaveData[] = { DEFINE_FIELD(CGrenade, m_fAttenu, FIELD_FLOAT), @@ -24,8 +19,6 @@ TYPEDESCRIPTION CGrenade::m_SaveData[] = DEFINE_FIELD(CGrenade, m_usEvent, FIELD_INTEGER), }; -#endif - LINK_ENTITY_TO_CLASS(grenade, CGrenade, CCSGrenade) void CGrenade::Explode(Vector vecSrc, Vector vecAim) diff --git a/regamedll/dlls/globals.cpp b/regamedll/dlls/globals.cpp index 59b259ac..69efe532 100644 --- a/regamedll/dlls/globals.cpp +++ b/regamedll/dlls/globals.cpp @@ -1,14 +1,7 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - const Vector g_vecZero(0, 0, 0); -#endif - int g_Language; int g_iSkillLevel; diff --git a/regamedll/dlls/h_battery.cpp b/regamedll/dlls/h_battery.cpp index 9a75a507..cd535865 100644 --- a/regamedll/dlls/h_battery.cpp +++ b/regamedll/dlls/h_battery.cpp @@ -1,10 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - TYPEDESCRIPTION CRecharge::m_SaveData[] = { DEFINE_FIELD(CRecharge, m_flNextCharge, FIELD_TIME), @@ -14,8 +9,6 @@ TYPEDESCRIPTION CRecharge::m_SaveData[] = DEFINE_FIELD(CRecharge, m_flSoundTime, FIELD_TIME), }; -#endif - IMPLEMENT_SAVERESTORE(CRecharge, CBaseEntity) LINK_ENTITY_TO_CLASS(func_recharge, CRecharge, CCSRecharge) diff --git a/regamedll/dlls/h_battery.h b/regamedll/dlls/h_battery.h index 5cfe15a9..18e13954 100644 --- a/regamedll/dlls/h_battery.h +++ b/regamedll/dlls/h_battery.h @@ -44,7 +44,7 @@ public: void EXPORT Recharge(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[5]; + static TYPEDESCRIPTION m_SaveData[]; float m_flNextCharge; int m_iReactivate; diff --git a/regamedll/dlls/h_cycler.cpp b/regamedll/dlls/h_cycler.cpp index 295b384b..12052e6b 100644 --- a/regamedll/dlls/h_cycler.cpp +++ b/regamedll/dlls/h_cycler.cpp @@ -1,34 +1,15 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - TYPEDESCRIPTION CCycler::m_SaveData[] = { DEFINE_FIELD(CCycler, m_animate, FIELD_INTEGER), }; -TYPEDESCRIPTION CCyclerSprite::m_SaveData[] = -{ - DEFINE_FIELD(CCyclerSprite, m_animate, FIELD_INTEGER), - DEFINE_FIELD(CCyclerSprite, m_lastTime, FIELD_TIME), - DEFINE_FIELD(CCyclerSprite, m_maxFrame, FIELD_FLOAT), -}; - -TYPEDESCRIPTION CWreckage::m_SaveData[] = -{ - DEFINE_FIELD(CWreckage, m_flStartTime, FIELD_TIME), -}; - -#endif - IMPLEMENT_SAVERESTORE(CCycler, CBaseToggle) void CGenericCycler::Spawn() { - GenericCyclerSpawn((char *)STRING(pev->model), Vector(-16, -16, 0), Vector(16, 16, 72)); + GenericCyclerSpawn(pev->model, Vector(-16, -16, 0), Vector(16, 16, 72)); } LINK_ENTITY_TO_CLASS(cycler, CGenericCycler, CCSGenericCycler) @@ -41,7 +22,7 @@ void CCyclerProbe::Spawn() } // Cycler member functions -void CCycler::GenericCyclerSpawn(char *szModel, Vector vecMin, Vector vecMax) +void CCycler::GenericCyclerSpawn(const char *szModel, Vector vecMin, Vector vecMax) { if (!szModel || !szModel[0]) { @@ -161,6 +142,13 @@ BOOL CCycler::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float return FALSE; } +TYPEDESCRIPTION CCyclerSprite::m_SaveData[] = +{ + DEFINE_FIELD(CCyclerSprite, m_animate, FIELD_INTEGER), + DEFINE_FIELD(CCyclerSprite, m_lastTime, FIELD_TIME), + DEFINE_FIELD(CCyclerSprite, m_maxFrame, FIELD_FLOAT), +}; + LINK_ENTITY_TO_CLASS(cycler_sprite, CCyclerSprite, CCSCyclerSprite) IMPLEMENT_SAVERESTORE(CCyclerSprite, CBaseEntity) @@ -176,8 +164,8 @@ void CCyclerSprite::Spawn() m_animate = 1; m_lastTime = gpGlobals->time; - PRECACHE_MODEL((char *)STRING(pev->model)); - SET_MODEL(ENT(pev), STRING(pev->model)); + PRECACHE_MODEL(pev->model); + SET_MODEL(ENT(pev), pev->model); m_maxFrame = float(MODEL_FRAMES(pev->modelindex) - 1); @@ -249,8 +237,8 @@ void CWeaponCycler::Spawn() pev->solid = SOLID_SLIDEBOX; pev->movetype = MOVETYPE_NONE; - PRECACHE_MODEL((char *)STRING(pev->model)); - SET_MODEL(ENT(pev), STRING(pev->model)); + PRECACHE_MODEL(pev->model); + SET_MODEL(ENT(pev), pev->model); m_iszModel = pev->model; m_iModel = pev->modelindex; @@ -302,6 +290,11 @@ void CWeaponCycler::SecondaryAttack() m_flNextSecondaryAttack = gpGlobals->time + 0.3f; } +TYPEDESCRIPTION CWreckage::m_SaveData[] = +{ + DEFINE_FIELD(CWreckage, m_flStartTime, FIELD_TIME), +}; + IMPLEMENT_SAVERESTORE(CWreckage, CBaseToggle) LINK_ENTITY_TO_CLASS(cycler_wreckage, CWreckage, CCSWreckage) @@ -315,10 +308,10 @@ void CWreckage::Spawn() pev->frame = 0; pev->nextthink = gpGlobals->time + 0.1f; - if (!FStringNull(pev->model)) + if (!pev->model.IsNull()) { - PRECACHE_MODEL((char *)STRING(pev->model)); - SET_MODEL(ENT(pev), STRING(pev->model)); + PRECACHE_MODEL(pev->model); + SET_MODEL(ENT(pev), pev->model); } // pev->scale = 5.0; @@ -327,9 +320,9 @@ void CWreckage::Spawn() void CWreckage::Precache() { - if (!FStringNull(pev->model)) + if (!pev->model.IsNull()) { - PRECACHE_MODEL((char *)STRING(pev->model)); + PRECACHE_MODEL(pev->model); } } diff --git a/regamedll/dlls/h_cycler.h b/regamedll/dlls/h_cycler.h index 5991c223..c2319cb1 100644 --- a/regamedll/dlls/h_cycler.h +++ b/regamedll/dlls/h_cycler.h @@ -42,11 +42,11 @@ public: virtual void Think(); virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); -public: - void GenericCyclerSpawn(char *szModel, Vector vecMin, Vector vecMax); +protected: + void GenericCyclerSpawn(const char *szModel, Vector vecMin, Vector vecMax); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[1]; + static TYPEDESCRIPTION m_SaveData[]; int m_animate; }; @@ -82,7 +82,7 @@ public: inline int ShouldAnimate() { return (m_animate && m_maxFrame > 1.0f); } public: - static TYPEDESCRIPTION IMPL(m_SaveData)[3]; + static TYPEDESCRIPTION m_SaveData[]; int m_animate; float m_lastTime; @@ -120,7 +120,7 @@ public: virtual void Think(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[1]; + static TYPEDESCRIPTION m_SaveData[]; int m_flStartTime; }; diff --git a/regamedll/dlls/h_export.cpp b/regamedll/dlls/h_export.cpp index 85e3260b..ea3ed562 100644 --- a/regamedll/dlls/h_export.cpp +++ b/regamedll/dlls/h_export.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -//! Holds engine functionality callbacks +// Holds engine functionality callbacks enginefuncs_t g_engfuncs; globalvars_t *gpGlobals; @@ -14,3 +14,30 @@ C_DLLEXPORT void WINAPI GiveFnptrsToDll(enginefuncs_t *pEnginefuncsTable, global Regamedll_Game_Init(); } + +#ifdef _WIN32 + +// DLL entry point +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + if (fdwReason == DLL_PROCESS_ATTACH) + { + } + else if (fdwReason == DLL_PROCESS_DETACH) + { + } + + return TRUE; +} + +#else // _WIN32 + +void __attribute__((constructor)) DllMainLoad() +{ +} + +void __attribute__((destructor)) DllMainUnload() +{ +} + +#endif // _WIN32 diff --git a/regamedll/dlls/healthkit.cpp b/regamedll/dlls/healthkit.cpp index c4acd7af..7d780427 100644 --- a/regamedll/dlls/healthkit.cpp +++ b/regamedll/dlls/healthkit.cpp @@ -1,21 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - -TYPEDESCRIPTION CWallHealth::m_SaveData[] = -{ - DEFINE_FIELD(CWallHealth, m_flNextCharge, FIELD_TIME), - DEFINE_FIELD(CWallHealth, m_iReactivate, FIELD_INTEGER), - DEFINE_FIELD(CWallHealth, m_iJuice, FIELD_INTEGER), - DEFINE_FIELD(CWallHealth, m_iOn, FIELD_INTEGER), - DEFINE_FIELD(CWallHealth, m_flSoundTime, FIELD_TIME), -}; - -#endif - LINK_ENTITY_TO_CLASS(item_healthkit, CHealthKit, CCSHealthKit) void CHealthKit::Spawn() @@ -50,7 +34,7 @@ BOOL CHealthKit::MyTouch(CBasePlayer *pPlayer) if (pPlayer->TakeHealth(healthValue, DMG_GENERIC)) { MESSAGE_BEGIN(MSG_ONE, gmsgItemPickup, nullptr, pPlayer->pev); - WRITE_STRING(STRING(pev->classname)); + WRITE_STRING(pev->classname); MESSAGE_END(); EMIT_SOUND(ENT(pPlayer->pev), CHAN_ITEM, "items/smallmedkit1.wav", VOL_NORM, ATTN_NORM); @@ -66,6 +50,15 @@ BOOL CHealthKit::MyTouch(CBasePlayer *pPlayer) return FALSE; } +TYPEDESCRIPTION CWallHealth::m_SaveData[] = +{ + DEFINE_FIELD(CWallHealth, m_flNextCharge, FIELD_TIME), + DEFINE_FIELD(CWallHealth, m_iReactivate, FIELD_INTEGER), + DEFINE_FIELD(CWallHealth, m_iJuice, FIELD_INTEGER), + DEFINE_FIELD(CWallHealth, m_iOn, FIELD_INTEGER), + DEFINE_FIELD(CWallHealth, m_flSoundTime, FIELD_TIME), +}; + IMPLEMENT_SAVERESTORE(CWallHealth, CBaseEntity) LINK_ENTITY_TO_CLASS(func_healthcharger, CWallHealth, CCSWallHealth) @@ -97,7 +90,7 @@ void CWallHealth::Spawn() UTIL_SetOrigin(pev, pev->origin); UTIL_SetSize(pev, pev->mins, pev->maxs); - SET_MODEL(ENT(pev), STRING(pev->model)); + SET_MODEL(ENT(pev), pev->model); int healthValue = (int)gSkillData.healthchargerCapacity; #ifdef REGAMEDLL_FIXES diff --git a/regamedll/dlls/healthkit.h b/regamedll/dlls/healthkit.h index e57d4a2d..8f261f29 100644 --- a/regamedll/dlls/healthkit.h +++ b/regamedll/dlls/healthkit.h @@ -51,7 +51,7 @@ public: void EXPORT Off(); void EXPORT Recharge(); - static TYPEDESCRIPTION IMPL(m_SaveData)[5]; + static TYPEDESCRIPTION m_SaveData[]; float m_flNextCharge; int m_iReactivate; diff --git a/regamedll/dlls/hostage/hostage.cpp b/regamedll/dlls/hostage/hostage.cpp index 4673eedf..ab1ae7a8 100644 --- a/regamedll/dlls/hostage/hostage.cpp +++ b/regamedll/dlls/hostage/hostage.cpp @@ -1,59 +1,80 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - cvar_t cv_hostage_debug = { "hostage_debug", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_hostage_stop = { "hostage_stop", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_hostage_stop = { "hostage_stop", "0", FCVAR_SERVER, 0.0f, nullptr }; CHostageManager *g_pHostages = nullptr; int g_iHostageNumber = 0; -#endif - struct { HostageChatterType type; char *fileName; } hostageSoundStruct[] = { { HOSTAGE_CHATTER_START_FOLLOW, "hostage/huse/getouttahere.wav" }, - { HOSTAGE_CHATTER_START_FOLLOW, "hostage/huse/illfollow.wav" }, - { HOSTAGE_CHATTER_START_FOLLOW, "hostage/huse/letsdoit.wav" }, - { HOSTAGE_CHATTER_START_FOLLOW, "hostage/huse/letsgo.wav" }, - { HOSTAGE_CHATTER_START_FOLLOW, "hostage/huse/letshurry.wav" }, - { HOSTAGE_CHATTER_START_FOLLOW, "hostage/huse/letsmove.wav" }, - { HOSTAGE_CHATTER_START_FOLLOW, "hostage/huse/okletsgo.wav" }, - { HOSTAGE_CHATTER_START_FOLLOW, "hostage/huse/youlead.wav" }, + { HOSTAGE_CHATTER_START_FOLLOW, "hostage/huse/illfollow.wav" }, + { HOSTAGE_CHATTER_START_FOLLOW, "hostage/huse/letsdoit.wav" }, + { HOSTAGE_CHATTER_START_FOLLOW, "hostage/huse/letsgo.wav" }, + { HOSTAGE_CHATTER_START_FOLLOW, "hostage/huse/letshurry.wav" }, + { HOSTAGE_CHATTER_START_FOLLOW, "hostage/huse/letsmove.wav" }, + { HOSTAGE_CHATTER_START_FOLLOW, "hostage/huse/okletsgo.wav" }, + { HOSTAGE_CHATTER_START_FOLLOW, "hostage/huse/youlead.wav" }, - { HOSTAGE_CHATTER_STOP_FOLLOW, "hostage/hunuse/comeback.wav" }, + { HOSTAGE_CHATTER_STOP_FOLLOW, "hostage/hunuse/comeback.wav" }, { HOSTAGE_CHATTER_STOP_FOLLOW, "hostage/hunuse/dontleaveme.wav" }, { HOSTAGE_CHATTER_STOP_FOLLOW, "hostage/hunuse/illstayhere.wav" }, - { HOSTAGE_CHATTER_STOP_FOLLOW, "hostage/hunuse/notleaveme.wav" }, + { HOSTAGE_CHATTER_STOP_FOLLOW, "hostage/hunuse/notleaveme.wav" }, { HOSTAGE_CHATTER_STOP_FOLLOW, "hostage/hunuse/yeahillstay.wav" }, - { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/donthurtme1.wav" }, - { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/donthurtme2.wav" }, - { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/dontkill.wav" }, - { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/endpeace.wav" }, - { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/nevernegotiate.wav" }, + { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/donthurtme1.wav" }, + { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/donthurtme2.wav" }, + { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/dontkill.wav" }, + { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/endpeace.wav" }, + { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/nevernegotiate.wav" }, { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/nottellanything.wav" }, - { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/surrender.wav" }, - { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/whatdoyou.wav" }, - { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/whyareyou.wav" }, + { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/surrender.wav" }, + { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/whatdoyou.wav" }, + { HOSTAGE_CHATTER_INTIMIDATED, "hostage/hseenbyt/whyareyou.wav" }, { HOSTAGE_CHATTER_RETREAT, "hostage/hseenbyt/donthurtme1.wav" }, { HOSTAGE_CHATTER_RETREAT, "hostage/hseenbyt/donthurtme2.wav" }, - { HOSTAGE_CHATTER_RETREAT, "hostage/hseenbyt/dontkill.wav" }, - { HOSTAGE_CHATTER_RETREAT, "hostage/hseenbyt/dontkill.wav" }, - { HOSTAGE_CHATTER_RETREAT, "hostage/hretreat/illgoback1.wav" }, - { HOSTAGE_CHATTER_RETREAT, "hostage/hretreat/illgoback2.wav" }, - { HOSTAGE_CHATTER_RETREAT, "hostage/hretreat/okokgoing.wav" }, - { HOSTAGE_CHATTER_RETREAT, "hostage/hretreat/okokgoing2.wav" }, - { HOSTAGE_CHATTER_RETREAT, "hostage/hretreat/sorry1.wav" }, - { HOSTAGE_CHATTER_RETREAT, "hostage/hretreat/sorry2.wav" }, - { HOSTAGE_CHATTER_RETREAT, "hostage/hretreat/sorry3.wav" }, + { HOSTAGE_CHATTER_RETREAT, "hostage/hseenbyt/dontkill.wav" }, + { HOSTAGE_CHATTER_RETREAT, "hostage/hseenbyt/dontkill.wav" }, + { HOSTAGE_CHATTER_RETREAT, "hostage/hretreat/illgoback1.wav" }, + { HOSTAGE_CHATTER_RETREAT, "hostage/hretreat/illgoback2.wav" }, + { HOSTAGE_CHATTER_RETREAT, "hostage/hretreat/okokgoing.wav" }, + { HOSTAGE_CHATTER_RETREAT, "hostage/hretreat/okokgoing2.wav" }, + { HOSTAGE_CHATTER_RETREAT, "hostage/hretreat/sorry1.wav" }, + { HOSTAGE_CHATTER_RETREAT, "hostage/hretreat/sorry2.wav" }, + { HOSTAGE_CHATTER_RETREAT, "hostage/hretreat/sorry3.wav" }, { HOSTAGE_CHATTER_PAIN, "hostage/hpain/hpain1.wav" }, { HOSTAGE_CHATTER_PAIN, "hostage/hpain/hpain2.wav" }, @@ -62,92 +83,92 @@ struct { HOSTAGE_CHATTER_PAIN, "hostage/hpain/hpain5.wav" }, { HOSTAGE_CHATTER_PAIN, "hostage/hpain/hpain6.wav" }, - { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/awwcrap1.wav" }, - { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/awwcrap2.wav" }, - { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/getdown1.wav" }, - { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/getdown2.wav" }, - { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/getdown3.wav" }, - { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/lookout1.wav" }, - { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/lookout2.wav" }, + { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/awwcrap1.wav" }, + { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/awwcrap2.wav" }, + { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/getdown1.wav" }, + { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/getdown2.wav" }, + { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/getdown3.wav" }, + { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/lookout1.wav" }, + { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/lookout2.wav" }, { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/lookshooting1.wav" }, { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/lookshooting2.wav" }, { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/lookshooting3.wav" }, - { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/ohgod1.wav" }, - { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/ohgod2.wav" }, + { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/ohgod1.wav" }, + { HOSTAGE_CHATTER_SCARED_OF_GUNFIRE, "hostage/hreactions/ohgod2.wav" }, { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/awwcrap1.wav" }, { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/awwcrap2.wav" }, { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/deargod1.wav" }, { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/deargod2.wav" }, { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/deargod3.wav" }, - { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/ohgod1.wav" }, - { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/ohgod2.wav" }, - { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/ohno1.wav" }, - { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/ohno2.wav" }, - { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/awww2.wav" }, - { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/awww4.wav" }, + { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/ohgod1.wav" }, + { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/ohgod2.wav" }, + { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/ohno1.wav" }, + { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/ohno2.wav" }, + { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/awww2.wav" }, + { HOSTAGE_CHATTER_SCARED_OF_MURDER, "hostage/hreactions/awww4.wav" }, { HOSTAGE_CHATTER_LOOK_OUT, "hostage/hreactions/awwcrap1.wav" }, { HOSTAGE_CHATTER_LOOK_OUT, "hostage/hreactions/awwcrap2.wav" }, { HOSTAGE_CHATTER_LOOK_OUT, "hostage/hreactions/lookout1.wav" }, { HOSTAGE_CHATTER_LOOK_OUT, "hostage/hreactions/lookout2.wav" }, - { HOSTAGE_CHATTER_PLEASE_RESCUE_ME, "hostage/hseenbyct/areyousave.wav" }, + { HOSTAGE_CHATTER_PLEASE_RESCUE_ME, "hostage/hseenbyct/areyousave.wav" }, { HOSTAGE_CHATTER_PLEASE_RESCUE_ME, "hostage/hseenbyct/getmeoutta1.wav" }, { HOSTAGE_CHATTER_PLEASE_RESCUE_ME, "hostage/hseenbyct/getmeoutta2.wav" }, - { HOSTAGE_CHATTER_PLEASE_RESCUE_ME, "hostage/hseenbyct/imahostage.wav" }, - { HOSTAGE_CHATTER_PLEASE_RESCUE_ME, "hostage/hseenbyct/rescueme1.wav" }, - { HOSTAGE_CHATTER_PLEASE_RESCUE_ME, "hostage/hseenbyct/rescueme2.wav" }, + { HOSTAGE_CHATTER_PLEASE_RESCUE_ME, "hostage/hseenbyct/imahostage.wav" }, + { HOSTAGE_CHATTER_PLEASE_RESCUE_ME, "hostage/hseenbyct/rescueme1.wav" }, + { HOSTAGE_CHATTER_PLEASE_RESCUE_ME, "hostage/hseenbyct/rescueme2.wav" }, { HOSTAGE_CHATTER_PLEASE_RESCUE_ME, "hostage/hseenbyct/theyregonna.wav" }, - { HOSTAGE_CHATTER_IMPATIENT_FOR_RESCUE, "hostage/hseenbyct/areyousave.wav" }, + { HOSTAGE_CHATTER_IMPATIENT_FOR_RESCUE, "hostage/hseenbyct/areyousave.wav" }, { HOSTAGE_CHATTER_IMPATIENT_FOR_RESCUE, "hostage/hseenbyct/getmeoutta1.wav" }, { HOSTAGE_CHATTER_IMPATIENT_FOR_RESCUE, "hostage/hseenbyct/getmeoutta2.wav" }, - { HOSTAGE_CHATTER_IMPATIENT_FOR_RESCUE, "hostage/hseenbyct/rescueme1.wav" }, - { HOSTAGE_CHATTER_IMPATIENT_FOR_RESCUE, "hostage/hseenbyct/rescueme2.wav" }, + { HOSTAGE_CHATTER_IMPATIENT_FOR_RESCUE, "hostage/hseenbyct/rescueme1.wav" }, + { HOSTAGE_CHATTER_IMPATIENT_FOR_RESCUE, "hostage/hseenbyct/rescueme2.wav" }, { HOSTAGE_CHATTER_SEE_RESCUE_ZONE, "hostage/hseezone/almostouttahere.wav" }, - { HOSTAGE_CHATTER_SEE_RESCUE_ZONE, "hostage/hseezone/almostthere.wav" }, - { HOSTAGE_CHATTER_SEE_RESCUE_ZONE, "hostage/hseezone/keepgoing.wav" }, - { HOSTAGE_CHATTER_SEE_RESCUE_ZONE, "hostage/hseezone/notfar.wav" }, + { HOSTAGE_CHATTER_SEE_RESCUE_ZONE, "hostage/hseezone/almostthere.wav" }, + { HOSTAGE_CHATTER_SEE_RESCUE_ZONE, "hostage/hseezone/keepgoing.wav" }, + { HOSTAGE_CHATTER_SEE_RESCUE_ZONE, "hostage/hseezone/notfar.wav" }, - { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/alldead.wav" }, - { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/goodnews.wav" }, + { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/alldead.wav" }, + { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/goodnews.wav" }, { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/outtahere.wav" }, - { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/over1.wav" }, - { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/over2.wav" }, - { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/over3.wav" }, - { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/over4.wav" }, - { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/over5.wav" }, - { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/relief.wav" }, + { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/over1.wav" }, + { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/over2.wav" }, + { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/over3.wav" }, + { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/over4.wav" }, + { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/over5.wav" }, + { HOSTAGE_CHATTER_CTS_WIN, "hostage/hctwin/relief.wav" }, - { HOSTAGE_CHATTER_TERRORISTS_WIN, "hostage/htwin/doomed.wav" }, - { HOSTAGE_CHATTER_TERRORISTS_WIN, "hostage/htwin/godno.wav" }, + { HOSTAGE_CHATTER_TERRORISTS_WIN, "hostage/htwin/doomed.wav" }, + { HOSTAGE_CHATTER_TERRORISTS_WIN, "hostage/htwin/godno.wav" }, { HOSTAGE_CHATTER_TERRORISTS_WIN, "hostage/htwin/nowwhat.wav" }, - { HOSTAGE_CHATTER_TERRORISTS_WIN, "hostage/htwin/ohman.wav" }, - { HOSTAGE_CHATTER_TERRORISTS_WIN, "hostage/htwin/ohno.wav" }, + { HOSTAGE_CHATTER_TERRORISTS_WIN, "hostage/htwin/ohman.wav" }, + { HOSTAGE_CHATTER_TERRORISTS_WIN, "hostage/htwin/ohno.wav" }, - { HOSTAGE_CHATTER_RESCUED, "hostage/hrescued/finally.wav" }, + { HOSTAGE_CHATTER_RESCUED, "hostage/hrescued/finally.wav" }, { HOSTAGE_CHATTER_RESCUED, "hostage/hrescued/finallysafe.wav" }, - { HOSTAGE_CHATTER_RESCUED, "hostage/hrescued/thankyou.wav" }, - { HOSTAGE_CHATTER_RESCUED, "hostage/hrescued/wemadeit1.wav" }, - { HOSTAGE_CHATTER_RESCUED, "hostage/hrescued/wemadeit2.wav" }, - { HOSTAGE_CHATTER_RESCUED, "hostage/hrescued/wemadeit3.wav" }, + { HOSTAGE_CHATTER_RESCUED, "hostage/hrescued/thankyou.wav" }, + { HOSTAGE_CHATTER_RESCUED, "hostage/hrescued/wemadeit1.wav" }, + { HOSTAGE_CHATTER_RESCUED, "hostage/hrescued/wemadeit2.wav" }, + { HOSTAGE_CHATTER_RESCUED, "hostage/hrescued/wemadeit3.wav" }, - { HOSTAGE_CHATTER_WARN_NEARBY, "hostage/hwarn/becareful1.wav" }, - { HOSTAGE_CHATTER_WARN_NEARBY, "hostage/hwarn/becareful2.wav" }, + { HOSTAGE_CHATTER_WARN_NEARBY, "hostage/hwarn/becareful1.wav" }, + { HOSTAGE_CHATTER_WARN_NEARBY, "hostage/hwarn/becareful2.wav" }, { HOSTAGE_CHATTER_WARN_NEARBY, "hostage/hwarn/stillaround1.wav" }, { HOSTAGE_CHATTER_WARN_NEARBY, "hostage/hwarn/stillaround2.wav" }, - { HOSTAGE_CHATTER_WARN_SPOTTED, "hostage/hwarn/lookout1.wav" }, - { HOSTAGE_CHATTER_WARN_SPOTTED, "hostage/hwarn/lookout2.wav" }, + { HOSTAGE_CHATTER_WARN_SPOTTED, "hostage/hwarn/lookout1.wav" }, + { HOSTAGE_CHATTER_WARN_SPOTTED, "hostage/hwarn/lookout2.wav" }, { HOSTAGE_CHATTER_WARN_SPOTTED, "hostage/hwarn/overthere1.wav" }, { HOSTAGE_CHATTER_WARN_SPOTTED, "hostage/hwarn/overthere2.wav" }, - { HOSTAGE_CHATTER_CALL_TO_RESCUER, "hostage/hwavect/helpme1.wav" }, - { HOSTAGE_CHATTER_CALL_TO_RESCUER, "hostage/hwavect/helpme2.wav" }, - { HOSTAGE_CHATTER_CALL_TO_RESCUER, "hostage/hwavect/hey1.wav" }, - { HOSTAGE_CHATTER_CALL_TO_RESCUER, "hostage/hwavect/hey2.wav" }, + { HOSTAGE_CHATTER_CALL_TO_RESCUER, "hostage/hwavect/helpme1.wav" }, + { HOSTAGE_CHATTER_CALL_TO_RESCUER, "hostage/hwavect/helpme2.wav" }, + { HOSTAGE_CHATTER_CALL_TO_RESCUER, "hostage/hwavect/hey1.wav" }, + { HOSTAGE_CHATTER_CALL_TO_RESCUER, "hostage/hwavect/hey2.wav" }, { HOSTAGE_CHATTER_CALL_TO_RESCUER, "hostage/hwavect/overhere1.wav" }, { HOSTAGE_CHATTER_COUGH, "hostage/hsmoke/cough1.wav" }, @@ -158,11 +179,11 @@ struct { HOSTAGE_CHATTER_COUGH, "hostage/hsmoke/cough6.wav" }, { HOSTAGE_CHATTER_BLINDED, "hostage/hflash/cantsee.wav" }, - { HOSTAGE_CHATTER_BLINDED, "hostage/hflash/myeyes.wav" }, + { HOSTAGE_CHATTER_BLINDED, "hostage/hflash/myeyes.wav" }, { HOSTAGE_CHATTER_SAW_HE_GRENADE, "hostage/hgrenade/grenade1.wav" }, { HOSTAGE_CHATTER_SAW_HE_GRENADE, "hostage/hgrenade/grenade2.wav" }, - { HOSTAGE_CHATTER_SAW_HE_GRENADE, "hostage/hgrenade/run.wav" }, + { HOSTAGE_CHATTER_SAW_HE_GRENADE, "hostage/hgrenade/run.wav" }, { HOSTAGE_CHATTER_SAW_HE_GRENADE, "hostage/hgrenade/watchout.wav" }, { HOSTAGE_CHATTER_DEATH_CRY, "hostage/hdie/hdeath1.wav" }, @@ -231,7 +252,7 @@ void CHostage::Spawn() m_vOldPos = Vector(9999, 9999, 9999); m_iHostageIndex = ++g_iHostageNumber; - nTargetNode = -1; + m_nTargetNode = NODE_INVALID_EMPTY; m_fHasPath = FALSE; m_flLastPathCheck = -1; @@ -247,10 +268,9 @@ void CHostage::Spawn() void CHostage::Precache() { - static int which = 0; - if (AreImprovAllowed()) { + static int which = 0; switch (which) { case REGULAR_GUY: @@ -277,13 +297,13 @@ void CHostage::Precache() else { m_whichModel = REGULAR_GUY; - if (FStringNull(pev->model)) + if (pev->model.IsNull()) { pev->model = MAKE_STRING("models/scientist.mdl"); } } - PRECACHE_MODEL((char *)STRING(pev->model)); + PRECACHE_MODEL(pev->model); PRECACHE_SOUND("hostage/hos1.wav"); PRECACHE_SOUND("hostage/hos2.wav"); PRECACHE_SOUND("hostage/hos3.wav"); @@ -292,12 +312,11 @@ void CHostage::Precache() PRECACHE_MODEL("sprites/smoke.spr"); } -void CHostage::SetActivity(int act) +void CHostage::SetActivity(Activity act) { if (m_Activity != act) { int sequence = LookupActivity(act); - if (sequence != ACT_INVALID) { if (pev->sequence != sequence) @@ -393,7 +412,7 @@ void CHostage::IdleThink() CBaseEntity *pSpot = nullptr; while ((pSpot = UTIL_FindEntityByClassname(pSpot, "info_hostage_rescue"))) { - if ((pSpot->pev->origin - pev->origin).Length() < RESCUE_HOSTAGES_RADIUS) + if ((pSpot->pev->origin - pev->origin).Length() < MAX_HOSTAGES_RESCUE_RADIUS) { m_bRescueMe = TRUE; break; @@ -406,7 +425,7 @@ void CHostage::IdleThink() while ((pSpot = UTIL_FindEntityByClassname(pSpot, "info_player_start"))) { - if ((pSpot->pev->origin - pev->origin).Length() < RESCUE_HOSTAGES_RADIUS) + if ((pSpot->pev->origin - pev->origin).Length() < MAX_HOSTAGES_RESCUE_RADIUS) { m_bRescueMe = TRUE; break; @@ -548,7 +567,7 @@ void CHostage::RePosition() pev->nextthink = gpGlobals->time + RANDOM_FLOAT(0.1, 0.2); m_fHasPath = FALSE; - nTargetNode = -1; + m_nTargetNode = NODE_INVALID_EMPTY; m_flLastPathCheck = -1; m_flPathAcquired = -1; @@ -879,7 +898,7 @@ void CHostage::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useTy { m_State = STAND; m_hTargetEnt = nullptr; - m_hStoppedTargetEnt = pActivator; + m_hStoppedTargetEnt = static_cast(pActivator); } else m_State = FOLLOW; @@ -1006,14 +1025,15 @@ void CHostage::DoFollow() if (m_fHasPath) { - nTargetNode = m_LocalNav->GetFurthestTraversableNode(pev->origin, vecNodes, m_nPathNodes, TRUE); + m_nTargetNode = m_LocalNav->GetFurthestTraversableNode(pev->origin, vecNodes, m_nPathNodes, TRUE); - if (!nTargetNode) + if (!m_nTargetNode) { - if ((vecNodes[nTargetNode] - pev->origin).Length2D() < HOSTAGE_STEPSIZE) - nTargetNode = -1; + if ((vecNodes[m_nTargetNode] - pev->origin).Length2D() < HOSTAGE_STEPSIZE) + m_nTargetNode = NODE_INVALID_EMPTY; } - if (nTargetNode == -1) + + if (m_nTargetNode == NODE_INVALID_EMPTY) { m_fHasPath = FALSE; m_flPathCheckInterval = 0.1f; @@ -1023,15 +1043,15 @@ void CHostage::DoFollow() if (gpGlobals->time < m_flFlinchTime) return; - if (nTargetNode != -1) + if (m_nTargetNode != NODE_INVALID_EMPTY) { if (pev->flags & FL_ONGROUND) - PointAt(vecNodes[nTargetNode]); + PointAt(vecNodes[m_nTargetNode]); if (pev->movetype == MOVETYPE_FLY) pev->v_angle.x = -60; - MoveToward(vecNodes[nTargetNode]); + MoveToward(vecNodes[m_nTargetNode]); m_bStuck = FALSE; } else if (IsAlive()) @@ -1050,7 +1070,7 @@ void CHostage::DoFollow() { if (m_flPathAcquired != -1 && m_flPathAcquired + 2 > gpGlobals->time) { - if (pev->velocity.Length2D() < 1 || nTargetNode == -1) + if (pev->velocity.Length2D() < 1 || m_nTargetNode == NODE_INVALID_EMPTY) { Wiggle(); } @@ -1067,7 +1087,6 @@ void CHostage::PointAt(const Vector &vecLoc) void CHostage::MoveToward(const Vector &vecLoc) { - int nFwdMove; Vector vecFwd; Vector vecbigDest; Vector vecMove; @@ -1080,15 +1099,15 @@ void CHostage::MoveToward(const Vector &vecLoc) Vector vecAng(0, UTIL_VecToAngles(vecMove).y, 0); UTIL_MakeVectorsPrivate(vecAng, vecFwd, nullptr, nullptr); - if ((vecFwd * s_flStepSize_LocalNav).Length2D() <= (vecLoc - pev->origin).Length2D()) - flDist = (vecFwd * s_flStepSize_LocalNav).Length2D(); + if ((vecFwd * m_LocalNav->m_flStepSize).Length2D() <= (vecLoc - pev->origin).Length2D()) + flDist = (vecFwd * m_LocalNav->m_flStepSize).Length2D(); else flDist = (vecLoc - pev->origin).Length2D(); vecbigDest = pev->origin + (vecFwd * flDist); - nFwdMove = m_LocalNav->PathTraversable(pev->origin, vecbigDest, FALSE); - if (nFwdMove != PATH_TRAVERSABLE_EMPTY) + auto nFwdMove = m_LocalNav->PathTraversable(pev->origin, vecbigDest, FALSE); + if (nFwdMove != PTRAVELS_EMPTY) { float_precision flSpeed = 250; @@ -1111,7 +1130,7 @@ void CHostage::MoveToward(const Vector &vecLoc) pev->velocity.x = vecFwd.x * flSpeed; pev->velocity.y = vecFwd.y * flSpeed; - if (nFwdMove == PATH_TRAVERSABLE_STEPJUMPABLE) + if (nFwdMove == PTRAVELS_STEPJUMPABLE) { if (pev->flags & FL_ONGROUND) { @@ -1157,8 +1176,8 @@ void CHostage::NavReady() vecDest.z += pFollowing->pev->mins.z; m_LocalNav->SetTargetEnt(pFollowing); - node_index_t nindexPath = m_LocalNav->FindPath(pev->origin, vecDest, flRadius, 1); - if (nindexPath == -1) + node_index_t nindexPath = m_LocalNav->FindPath(pev->origin, vecDest, flRadius, TRUE); + if (nindexPath == NODE_INVALID_EMPTY) { if (!m_fHasPath) { @@ -1173,7 +1192,7 @@ void CHostage::NavReady() else { m_fHasPath = TRUE; - nTargetNode = -1; + m_nTargetNode = NODE_INVALID_EMPTY; m_flPathAcquired = gpGlobals->time; m_flPathCheckInterval = 0.5f; @@ -1255,7 +1274,7 @@ void CHostage::Wiggle() for (auto& dir : wiggle_directions) { Vector dest = pev->origin + dir; - if (m_LocalNav->PathTraversable(pev->origin, dest, TRUE) == PATH_TRAVERSABLE_EMPTY) + if (m_LocalNav->PathTraversable(pev->origin, dest, TRUE) == PTRAVELS_EMPTY) vec = vec - dir; } @@ -1297,7 +1316,7 @@ void CHostage::PreThink() vecSrc = pev->origin; - flInterval = s_flStepSize_LocalNav; + flInterval = m_LocalNav->m_flStepSize; vecDest = vecSrc + pev->velocity * gpGlobals->frametime; vecDest.z = vecSrc.z; @@ -1376,21 +1395,22 @@ void CHostageManager::ServerActivate() { m_hostageCount = 0; - CBaseEntity *pEntity = nullptr; - while ((pEntity = UTIL_FindEntityByClassname(pEntity, "hostage_entity"))) + CHostage *pHostage = nullptr; + while ((pHostage = UTIL_FindEntityByClassname(pHostage, "hostage_entity"))) { - AddHostage((CHostage *)pEntity); + AddHostage(pHostage); } if (AreImprovAllowed()) { - for (auto& sound : hostageSoundStruct) { - m_chatter.AddSound(sound.type, sound.fileName); + for (auto& snd : hostageSoundStruct) { + m_chatter.AddSound(snd.type, snd.fileName); } #ifdef REGAMEDLL_ADD - if (!AreRunningCZero()) + if (!AreRunningCZero()) { LoadNavigationMap(); + } #endif } } @@ -1480,7 +1500,7 @@ void CHostageManager::OnEvent(GameEventType event, CBaseEntity *entity, CBaseEnt { for (int i = 0; i < m_hostageCount; i++) { - CHostageImprov *improv = m_hostage[ i ]->m_improv; + CHostageImprov *improv = m_hostage[i]->m_improv; if (improv) { improv->OnGameEvent(event, entity, other); diff --git a/regamedll/dlls/hostage/hostage.h b/regamedll/dlls/hostage/hostage.h index 6ec034e7..18878fdd 100644 --- a/regamedll/dlls/hostage/hostage.h +++ b/regamedll/dlls/hostage/hostage.h @@ -28,19 +28,17 @@ #pragma once -#define MAX_NODES 100 -#define MAX_HOSTAGES 12 -#define MAX_HOSTAGES_NAV 20 +const int MAX_NODES = 100; +const int MAX_HOSTAGES = 12; +const int MAX_HOSTAGES_NAV = 20; -#define HOSTAGE_STEPSIZE 26.0f -#define HOSTAGE_STEPSIZE_DEFAULT 18.0f +const float HOSTAGE_STEPSIZE = 26.0f; +const float MAX_HOSTAGES_RESCUE_RADIUS = 256.0f; // rescue zones from legacy info_* -#define VEC_HOSTAGE_VIEW Vector(0, 0, 12) -#define VEC_HOSTAGE_HULL_MIN Vector(-10, -10, 0) -#define VEC_HOSTAGE_HULL_MAX Vector(10, 10, 62) - -#define VEC_HOSTAGE_CROUCH Vector(10, 10, 30) -#define RESCUE_HOSTAGES_RADIUS 256.0f // rescue zones from legacy info_* +#define VEC_HOSTAGE_VIEW Vector(0, 0, 12) +#define VEC_HOSTAGE_HULL_MIN Vector(-10, -10, 0) +#define VEC_HOSTAGE_HULL_MAX Vector(10, 10, 62) +#define VEC_HOSTAGE_CROUCH Vector(10, 10, 30) class CHostage; class CLocalNav; @@ -105,8 +103,8 @@ public: void EXPORT IdleThink(); void EXPORT Remove(); void RePosition(); - void SetActivity(int act); - int GetActivity() { return m_Activity; } + void SetActivity(Activity act); + Activity GetActivity() { return m_Activity; } float GetModifiedDamage(float flDamage, int nHitGroup); void SetFlinchActivity(); void SetDeathActivity(); @@ -150,13 +148,12 @@ public: return true; } - bool IsValid() const { return (pev->takedamage == DAMAGE_YES); } - bool IsDead() const { return (pev->deadflag == DEAD_DEAD); } - bool IsAtHome() const { return (pev->origin - m_vStart).IsLengthGreaterThan(20) != true; } + bool IsValid() const { return (pev->takedamage == DAMAGE_YES); } + bool IsDead() const { return (pev->deadflag == DEAD_DEAD); } + bool IsAtHome() const { return !(pev->origin - m_vStart).IsLengthGreaterThan(20); } const Vector *GetHomePosition() const { return &m_vStart; } public: - int m_Activity; BOOL m_bTouched; BOOL m_bRescueMe; float m_flFlinchTime; @@ -165,17 +162,17 @@ public: int m_iModel; int m_iSkin; float m_flNextRadarTime; - enum state { FOLLOW, STAND, DUCK, SCARED, IDLE, FOLLOWPATH } - m_State; + enum state { FOLLOW, STAND, DUCK, SCARED, IDLE, FOLLOWPATH }; + state m_State; Vector m_vStart; Vector m_vStartAngles; - Vector m_vPathToFollow[20]; + Vector m_vPathToFollow[MAX_HOSTAGES_NAV]; int m_iWaypoint; CBasePlayer *m_target; CLocalNav *m_LocalNav; - int nTargetNode; + int m_nTargetNode; Vector vecNodes[MAX_NODES]; - EHANDLE m_hStoppedTargetEnt; + EntityHandle m_hStoppedTargetEnt; float m_flNextFullThink; float m_flPathCheckInterval; float m_flLastPathCheck; @@ -188,8 +185,8 @@ public: float m_flStuckTime; CHostageImprov *m_improv; - enum ModelType { REGULAR_GUY, OLD_GUY, BLACK_GUY, GOOFY_GUY } - m_whichModel; + enum ModelType { REGULAR_GUY, OLD_GUY, BLACK_GUY, GOOFY_GUY }; + ModelType m_whichModel; }; class SimpleChatter @@ -218,7 +215,7 @@ public: void Shuffle(ChatterSet *chatter); private: - ChatterSet m_chatter[21]; + ChatterSet m_chatter[NUM_HOSTAGE_CHATTER_TYPES]; }; class CHostageManager @@ -246,12 +243,12 @@ public: { for (int i = 0; i < m_hostageCount; i++) { - CHostage *hostage = m_hostage[i]; + CHostage *pHostage = m_hostage[i]; - if (!hostage || hostage->pev->deadflag == DEAD_DEAD) + if (!pHostage || pHostage->pev->deadflag == DEAD_DEAD) continue; - if (func(hostage) == false) + if (!func(pHostage)) return false; } diff --git a/regamedll/dlls/hostage/hostage_improv.cpp b/regamedll/dlls/hostage/hostage_improv.cpp index 7bd18dcc..43600c90 100644 --- a/regamedll/dlls/hostage/hostage_improv.cpp +++ b/regamedll/dlls/hostage/hostage_improv.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" inline void DrawAxes(const Vector &origin, int red, int green, int blue) diff --git a/regamedll/dlls/hostage/hostage_localnav.cpp b/regamedll/dlls/hostage/hostage_localnav.cpp index 444099f7..de024869 100644 --- a/regamedll/dlls/hostage/hostage_localnav.cpp +++ b/regamedll/dlls/hostage/hostage_localnav.cpp @@ -1,21 +1,44 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL +EntityHandle CLocalNav::m_hQueue[MAX_HOSTAGES_NAV]; +EntityHandle CLocalNav::m_hHostages[MAX_HOSTAGES_NAV]; -float CLocalNav::s_flStepSize; -int CLocalNav::qptr; -EHANDLE CLocalNav::_queue[MAX_HOSTAGES_NAV]; -int CLocalNav::tot_inqueue; -float CLocalNav::nodeval; -float CLocalNav::flNextCvarCheck; -float CLocalNav::flLastThinkTime; -EHANDLE CLocalNav::hostages[MAX_HOSTAGES_NAV]; -int CLocalNav::tot_hostages; +int CLocalNav::m_CurRequest = 0; +int CLocalNav::m_NumRequest = 0; +int CLocalNav::m_NumHostages = 0; +int CLocalNav::m_NodeValue = 0; -#endif +float CLocalNav::m_flStepSize = 18.0f; // sv_stepsize by default +float CLocalNav::m_flNextCvarCheck = 0.0f; +float CLocalNav::m_flLastThinkTime = 0.0f; CLocalNav::CLocalNav(CHostage *pOwner) { @@ -23,12 +46,10 @@ CLocalNav::CLocalNav(CHostage *pOwner) m_pTargetEnt = nullptr; m_nodeArr = new localnode_t[MAX_NODES]; - if (tot_hostages >= MAX_HOSTAGES_NAV) - { + if (m_NumHostages >= MAX_HOSTAGES_NAV) return; - } - hostages[tot_hostages++] = pOwner; + m_hHostages[m_NumHostages++] = pOwner; } CLocalNav::~CLocalNav() @@ -61,7 +82,7 @@ node_index_t CLocalNav::AddNode(node_index_t nindexParent, Vector &vecLoc, int o localnode_t *CLocalNav::GetNode(node_index_t nindex) { - return &m_nodeArr[ nindex ]; + return &m_nodeArr[nindex]; } node_index_t CLocalNav::NodeExists(int offsetX, int offsetY) @@ -82,7 +103,7 @@ node_index_t CLocalNav::NodeExists(int offsetX, int offsetY) return nindexCurrent; } -void CLocalNav::AddPathNodes(node_index_t nindexSource, int fNoMonsters) +void CLocalNav::AddPathNodes(node_index_t nindexSource, BOOL fNoMonsters) { AddPathNode(nindexSource, 1, 0, fNoMonsters); AddPathNode(nindexSource, -1, 0, fNoMonsters); @@ -94,9 +115,9 @@ void CLocalNav::AddPathNodes(node_index_t nindexSource, int fNoMonsters) AddPathNode(nindexSource, -1, -1, fNoMonsters); } -void CLocalNav::AddPathNode(node_index_t nindexSource, int offsetX, int offsetY, int fNoMonsters) +void CLocalNav::AddPathNode(node_index_t nindexSource, int offsetX, int offsetY, BOOL fNoMonsters) { - int bDepth; + byte bDepth; Vector vecSource, vecDest; int offsetXAbs, offsetYAbs; @@ -173,7 +194,7 @@ void CLocalNav::AddPathNode(node_index_t nindexSource, int offsetX, int offsetY, } } - if (PathTraversable(nodeSource->vecLoc, vecDest, fNoMonsters) != PATH_TRAVERSABLE_EMPTY) + if (PathTraversable(nodeSource->vecLoc, vecDest, fNoMonsters) != PTRAVELS_EMPTY) { nodeCurrent = nodeSource; nindexSource = nindexCurrent; @@ -183,10 +204,10 @@ void CLocalNav::AddPathNode(node_index_t nindexSource, int offsetX, int offsetY, } vecSource = nodeCurrent->vecLoc; - bDepth = int(nodeCurrent->bDepth) + 1; + bDepth = (nodeCurrent->bDepth + 1) & 0xff; } - if (PathTraversable(vecSource, vecDest, fNoMonsters) != PATH_TRAVERSABLE_EMPTY) + if (PathTraversable(vecSource, vecDest, fNoMonsters) != PTRAVELS_EMPTY) { AddNode(nindexSource, vecDest, offsetXAbs, offsetYAbs, bDepth); } @@ -225,7 +246,7 @@ node_index_t CLocalNav::GetBestNode(Vector &vecOrigin, Vector &vecDest) flZDiff = 1.0; } - if ((flDistToDest * flZDiff) <= s_flStepSize) + if ((flDistToDest * flZDiff) <= m_flStepSize) flZDiff = 1.0; else flZDiff = 1.25; @@ -238,13 +259,13 @@ node_index_t CLocalNav::GetBestNode(Vector &vecOrigin, Vector &vecDest) } } - ++nindexCurrent; + nindexCurrent++; } return nindexBest; } -int CLocalNav::SetupPathNodes(node_index_t nindex, Vector *vecNodes, int fNoMonsters) +int CLocalNav::SetupPathNodes(node_index_t nindex, Vector *vecNodes, BOOL fNoMonsters) { node_index_t nCurrentIndex = nindex; int nNodeCount = 0; @@ -253,7 +274,7 @@ int CLocalNav::SetupPathNodes(node_index_t nindex, Vector *vecNodes, int fNoMons { localnode_t *nodeCurrent = GetNode(nCurrentIndex); Vector vecCurrentLoc = nodeCurrent->vecLoc; - vecNodes[ nNodeCount++ ] = vecCurrentLoc; + vecNodes[nNodeCount++] = vecCurrentLoc; nCurrentIndex = nodeCurrent->nindexParent; } @@ -261,21 +282,21 @@ int CLocalNav::SetupPathNodes(node_index_t nindex, Vector *vecNodes, int fNoMons return nNodeCount; } -int CLocalNav::GetFurthestTraversableNode(Vector &vecStartingLoc, Vector *vecNodes, int nTotalNodes, int fNoMonsters) +node_index_t CLocalNav::GetFurthestTraversableNode(Vector &vecStartingLoc, Vector *vecNodes, int nTotalNodes, BOOL fNoMonsters) { int nCount = 0; while (nCount < nTotalNodes) { - if (PathTraversable(vecStartingLoc, vecNodes[nCount], fNoMonsters) != PATH_TRAVERSABLE_EMPTY) + if (PathTraversable(vecStartingLoc, vecNodes[nCount], fNoMonsters) != PTRAVELS_EMPTY) return nCount; - ++nCount; + nCount++; } - return -1; + return NODE_INVALID_EMPTY; } -node_index_t CLocalNav::FindPath(Vector &vecStart, Vector &vecDest, float flTargetRadius, int fNoMonsters) +node_index_t CLocalNav::FindPath(Vector &vecStart, Vector &vecDest, float flTargetRadius, BOOL fNoMonsters) { node_index_t nIndexBest = FindDirectPath(vecStart, vecDest, flTargetRadius, fNoMonsters); @@ -320,92 +341,92 @@ node_index_t CLocalNav::FindPath(Vector &vecStart, Vector &vecDest, float flTarg } if (m_nindexAvailableNode <= 10) - nodeval += 2; + m_NodeValue += 2; else if (m_nindexAvailableNode <= 20) - nodeval += 4; + m_NodeValue += 4; else if (m_nindexAvailableNode <= 30) - nodeval += 8; + m_NodeValue += 8; else if (m_nindexAvailableNode <= 40) - nodeval += 13; + m_NodeValue += 13; else if (m_nindexAvailableNode <= 50) - nodeval += 19; + m_NodeValue += 19; else if (m_nindexAvailableNode <= 60) - nodeval += 26; + m_NodeValue += 26; else if (m_nindexAvailableNode <= 70) - nodeval += 34; + m_NodeValue += 34; else if (m_nindexAvailableNode <= 80) - nodeval += 43; + m_NodeValue += 43; else if (m_nindexAvailableNode <= 90) - nodeval += 53; + m_NodeValue += 53; else if (m_nindexAvailableNode <= 100) - nodeval += 64; + m_NodeValue += 64; else if (m_nindexAvailableNode <= 110) - nodeval += 76; + m_NodeValue += 76; else if (m_nindexAvailableNode <= 120) - nodeval += 89; + m_NodeValue += 89; else if (m_nindexAvailableNode <= 130) - nodeval += 103; + m_NodeValue += 103; else if (m_nindexAvailableNode <= 140) - nodeval += 118; + m_NodeValue += 118; else if (m_nindexAvailableNode <= 150) - nodeval += 134; + m_NodeValue += 134; else if (m_nindexAvailableNode <= 160) - nodeval += 151; + m_NodeValue += 151; else - nodeval += 169; + m_NodeValue += 169; return nIndexBest; } -node_index_t CLocalNav::FindDirectPath(Vector &vecStart, Vector &vecDest, float flTargetRadius, int fNoMonsters) +node_index_t CLocalNav::FindDirectPath(Vector &vecStart, Vector &vecDest, float flTargetRadius, BOOL fNoMonsters) { Vector vecActualDest; Vector vecPathDir; Vector vecNodeLoc; - node_index_t nindexLast; + node_index_t nIndexLast; vecPathDir = NormalizeSubtract(vecStart, vecDest); vecActualDest = vecDest - (vecPathDir * flTargetRadius); - if (PathTraversable(vecStart, vecActualDest, fNoMonsters) == PATH_TRAVERSABLE_EMPTY) + if (PathTraversable(vecStart, vecActualDest, fNoMonsters) == PTRAVELS_EMPTY) { return NODE_INVALID_EMPTY; } - nindexLast = NODE_INVALID_EMPTY; + nIndexLast = NODE_INVALID_EMPTY; vecNodeLoc = vecStart; m_nindexAvailableNode = 0; while ((vecNodeLoc - vecActualDest).Length2D() >= HOSTAGE_STEPSIZE) { - node_index_t nindexCurrent = nindexLast; + node_index_t nindexCurrent = nIndexLast; vecNodeLoc = vecNodeLoc + (vecPathDir * HOSTAGE_STEPSIZE); - nindexLast = AddNode(nindexCurrent, vecNodeLoc); + nIndexLast = AddNode(nindexCurrent, vecNodeLoc); - if (nindexLast == NODE_INVALID_EMPTY) + if (nIndexLast == NODE_INVALID_EMPTY) break; } - return nindexLast; + return nIndexLast; } -BOOL CLocalNav::PathClear(Vector &vecOrigin, Vector &vecDest, int fNoMonsters, TraceResult &tr) +BOOL CLocalNav::PathClear(Vector &vecOrigin, Vector &vecDest, BOOL fNoMonsters, TraceResult &tr) { TRACE_MONSTER_HULL(m_pOwner->edict(), vecOrigin, vecDest, fNoMonsters, m_pOwner->edict(), &tr); @@ -424,14 +445,20 @@ BOOL CLocalNav::PathClear(Vector &vecOrigin, Vector &vecDest, int fNoMonsters, T return FALSE; } -int CLocalNav::PathTraversable(Vector &vecSource, Vector &vecDest, int fNoMonsters) +BOOL CLocalNav::PathClear(Vector &vecSource, Vector &vecDest, BOOL fNoMonsters) +{ + TraceResult tr; + return PathClear(vecSource, vecDest, fNoMonsters, tr); +} + +PathTraversAble CLocalNav::PathTraversable(Vector &vecSource, Vector &vecDest, BOOL fNoMonsters) { TraceResult tr; Vector vecSrcTmp; Vector vecDestTmp; Vector vecDir; float_precision flTotal; - int retval = PATH_TRAVERSABLE_EMPTY; + auto retval = PTRAVELS_EMPTY; vecSrcTmp = vecSource; vecDestTmp = vecDest - vecSource; @@ -443,15 +470,15 @@ int CLocalNav::PathTraversable(Vector &vecSource, Vector &vecDest, int fNoMonste while (flTotal > 1.0f) { - if (flTotal >= s_flStepSize) + if (flTotal >= m_flStepSize) { #ifndef PLAY_GAMEDLL - vecDestTmp = vecSrcTmp + (vecDir * s_flStepSize); + vecDestTmp = vecSrcTmp + (vecDir * m_flStepSize); #else // TODO: fix test demo - vecDestTmp[0] = vecSrcTmp[0] + (vecDir[0] * s_flStepSize); - vecDestTmp[1] = vecSrcTmp[1] + float(vecDir[1] * s_flStepSize); - vecDestTmp[2] = vecSrcTmp[2] + (vecDir[2] * s_flStepSize); + vecDestTmp[0] = vecSrcTmp[0] + (vecDir[0] * m_flStepSize); + vecDestTmp[1] = vecSrcTmp[1] + float(vecDir[1] * m_flStepSize); + vecDestTmp[2] = vecSrcTmp[2] + (vecDir[2] * m_flStepSize); #endif } @@ -464,23 +491,23 @@ int CLocalNav::PathTraversable(Vector &vecSource, Vector &vecDest, int fNoMonste { vecDestTmp = tr.vecEndPos; - if (retval == PATH_TRAVERSABLE_EMPTY) + if (retval == PTRAVELS_EMPTY) { - retval = PATH_TRAVERSABLE_SLOPE; + retval = PTRAVELS_SLOPE; } } else { if (tr.fStartSolid) { - return PATH_TRAVERSABLE_EMPTY; + return PTRAVELS_EMPTY; } if (tr.pHit && !fNoMonsters && tr.pHit->v.classname) { if (FClassnameIs(tr.pHit, "hostage_entity")) { - return PATH_TRAVERSABLE_EMPTY; + return PTRAVELS_EMPTY; } } @@ -490,21 +517,21 @@ int CLocalNav::PathTraversable(Vector &vecSource, Vector &vecDest, int fNoMonste { if (StepTraversable(vecSrcTmp, vecDestTmp, fNoMonsters, tr)) { - if (retval == PATH_TRAVERSABLE_EMPTY) + if (retval == PTRAVELS_EMPTY) { - retval = PATH_TRAVERSABLE_STEP; + retval = PTRAVELS_STEP; } } else { if (!StepJumpable(vecSrcTmp, vecDestTmp, fNoMonsters, tr)) { - return PATH_TRAVERSABLE_EMPTY; + return PTRAVELS_EMPTY; } - if (retval == PATH_TRAVERSABLE_EMPTY) + if (retval == PTRAVELS_EMPTY) { - retval = PATH_TRAVERSABLE_STEPJUMPABLE; + retval = PTRAVELS_STEPJUMPABLE; } } } @@ -512,12 +539,12 @@ int CLocalNav::PathTraversable(Vector &vecSource, Vector &vecDest, int fNoMonste { if (!SlopeTraversable(vecSrcTmp, vecDestTmp, fNoMonsters, tr)) { - return PATH_TRAVERSABLE_EMPTY; + return PTRAVELS_EMPTY; } - if (retval == PATH_TRAVERSABLE_EMPTY) + if (retval == PTRAVELS_EMPTY) { - retval = PATH_TRAVERSABLE_SLOPE; + retval = PTRAVELS_SLOPE; } } } @@ -526,7 +553,7 @@ int CLocalNav::PathTraversable(Vector &vecSource, Vector &vecDest, int fNoMonste if (PathClear(vecDestTmp, vecDropDest, fNoMonsters, tr)) { - return PATH_TRAVERSABLE_EMPTY; + return PTRAVELS_EMPTY; } if (!tr.fStartSolid) @@ -548,7 +575,7 @@ int CLocalNav::PathTraversable(Vector &vecSource, Vector &vecDest, int fNoMonste return retval; } -BOOL CLocalNav::SlopeTraversable(Vector &vecSource, Vector &vecDest, int fNoMonsters, TraceResult &tr) +BOOL CLocalNav::SlopeTraversable(Vector &vecSource, Vector &vecDest, BOOL fNoMonsters, TraceResult &tr) { Vector vecSlopeEnd; Vector vecDown; @@ -572,7 +599,7 @@ BOOL CLocalNav::SlopeTraversable(Vector &vecSource, Vector &vecDest, int fNoMons vecSlopeEnd = tr.vecEndPos; vecDown = vecSlopeEnd; - vecDown.z -= s_flStepSize; + vecDown.z -= m_flStepSize; if (!PathClear(vecSlopeEnd, vecDown, fNoMonsters, tr)) { @@ -587,7 +614,7 @@ BOOL CLocalNav::SlopeTraversable(Vector &vecSource, Vector &vecDest, int fNoMons return TRUE; } -BOOL CLocalNav::LadderTraversable(Vector &vecSource, Vector &vecDest, int fNoMonsters, TraceResult &tr) +BOOL CLocalNav::LadderTraversable(Vector &vecSource, Vector &vecDest, BOOL fNoMonsters, TraceResult &tr) { Vector vecStepStart; Vector vecStepDest; @@ -611,7 +638,7 @@ BOOL CLocalNav::LadderTraversable(Vector &vecSource, Vector &vecDest, int fNoMon return PathTraversable(vecStepStart, vecDest, fNoMonsters); } -BOOL CLocalNav::StepTraversable(Vector &vecSource, Vector &vecDest, int fNoMonsters, TraceResult &tr) +BOOL CLocalNav::StepTraversable(Vector &vecSource, Vector &vecDest, BOOL fNoMonsters, TraceResult &tr) { Vector vecStepStart; Vector vecStepDest; @@ -621,7 +648,7 @@ BOOL CLocalNav::StepTraversable(Vector &vecSource, Vector &vecDest, int fNoMonst vecStepStart = vecSource; vecStepDest = vecDest; - vecStepStart.z += s_flStepSize; + vecStepStart.z += m_flStepSize; vecStepDest.z = vecStepStart.z; if (!PathClear(vecStepStart, vecStepDest, fNoMonsters, tr)) @@ -638,7 +665,7 @@ BOOL CLocalNav::StepTraversable(Vector &vecSource, Vector &vecDest, int fNoMonst vecStepStart = tr.vecEndPos; vecStepDest = vecStepStart; - vecStepDest.z -= s_flStepSize; + vecStepDest.z -= m_flStepSize; if (!PathClear(vecStepStart, vecStepDest, fNoMonsters, tr)) { @@ -653,12 +680,12 @@ BOOL CLocalNav::StepTraversable(Vector &vecSource, Vector &vecDest, int fNoMonst return TRUE; } -BOOL CLocalNav::StepJumpable(Vector &vecSource, Vector &vecDest, int fNoMonsters, TraceResult &tr) +BOOL CLocalNav::StepJumpable(Vector &vecSource, Vector &vecDest, BOOL fNoMonsters, TraceResult &tr) { Vector vecStepStart; Vector vecStepDest; float flFwdFraction; - float flJumpHeight = s_flStepSize + 1.0f; + float flJumpHeight = m_flStepSize + 1.0f; vecStepStart = vecSource; vecStepStart.z += flJumpHeight; @@ -686,7 +713,7 @@ BOOL CLocalNav::StepJumpable(Vector &vecSource, Vector &vecDest, int fNoMonsters vecStepStart = tr.vecEndPos; vecStepDest = vecStepStart; - vecStepDest.z -= s_flStepSize; + vecStepDest.z -= m_flStepSize; if (!PathClear(vecStepStart, vecStepDest, fNoMonsters, tr)) { @@ -746,120 +773,107 @@ BOOL CLocalNav::LadderHit(Vector &vecSource, Vector &vecDest, TraceResult &tr) void CLocalNav::Think() { - EHANDLE hCallback; - static cvar_t *sv_stepsize = nullptr; - - if (gpGlobals->time >= flNextCvarCheck) + static cvar_t *sv_stepsize = NULL; + if (gpGlobals->time >= m_flNextCvarCheck) { - if (sv_stepsize) - s_flStepSize = sv_stepsize->value; + if (sv_stepsize != NULL) + m_flStepSize = sv_stepsize->value; else { sv_stepsize = CVAR_GET_POINTER("sv_stepsize"); - s_flStepSize = s_flStepSize ? sv_stepsize->value : HOSTAGE_STEPSIZE_DEFAULT; + m_flStepSize = sv_stepsize ? sv_stepsize->value : 18; } - flNextCvarCheck = gpGlobals->time + 1.0f; + m_flNextCvarCheck = gpGlobals->time + 1.0f; } HostagePrethink(); - float flElapsedTime = gpGlobals->time - flLastThinkTime; - nodeval -= flElapsedTime * 250; - flLastThinkTime = gpGlobals->time; + float flElapsedTime = gpGlobals->time - m_flLastThinkTime; + m_NodeValue -= flElapsedTime * 250; + m_flLastThinkTime = gpGlobals->time; - if (nodeval < 0) - nodeval = 0; + if (m_NodeValue < 0) + m_NodeValue = 0; - else if (nodeval > 17) + else if (m_NodeValue > 17) return; - if (tot_inqueue) + if (m_NumRequest) { - hCallback = _queue[qptr]; - - if (!hCallback) + auto hHostage = m_hQueue[m_CurRequest]; + while (!hHostage.IsValid() && m_NumRequest > 0) { - while (tot_inqueue > 0) + if (++m_CurRequest == MAX_HOSTAGES_NAV) + m_CurRequest = 0; + + m_NumRequest--; + if (m_NumRequest <= 0) { - if (++qptr == MAX_HOSTAGES_NAV) - qptr = 0; - - tot_inqueue--; - if (!tot_inqueue) - { - hCallback = nullptr; - break; - } - - hCallback = _queue[qptr]; - - if (hCallback) - break; + hHostage = nullptr; + break; } + + hHostage = m_hQueue[m_CurRequest]; } - if (hCallback) + if (hHostage.IsValid()) { - CHostage *pHostage = GetClassPtr((CHostage *)hCallback->pev); + if (++m_CurRequest == MAX_HOSTAGES_NAV) + m_CurRequest = 0; - if (++qptr == MAX_HOSTAGES_NAV) - qptr = 0; - - tot_inqueue--; - pHostage->NavReady(); + m_NumRequest--; + hHostage->NavReady(); } } } void CLocalNav::RequestNav(CHostage *pCaller) { - int curr = qptr; + int curr = m_CurRequest; int found = 0; - if (nodeval <= 17 && !tot_inqueue) + if (m_NodeValue <= 17 && !m_NumRequest) { pCaller->NavReady(); return; } - if (tot_inqueue >= MAX_HOSTAGES_NAV) + if (m_NumRequest >= MAX_HOSTAGES_NAV) { return; } - for (int i = 0; i < tot_inqueue; ++i) + for (int i = 0; i < m_NumRequest; i++) { - CHostage *pQueueItem = GetClassPtr((CHostage *)_queue[curr]->pev); - - if (pQueueItem == pCaller) + if (m_hQueue[curr] == pCaller) return; if (++curr == MAX_HOSTAGES_NAV) curr = 0; } - _queue[curr] = pCaller; - ++tot_inqueue; + m_hQueue[curr] = pCaller; + m_NumRequest++; } void CLocalNav::Reset() { - flNextCvarCheck = 0; - flLastThinkTime = 0; - tot_inqueue = 0; - qptr = 0; - nodeval = 0; - tot_hostages = 0; + m_flNextCvarCheck = 0.0f; + m_flLastThinkTime = 0.0f; + + m_NumRequest = 0; + m_CurRequest = 0; + m_NumHostages = 0; + m_NodeValue = 0; } void CLocalNav::HostagePrethink() { - for (int iCount = 0; iCount < tot_hostages; ++iCount) + for (int i = 0; i < m_NumHostages; i++) { - if (hostages[ iCount ]) - { - GetClassPtr((CHostage *)hostages[ iCount ]->pev)->PreThink(); + if (m_hHostages[i].IsValid()) { + m_hHostages[i]->PreThink(); } } } diff --git a/regamedll/dlls/hostage/hostage_localnav.h b/regamedll/dlls/hostage/hostage_localnav.h index d3661afa..9fcb58f5 100644 --- a/regamedll/dlls/hostage/hostage_localnav.h +++ b/regamedll/dlls/hostage/hostage_localnav.h @@ -28,14 +28,16 @@ #pragma once -#define NODE_INVALID_EMPTY -1 +enum PathTraversAble +{ + PTRAVELS_EMPTY, + PTRAVELS_SLOPE, + PTRAVELS_STEP, + PTRAVELS_STEPJUMPABLE, +}; -#define PATH_TRAVERSABLE_EMPTY 0 -#define PATH_TRAVERSABLE_SLOPE 1 -#define PATH_TRAVERSABLE_STEP 2 -#define PATH_TRAVERSABLE_STEPJUMPABLE 3 - -typedef int node_index_t; +using node_index_t = int; +constexpr node_index_t NODE_INVALID_EMPTY = {-1}; typedef struct localnode_s { @@ -48,10 +50,6 @@ typedef struct localnode_s } localnode_t; -#ifndef HOOK_GAMEDLL -#define s_flStepSize_LocalNav m_LocalNav->s_flStepSize -#endif - class CLocalNav { public: @@ -66,44 +64,40 @@ public: m_pTargetEnt = nullptr; } - node_index_t FindPath(Vector &vecStart, Vector &vecDest, float flTargetRadius, int fNoMonsters); - int SetupPathNodes(node_index_t nindex, Vector *vecNodes, int fNoMonsters); - int GetFurthestTraversableNode(Vector &vecStartingLoc, Vector *vecNodes, int nTotalNodes, int fNoMonsters); - int PathTraversable(Vector &vecSource, Vector &vecDest, int fNoMonsters); - BOOL PathClear(Vector &vecOrigin, Vector &vecDest, int fNoMonsters, TraceResult &tr); - BOOL PathClear(Vector &vecSource, Vector &vecDest, BOOL fNoMonsters) - { - TraceResult tr; - return PathClear(vecSource, vecDest, fNoMonsters, tr); - } + node_index_t FindPath(Vector &vecStart, Vector &vecDest, float flTargetRadius, BOOL fNoMonsters); + int SetupPathNodes(node_index_t nindex, Vector *vecNodes, BOOL fNoMonsters); + node_index_t GetFurthestTraversableNode(Vector &vecStartingLoc, Vector *vecNodes, int nTotalNodes, BOOL fNoMonsters); + PathTraversAble PathTraversable(Vector &vecSource, Vector &vecDest, BOOL fNoMonsters); + BOOL PathClear(Vector &vecOrigin, Vector &vecDest, BOOL fNoMonsters, TraceResult &tr); + BOOL PathClear(Vector &vecSource, Vector &vecDest, BOOL fNoMonsters); node_index_t AddNode(node_index_t nindexParent, Vector &vecLoc, int offsetX = 0, int offsetY = 0, byte bDepth = 0); localnode_t *GetNode(node_index_t nindex); node_index_t NodeExists(int offsetX, int offsetY); - void AddPathNodes(node_index_t nindexSource, int fNoMonsters); - void AddPathNode(node_index_t nindexSource, int offsetX, int offsetY, int fNoMonsters); + void AddPathNodes(node_index_t nindexSource, BOOL fNoMonsters); + void AddPathNode(node_index_t nindexSource, int offsetX, int offsetY, BOOL fNoMonsters); node_index_t GetBestNode(Vector &vecOrigin, Vector &vecDest); - BOOL SlopeTraversable(Vector &vecSource, Vector &vecDest, int fNoMonsters, TraceResult &tr); - BOOL LadderTraversable(Vector &vecSource, Vector &vecDest, int fNoMonsters, TraceResult &tr); - BOOL StepTraversable(Vector &vecSource, Vector &vecDest, int fNoMonsters, TraceResult &tr); - BOOL StepJumpable(Vector &vecSource, Vector &vecDest, int fNoMonsters, TraceResult &tr); - node_index_t FindDirectPath(Vector &vecStart, Vector &vecDest, float flTargetRadius, int fNoMonsters); + BOOL SlopeTraversable(Vector &vecSource, Vector &vecDest, BOOL fNoMonsters, TraceResult &tr); + BOOL LadderTraversable(Vector &vecSource, Vector &vecDest, BOOL fNoMonsters, TraceResult &tr); + BOOL StepTraversable(Vector &vecSource, Vector &vecDest, BOOL fNoMonsters, TraceResult &tr); + BOOL StepJumpable(Vector &vecSource, Vector &vecDest, BOOL fNoMonsters, TraceResult &tr); + node_index_t FindDirectPath(Vector &vecStart, Vector &vecDest, float flTargetRadius, BOOL fNoMonsters); BOOL LadderHit(Vector &vecSource, Vector &vecDest, TraceResult &tr); static void Think(); static void RequestNav(CHostage *pCaller); static void Reset(); static void HostagePrethink(); - static float s_flStepSize; + static float m_flStepSize; private: - static EHANDLE _queue[MAX_HOSTAGES_NAV]; - static int qptr; - static int tot_inqueue; - static float nodeval; - static float flNextCvarCheck; - static float flLastThinkTime; - static EHANDLE hostages[MAX_HOSTAGES_NAV]; - static int tot_hostages; + static EntityHandle m_hQueue[MAX_HOSTAGES_NAV]; + static EntityHandle m_hHostages[MAX_HOSTAGES_NAV]; + static int m_CurRequest; + static int m_NumRequest; + static int m_NumHostages; + static int m_NodeValue; + static float m_flNextCvarCheck; + static float m_flLastThinkTime; CHostage *m_pOwner; edict_t *m_pTargetEnt; diff --git a/regamedll/dlls/hostage/states/hostage_animate.cpp b/regamedll/dlls/hostage/states/hostage_animate.cpp index bce50a30..7a84ff75 100644 --- a/regamedll/dlls/hostage/states/hostage_animate.cpp +++ b/regamedll/dlls/hostage/states/hostage_animate.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" void HostageAnimateState::Reset() diff --git a/regamedll/dlls/hostage/states/hostage_escape.cpp b/regamedll/dlls/hostage/states/hostage_escape.cpp index 53f23242..8aefdccb 100644 --- a/regamedll/dlls/hostage/states/hostage_escape.cpp +++ b/regamedll/dlls/hostage/states/hostage_escape.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" void HostageEscapeToCoverState::OnEnter(CHostageImprov *improv) diff --git a/regamedll/dlls/hostage/states/hostage_follow.cpp b/regamedll/dlls/hostage/states/hostage_follow.cpp index 95a6f33d..06719e54 100644 --- a/regamedll/dlls/hostage/states/hostage_follow.cpp +++ b/regamedll/dlls/hostage/states/hostage_follow.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" void HostageFollowState::OnEnter(CHostageImprov *improv) diff --git a/regamedll/dlls/hostage/states/hostage_idle.cpp b/regamedll/dlls/hostage/states/hostage_idle.cpp index 93e43261..4653750b 100644 --- a/regamedll/dlls/hostage/states/hostage_idle.cpp +++ b/regamedll/dlls/hostage/states/hostage_idle.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" void HostageIdleState::OnEnter(CHostageImprov *improv) diff --git a/regamedll/dlls/hostage/states/hostage_retreat.cpp b/regamedll/dlls/hostage/states/hostage_retreat.cpp index 52cff04c..ee878e77 100644 --- a/regamedll/dlls/hostage/states/hostage_retreat.cpp +++ b/regamedll/dlls/hostage/states/hostage_retreat.cpp @@ -1,3 +1,31 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" void HostageRetreatState::OnEnter(CHostageImprov *improv) diff --git a/regamedll/dlls/items.cpp b/regamedll/dlls/items.cpp index 7948d45d..a72a5b8c 100644 --- a/regamedll/dlls/items.cpp +++ b/regamedll/dlls/items.cpp @@ -278,7 +278,7 @@ BOOL CItemAntidote::MyTouch(CBasePlayer *pPlayer) #endif pPlayer->SetSuitUpdate("!HEV_DET4", SUIT_SENTENCE, SUIT_NEXT_IN_1MIN); - pPlayer->m_rgItems[ ITEM_ID_ANTIDOTE ] += 1; + pPlayer->m_rgItems[ITEM_ID_ANTIDOTE] += 1; return TRUE; } @@ -301,7 +301,7 @@ void CItemSecurity::Precache() BOOL CItemSecurity::MyTouch(CBasePlayer *pPlayer) { - pPlayer->m_rgItems[ ITEM_ID_SECURITY ] += 1; + pPlayer->m_rgItems[ITEM_ID_SECURITY] += 1; return TRUE; } diff --git a/regamedll/dlls/lights.cpp b/regamedll/dlls/lights.cpp index c7f3eda8..3fb29ba6 100644 --- a/regamedll/dlls/lights.cpp +++ b/regamedll/dlls/lights.cpp @@ -1,18 +1,11 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - TYPEDESCRIPTION CLight::m_SaveData[] = { DEFINE_FIELD(CLight, m_iStyle, FIELD_INTEGER), DEFINE_FIELD(CLight, m_iszPattern, FIELD_STRING), }; -#endif - LINK_ENTITY_TO_CLASS(light, CLight, CCSLight) IMPLEMENT_SAVERESTORE(CLight, CPointEntity) diff --git a/regamedll/dlls/lights.h b/regamedll/dlls/lights.h index 5f7f61d8..a3635103 100644 --- a/regamedll/dlls/lights.h +++ b/regamedll/dlls/lights.h @@ -40,7 +40,7 @@ public: virtual int Restore(CRestore &restore); virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); - static TYPEDESCRIPTION IMPL(m_SaveData)[2]; + static TYPEDESCRIPTION m_SaveData[]; private: int m_iStyle; diff --git a/regamedll/dlls/maprules.cpp b/regamedll/dlls/maprules.cpp index 5fe4fe8d..3419c1a4 100644 --- a/regamedll/dlls/maprules.cpp +++ b/regamedll/dlls/maprules.cpp @@ -1,32 +1,10 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - TYPEDESCRIPTION CRuleEntity::m_SaveData[] = { DEFINE_FIELD(CRuleEntity, m_iszMaster, FIELD_STRING), }; -// Save parms as a block. Will break save/restore if the structure changes, but this entity didn't ship with Half-Life, so -// it can't impact saved Half-Life games. -TYPEDESCRIPTION CGameText::m_SaveData[] = -{ - DEFINE_ARRAY(CGameText, m_textParms, FIELD_CHARACTER, sizeof(hudtextparms_t)), -}; - -TYPEDESCRIPTION CGamePlayerZone::m_SaveData[] = -{ - DEFINE_FIELD(CGamePlayerZone, m_iszInTarget, FIELD_STRING), - DEFINE_FIELD(CGamePlayerZone, m_iszOutTarget, FIELD_STRING), - DEFINE_FIELD(CGamePlayerZone, m_iszInCount, FIELD_STRING), - DEFINE_FIELD(CGamePlayerZone, m_iszOutCount, FIELD_STRING), -}; - -#endif - IMPLEMENT_SAVERESTORE(CRuleEntity, CBaseEntity) void CRuleEntity::Spawn() @@ -121,6 +99,13 @@ void CGameEnd::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useTy g_pGameRules->EndMultiplayerGame(); } +// Save parms as a block. Will break save/restore if the structure changes, but this entity didn't ship with Half-Life, so +// it can't impact saved Half-Life games. +TYPEDESCRIPTION CGameText::m_SaveData[] = +{ + DEFINE_ARRAY(CGameText, m_textParms, FIELD_CHARACTER, sizeof(hudtextparms_t)), +}; + LINK_ENTITY_TO_CLASS(game_text, CGameText, CCSGameText) IMPLEMENT_SAVERESTORE(CGameText, CRulePointEntity) @@ -362,6 +347,14 @@ void CGameTeamSet::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE u } } +TYPEDESCRIPTION CGamePlayerZone::m_SaveData[] = +{ + DEFINE_FIELD(CGamePlayerZone, m_iszInTarget, FIELD_STRING), + DEFINE_FIELD(CGamePlayerZone, m_iszOutTarget, FIELD_STRING), + DEFINE_FIELD(CGamePlayerZone, m_iszInCount, FIELD_STRING), + DEFINE_FIELD(CGamePlayerZone, m_iszOutCount, FIELD_STRING), +}; + LINK_ENTITY_TO_CLASS(game_zone_player, CGamePlayerZone, CCSGamePlayerZone) IMPLEMENT_SAVERESTORE(CGamePlayerZone, CRuleBrushEntity) diff --git a/regamedll/dlls/maprules.h b/regamedll/dlls/maprules.h index c977b577..f2868c9f 100644 --- a/regamedll/dlls/maprules.h +++ b/regamedll/dlls/maprules.h @@ -37,7 +37,7 @@ public: virtual int Restore(CRestore &restore); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[1]; + static TYPEDESCRIPTION m_SaveData[]; void SetMaster(string_t iszMaster) { m_iszMaster = iszMaster; } @@ -107,7 +107,7 @@ public: const char *MessageGet() const { return STRING(pev->message); } public: - static TYPEDESCRIPTION IMPL(m_SaveData)[1]; + static TYPEDESCRIPTION m_SaveData[]; private: hudtextparms_t m_textParms; @@ -168,7 +168,7 @@ public: virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[4]; + static TYPEDESCRIPTION m_SaveData[]; bool HasOnlyAlive() const { return (pev->spawnflags & SF_GAME_PZONE_ONLY_ALIVE) == SF_GAME_PZONE_ONLY_ALIVE; } private: diff --git a/regamedll/dlls/mortar.cpp b/regamedll/dlls/mortar.cpp index a70c31bc..2b7d23cc 100644 --- a/regamedll/dlls/mortar.cpp +++ b/regamedll/dlls/mortar.cpp @@ -1,10 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - TYPEDESCRIPTION CFuncMortarField::m_SaveData[] = { DEFINE_FIELD(CFuncMortarField, m_iszXController, FIELD_STRING), @@ -15,8 +10,6 @@ TYPEDESCRIPTION CFuncMortarField::m_SaveData[] = DEFINE_FIELD(CFuncMortarField, m_fControl, FIELD_INTEGER), }; -#endif - LINK_ENTITY_TO_CLASS(func_mortar_field, CFuncMortarField, CCSFuncMortarField) IMPLEMENT_SAVERESTORE(CFuncMortarField, CBaseToggle) diff --git a/regamedll/dlls/mortar.h b/regamedll/dlls/mortar.h index b839d427..da7dee3e 100644 --- a/regamedll/dlls/mortar.h +++ b/regamedll/dlls/mortar.h @@ -44,7 +44,7 @@ public: void EXPORT FieldUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[6]; + static TYPEDESCRIPTION m_SaveData[]; int m_iszXController; int m_iszYController; diff --git a/regamedll/dlls/multiplay_gamerules.cpp b/regamedll/dlls/multiplay_gamerules.cpp index 069f942b..d88247f9 100644 --- a/regamedll/dlls/multiplay_gamerules.cpp +++ b/regamedll/dlls/multiplay_gamerules.cpp @@ -1,14 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - -cvar_t *sv_clienttrace = nullptr; - -#endif - CCStrikeGameMgrHelper g_GameMgrHelper; CHalfLifeMultiplay *g_pMPGameRules = nullptr; RewardAccount CHalfLifeMultiplay::m_rgRewardAccountRules[RR_END]; @@ -484,7 +475,6 @@ CHalfLifeMultiplay::CHalfLifeMultiplay() CVAR_SET_FLOAT("mp_windifference", 1); } - sv_clienttrace = CVAR_GET_POINTER("sv_clienttrace"); InstallTutor(CVAR_GET_FLOAT("tutor_enable") != 0.0f); m_bSkipShowMenu = false; @@ -2289,7 +2279,7 @@ void CHalfLifeMultiplay::Think() MonitorTutorStatus(); m_VoiceGameMgr.Update(gpGlobals->frametime); - if (sv_clienttrace->value != 1.0f) + if (g_psv_clienttrace->value != 1.0f) { CVAR_SET_FLOAT("sv_clienttrace", 1); } @@ -3444,11 +3434,11 @@ void CHalfLifeMultiplay::ClientDisconnected(edict_t *pClient) if (pPlayer->m_iMapVote) { - --m_iMapVotes[ pPlayer->m_iMapVote ]; + --m_iMapVotes[pPlayer->m_iMapVote]; - if (m_iMapVotes[ pPlayer->m_iMapVote ] < 0) + if (m_iMapVotes[pPlayer->m_iMapVote] < 0) { - m_iMapVotes[ pPlayer->m_iMapVote ] = 0; + m_iMapVotes[pPlayer->m_iMapVote] = 0; } } @@ -4189,15 +4179,7 @@ int CHalfLifeMultiplay::PlayerRelationship(CBasePlayer *pPlayer, CBaseEntity *pT BOOL CHalfLifeMultiplay::FAllowFlashlight() { - static cvar_t *mp_flashlight = nullptr; - - if (!mp_flashlight) - mp_flashlight = CVAR_GET_POINTER("mp_flashlight"); - - if (mp_flashlight) - return mp_flashlight->value != 0; - - return FALSE; + return flashlight.value ? TRUE : FALSE; } BOOL CHalfLifeMultiplay::FAllowMonsters() diff --git a/regamedll/dlls/pathcorner.cpp b/regamedll/dlls/pathcorner.cpp index b43893c6..9422d7f4 100644 --- a/regamedll/dlls/pathcorner.cpp +++ b/regamedll/dlls/pathcorner.cpp @@ -1,26 +1,10 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - TYPEDESCRIPTION CPathCorner::m_SaveData[] = { DEFINE_FIELD(CPathCorner, m_flWait, FIELD_FLOAT), }; -TYPEDESCRIPTION CPathTrack::m_SaveData[] = -{ - DEFINE_FIELD(CPathTrack, m_length, FIELD_FLOAT), - DEFINE_FIELD(CPathTrack, m_pnext, FIELD_CLASSPTR), - DEFINE_FIELD(CPathTrack, m_paltpath, FIELD_CLASSPTR), - DEFINE_FIELD(CPathTrack, m_pprevious, FIELD_CLASSPTR), - DEFINE_FIELD(CPathTrack, m_altName, FIELD_STRING), -}; - -#endif - LINK_ENTITY_TO_CLASS(path_corner, CPathCorner, CCSPathCorner) IMPLEMENT_SAVERESTORE(CPathCorner, CPointEntity) @@ -39,9 +23,18 @@ void CPathCorner::KeyValue(KeyValueData *pkvd) void CPathCorner::Spawn() { - assert(("path_corner without a targetname", !FStringNull(pev->targetname))); + assert(("path_corner without a targetname", !pev->targetname.IsNull())); } +TYPEDESCRIPTION CPathTrack::m_SaveData[] = +{ + DEFINE_FIELD(CPathTrack, m_length, FIELD_FLOAT), + DEFINE_FIELD(CPathTrack, m_pnext, FIELD_CLASSPTR), + DEFINE_FIELD(CPathTrack, m_paltpath, FIELD_CLASSPTR), + DEFINE_FIELD(CPathTrack, m_pprevious, FIELD_CLASSPTR), + DEFINE_FIELD(CPathTrack, m_altName, FIELD_STRING), +}; + IMPLEMENT_SAVERESTORE(CPathTrack, CBaseEntity) LINK_ENTITY_TO_CLASS(path_track, CPathTrack, CCSPathTrack) @@ -89,7 +82,7 @@ void CPathTrack::Link() if (!FStringNull(pev->target)) { - pentTarget = FIND_ENTITY_BY_TARGETNAME(nullptr, STRING(pev->target)); + pentTarget = FIND_ENTITY_BY_TARGETNAME(nullptr, pev->target); if (!FNullEnt(pentTarget)) { m_pnext = CPathTrack::Instance(pentTarget); @@ -109,7 +102,7 @@ void CPathTrack::Link() // Find "alternate" path if (!FStringNull(m_altName)) { - pentTarget = FIND_ENTITY_BY_TARGETNAME(nullptr, STRING(m_altName)); + pentTarget = FIND_ENTITY_BY_TARGETNAME(nullptr, m_altName); if (!FNullEnt(pentTarget)) { m_paltpath = CPathTrack::Instance(pentTarget); @@ -186,7 +179,7 @@ CPathTrack *CPathTrack::GetPrevious() void CPathTrack::SetPrevious(CPathTrack *pprev) { // Only set previous if this isn't my alternate path - if (pprev && !FStrEq(STRING(pprev->pev->targetname), STRING(m_altName))) + if (pprev && !FStrEq(pprev->pev->targetname, m_altName)) { m_pprevious = pprev; } @@ -340,11 +333,11 @@ CPathTrack *CPathTrack::Nearest(Vector origin) return pnearest; } -CPathTrack *CPathTrack::Instance(edict_t *pent) +CPathTrack *CPathTrack::Instance(edict_t *pEdict) { - if (FClassnameIs(pent, "path_track")) + if (FClassnameIs(pEdict, "path_track")) { - return (CPathTrack *)GET_PRIVATE(pent); + return GET_PRIVATE(pEdict); } return nullptr; diff --git a/regamedll/dlls/pathcorner.h b/regamedll/dlls/pathcorner.h index 0bd1f0dd..38f4de68 100644 --- a/regamedll/dlls/pathcorner.h +++ b/regamedll/dlls/pathcorner.h @@ -42,7 +42,7 @@ public: virtual float GetDelay() { return m_flWait; } public: - static TYPEDESCRIPTION IMPL(m_SaveData)[1]; + static TYPEDESCRIPTION m_SaveData[]; private: float m_flWait; diff --git a/regamedll/dlls/plats.cpp b/regamedll/dlls/plats.cpp index 71e2b324..df86fbe8 100644 --- a/regamedll/dlls/plats.cpp +++ b/regamedll/dlls/plats.cpp @@ -1,10 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - TYPEDESCRIPTION CBasePlatTrain::m_SaveData[] = { DEFINE_FIELD(CBasePlatTrain, m_bMoveSnd, FIELD_CHARACTER), @@ -12,55 +7,6 @@ TYPEDESCRIPTION CBasePlatTrain::m_SaveData[] = DEFINE_FIELD(CBasePlatTrain, m_volume, FIELD_FLOAT), }; -TYPEDESCRIPTION CFuncPlatRot::m_SaveData[] = -{ - DEFINE_FIELD(CFuncPlatRot, m_end, FIELD_VECTOR), - DEFINE_FIELD(CFuncPlatRot, m_start, FIELD_VECTOR), -}; - -TYPEDESCRIPTION CFuncTrain::m_SaveData[] = -{ - DEFINE_FIELD(CFuncTrain, m_sounds, FIELD_INTEGER), - DEFINE_FIELD(CFuncTrain, m_pevCurrentTarget, FIELD_EVARS), - DEFINE_FIELD(CFuncTrain, m_activated, FIELD_BOOLEAN), -}; - -TYPEDESCRIPTION CFuncTrackTrain::m_SaveData[] = -{ - DEFINE_FIELD(CFuncTrackTrain, m_ppath, FIELD_CLASSPTR), - DEFINE_FIELD(CFuncTrackTrain, m_length, FIELD_FLOAT), - DEFINE_FIELD(CFuncTrackTrain, m_height, FIELD_FLOAT), - DEFINE_FIELD(CFuncTrackTrain, m_speed, FIELD_FLOAT), - DEFINE_FIELD(CFuncTrackTrain, m_dir, FIELD_FLOAT), - DEFINE_FIELD(CFuncTrackTrain, m_startSpeed, FIELD_FLOAT), - DEFINE_FIELD(CFuncTrackTrain, m_controlMins, FIELD_VECTOR), - DEFINE_FIELD(CFuncTrackTrain, m_controlMaxs, FIELD_VECTOR), - DEFINE_FIELD(CFuncTrackTrain, m_sounds, FIELD_INTEGER), - DEFINE_FIELD(CFuncTrackTrain, m_flVolume, FIELD_FLOAT), - DEFINE_FIELD(CFuncTrackTrain, m_flBank, FIELD_FLOAT), - DEFINE_FIELD(CFuncTrackTrain, m_oldSpeed, FIELD_FLOAT), -}; - -TYPEDESCRIPTION CFuncTrackChange::m_SaveData[] = -{ - DEFINE_GLOBAL_FIELD(CFuncTrackChange, m_trackTop, FIELD_CLASSPTR), - DEFINE_GLOBAL_FIELD(CFuncTrackChange, m_trackBottom, FIELD_CLASSPTR), - DEFINE_GLOBAL_FIELD(CFuncTrackChange, m_train, FIELD_CLASSPTR), - DEFINE_GLOBAL_FIELD(CFuncTrackChange, m_trackTopName, FIELD_STRING), - DEFINE_GLOBAL_FIELD(CFuncTrackChange, m_trackBottomName, FIELD_STRING), - DEFINE_GLOBAL_FIELD(CFuncTrackChange, m_trainName, FIELD_STRING), - DEFINE_FIELD(CFuncTrackChange, m_code, FIELD_INTEGER), - DEFINE_FIELD(CFuncTrackChange, m_targetState, FIELD_INTEGER), - DEFINE_FIELD(CFuncTrackChange, m_use, FIELD_INTEGER), -}; - -TYPEDESCRIPTION CGunTarget::m_SaveData[] = -{ - DEFINE_FIELD(CGunTarget, m_on, FIELD_BOOLEAN), -}; - -#endif // HOOK_GAMEDLL - IMPLEMENT_SAVERESTORE(CBasePlatTrain, CBaseToggle) void CBasePlatTrain::KeyValue(KeyValueData *pkvd) @@ -239,7 +185,7 @@ LINK_ENTITY_TO_CLASS(func_plat, CFuncPlat, CCSFuncPlat) #define noiseMovement noise #define noiseStopMoving noise1 -// QUAKED func_plat (0 .5 .8) ? PLAT_LOW_TRIGGER +// QUAKED func_plat (0 .5 .8) ? SF_PLAT_TOGGLE // speed default 150 // Plats are always drawn in the extended position, so they will light correctly. @@ -513,6 +459,12 @@ void CFuncPlat::Blocked(CBaseEntity *pOther) } } +TYPEDESCRIPTION CFuncPlatRot::m_SaveData[] = +{ + DEFINE_FIELD(CFuncPlatRot, m_end, FIELD_VECTOR), + DEFINE_FIELD(CFuncPlatRot, m_start, FIELD_VECTOR), +}; + LINK_ENTITY_TO_CLASS(func_platrot, CFuncPlatRot, CCSFuncPlatRot) IMPLEMENT_SAVERESTORE(CFuncPlatRot, CFuncPlat) @@ -590,6 +542,13 @@ void CFuncPlatRot::RotMove(Vector &destAngle, float time) } } +TYPEDESCRIPTION CFuncTrain::m_SaveData[] = +{ + DEFINE_FIELD(CFuncTrain, m_sounds, FIELD_INTEGER), + DEFINE_FIELD(CFuncTrain, m_pevCurrentTarget, FIELD_EVARS), + DEFINE_FIELD(CFuncTrain, m_activated, FIELD_BOOLEAN), +}; + LINK_ENTITY_TO_CLASS(func_train, CFuncTrain, CCSFuncTrain) IMPLEMENT_SAVERESTORE(CFuncTrain, CBasePlatTrain) @@ -922,6 +881,22 @@ void CFuncTrain::OverrideReset() } } +TYPEDESCRIPTION CFuncTrackTrain::m_SaveData[] = +{ + DEFINE_FIELD(CFuncTrackTrain, m_ppath, FIELD_CLASSPTR), + DEFINE_FIELD(CFuncTrackTrain, m_length, FIELD_FLOAT), + DEFINE_FIELD(CFuncTrackTrain, m_height, FIELD_FLOAT), + DEFINE_FIELD(CFuncTrackTrain, m_speed, FIELD_FLOAT), + DEFINE_FIELD(CFuncTrackTrain, m_dir, FIELD_FLOAT), + DEFINE_FIELD(CFuncTrackTrain, m_startSpeed, FIELD_FLOAT), + DEFINE_FIELD(CFuncTrackTrain, m_controlMins, FIELD_VECTOR), + DEFINE_FIELD(CFuncTrackTrain, m_controlMaxs, FIELD_VECTOR), + DEFINE_FIELD(CFuncTrackTrain, m_sounds, FIELD_INTEGER), + DEFINE_FIELD(CFuncTrackTrain, m_flVolume, FIELD_FLOAT), + DEFINE_FIELD(CFuncTrackTrain, m_flBank, FIELD_FLOAT), + DEFINE_FIELD(CFuncTrackTrain, m_oldSpeed, FIELD_FLOAT), +}; + IMPLEMENT_SAVERESTORE(CFuncTrackTrain, CBaseEntity) LINK_ENTITY_TO_CLASS(func_tracktrain, CFuncTrackTrain, CCSFuncTrackTrain) @@ -1596,10 +1571,18 @@ void CFuncTrainControls::Spawn() pev->nextthink = gpGlobals->time; } -BOOL CFuncTrackChange::IsTogglePlat() +TYPEDESCRIPTION CFuncTrackChange::m_SaveData[] = { - return TRUE; -} + DEFINE_GLOBAL_FIELD(CFuncTrackChange, m_trackTop, FIELD_CLASSPTR), + DEFINE_GLOBAL_FIELD(CFuncTrackChange, m_trackBottom, FIELD_CLASSPTR), + DEFINE_GLOBAL_FIELD(CFuncTrackChange, m_train, FIELD_CLASSPTR), + DEFINE_GLOBAL_FIELD(CFuncTrackChange, m_trackTopName, FIELD_STRING), + DEFINE_GLOBAL_FIELD(CFuncTrackChange, m_trackBottomName, FIELD_STRING), + DEFINE_GLOBAL_FIELD(CFuncTrackChange, m_trainName, FIELD_STRING), + DEFINE_FIELD(CFuncTrackChange, m_code, FIELD_INTEGER), + DEFINE_FIELD(CFuncTrackChange, m_targetState, FIELD_INTEGER), + DEFINE_FIELD(CFuncTrackChange, m_use, FIELD_INTEGER), +}; LINK_ENTITY_TO_CLASS(func_trackchange, CFuncTrackChange, CCSFuncTrackChange) IMPLEMENT_SAVERESTORE(CFuncTrackChange, CFuncPlatRot) @@ -2029,6 +2012,11 @@ void CFuncTrackAuto::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE } } +TYPEDESCRIPTION CGunTarget::m_SaveData[] = +{ + DEFINE_FIELD(CGunTarget, m_on, FIELD_BOOLEAN), +}; + LINK_ENTITY_TO_CLASS(func_guntarget, CGunTarget, CCSGunTarget) IMPLEMENT_SAVERESTORE(CGunTarget, CBaseMonster) diff --git a/regamedll/dlls/plats.h b/regamedll/dlls/plats.h index 04b9fcb9..e8becace 100644 --- a/regamedll/dlls/plats.h +++ b/regamedll/dlls/plats.h @@ -44,7 +44,7 @@ public: virtual BOOL IsTogglePlat() { return (pev->spawnflags & SF_PLAT_TOGGLE) != 0; } public: - static TYPEDESCRIPTION IMPL(m_SaveData)[3]; + static TYPEDESCRIPTION m_SaveData[]; byte m_bMoveSnd; byte m_bStopSnd; @@ -99,7 +99,7 @@ public: void RotMove(Vector &destAngle, float time); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[2]; + static TYPEDESCRIPTION m_SaveData[]; Vector m_end; Vector m_start; @@ -128,7 +128,7 @@ public: void EXPORT Next(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[3]; + static TYPEDESCRIPTION m_SaveData[]; Vector m_vStartPosition; entvars_t *m_pevFirstTarget; @@ -170,7 +170,7 @@ public: virtual void OverrideReset(); virtual void Touch(CBaseEntity *pOther); virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); - virtual BOOL IsTogglePlat(); + virtual BOOL IsTogglePlat() { return TRUE; }; virtual void EXPORT GoUp(); virtual void EXPORT GoDown(); @@ -190,7 +190,7 @@ public: int UseEnabled() const { return m_use; } public: - static TYPEDESCRIPTION IMPL(m_SaveData)[9]; + static TYPEDESCRIPTION m_SaveData[]; CPathTrack *m_trackTop; CPathTrack *m_trackBottom; @@ -239,7 +239,7 @@ public: void Stop(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[1]; + static TYPEDESCRIPTION m_SaveData[]; private: BOOL m_on; diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp index fbd00d1e..ba08f939 100644 --- a/regamedll/dlls/player.cpp +++ b/regamedll/dlls/player.cpp @@ -1,18 +1,35 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - BOOL gInitHUD = TRUE; -TYPEDESCRIPTION CRevertSaved::m_SaveData[] = -{ - DEFINE_FIELD(CRevertSaved, m_messageTime, FIELD_FLOAT), // These are not actual times, but durations, so save as floats - DEFINE_FIELD(CRevertSaved, m_loadTime, FIELD_FLOAT), -}; - TYPEDESCRIPTION CBasePlayer::m_playerSaveData[] = { DEFINE_FIELD(CBasePlayer, m_flFlashLightTime, FIELD_TIME), @@ -57,7 +74,7 @@ TYPEDESCRIPTION CBasePlayer::m_playerSaveData[] = DEFINE_FIELD(CBasePlayer, m_iJoiningState, FIELD_INTEGER), }; -char *CDeadHEV::m_szPoses[] = +const char *CDeadHEV::m_szPoses[] = { "deadback", "deadsitting", @@ -65,10 +82,7 @@ char *CDeadHEV::m_szPoses[] = "deadtable" }; -#endif // HOOK_GAMEDLL - int gEvilImpulse101; - entvars_t *g_pevLastInflictor; LINK_ENTITY_TO_CLASS(player, CBasePlayer, CCSPlayer) @@ -924,11 +938,11 @@ BOOL EXT_FUNC CBasePlayer::__API_HOOK(TakeDamage)(entvars_t *pevInflictor, entva // tell director about it MESSAGE_BEGIN(MSG_SPEC, SVC_DIRECTOR); - WRITE_BYTE(9); // command length in bytes - WRITE_BYTE(DRC_CMD_EVENT); // take damage event - WRITE_SHORT(ENTINDEX(edict())); // index number of primary entity - WRITE_SHORT(ENTINDEX(ENT(pevInflictor))); // index number of secondary entity - WRITE_LONG(5); // eventflags (priority and flags) + WRITE_BYTE(9); // command length in bytes + WRITE_BYTE(DRC_CMD_EVENT); // take damage event + WRITE_SHORT(ENTINDEX(edict())); // index number of primary entity + WRITE_SHORT(ENTINDEX(ENT(pevInflictor))); // index number of secondary entity + WRITE_LONG(5); // eventflags (priority and flags) MESSAGE_END(); MESSAGE_BEGIN(MSG_SPEC, gmsgHLTV); @@ -1172,11 +1186,11 @@ BOOL EXT_FUNC CBasePlayer::__API_HOOK(TakeDamage)(entvars_t *pevInflictor, entva // tell director about it MESSAGE_BEGIN(MSG_SPEC, SVC_DIRECTOR); - WRITE_BYTE(9); // command length in bytes - WRITE_BYTE(DRC_CMD_EVENT); // take damage event - WRITE_SHORT(ENTINDEX(edict())); // index number of primary entity + WRITE_BYTE(9); // command length in bytes + WRITE_BYTE(DRC_CMD_EVENT); // take damage event + WRITE_SHORT(ENTINDEX(edict())); // index number of primary entity WRITE_SHORT(ENTINDEX(ENT(pevInflictor))); // index number of secondary entity - WRITE_LONG(5); // eventflags (priority and flags) + WRITE_LONG(5); // eventflags (priority and flags) MESSAGE_END(); MESSAGE_BEGIN(MSG_SPEC, gmsgHLTV); @@ -1238,7 +1252,7 @@ void packPlayerItem(CBasePlayer *pPlayer, CBasePlayerItem *pItem, bool packAmmo) // pack the ammo if (packAmmo) { - pWeaponBox->PackAmmo(MAKE_STRING(IMPL_CLASS(CBasePlayerItem, m_ItemInfoArray)[pItem->m_iId].pszAmmo1), pPlayer->m_rgAmmo[pItem->PrimaryAmmoIndex()]); + pWeaponBox->PackAmmo(MAKE_STRING(CBasePlayerItem::m_ItemInfoArray[pItem->m_iId].pszAmmo1), pPlayer->m_rgAmmo[pItem->PrimaryAmmoIndex()]); } SET_MODEL(ENT(pWeaponBox->pev), modelName); @@ -1268,7 +1282,7 @@ void packPlayerNade(CBasePlayer *pPlayer, CBasePlayerItem *pItem, bool packAmmo) break; } - auto& ammoNades = pPlayer->m_rgAmmo[ pItem->PrimaryAmmoIndex() ]; + auto& ammoNades = pPlayer->m_rgAmmo[pItem->PrimaryAmmoIndex()]; if (pItem->m_flStartThrow != 0) { if (ammoNades < 2) @@ -1301,7 +1315,7 @@ void packPlayerNade(CBasePlayer *pPlayer, CBasePlayerItem *pItem, bool packAmmo) // pack the ammo if (packAmmo) { - pWeaponBox->PackAmmo(MAKE_STRING(IMPL_CLASS(CBasePlayerItem, m_ItemInfoArray)[pItem->m_iId].pszAmmo1), pPlayer->m_rgAmmo[pItem->PrimaryAmmoIndex()]); + pWeaponBox->PackAmmo(MAKE_STRING(CBasePlayerItem::m_ItemInfoArray[pItem->m_iId].pszAmmo1), pPlayer->m_rgAmmo[pItem->PrimaryAmmoIndex()]); } SET_MODEL(ENT(pWeaponBox->pev), modelName); @@ -1333,7 +1347,7 @@ void CBasePlayer::PackDeadPlayerItems() for (int n = 0; n < MAX_ITEM_TYPES; n++) { // there's a weapon here. Should I pack it? - CBasePlayerItem *pPlayerItem = m_rgpPlayerItems[ n ]; + CBasePlayerItem *pPlayerItem = m_rgpPlayerItems[n]; while (pPlayerItem) { @@ -1933,7 +1947,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Killed)(entvars_t *pevAttacker, int iGib) case WEAPON_HEGRENADE: { CHEGrenade *pHEGrenade = static_cast(m_pActiveItem); - if ((pev->button & IN_ATTACK) && m_rgAmmo[ pHEGrenade->m_iPrimaryAmmoType ]) + if ((pev->button & IN_ATTACK) && m_rgAmmo[pHEGrenade->m_iPrimaryAmmoType]) { CGrenade::ShootTimed2(pev, (pev->origin + pev->view_ofs), pev->angles, 1.5, m_iTeam, pHEGrenade->m_usCreateExplosion); } @@ -1941,7 +1955,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Killed)(entvars_t *pevAttacker, int iGib) } case WEAPON_FLASHBANG: { - if ((pev->button & IN_ATTACK) && m_rgAmmo[ ((CBasePlayerWeapon *)m_pActiveItem)->m_iPrimaryAmmoType ]) + if ((pev->button & IN_ATTACK) && m_rgAmmo[((CBasePlayerWeapon *)m_pActiveItem)->m_iPrimaryAmmoType]) { CGrenade::ShootTimed(pev, (pev->origin + pev->view_ofs), pev->angles, 1.5); } @@ -1950,7 +1964,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Killed)(entvars_t *pevAttacker, int iGib) case WEAPON_SMOKEGRENADE: { CSmokeGrenade *pSmoke = static_cast(m_pActiveItem); - if ((pev->button & IN_ATTACK) && m_rgAmmo[ pSmoke->m_iPrimaryAmmoType ]) + if ((pev->button & IN_ATTACK) && m_rgAmmo[pSmoke->m_iPrimaryAmmoType]) { CGrenade::ShootSmokeGrenade(pev, (pev->origin + pev->view_ofs), pev->angles, 1.5, pSmoke->m_usCreateSmoke); } @@ -2751,7 +2765,7 @@ void CBasePlayer::WaterMove() // NOTE: this actually causes the count to continue restarting // until all drowning damage is healed. - m_rgbTimeBasedDamage[ ITBD_DROWN_RECOVER ] = 0; + m_rgbTimeBasedDamage[ITBD_DROWN_RECOVER] = 0; m_bitsDamageType |= DMG_DROWNRECOVER; m_bitsDamageType &= ~DMG_DROWN; } @@ -2760,7 +2774,7 @@ void CBasePlayer::WaterMove() { // fully under water // stop restoring damage while underwater - m_rgbTimeBasedDamage[ ITBD_DROWN_RECOVER ] = 0; + m_rgbTimeBasedDamage[ITBD_DROWN_RECOVER] = 0; m_bitsDamageType &= ~DMG_DROWNRECOVER; // drown! @@ -2888,7 +2902,7 @@ void CWShield::Touch(CBaseEntity *pOther) if (!pPlayer->m_bHasPrimary) { - if (pPlayer->m_rgpPlayerItems[ PISTOL_SLOT ] && pPlayer->m_rgpPlayerItems[ PISTOL_SLOT ]->m_iId == WEAPON_ELITE) + if (pPlayer->m_rgpPlayerItems[PISTOL_SLOT] && pPlayer->m_rgpPlayerItems[PISTOL_SLOT]->m_iId == WEAPON_ELITE) return; if (pPlayer->m_pActiveItem) @@ -2926,7 +2940,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(GiveShield)(bool bDeploy) if (bDeploy) { - if (m_rgAmmo[ pWeapon->m_iPrimaryAmmoType ] > 0) + if (m_rgAmmo[pWeapon->m_iPrimaryAmmoType] > 0) pWeapon->Holster(); if (!pWeapon->Deploy()) @@ -2966,7 +2980,7 @@ CBaseEntity *EXT_FUNC CBasePlayer::__API_HOOK(DropShield)(bool bDeploy) { if (pWeapon->m_iId == WEAPON_HEGRENADE || pWeapon->m_iId == WEAPON_FLASHBANG || pWeapon->m_iId == WEAPON_SMOKEGRENADE) { - if (m_rgAmmo[ pWeapon->m_iPrimaryAmmoType ] <= 0) + if (m_rgAmmo[pWeapon->m_iPrimaryAmmoType] <= 0) g_pGameRules->GetNextBestWeapon(this, pWeapon); } } @@ -3208,7 +3222,7 @@ void CBasePlayer::MenuPrint(const char *msg) while (Q_strlen(msg_portion) >= MAX_BUFFER_MENU_BRIEFING) { Q_strncpy(sbuf, msg_portion, MAX_BUFFER_MENU_BRIEFING); - sbuf[ MAX_BUFFER_MENU_BRIEFING ] = '\0'; + sbuf[MAX_BUFFER_MENU_BRIEFING] = '\0'; msg_portion += MAX_BUFFER_MENU_BRIEFING; MESSAGE_BEGIN(MSG_ONE, gmsgShowMenu, nullptr, pev); @@ -3662,9 +3676,9 @@ bool CanSeeUseable(CBasePlayer *me, CBaseEntity *entity) if (FClassnameIs(entity->pev, "hostage_entity")) { - Vector chest = entity->pev->origin + Vector(0, 0, HalfHumanHeight); - Vector head = entity->pev->origin + Vector(0, 0, HumanHeight * 0.9); - Vector knees = entity->pev->origin + Vector(0, 0, StepHeight); + Vector chest = entity->pev->origin + Vector(0, 0, HalfHumanHeight); + Vector head = entity->pev->origin + Vector(0, 0, HumanHeight * 0.9); + Vector knees = entity->pev->origin + Vector(0, 0, StepHeight); UTIL_TraceLine(eye, chest, ignore_monsters, ignore_glass, me->edict(), &result); if (result.flFraction < 1.0f) @@ -4501,7 +4515,7 @@ void CBasePlayer::CheckSuitUpdate() if (isentence) { - m_rgSuitPlayList[ isearch ] = 0; + m_rgSuitPlayList[isearch] = 0; if (isentence > 0) { @@ -5113,7 +5127,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Spawn)() m_lastLocation[0] = '\0'; m_bitsDamageType &= ~(DMG_DROWN | DMG_DROWNRECOVER); - m_rgbTimeBasedDamage[ ITBD_DROWN_RECOVER ] = 0; + m_rgbTimeBasedDamage[ITBD_DROWN_RECOVER] = 0; m_idrowndmg = 0; m_idrownrestored = 0; @@ -5388,7 +5402,7 @@ int CBasePlayer::Save(CSave &save) if (!CBaseMonster::Save(save)) return 0; - return save.WriteFields("PLAYER", this, IMPL_CLASS(CBasePlayer, m_playerSaveData), ARRAYSIZE(IMPL_CLASS(CBasePlayer, m_playerSaveData))); + return save.WriteFields("PLAYER", this, m_playerSaveData, ARRAYSIZE(m_playerSaveData)); } void CBasePlayer::SetScoreboardAttributes(CBasePlayer *destination) @@ -5419,7 +5433,7 @@ int CBasePlayer::Restore(CRestore &restore) if (!CBaseMonster::Restore(restore)) return 0; - int status = restore.ReadFields("PLAYER", this, IMPL_CLASS(CBasePlayer, m_playerSaveData), ARRAYSIZE(IMPL_CLASS(CBasePlayer, m_playerSaveData))); + int status = restore.ReadFields("PLAYER", this, m_playerSaveData, ARRAYSIZE(m_playerSaveData)); SAVERESTOREDATA *pSaveData = (SAVERESTOREDATA *)gpGlobals->pSaveData; // landmark isn't present. @@ -6226,7 +6240,7 @@ LINK_HOOK_CLASS_CHAIN(BOOL, CBasePlayer, AddPlayerItem, (CBasePlayerItem *pItem) // Add a weapon to the player (Item == Weapon == Selectable Object) BOOL EXT_FUNC CBasePlayer::__API_HOOK(AddPlayerItem)(CBasePlayerItem *pItem) { - CBasePlayerItem *pInsert = m_rgpPlayerItems[ pItem->iItemSlot() ]; + CBasePlayerItem *pInsert = m_rgpPlayerItems[pItem->iItemSlot()]; while (pInsert) { if (FClassnameIs(pInsert->pev, STRING(pItem->pev->classname))) @@ -6261,8 +6275,8 @@ BOOL EXT_FUNC CBasePlayer::__API_HOOK(AddPlayerItem)(CBasePlayerItem *pItem) m_bHasPrimary = true; pItem->CheckRespawn(); - pItem->m_pNext = m_rgpPlayerItems[ pItem->iItemSlot() ]; - m_rgpPlayerItems[ pItem->iItemSlot() ] = pItem; + pItem->m_pNext = m_rgpPlayerItems[pItem->iItemSlot()]; + m_rgpPlayerItems[pItem->iItemSlot()] = pItem; if (HasShield()) pev->gamestate = 0; @@ -6439,10 +6453,10 @@ int CBasePlayer::GetAmmoIndex(const char *psz) for (int i = 1; i < MAX_AMMO_SLOTS; i++) { - if (!IMPL_CLASS(CBasePlayerItem, m_AmmoInfoArray)[i].pszName) + if (!CBasePlayerItem::m_AmmoInfoArray[i].pszName) continue; - if (!Q_stricmp(psz, IMPL_CLASS(CBasePlayerItem, m_AmmoInfoArray)[i].pszName)) + if (!Q_stricmp(CBasePlayerItem::m_AmmoInfoArray[i].pszName, psz)) return i; } @@ -6457,10 +6471,13 @@ void CBasePlayer::SendAmmoUpdate() { m_rgAmmoLast[i] = m_rgAmmo[i]; + assert(m_rgAmmo[i] >= 0); + assert(m_rgAmmo[i] < 255); + // send "Ammo" update message MESSAGE_BEGIN(MSG_ONE, gmsgAmmoX, nullptr, pev); WRITE_BYTE(i); - WRITE_BYTE(Q_max(Q_min(m_rgAmmo[i], 254), 0)); // clamp the value to one byte + WRITE_BYTE(clamp(m_rgAmmo[i], 0, 254)); // clamp the value to one byte MESSAGE_END(); } } @@ -7135,8 +7152,8 @@ void CBasePlayer::UpdateStatusBar() { CBasePlayer *pTarget = (CBasePlayer *)pEntity; - newSBarState[ SBAR_ID_TARGETNAME ] = ENTINDEX(pTarget->edict()); - newSBarState[ SBAR_ID_TARGETTYPE ] = (pTarget->m_iTeam == m_iTeam) ? SBAR_TARGETTYPE_TEAMMATE : SBAR_TARGETTYPE_ENEMY; + newSBarState[SBAR_ID_TARGETNAME] = ENTINDEX(pTarget->edict()); + newSBarState[SBAR_ID_TARGETTYPE] = (pTarget->m_iTeam == m_iTeam) ? SBAR_TARGETTYPE_TEAMMATE : SBAR_TARGETTYPE_ENEMY; if (pTarget->m_iTeam == m_iTeam || IsObserver()) { @@ -7145,7 +7162,7 @@ void CBasePlayer::UpdateStatusBar() else Q_strcpy(sbuf0, " "); - newSBarState[ SBAR_ID_TARGETHEALTH ] = int((pEntity->pev->health / pEntity->pev->max_health) * 100); + newSBarState[SBAR_ID_TARGETHEALTH] = int((pEntity->pev->health / pEntity->pev->max_health) * 100); if (!(m_flDisplayHistory & DHF_FRIEND_SEEN) && !(pev->flags & FL_SPECTATOR)) { @@ -7176,8 +7193,8 @@ void CBasePlayer::UpdateStatusBar() else Q_strcpy(sbuf0, " "); - newSBarState[ SBAR_ID_TARGETTYPE ] = SBAR_TARGETTYPE_HOSTAGE; - newSBarState[ SBAR_ID_TARGETHEALTH ] = int((pEntity->pev->health / pEntity->pev->max_health) * 100); + newSBarState[SBAR_ID_TARGETTYPE] = SBAR_TARGETTYPE_HOSTAGE; + newSBarState[SBAR_ID_TARGETHEALTH] = int((pEntity->pev->health / pEntity->pev->max_health) * 100); if (!(m_flDisplayHistory & DHF_HOSTAGE_SEEN_FAR) && tr.flFraction > 0.1f) { @@ -7202,9 +7219,9 @@ void CBasePlayer::UpdateStatusBar() else if (m_flStatusBarDisappearDelay > gpGlobals->time) { // hold the values for a short amount of time after viewing the object - newSBarState[ SBAR_ID_TARGETTYPE ] = m_izSBarState[ SBAR_ID_TARGETTYPE ]; - newSBarState[ SBAR_ID_TARGETNAME ] = m_izSBarState[ SBAR_ID_TARGETNAME ]; - newSBarState[ SBAR_ID_TARGETHEALTH ] = m_izSBarState[ SBAR_ID_TARGETHEALTH ]; + newSBarState[SBAR_ID_TARGETTYPE] = m_izSBarState[SBAR_ID_TARGETTYPE]; + newSBarState[SBAR_ID_TARGETNAME] = m_izSBarState[SBAR_ID_TARGETNAME]; + newSBarState[SBAR_ID_TARGETHEALTH] = m_izSBarState[SBAR_ID_TARGETHEALTH]; } bool bForceResend = false; @@ -7397,7 +7414,7 @@ CBaseEntity *EXT_FUNC CBasePlayer::__API_HOOK(DropPlayerItem)(const char *pszIte // Does the player already have this item? bool CBasePlayer::HasPlayerItem(CBasePlayerItem *pCheckItem) { - auto item = m_rgpPlayerItems[ pCheckItem->iItemSlot() ]; + auto item = m_rgpPlayerItems[pCheckItem->iItemSlot()]; while (item) { if (FClassnameIs(item->pev, STRING(pCheckItem->pev->classname))) @@ -7648,24 +7665,6 @@ void CBasePlayer::TabulateAmmo() ammo_357sig = AmmoInventory(GetAmmoIndex("357SIG")); } -int CDeadHEV::Classify() -{ - return CLASS_HUMAN_MILITARY; -} - -void CDeadHEV::KeyValue(KeyValueData *pkvd) -{ - if (FStrEq(pkvd->szKeyName, "pose")) - { - m_iPose = Q_atoi(pkvd->szValue); - pkvd->fHandled = TRUE; - } - else - { - CBaseMonster::KeyValue(pkvd); - } -} - LINK_ENTITY_TO_CLASS(monster_hevsuit_dead, CDeadHEV, CCSDeadHEV) void CDeadHEV::Spawn() @@ -7680,7 +7679,7 @@ void CDeadHEV::Spawn() pev->body = 1; m_bloodColor = BLOOD_COLOR_RED; - pev->sequence = LookupSequence(m_szPoses[ m_iPose ]); + pev->sequence = LookupSequence(m_szPoses[m_iPose]); if (pev->sequence == -1) { @@ -7694,6 +7693,19 @@ void CDeadHEV::Spawn() MonsterInitDead(); } +void CDeadHEV::KeyValue(KeyValueData *pkvd) +{ + if (FStrEq(pkvd->szKeyName, "pose")) + { + m_iPose = Q_atoi(pkvd->szValue); + pkvd->fHandled = TRUE; + } + else + { + CBaseMonster::KeyValue(pkvd); + } +} + LINK_ENTITY_TO_CLASS(player_weaponstrip, CStripWeapons, CCSStripWeapons) void CStripWeapons::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) @@ -7714,88 +7726,6 @@ void CStripWeapons::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE } } -LINK_ENTITY_TO_CLASS(player_loadsaved, CRevertSaved, CCSRevertSaved) -IMPLEMENT_SAVERESTORE(CRevertSaved, CPointEntity) - -void CRevertSaved::KeyValue(KeyValueData *pkvd) -{ - if (FStrEq(pkvd->szKeyName, "duration")) - { - SetDuration(Q_atof(pkvd->szValue)); - pkvd->fHandled = TRUE; - } - else if (FStrEq(pkvd->szKeyName, "holdtime")) - { - SetHoldTime(Q_atof(pkvd->szValue)); - pkvd->fHandled = TRUE; - } - else if (FStrEq(pkvd->szKeyName, "messagetime")) - { - SetMessageTime(Q_atof(pkvd->szValue)); - pkvd->fHandled = TRUE; - } - else if (FStrEq(pkvd->szKeyName, "loadtime")) - { - SetLoadTime(Q_atof(pkvd->szValue)); - pkvd->fHandled = TRUE; - } - else - { - CPointEntity::KeyValue(pkvd); - } -} - -void CRevertSaved::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) -{ - UTIL_ScreenFadeAll(pev->rendercolor, Duration(), HoldTime(), int(pev->renderamt), FFADE_OUT); - pev->nextthink = gpGlobals->time + MessageTime(); - SetThink(&CRevertSaved::MessageThink); -} - -void CRevertSaved::MessageThink() -{ - float nextThink = LoadTime() - MessageTime(); - UTIL_ShowMessageAll(STRING(pev->message)); - - if (nextThink > 0) - { - pev->nextthink = gpGlobals->time + nextThink; - SetThink(&CRevertSaved::LoadThink); - } - else - LoadThink(); -} - -void CRevertSaved::LoadThink() -{ - if (!gpGlobals->deathmatch) - SERVER_COMMAND("reload\n"); -} - -void CInfoIntermission::Spawn() -{ - UTIL_SetOrigin(pev, pev->origin); - - pev->solid = SOLID_NOT; - pev->effects = EF_NODRAW; - pev->v_angle = g_vecZero; - pev->nextthink = gpGlobals->time + 2.0f; // let targets spawn! -} - -void CInfoIntermission::Think() -{ - // find my target - edict_t *pTarget = FIND_ENTITY_BY_TARGETNAME(nullptr, STRING(pev->target)); - - if (!FNullEnt(pTarget)) - { - pev->v_angle = UTIL_VecToAngles((pTarget->v.origin - pev->origin).Normalize()); - pev->v_angle.x = -pev->v_angle.x; - } -} - -LINK_ENTITY_TO_CLASS(info_intermission, CInfoIntermission, CCSInfoIntermission) - void CBasePlayer::StudioEstimateGait() { float_precision dt; @@ -8206,11 +8136,9 @@ bool CBasePlayer::CanAffordPrimary() bool CBasePlayer::CanAffordPrimaryAmmo() { - CBasePlayerWeapon *primary = static_cast(m_rgpPlayerItems[ PRIMARY_WEAPON_SLOT ]); - - for (auto& weapon : g_weaponStruct) - { - if (weapon.m_type == primary->m_iId && m_iAccount >= weapon.m_ammoPrice) + CBasePlayerWeapon *pPrimary = static_cast(m_rgpPlayerItems[PRIMARY_WEAPON_SLOT]); + for (auto& weapon : g_weaponStruct) { + if (weapon.m_type == pPrimary->m_iId && m_iAccount >= weapon.m_ammoPrice) return true; } @@ -8219,11 +8147,9 @@ bool CBasePlayer::CanAffordPrimaryAmmo() bool CBasePlayer::CanAffordSecondaryAmmo() { - CBasePlayerWeapon *secondary = static_cast(m_rgpPlayerItems[ PISTOL_SLOT ]); - - for (auto& weapon : g_weaponStruct) - { - if (weapon.m_type == secondary->m_iId && m_iAccount >= weapon.m_ammoPrice) + CBasePlayerWeapon *pSecondary = static_cast(m_rgpPlayerItems[PISTOL_SLOT]); + for (auto& weapon : g_weaponStruct) { + if (weapon.m_type == pSecondary->m_iId && m_iAccount >= weapon.m_ammoPrice) return true; } @@ -8250,22 +8176,22 @@ bool CBasePlayer::CanAffordGrenade() bool CBasePlayer::NeedsPrimaryAmmo() { - CBasePlayerWeapon *primary = static_cast(m_rgpPlayerItems[ PRIMARY_WEAPON_SLOT ]); - - if (!primary || primary->m_iId == WEAPON_SHIELDGUN) + CBasePlayerWeapon *pPrimary = static_cast(m_rgpPlayerItems[PRIMARY_WEAPON_SLOT]); + if (!pPrimary || pPrimary->m_iId == WEAPON_SHIELDGUN) { return false; + } - return (m_rgAmmo[ primary->m_iPrimaryAmmoType ] < primary->iMaxAmmo1()); + return (m_rgAmmo[pPrimary->m_iPrimaryAmmoType] < pPrimary->iMaxAmmo1()); } bool CBasePlayer::NeedsSecondaryAmmo() { - CBasePlayerWeapon *secondary = static_cast(m_rgpPlayerItems[ PISTOL_SLOT ]); - - if (!secondary) + CBasePlayerWeapon *pSecondary = static_cast(m_rgpPlayerItems[PISTOL_SLOT]); + if (!pSecondary) { return false; + } - return (m_rgAmmo[ secondary->m_iPrimaryAmmoType ] < secondary->iMaxAmmo1()); + return (m_rgAmmo[pSecondary->m_iPrimaryAmmoType] < pSecondary->iMaxAmmo1()); } bool CBasePlayer::NeedsArmor() @@ -8288,17 +8214,17 @@ bool CBasePlayer::NeedsGrenade() { int iAmmoIndex = GetAmmoIndex("HEGrenade"); - if (iAmmoIndex > 0 && m_rgAmmo[ iAmmoIndex ]) + if (iAmmoIndex > 0 && m_rgAmmo[iAmmoIndex]) return false; iAmmoIndex = GetAmmoIndex("Flashbang"); - if (iAmmoIndex > 0 && m_rgAmmo[ iAmmoIndex ]) + if (iAmmoIndex > 0 && m_rgAmmo[iAmmoIndex]) return false; iAmmoIndex = GetAmmoIndex("SmokeGrenade"); - if (iAmmoIndex > 0 && m_rgAmmo[ iAmmoIndex ]) + if (iAmmoIndex > 0 && m_rgAmmo[iAmmoIndex]) return false; return true; @@ -8397,9 +8323,9 @@ void CBasePlayer::InitRebuyData(const char *str) m_rebuyString = nullptr; } - m_rebuyString = new char[ Q_strlen(str) + 1 ]; + m_rebuyString = new char[Q_strlen(str) + 1]; Q_strcpy(m_rebuyString, str); - m_rebuyString[ Q_strlen(str) ] = '\0'; + m_rebuyString[Q_strlen(str)] = '\0'; } void CBasePlayer::AutoBuy() @@ -8407,7 +8333,7 @@ void CBasePlayer::AutoBuy() const char *c = nullptr; bool boughtPrimary = false; bool boughtSecondary = false; - char prioritizedString[ MAX_AUTOBUY_LENGTH ]; + char prioritizedString[MAX_AUTOBUY_LENGTH]; c = PickFlashKillWeaponString(); @@ -8525,7 +8451,7 @@ const char *CBasePlayer::PickPrimaryCareerTaskWeapon() { const int BufLen = 256; static char buf[BufLen]; - CBasePlayerWeapon *primary; + CBasePlayerWeapon *pPrimary; std::vector taskVector; if (!TheCareerTasks) @@ -8534,7 +8460,7 @@ const char *CBasePlayer::PickPrimaryCareerTaskWeapon() } buf[0] = '\0'; - primary = static_cast(m_rgpPlayerItems[PRIMARY_WEAPON_SLOT]); + pPrimary = static_cast(m_rgpPlayerItems[PRIMARY_WEAPON_SLOT]); for (auto pTask : *TheCareerTasks->GetTasks()) { @@ -8549,9 +8475,9 @@ const char *CBasePlayer::PickPrimaryCareerTaskWeapon() } } - if (primary) + if (pPrimary) { - if (CurrentWeaponSatisfies(primary, pTask->GetWeaponId(), pTask->GetWeaponClassId())) + if (CurrentWeaponSatisfies(pPrimary, pTask->GetWeaponId(), pTask->GetWeaponClassId())) { if (IsPrimaryWeaponId(pTask->GetWeaponId())) { @@ -8568,7 +8494,6 @@ const char *CBasePlayer::PickPrimaryCareerTaskWeapon() } int taskNum = taskVector.size(); - if (taskNum > 1) { // randomize names weapons of list @@ -8600,7 +8525,7 @@ const char *CBasePlayer::PickSecondaryCareerTaskWeapon() { const int BufLen = 256; static char buf[BufLen]; - CBasePlayerWeapon *secondary; + CBasePlayerWeapon *pSecondary; std::vector taskVector; if (!TheCareerTasks) @@ -8608,7 +8533,7 @@ const char *CBasePlayer::PickSecondaryCareerTaskWeapon() return nullptr; } - secondary = static_cast(m_rgpPlayerItems[PISTOL_SLOT]); + pSecondary = static_cast(m_rgpPlayerItems[PISTOL_SLOT]); for (auto pTask : *TheCareerTasks->GetTasks()) { @@ -8623,9 +8548,9 @@ const char *CBasePlayer::PickSecondaryCareerTaskWeapon() } } - if (secondary) + if (pSecondary) { - if (CurrentWeaponSatisfies(secondary, pTask->GetWeaponId(), pTask->GetWeaponClassId())) + if (CurrentWeaponSatisfies(pSecondary, pTask->GetWeaponId(), pTask->GetWeaponClassId())) { if (IsSecondaryWeaponId(pTask->GetWeaponId())) { @@ -8642,7 +8567,6 @@ const char *CBasePlayer::PickSecondaryCareerTaskWeapon() } int taskNum = taskVector.size(); - if (taskNum > 1) { // randomize names weapons of list @@ -8717,7 +8641,7 @@ const char *CBasePlayer::PickGrenadeKillWeaponString() // PostAutoBuyCommandProcessing - reorders the tokens in autobuyString based on the order of tokens in the priorityString. void CBasePlayer::PrioritizeAutoBuyString(char *autobuyString, const char *priorityString) { - char newString[ MAX_AUTOBUY_LENGTH ]; + char newString[MAX_AUTOBUY_LENGTH]; int newStringPos = 0; char priorityToken[32]; @@ -8777,7 +8701,7 @@ void CBasePlayer::PrioritizeAutoBuyString(char *autobuyString, const char *prior // copy the token over to the new string. while (*autobuyPosition != '\0' && *autobuyPosition != ' ') { - newString[ newStringPos++ ] = *autobuyPosition; + newString[newStringPos++] = *autobuyPosition; autobuyPosition++; } @@ -8892,20 +8816,20 @@ void CBasePlayer::PostAutoBuyCommandProcessing(AutoBuyInfoStruct *commandInfo, b return; } - CBasePlayerWeapon *primary = static_cast(m_rgpPlayerItems[ PRIMARY_WEAPON_SLOT ]); - CBasePlayerWeapon *secondary = static_cast(m_rgpPlayerItems[ PISTOL_SLOT ]); + CBasePlayerWeapon *pPrimary = static_cast(m_rgpPlayerItems[PRIMARY_WEAPON_SLOT]); + CBasePlayerWeapon *pSecondary = static_cast(m_rgpPlayerItems[PISTOL_SLOT]); - if (primary && FClassnameIs(primary->pev, commandInfo->m_classname)) + if (pPrimary && FClassnameIs(pPrimary->pev, commandInfo->m_classname)) { // I just bought the gun I was trying to buy. boughtPrimary = true; } - else if (!primary && ((commandInfo->m_class & AUTOBUYCLASS_SHIELD) == AUTOBUYCLASS_SHIELD) && HasShield()) + else if (!pPrimary && ((commandInfo->m_class & AUTOBUYCLASS_SHIELD) == AUTOBUYCLASS_SHIELD) && HasShield()) { // the shield is a primary weapon even though it isn't a "real" weapon. boughtPrimary = true; } - else if (secondary && FClassnameIs(secondary->pev, commandInfo->m_classname)) + else if (pSecondary && FClassnameIs(pSecondary->pev, commandInfo->m_classname)) { // I just bought the pistol I was trying to buy. boughtSecondary = true; @@ -8920,11 +8844,11 @@ void CBasePlayer::BuildRebuyStruct() return; } - CBasePlayerWeapon *primary = static_cast(m_rgpPlayerItems[ PRIMARY_WEAPON_SLOT ]); - CBasePlayerWeapon *secondary = static_cast(m_rgpPlayerItems[ PISTOL_SLOT ]); + CBasePlayerWeapon *pPrimary = static_cast(m_rgpPlayerItems[PRIMARY_WEAPON_SLOT]); + CBasePlayerWeapon *pSecondary = static_cast(m_rgpPlayerItems[PISTOL_SLOT]); // do the primary weapon/ammo stuff. - if (!primary) + if (!pPrimary) { // count a shieldgun as a primary. if (HasShield()) @@ -8940,27 +8864,27 @@ void CBasePlayer::BuildRebuyStruct() } else { - m_rebuyStruct.m_primaryWeapon = primary->m_iId; - m_rebuyStruct.m_primaryAmmo = m_rgAmmo[ primary->m_iPrimaryAmmoType ]; + m_rebuyStruct.m_primaryWeapon = pPrimary->m_iId; + m_rebuyStruct.m_primaryAmmo = m_rgAmmo[pPrimary->m_iPrimaryAmmoType]; } // do the secondary weapon/ammo stuff. - if (!secondary) + if (!pSecondary) { m_rebuyStruct.m_secondaryWeapon = 0; m_rebuyStruct.m_secondaryAmmo = 0; // can't have ammo if we don't have a gun right? } else { - m_rebuyStruct.m_secondaryWeapon = secondary->m_iId; - m_rebuyStruct.m_secondaryAmmo = m_rgAmmo[ secondary->m_iPrimaryAmmoType ]; + m_rebuyStruct.m_secondaryWeapon = pSecondary->m_iId; + m_rebuyStruct.m_secondaryAmmo = m_rgAmmo[pSecondary->m_iPrimaryAmmoType]; } // HE Grenade int iAmmoIndex = GetAmmoIndex("HEGrenade"); if (iAmmoIndex != -1) - m_rebuyStruct.m_heGrenade = m_rgAmmo[ iAmmoIndex ]; + m_rebuyStruct.m_heGrenade = m_rgAmmo[iAmmoIndex]; else m_rebuyStruct.m_heGrenade = 0; @@ -8968,7 +8892,7 @@ void CBasePlayer::BuildRebuyStruct() iAmmoIndex = GetAmmoIndex("Flashbang"); if (iAmmoIndex != -1) - m_rebuyStruct.m_flashbang = m_rgAmmo[ iAmmoIndex ]; + m_rebuyStruct.m_flashbang = m_rgAmmo[iAmmoIndex]; else m_rebuyStruct.m_flashbang = 0; @@ -8976,7 +8900,7 @@ void CBasePlayer::BuildRebuyStruct() iAmmoIndex = GetAmmoIndex("SmokeGrenade"); if (iAmmoIndex != -1) - m_rebuyStruct.m_smokeGrenade = m_rgAmmo[ iAmmoIndex ]; + m_rebuyStruct.m_smokeGrenade = m_rgAmmo[iAmmoIndex]; else m_rebuyStruct.m_smokeGrenade = 0; @@ -9034,7 +8958,7 @@ void CBasePlayer::Rebuy() void CBasePlayer::RebuyPrimaryWeapon() { - if (!m_rgpPlayerItems[ PRIMARY_WEAPON_SLOT ]) + if (!m_rgpPlayerItems[PRIMARY_WEAPON_SLOT]) { if (m_rebuyStruct.m_primaryWeapon) { @@ -9047,13 +8971,13 @@ void CBasePlayer::RebuyPrimaryWeapon() void CBasePlayer::RebuyPrimaryAmmo() { - CBasePlayerWeapon *primary = static_cast(m_rgpPlayerItems[ PRIMARY_WEAPON_SLOT ]); - - if (primary) + CBasePlayerWeapon *pPrimary = static_cast(m_rgpPlayerItems[PRIMARY_WEAPON_SLOT]); + if (pPrimary) { // if we had more ammo before than we have now, buy more. - if (m_rebuyStruct.m_primaryAmmo > m_rgAmmo[ primary->m_iPrimaryAmmoType ]) + if (m_rebuyStruct.m_primaryAmmo > m_rgAmmo[pPrimary->m_iPrimaryAmmoType]) { ClientCommand("primammo"); + } } } @@ -9062,19 +8986,20 @@ void CBasePlayer::RebuySecondaryWeapon() if (m_rebuyStruct.m_secondaryWeapon) { const char *alias = WeaponIDToAlias(m_rebuyStruct.m_secondaryWeapon); - if (alias) + if (alias) { ClientCommand(alias); + } } } void CBasePlayer::RebuySecondaryAmmo() { - CBasePlayerWeapon *secondary = static_cast(m_rgpPlayerItems[ PISTOL_SLOT ]); - - if (secondary) + CBasePlayerWeapon *pSecondary = static_cast(m_rgpPlayerItems[PISTOL_SLOT]); + if (pSecondary) { - if (m_rebuyStruct.m_secondaryAmmo > m_rgAmmo[ secondary->m_iPrimaryAmmoType ]) + if (m_rebuyStruct.m_secondaryAmmo > m_rgAmmo[pSecondary->m_iPrimaryAmmoType]) { ClientCommand("secammo"); + } } } @@ -9084,7 +9009,7 @@ void CBasePlayer::RebuyHEGrenade() if (iAmmoIndex == -1) return; - int numToBuy = m_rebuyStruct.m_heGrenade - m_rgAmmo[ iAmmoIndex ]; + int numToBuy = m_rebuyStruct.m_heGrenade - m_rgAmmo[iAmmoIndex]; for (int i = 0; i < numToBuy; i++) ClientCommand("hegren"); } @@ -9095,7 +9020,7 @@ void CBasePlayer::RebuyFlashbang() if (iAmmoIndex == -1) return; - int numToBuy = m_rebuyStruct.m_flashbang - m_rgAmmo[ iAmmoIndex ]; + int numToBuy = m_rebuyStruct.m_flashbang - m_rgAmmo[iAmmoIndex]; for (int i = 0; i < numToBuy; i++) ClientCommand("flash"); } @@ -9106,7 +9031,7 @@ void CBasePlayer::RebuySmokeGrenade() if (iAmmoIndex == -1) return; - int numToBuy = m_rebuyStruct.m_smokeGrenade - m_rgAmmo[ iAmmoIndex ]; + int numToBuy = m_rebuyStruct.m_smokeGrenade - m_rgAmmo[iAmmoIndex]; for (int i = 0; i < numToBuy; i++) ClientCommand("sgren"); } @@ -9234,7 +9159,7 @@ void CBasePlayer::ReloadWeapons(CBasePlayerItem *pWeapon, bool bForceReload, boo if (pWeapon == nullptr || pWeapon == item) { if (bCanRefillBPAmmo) { - m_rgAmmo[ item->PrimaryAmmoIndex() ] = item->iMaxAmmo1(); + m_rgAmmo[item->PrimaryAmmoIndex()] = item->iMaxAmmo1(); } if (bCanAutoReload) { ((CBasePlayerWeapon *)item)->InstantReload(bCanRefillBPAmmo); @@ -9289,7 +9214,7 @@ void CBasePlayer::DropSecondary() return false; }); #else - auto item = m_rgpPlayerItems[ PISTOL_SLOT ]; + auto item = m_rgpPlayerItems[PISTOL_SLOT]; if (item) { DropPlayerItem(STRING(item->pev->classname)); @@ -9311,7 +9236,7 @@ void CBasePlayer::DropPrimary() return false; }); #else - auto item = m_rgpPlayerItems[ PRIMARY_WEAPON_SLOT ]; + auto item = m_rgpPlayerItems[PRIMARY_WEAPON_SLOT]; if (item) { DropPlayerItem(STRING(item->pev->classname)); diff --git a/regamedll/dlls/player.h b/regamedll/dlls/player.h index 9e1e501b..bec1301e 100644 --- a/regamedll/dlls/player.h +++ b/regamedll/dlls/player.h @@ -299,23 +299,16 @@ public: virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); }; -// Multiplayer intermission spots. -class CInfoIntermission: public CPointEntity { -public: - virtual void Spawn(); - virtual void Think(); -}; - // Dead HEV suit prop class CDeadHEV: public CBaseMonster { public: virtual void Spawn(); virtual void KeyValue(KeyValueData *pkvd); - virtual int Classify(); + virtual int Classify() { return CLASS_HUMAN_MILITARY; } public: int m_iPose; // which sequence to display -- temporary, don't need to save - static char *m_szPoses[4]; + static const char *m_szPoses[]; }; class CSprayCan: public CBaseEntity { @@ -427,7 +420,7 @@ public: #endif // REGAMEDLL_API public: - static CBasePlayer *Instance(edict_t *pent) { return (CBasePlayer *)GET_PRIVATE(pent ? pent : ENT(0)); } + static CBasePlayer *Instance(edict_t *pEdict) { return GET_PRIVATE(pEdict ? pEdict : ENT(0)); } static CBasePlayer *Instance(entvars_t *pev) { return Instance(ENT(pev)); } static CBasePlayer *Instance(int offset) { return Instance(ENT(offset)); } @@ -613,7 +606,7 @@ public: template T *ForEachItem(int slot, const Functor &func) const { - auto item = m_rgpPlayerItems[ slot ]; + auto item = m_rgpPlayerItems[slot]; while (item) { if (func(static_cast(item))) @@ -653,7 +646,7 @@ public: { while (item) { - if (FClassnameIs(pszItemName, STRING(item->pev->classname)) && func(static_cast(item))) { + if (FClassnameIs(item->pev, pszItemName) && func(static_cast(item))) { return static_cast(item); } @@ -776,7 +769,7 @@ public: float m_flgeigerDelay; int m_igeigerRangePrev; int m_iStepLeft; - char m_szTextureName[CBTEXTURENAMEMAX]; + char m_szTextureName[MAX_TEXTURENAME_LENGHT]; char m_chTextureType; int m_idrowndmg; int m_idrownrestored; @@ -818,7 +811,7 @@ public: float m_flNextDecalTime; char m_szTeamName[MAX_TEAM_NAME_LENGTH]; - static TYPEDESCRIPTION IMPL(m_playerSaveData)[40]; + static TYPEDESCRIPTION m_playerSaveData[]; /*protected:*/ int m_modelIndexPlayer; diff --git a/regamedll/dlls/revert_saved.cpp b/regamedll/dlls/revert_saved.cpp new file mode 100644 index 00000000..859dc096 --- /dev/null +++ b/regamedll/dlls/revert_saved.cpp @@ -0,0 +1,95 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + +#include "precompiled.h" + +TYPEDESCRIPTION CRevertSaved::m_SaveData[] = +{ + DEFINE_FIELD(CRevertSaved, m_messageTime, FIELD_FLOAT), // These are not actual times, but durations, so save as floats + DEFINE_FIELD(CRevertSaved, m_loadTime, FIELD_FLOAT), +}; + +LINK_ENTITY_TO_CLASS(player_loadsaved, CRevertSaved, CCSRevertSaved) +IMPLEMENT_SAVERESTORE(CRevertSaved, CPointEntity) + +void CRevertSaved::KeyValue(KeyValueData *pkvd) +{ + if (FStrEq(pkvd->szKeyName, "duration")) + { + SetDuration(Q_atof(pkvd->szValue)); + pkvd->fHandled = TRUE; + } + else if (FStrEq(pkvd->szKeyName, "holdtime")) + { + SetHoldTime(Q_atof(pkvd->szValue)); + pkvd->fHandled = TRUE; + } + else if (FStrEq(pkvd->szKeyName, "messagetime")) + { + SetMessageTime(Q_atof(pkvd->szValue)); + pkvd->fHandled = TRUE; + } + else if (FStrEq(pkvd->szKeyName, "loadtime")) + { + SetLoadTime(Q_atof(pkvd->szValue)); + pkvd->fHandled = TRUE; + } + else + { + CPointEntity::KeyValue(pkvd); + } +} + +void CRevertSaved::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) +{ + UTIL_ScreenFadeAll(pev->rendercolor, Duration(), HoldTime(), int(pev->renderamt), FFADE_OUT); + pev->nextthink = gpGlobals->time + MessageTime(); + SetThink(&CRevertSaved::MessageThink); +} + +void CRevertSaved::MessageThink() +{ + float flNextThink = LoadTime() - MessageTime(); + UTIL_ShowMessageAll(pev->message); + + if (flNextThink > 0) + { + pev->nextthink = gpGlobals->time + flNextThink; + SetThink(&CRevertSaved::LoadThink); + return; + } + + LoadThink(); +} + +void CRevertSaved::LoadThink() +{ + if (!gpGlobals->deathmatch) { + SERVER_COMMAND("reload\n"); + } +} diff --git a/regamedll/dlls/revert_saved.h b/regamedll/dlls/revert_saved.h index 4666ab92..79d41ed5 100644 --- a/regamedll/dlls/revert_saved.h +++ b/regamedll/dlls/revert_saved.h @@ -52,7 +52,7 @@ public: void SetLoadTime(float time) { m_loadTime = time; } public: - static TYPEDESCRIPTION IMPL(m_SaveData)[2]; + static TYPEDESCRIPTION m_SaveData[]; float m_messageTime; float m_loadTime; diff --git a/regamedll/dlls/saverestore.cpp b/regamedll/dlls/saverestore.cpp new file mode 100644 index 00000000..3a03b562 --- /dev/null +++ b/regamedll/dlls/saverestore.cpp @@ -0,0 +1,1085 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + +#include "precompiled.h" + +TYPEDESCRIPTION g_EntvarsDescription[] = +{ + DEFINE_ENTITY_FIELD(classname, FIELD_STRING), + DEFINE_ENTITY_GLOBAL_FIELD(globalname, FIELD_STRING), + DEFINE_ENTITY_FIELD(origin, FIELD_POSITION_VECTOR), + DEFINE_ENTITY_FIELD(oldorigin, FIELD_POSITION_VECTOR), + DEFINE_ENTITY_FIELD(velocity, FIELD_VECTOR), + DEFINE_ENTITY_FIELD(basevelocity, FIELD_VECTOR), + DEFINE_ENTITY_FIELD(movedir, FIELD_VECTOR), + DEFINE_ENTITY_FIELD(angles, FIELD_VECTOR), + DEFINE_ENTITY_FIELD(avelocity, FIELD_VECTOR), + DEFINE_ENTITY_FIELD(punchangle, FIELD_VECTOR), + DEFINE_ENTITY_FIELD(v_angle, FIELD_VECTOR), + DEFINE_ENTITY_FIELD(fixangle, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(idealpitch, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(pitch_speed, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(ideal_yaw, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(yaw_speed, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(modelindex, FIELD_INTEGER), + DEFINE_ENTITY_GLOBAL_FIELD(model, FIELD_MODELNAME), + DEFINE_ENTITY_FIELD(viewmodel, FIELD_MODELNAME), + DEFINE_ENTITY_FIELD(weaponmodel, FIELD_MODELNAME), + DEFINE_ENTITY_FIELD(absmin, FIELD_POSITION_VECTOR), + DEFINE_ENTITY_FIELD(absmax, FIELD_POSITION_VECTOR), + DEFINE_ENTITY_GLOBAL_FIELD(mins, FIELD_VECTOR), + DEFINE_ENTITY_GLOBAL_FIELD(maxs, FIELD_VECTOR), + DEFINE_ENTITY_GLOBAL_FIELD(size, FIELD_VECTOR), + DEFINE_ENTITY_FIELD(ltime, FIELD_TIME), + DEFINE_ENTITY_FIELD(nextthink, FIELD_TIME), + DEFINE_ENTITY_FIELD(solid, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(movetype, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(skin, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(body, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(effects, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(gravity, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(friction, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(light_level, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(frame, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(scale, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(sequence, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(animtime, FIELD_TIME), + DEFINE_ENTITY_FIELD(framerate, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(controller, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(blending, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(rendermode, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(renderamt, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(rendercolor, FIELD_VECTOR), + DEFINE_ENTITY_FIELD(renderfx, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(health, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(frags, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(weapons, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(takedamage, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(deadflag, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(view_ofs, FIELD_VECTOR), + DEFINE_ENTITY_FIELD(button, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(impulse, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(chain, FIELD_EDICT), + DEFINE_ENTITY_FIELD(dmg_inflictor, FIELD_EDICT), + DEFINE_ENTITY_FIELD(enemy, FIELD_EDICT), + DEFINE_ENTITY_FIELD(aiment, FIELD_EDICT), + DEFINE_ENTITY_FIELD(owner, FIELD_EDICT), + DEFINE_ENTITY_FIELD(groundentity, FIELD_EDICT), + DEFINE_ENTITY_FIELD(spawnflags, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(flags, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(colormap, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(team, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(max_health, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(teleport_time, FIELD_TIME), + DEFINE_ENTITY_FIELD(armortype, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(armorvalue, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(waterlevel, FIELD_INTEGER), + DEFINE_ENTITY_FIELD(watertype, FIELD_INTEGER), + DEFINE_ENTITY_GLOBAL_FIELD(target, FIELD_STRING), + DEFINE_ENTITY_GLOBAL_FIELD(targetname, FIELD_STRING), + DEFINE_ENTITY_FIELD(netname, FIELD_STRING), + DEFINE_ENTITY_FIELD(message, FIELD_STRING), + DEFINE_ENTITY_FIELD(dmg_take, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(dmg_save, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(dmg, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(dmgtime, FIELD_TIME), + DEFINE_ENTITY_FIELD(noise, FIELD_SOUNDNAME), + DEFINE_ENTITY_FIELD(noise1, FIELD_SOUNDNAME), + DEFINE_ENTITY_FIELD(noise2, FIELD_SOUNDNAME), + DEFINE_ENTITY_FIELD(noise3, FIELD_SOUNDNAME), + DEFINE_ENTITY_FIELD(speed, FIELD_FLOAT), + DEFINE_ENTITY_FIELD(air_finished, FIELD_TIME), + DEFINE_ENTITY_FIELD(pain_finished, FIELD_TIME), + DEFINE_ENTITY_FIELD(radsuit_finished, FIELD_TIME), +}; + +void EntvarsKeyvalue(entvars_t *pev, KeyValueData *pkvd) +{ + for (int i = 0; i < ARRAYSIZE(g_EntvarsDescription); i++) + { + TYPEDESCRIPTION *pField = &g_EntvarsDescription[i]; + + if (!Q_stricmp(pField->fieldName, pkvd->szKeyName)) + { + switch (pField->fieldType) + { + case FIELD_STRING: + case FIELD_MODELNAME: + case FIELD_SOUNDNAME: + *(string_t *)((char *)pev + pField->fieldOffset) = ALLOC_STRING(pkvd->szValue); + break; + case FIELD_FLOAT: + case FIELD_TIME: + *(float *)((char *)pev + pField->fieldOffset) = Q_atof(pkvd->szValue); + break; + case FIELD_INTEGER: + *(string_t *)((char *)pev + pField->fieldOffset) = Q_atoi(pkvd->szValue); + break; + case FIELD_VECTOR: + case FIELD_POSITION_VECTOR: + UTIL_StringToVector((float *)((char *)pev + pField->fieldOffset), pkvd->szValue); + break; + + default: + case FIELD_EVARS: + case FIELD_CLASSPTR: + case FIELD_EDICT: + case FIELD_ENTITY: + case FIELD_POINTER: + ALERT(at_error, "Bad field in entity!!\n"); + break; + } + pkvd->fHandled = TRUE; + break; + } + } +} + +CSaveRestoreBuffer::CSaveRestoreBuffer() +{ + m_pData = nullptr; +} + +CSaveRestoreBuffer::CSaveRestoreBuffer(SAVERESTOREDATA *pdata) +{ + m_pData = pdata; +} + +CSaveRestoreBuffer::~CSaveRestoreBuffer() +{ + ; +} + +int CSaveRestoreBuffer::EntityIndex(CBaseEntity *pEntity) +{ + if (!pEntity) + return -1; + + return EntityIndex(pEntity->pev); +} + +int CSaveRestoreBuffer::EntityIndex(entvars_t *pevLookup) +{ + if (!pevLookup) + return -1; + + return EntityIndex(ENT(pevLookup)); +} + +int CSaveRestoreBuffer::EntityIndex(EOFFSET eoLookup) +{ + return EntityIndex(ENT(eoLookup)); +} + +int CSaveRestoreBuffer::EntityIndex(edict_t *pentLookup) +{ + if (!m_pData || !pentLookup) + return -1; + + for (int i = 0; i < m_pData->tableCount; i++) + { + ENTITYTABLE *pTable = &m_pData->pTable[i]; + if (pTable->pent == pentLookup) + return i; + } + + return -1; +} + +edict_t *CSaveRestoreBuffer::EntityFromIndex(int entityIndex) +{ + if (!m_pData || entityIndex < 0) + return nullptr; + + for (int i = 0; i < m_pData->tableCount; i++) + { + ENTITYTABLE *pTable = &m_pData->pTable[i]; + if (pTable->id == entityIndex) + return pTable->pent; + } + + return nullptr; +} + +int CSaveRestoreBuffer::EntityFlagsSet(int entityIndex, int flags) +{ + if (!m_pData || entityIndex < 0) + return 0; + + if (!m_pData || entityIndex < 0 || entityIndex > m_pData->tableCount) + return 0; + + m_pData->pTable[entityIndex].flags |= flags; + return m_pData->pTable[entityIndex].flags; +} + +int CSaveRestoreBuffer::EntityFlags(int entityIndex, int flags) +{ + return EntityFlagsSet(entityIndex, flags); +} + +void CSaveRestoreBuffer::BufferRewind(int size) +{ + if (!m_pData) + return; + + if (m_pData->size < size) + size = m_pData->size; + + m_pData->pCurrentData -= size; + m_pData->size -= size; +} + +#ifndef _WIN32 +extern "C" +{ + inline unsigned _rotr(unsigned val, int shift) + { + register unsigned lobit; + register unsigned num = val; + + shift &= 0x1f; + + while (shift--) + { + lobit = num & 1; + num >>= 1; + if (lobit) + num |= 0x80000000; + } + + return num; + } +} +#endif // _WIN32 + +unsigned int CSaveRestoreBuffer::HashString(const char *pszToken) +{ + unsigned int hash = 0; + while (*pszToken) + hash = _rotr(hash, 4) ^ *pszToken++; + + return hash; +} + +unsigned short CSaveRestoreBuffer::TokenHash(const char *pszToken) +{ + unsigned short hash = (unsigned short)(HashString(pszToken) % (unsigned)m_pData->tokenCount); + for (int i = 0; i < m_pData->tokenCount; i++) + { + int index = hash + i; + if (index >= m_pData->tokenCount) + index -= m_pData->tokenCount; + + if (!m_pData->pTokens[index] || !Q_strcmp(pszToken, m_pData->pTokens[index])) + { + m_pData->pTokens[index] = (char *)pszToken; + return index; + } + } + + ALERT(at_error, "CSaveRestoreBuffer :: TokenHash() is COMPLETELY FULL!"); + return 0; +} + + +void CSave::WriteData(const char *pname, int size, const char *pdata) +{ + BufferField(pname, size, pdata); +} + +NOXREF void CSave::WriteShort(const char *pname, const short *data, int count) +{ + BufferField(pname, sizeof(short) * count, (const char *)data); +} + +void CSave::WriteInt(const char *pname, const int *data, int count) +{ + BufferField(pname, sizeof(int) * count, (const char *)data); +} + +void CSave::WriteFloat(const char *pname, const float *data, int count) +{ + BufferField(pname, sizeof(float) * count, (const char *)data); +} + +void CSave::WriteTime(const char *pname, const float *data, int count) +{ + BufferHeader(pname, sizeof(float) * count); + + for (int i = 0; i < count; i++) + { + float tmp = data[0]; + if (m_pData) { + tmp -= m_pData->time; + } + + BufferData((const char *)&tmp, sizeof(float)); + data++; + } +} + +NOXREF void CSave::WriteString(const char *pname, const char *pdata) +{ + BufferField(pname, Q_strlen(pdata) + 1, pdata); +} + +void CSave::WriteString(const char *pname, const int *stringId, int count) +{ + int i; + int size = 0; + + for (i = 0; i < count; i++) { + size += Q_strlen(STRING(stringId[i])) + 1; + } + + BufferHeader(pname, size); + for (i = 0; i < count; i++) + { + const char *pString = STRING(stringId[i]); + BufferData(pString, Q_strlen(pString) + 1); + } +} + +void CSave::WriteVector(const char *pname, const Vector &value) +{ + WriteVector(pname, &value.x, 1); +} + +void CSave::WriteVector(const char *pname, const float *value, int count) +{ + BufferHeader(pname, sizeof(float) * 3 * count); + BufferData((const char *)value, sizeof(float) * 3 * count); +} + +NOXREF void CSave::WritePositionVector(const char *pname, const Vector &value) +{ + if (m_pData && m_pData->fUseLandmark) + { + Vector tmp = value - m_pData->vecLandmarkOffset; + WriteVector(pname, tmp); + } + WriteVector(pname, value); +} + +void CSave::WritePositionVector(const char *pname, const float *value, int count) +{ + BufferHeader(pname, sizeof(float) * 3 * count); + for (int i = 0; i < count; i++) + { + Vector tmp(value[0], value[1], value[2]); + if (m_pData && m_pData->fUseLandmark) { + tmp -= m_pData->vecLandmarkOffset; + } + + BufferData((const char *)&tmp.x, sizeof(float) * 3); + value += 3; + } +} + +void CSave::WriteFunction(const char *pname, void **data, int count) +{ + const char *functionName = NAME_FOR_FUNCTION((uint32)*data); + + if (functionName) + BufferField(pname, Q_strlen(functionName) + 1, functionName); + else + ALERT(at_error, "Invalid function pointer in entity!"); +} + +int CSave::WriteEntVars(const char *pname, entvars_t *pev) +{ + return WriteFields(pname, pev, g_EntvarsDescription, ARRAYSIZE(g_EntvarsDescription)); +} + +int CSave::WriteFields(const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount) +{ + int i; + int emptyCount = 0; + + for (i = 0; i < fieldCount; i++) + { + void *pOutputData = ((char *)pBaseData + pFields[i].fieldOffset); + if (DataEmpty((const char *)pOutputData, pFields[i].fieldSize * m_Sizes[pFields[i].fieldType])) + emptyCount++; + } + + int entityArray[MAX_ENTITY_ARRAY]; + int actualCount = fieldCount - emptyCount; + + WriteInt(pname, &actualCount, 1); + for (i = 0; i < fieldCount; i++) + { + TYPEDESCRIPTION *pTest = &pFields[i]; + void *pOutputData = ((char *)pBaseData + pTest->fieldOffset); + + if (DataEmpty((const char *)pOutputData, pTest->fieldSize * m_Sizes[pTest->fieldType])) + continue; + + switch (pTest->fieldType) + { + case FIELD_FLOAT: + WriteFloat(pTest->fieldName, (float *)pOutputData, pTest->fieldSize); + break; + + case FIELD_TIME: + WriteTime(pTest->fieldName, (float *)pOutputData, pTest->fieldSize); + break; + + case FIELD_MODELNAME: + case FIELD_SOUNDNAME: + case FIELD_STRING: + WriteString(pTest->fieldName, (int *)pOutputData, pTest->fieldSize); + break; + + case FIELD_CLASSPTR: + case FIELD_EVARS: + case FIELD_EDICT: + case FIELD_ENTITY: + case FIELD_EHANDLE: + { + if (pTest->fieldSize > MAX_ENTITY_ARRAY) + ALERT(at_error, "Can't save more than %d entities in an array!!!\n", MAX_ENTITY_ARRAY); + + for (int j = 0; j < pTest->fieldSize; j++) + { + switch (pTest->fieldType) + { + case FIELD_EVARS: + entityArray[j] = EntityIndex(((entvars_t **)pOutputData)[j]); + break; + case FIELD_CLASSPTR: + entityArray[j] = EntityIndex(((CBaseEntity **)pOutputData)[j]); + break; + case FIELD_EDICT: + entityArray[j] = EntityIndex(((edict_t **)pOutputData)[j]); + break; + case FIELD_ENTITY: + entityArray[j] = EntityIndex(((EOFFSET *)pOutputData)[j]); + break; + case FIELD_EHANDLE: + entityArray[j] = EntityIndex((CBaseEntity *)(((EHANDLE *)pOutputData)[j])); + break; + default: + break; + } + } + WriteInt(pTest->fieldName, entityArray, pTest->fieldSize); + break; + } + case FIELD_POSITION_VECTOR: + WritePositionVector(pTest->fieldName, (float *)pOutputData, pTest->fieldSize); + break; + case FIELD_VECTOR: + WriteVector(pTest->fieldName, (float *)pOutputData, pTest->fieldSize); + break; + case FIELD_BOOLEAN: + case FIELD_INTEGER: + WriteInt(pTest->fieldName, (int *)pOutputData, pTest->fieldSize); + break; + case FIELD_SHORT: + WriteData(pTest->fieldName, 2 * pTest->fieldSize, ((char *)pOutputData)); + break; + case FIELD_CHARACTER: + WriteData(pTest->fieldName, pTest->fieldSize, ((char *)pOutputData)); + break; + case FIELD_POINTER: + WriteInt(pTest->fieldName, (int *)(char *)pOutputData, pTest->fieldSize); + break; + case FIELD_FUNCTION: + WriteFunction(pTest->fieldName, &pOutputData, pTest->fieldSize); + break; + default: + ALERT(at_error, "Bad field type\n"); + break; + } + } + + return 1; +} + +NOXREF void CSave::BufferString(char *pdata, int len) +{ + char c = 0; + BufferData(pdata, len); + BufferData(&c, 1); +} + +int CSave::DataEmpty(const char *pdata, int size) +{ + for (int i = 0; i < size; i++) + { + if (pdata[i]) + return 0; + } + + return 1; +} + +void CSave::BufferField(const char *pname, int size, const char *pdata) +{ + BufferHeader(pname, size); + BufferData(pdata, size); +} + +void CSave::BufferHeader(const char *pname, int size) +{ + short hashvalue = TokenHash(pname); + if (size > (1 << (sizeof(short) * 8))) + ALERT(at_error, "CSave :: BufferHeader() size parameter exceeds 'short'!"); + + BufferData((const char *)&size, sizeof(short)); + BufferData((const char *)&hashvalue, sizeof(short)); +} + +void CSave::BufferData(const char *pdata, int size) +{ + if (!m_pData) + return; + + if (m_pData->size + size > m_pData->bufferSize) + { + ALERT(at_error, "Save/Restore overflow!"); + m_pData->size = m_pData->bufferSize; + return; + } + + Q_memcpy(m_pData->pCurrentData, pdata, size); + m_pData->pCurrentData += size; + m_pData->size += size; +} + +int CRestore::ReadField(void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount, int startField, int size, char *pName, void *pData) +{ + float time = 0.0f; + Vector position(0, 0, 0); + + if (m_pData) + { + time = m_pData->time; + if (m_pData->fUseLandmark) { + position = m_pData->vecLandmarkOffset; + } + } + for (int i = 0; i < fieldCount; i++) + { + int fieldNumber = (i + startField) % fieldCount; + TYPEDESCRIPTION *pTest = &pFields[fieldNumber]; + + if (!Q_stricmp(pTest->fieldName, pName)) + { + if (!m_global || !(pTest->flags & FTYPEDESC_GLOBAL)) + { + for (int j = 0; j < pTest->fieldSize; j++) + { + void *pOutputData = ((char *)pBaseData + pTest->fieldOffset + (j * m_Sizes[pTest->fieldType])); + void *pInputData = (char *)pData + j * m_Sizes[pTest->fieldType]; + + switch (pTest->fieldType) + { + case FIELD_TIME: + { + float timeData = *(float *)pInputData; + timeData += time; + *((float *)pOutputData) = timeData; + break; + } + case FIELD_FLOAT: *((float *)pOutputData) = *(float *)pInputData; break; + case FIELD_MODELNAME: + case FIELD_SOUNDNAME: + case FIELD_STRING: + { + char *pString = (char *)pData; + for (int stringCount = 0; stringCount < j; stringCount++) + { + while (*pString) + pString++; + + pString++; + } + + pInputData = pString; + if (!Q_strlen((char *)pInputData)) + *((int *)pOutputData) = 0; + else + { + int string = ALLOC_STRING((char *)pInputData); + *((int *)pOutputData) = string; + + if (!FStringNull(string) && m_precache) + { + if (pTest->fieldType == FIELD_MODELNAME) + PRECACHE_MODEL((char *)STRING(string)); + else if (pTest->fieldType == FIELD_SOUNDNAME) + PRECACHE_SOUND((char *)STRING(string)); + } + } + break; + } + case FIELD_EVARS: + { + int entityIndex = *(int *)pInputData; + edict_t *pent = EntityFromIndex(entityIndex); + + if (pent) + *((entvars_t **)pOutputData) = VARS(pent); + else + *((entvars_t **)pOutputData) = nullptr; + + break; + } + case FIELD_CLASSPTR: + { + int entityIndex = *(int *)pInputData; + edict_t *pent = EntityFromIndex(entityIndex); + + if (pent) + *((CBaseEntity **)pOutputData) = CBaseEntity::Instance(pent); + else + *((CBaseEntity **)pOutputData) = nullptr; + + break; + } + case FIELD_EDICT: + { + int entityIndex = *(int *)pInputData; + edict_t *pent = EntityFromIndex(entityIndex); + *((edict_t **)pOutputData) = pent; + break; + } + case FIELD_EHANDLE: + { + pOutputData = (char *)pOutputData + j * (sizeof(EHANDLE) - m_Sizes[pTest->fieldType]); + int entityIndex = *(int *)pInputData; + edict_t *pent = EntityFromIndex(entityIndex); + + if (pent) + *((EHANDLE *)pOutputData) = CBaseEntity::Instance(pent); + else + *((EHANDLE *)pOutputData) = nullptr; + + break; + } + case FIELD_ENTITY: + { + int entityIndex = *(int *)pInputData; + edict_t *pent = EntityFromIndex(entityIndex); + + if (pent) + *((EOFFSET *)pOutputData) = OFFSET(pent); + else + *((EOFFSET *)pOutputData) = 0; + + break; + } + case FIELD_VECTOR: + { + ((float *)pOutputData)[0] = ((float *)pInputData)[0]; + ((float *)pOutputData)[1] = ((float *)pInputData)[1]; + ((float *)pOutputData)[2] = ((float *)pInputData)[2]; + break; + } + case FIELD_POSITION_VECTOR: + { + ((float *)pOutputData)[0] = ((float *)pInputData)[0] + position.x; + ((float *)pOutputData)[1] = ((float *)pInputData)[1] + position.y; + ((float *)pOutputData)[2] = ((float *)pInputData)[2] + position.z; + break; + } + case FIELD_BOOLEAN: + case FIELD_INTEGER: + *((int *)pOutputData) = *(int *)pInputData; + break; + case FIELD_SHORT: + *((short *)pOutputData) = *(short *)pInputData; + break; + case FIELD_CHARACTER: + *((char *)pOutputData) = *(char *)pInputData; + break; + case FIELD_POINTER: + *((int *)pOutputData) = *(int *)pInputData; + break; + case FIELD_FUNCTION: + { + if (!Q_strlen((char *)pInputData)) + *((int *)pOutputData) = 0; + else + *((int *)pOutputData) = FUNCTION_FROM_NAME((char *)pInputData); + + break; + } + default: + ALERT(at_error, "Bad field type\n"); + break; + } + } + } + return fieldNumber; + } + } + return -1; +} + +int CRestore::ReadEntVars(const char *pname, entvars_t *pev) +{ + return ReadFields(pname, pev, g_EntvarsDescription, ARRAYSIZE(g_EntvarsDescription)); +} + +int CRestore::ReadFields(const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount) +{ + unsigned short i = ReadShort(); + unsigned short token = ReadShort(); + + if (token != TokenHash(pname)) + { + BufferRewind(2 * sizeof(short)); + return 0; + } + + int fileCount = ReadInt(); + int lastField = 0; + + for (i = 0; i < fieldCount; i++) + { + if (!m_global || !(pFields[i].flags & FTYPEDESC_GLOBAL)) + Q_memset(((char *)pBaseData + pFields[i].fieldOffset), 0, pFields[i].fieldSize * m_Sizes[pFields[i].fieldType]); + } + + for (i = 0; i < fileCount; i++) + { + HEADER header; + BufferReadHeader(&header); + + lastField = ReadField(pBaseData, pFields, fieldCount, lastField, header.size, m_pData->pTokens[header.token], header.pData); + lastField++; + } + + return 1; +} + +void CRestore::BufferReadHeader(HEADER *pheader) +{ + pheader->size = ReadShort(); + pheader->token = ReadShort(); + pheader->pData = BufferPointer(); + + BufferSkipBytes(pheader->size); +} + +short CRestore::ReadShort() +{ + short tmp = 0; + BufferReadBytes((char *)&tmp, sizeof(short)); + return tmp; +} + +int CRestore::ReadInt() +{ + int tmp = 0; + BufferReadBytes((char *)&tmp, sizeof(int)); + return tmp; +} + +NOXREF int CRestore::ReadNamedInt(const char *pName) +{ + HEADER header; + BufferReadHeader(&header); + return ((int *)header.pData)[0]; +} + +NOXREF char *CRestore::ReadNamedString(const char *pName) +{ + HEADER header; + BufferReadHeader(&header); + return (char *)header.pData; +} + +char *CRestore::BufferPointer() +{ + if (!m_pData) + return nullptr; + + return m_pData->pCurrentData; +} + +void CRestore::BufferReadBytes(char *pOutput, int size) +{ + if (!m_pData || Empty()) + return; + + if ((m_pData->size + size) > m_pData->bufferSize) + { + ALERT(at_error, "Restore overflow!"); + m_pData->size = m_pData->bufferSize; + return; + } + + if (pOutput) + Q_memcpy(pOutput, m_pData->pCurrentData, size); + + m_pData->pCurrentData += size; + m_pData->size += size; +} + +void CRestore::BufferSkipBytes(int bytes) +{ + BufferReadBytes(nullptr, bytes); +} + +NOXREF int CRestore::BufferSkipZString() +{ + if (!m_pData) + return 0; + + int maxLen = m_pData->bufferSize - m_pData->size; + int len = 0; + char *pszSearch = m_pData->pCurrentData; + + while (*pszSearch++ && len < maxLen) + len++; + + len++; + BufferSkipBytes(len); + return len; +} + +NOXREF int CRestore::BufferCheckZString(const char *string) +{ + if (!m_pData) + return 0; + + int maxLen = m_pData->bufferSize - m_pData->size; + int len = Q_strlen(string); + + if (len <= maxLen) + { + if (!Q_strncmp(string, m_pData->pCurrentData, len)) + return 1; + } + + return 0; +} + +CGlobalState::CGlobalState() +{ + Reset(); +} + +void CGlobalState::Reset() +{ + m_pList = nullptr; + m_listCount = 0; +} + +globalentity_t *CGlobalState::Find(string_t globalname) +{ + if (!globalname) + return nullptr; + + globalentity_t *pTest = m_pList; + const char *pEntityName = STRING(globalname); + + while (pTest) + { + if (!Q_strcmp(pEntityName, pTest->name)) + break; + + pTest = pTest->pNext; + } + + return pTest; +} + +// This is available all the time now on impulse 104, remove later +void CGlobalState::DumpGlobals() +{ + static char *estates[] = { "Off", "On", "Dead" }; + globalentity_t *pTest; + + ALERT(at_console, "-- Globals --\n"); + pTest = m_pList; + + while (pTest) + { + ALERT(at_console, "%s: %s (%s)\n", pTest->name, pTest->levelName, estates[pTest->state]); + pTest = pTest->pNext; + } +} + +void CGlobalState::EntityAdd(string_t globalname, string_t mapName, GLOBALESTATE state) +{ + assert(!Find(globalname)); + + globalentity_t *pNewEntity = (globalentity_t *)calloc(sizeof(globalentity_t), 1); + assert(pNewEntity != nullptr); + + pNewEntity->pNext = m_pList; + m_pList = pNewEntity; + Q_strcpy(pNewEntity->name, STRING(globalname)); + Q_strcpy(pNewEntity->levelName, STRING(mapName)); + pNewEntity->state = state; + + m_listCount++; +} + +void CGlobalState::EntitySetState(string_t globalname, GLOBALESTATE state) +{ + globalentity_t *pEnt = Find(globalname); + if (pEnt) + { + pEnt->state = state; + } +} + +const globalentity_t *CGlobalState::EntityFromTable(string_t globalname) +{ + globalentity_t *pEnt = Find(globalname); + + return pEnt; +} + +GLOBALESTATE CGlobalState::EntityGetState(string_t globalname) +{ + globalentity_t *pEnt = Find(globalname); + if (pEnt) + { + return pEnt->state; + } + + return GLOBAL_OFF; +} + +TYPEDESCRIPTION CGlobalState::m_SaveData[] = +{ + DEFINE_FIELD(CGlobalState, m_listCount, FIELD_INTEGER) +}; + +TYPEDESCRIPTION CGlobalState::m_GlobalEntitySaveData[] = +{ + DEFINE_ARRAY(globalentity_t, name, FIELD_CHARACTER, 64), + DEFINE_ARRAY(globalentity_t, levelName, FIELD_CHARACTER, MAX_MAPNAME_LENGHT), + DEFINE_FIELD(globalentity_t, state, FIELD_INTEGER) +}; + +int CGlobalState::Save(CSave &save) +{ + int i; + globalentity_t *pEntity; + + if (!save.WriteFields("GLOBAL", this, m_SaveData, ARRAYSIZE(m_SaveData))) + { + return 0; + } + + pEntity = m_pList; + for (i = 0; i < m_listCount && pEntity; i++) + { + if (!save.WriteFields("GENT", pEntity, m_GlobalEntitySaveData, ARRAYSIZE(m_GlobalEntitySaveData))) + { + return 0; + } + + pEntity = pEntity->pNext; + } + + return 1; +} + +int CGlobalState::Restore(CRestore &restore) +{ + int i, listCount; + globalentity_t tmpEntity; + + ClearStates(); + + if (!restore.ReadFields("GLOBAL", this, m_SaveData, ARRAYSIZE(m_SaveData))) + { + return 0; + } + + // Get new list count + listCount = m_listCount; + + // Clear loaded data + m_listCount = 0; + + for (i = 0; i < listCount; i++) + { + if (!restore.ReadFields("GENT", &tmpEntity, m_GlobalEntitySaveData, ARRAYSIZE(m_GlobalEntitySaveData))) + { + return 0; + } + + EntityAdd(MAKE_STRING(tmpEntity.name), MAKE_STRING(tmpEntity.levelName), tmpEntity.state); + } + + return 1; +} + +void CGlobalState::EntityUpdate(string_t globalname, string_t mapname) +{ + globalentity_t *pEnt = Find(globalname); + if (pEnt) + { + Q_strcpy(pEnt->levelName, STRING(mapname)); + } +} + +void CGlobalState::ClearStates() +{ + globalentity_t *pFree = m_pList; + while (pFree) + { + globalentity_t *pNext = pFree->pNext; + + free(pFree); + pFree = pNext; + } + + Reset(); +} + +void EXT_FUNC SaveGlobalState(SAVERESTOREDATA *pSaveData) +{ + CSave saveHelper(pSaveData); + gGlobalState.Save(saveHelper); +} + +void EXT_FUNC RestoreGlobalState(SAVERESTOREDATA *pSaveData) +{ + CRestore restoreHelper(pSaveData); + gGlobalState.Restore(restoreHelper); +} + +void EXT_FUNC ResetGlobalState() +{ + gGlobalState.ClearStates(); + + // Init the HUD on a new game / load game + gInitHUD = TRUE; +} diff --git a/regamedll/dlls/saverestore.h b/regamedll/dlls/saverestore.h index 7870586f..be5d429c 100644 --- a/regamedll/dlls/saverestore.h +++ b/regamedll/dlls/saverestore.h @@ -28,59 +28,46 @@ #pragma once -#define MAX_ENTITY_ARRAY 64 - -#ifndef HOOK_GAMEDLL - -#define IMPL(var)\ - var - -#define IMPL_CLASS(baseClass,var)\ - baseClass::var - -#endif // HOOK_GAMEDLL - #define IMPLEMENT_SAVERESTORE(derivedClass, baseClass)\ int derivedClass::Save(CSave &save)\ {\ if (!baseClass::Save(save))\ return 0;\ - return save.WriteFields(#derivedClass, this, IMPL(m_SaveData), ARRAYSIZE(IMPL(m_SaveData)));\ + return save.WriteFields(#derivedClass, this, m_SaveData, ARRAYSIZE(m_SaveData));\ }\ int derivedClass::Restore(CRestore &restore)\ {\ if (!baseClass::Restore(restore))\ return 0;\ - return restore.ReadFields(#derivedClass, this, IMPL(m_SaveData), ARRAYSIZE(IMPL(m_SaveData)));\ + return restore.ReadFields(#derivedClass, this, m_SaveData, ARRAYSIZE(m_SaveData));\ } -typedef enum +enum GLOBALESTATE { GLOBAL_OFF, GLOBAL_ON, GLOBAL_DEAD - -} GLOBALESTATE; +}; typedef struct globalentity_s { char name[64]; - char levelName[32]; + char levelName[MAX_MAPNAME_LENGHT]; GLOBALESTATE state; struct globalentity_s *pNext; } globalentity_t; -typedef struct +struct HEADER { unsigned short size; unsigned short token; char *pData; +}; -} HEADER; +const int MAX_ENTITY_ARRAY = 64; class CBaseEntity; - class CSaveRestoreBuffer { public: @@ -92,13 +79,34 @@ public: int EntityIndex(edict_t *pentLookup); int EntityIndex(EOFFSET eoLookup); int EntityIndex(CBaseEntity *pEntity); - int EntityFlags(int entityIndex, int flags = 0) { return EntityFlagsSet(entityIndex, flags); } + int EntityFlags(int entityIndex, int flags); int EntityFlagsSet(int entityIndex, int flags); edict_t *EntityFromIndex(int entityIndex); unsigned short TokenHash(const char *pszToken); protected: - SAVERESTOREDATA *m_pdata; + static constexpr int m_Sizes[] = { + sizeof(float), // FIELD_FLOAT + sizeof(int), // FIELD_STRING + sizeof(int), // FIELD_ENTITY + sizeof(int), // FIELD_CLASSPTR + sizeof(int), // FIELD_EHANDLE + sizeof(int), // FIELD_entvars_t + sizeof(int), // FIELD_EDICT + sizeof(float) * 3, // FIELD_VECTOR + sizeof(float) * 3, // FIELD_POSITION_VECTOR + sizeof(int *), // FIELD_POINTER + sizeof(int), // FIELD_INTEGER + sizeof(int *), // FIELD_FUNCTION + sizeof(int), // FIELD_BOOLEAN + sizeof(short), // FIELD_SHORT + sizeof(char), // FIELD_CHARACTER + sizeof(float), // FIELD_TIME + sizeof(int), // FIELD_MODELNAME + sizeof(int), // FIELD_SOUNDNAME + }; + + SAVERESTOREDATA *m_pData; void BufferRewind(int size); unsigned int HashString(const char *pszToken); }; @@ -136,7 +144,7 @@ class CRestore: public CSaveRestoreBuffer public: CRestore(SAVERESTOREDATA *pdata) : CSaveRestoreBuffer(pdata) { - m_global = 0; + m_global = FALSE; m_precache = TRUE; } int ReadEntVars(const char *pname, entvars_t *pev); @@ -147,8 +155,8 @@ public: int ReadNamedInt(const char *pName); char *ReadNamedString(const char *pName); - int Empty() const { return (m_pdata == NULL || ((m_pdata->pCurrentData - m_pdata->pBaseData) >= m_pdata->bufferSize)); } - void SetGlobalMode(int global) { m_global = global; } + bool Empty() const { return (!m_pData || ((m_pData->pCurrentData - m_pData->pBaseData) >= m_pData->bufferSize)); } + void SetGlobalMode(BOOL global) { m_global = global; } void PrecacheMode(BOOL mode) { m_precache = mode; } private: @@ -160,7 +168,7 @@ private: void BufferReadHeader(HEADER *pheader); private: - int m_global; + BOOL m_global; BOOL m_precache; }; @@ -177,12 +185,13 @@ public: const globalentity_t *EntityFromTable(string_t globalname); GLOBALESTATE EntityGetState(string_t globalname); - int EntityInTable(string_t globalname) { return (Find(globalname) != NULL) ? TRUE : FALSE; } + BOOL EntityInTable(string_t globalname) { return Find(globalname) ? TRUE : FALSE; } int Save(CSave &save); int Restore(CRestore &restore); void DumpGlobals(); - static TYPEDESCRIPTION IMPL(m_SaveData)[1]; + static TYPEDESCRIPTION m_SaveData[]; + static TYPEDESCRIPTION m_GlobalEntitySaveData[]; private: globalentity_t *Find(string_t globalname); @@ -190,3 +199,9 @@ private: globalentity_t *m_pList; int m_listCount; }; + +void SaveGlobalState(SAVERESTOREDATA *pSaveData); +void RestoreGlobalState(SAVERESTOREDATA *pSaveData); +void ResetGlobalState(); + +extern CGlobalState gGlobalState; diff --git a/regamedll/dlls/sound.cpp b/regamedll/dlls/sound.cpp index 1cc409a0..0554449f 100644 --- a/regamedll/dlls/sound.cpp +++ b/regamedll/dlls/sound.cpp @@ -1,7 +1,5 @@ #include "precompiled.h" -#ifndef HOOK_GAMEDLL - // presets for runtime pitch and vol modulation of ambient sounds dynpitchvol_t rgdpvpreset[MAX_SENTENCE_DPV_RESET] = { @@ -35,6 +33,23 @@ dynpitchvol_t rgdpvpreset[MAX_SENTENCE_DPV_RESET] = { 27, 128, 90, 10, 10, 10, 1, 20, 40, LFO_SQUARE, 5, 10, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; +int gcallsentences = 0; +BOOL fSentencesInit = FALSE; + +int gcTextures = 0; +BOOL fTextureTypeInit = FALSE; + +// time delay until it's ok to speak: used so that two NPCs don't talk at once +float CTalkMonster::g_talkWaitTime = 0; + +char gszallsentencenames[MAX_SENTENCE_VOXFILE][MAX_SENTENCE_NAME]; +sentenceg rgsentenceg[MAX_SENTENCE_GROUPS]; + +// Used to detect the texture the player is standing on, map the +// texture name to a material type. Play footstep sound based on material type. +char grgszTextureName[MAX_TEXTURES][MAX_TEXTURENAME_LENGHT]; +char grgchTextureType[MAX_TEXTURES]; + TYPEDESCRIPTION CAmbientGeneric::m_SaveData[] = { DEFINE_FIELD(CAmbientGeneric, m_flAttenuation, FIELD_FLOAT), @@ -49,36 +64,6 @@ TYPEDESCRIPTION CAmbientGeneric::m_SaveData[] = DEFINE_ARRAY(CAmbientGeneric, m_dpv, FIELD_CHARACTER, sizeof(dynpitchvol_t)), }; -TYPEDESCRIPTION CEnvSound::m_SaveData[] = -{ - DEFINE_FIELD(CEnvSound, m_flRadius, FIELD_FLOAT), - DEFINE_FIELD(CEnvSound, m_flRoomtype, FIELD_FLOAT), -}; - -TYPEDESCRIPTION CSpeaker::m_SaveData[] = -{ - DEFINE_FIELD(CSpeaker, m_preset, FIELD_INTEGER), -}; - -int gcallsentences = 0; -BOOL fSentencesInit = FALSE; - -int gcTextures = 0; -BOOL fTextureTypeInit = FALSE; - -#endif // HOOK_GAMEDLL - -// time delay until it's ok to speak: used so that two NPCs don't talk at once -float CTalkMonster::g_talkWaitTime = 0; - -char gszallsentencenames[MAX_SENTENCE_VOXFILE][MAX_SENTENCE_NAME]; -sentenceg rgsentenceg[MAX_SENTENCE_GROUPS]; - -// Used to detect the texture the player is standing on, map the -// texture name to a material type. Play footstep sound based on material type. -char grgszTextureName[CTEXTURESMAX][CBTEXTURENAMEMAX]; -char grgchTextureType[CTEXTURESMAX]; - LINK_ENTITY_TO_CLASS(ambient_generic, CAmbientGeneric, CCSAmbientGeneric) IMPLEMENT_SAVERESTORE(CAmbientGeneric, CBaseEntity) @@ -856,6 +841,12 @@ void CAmbientGeneric::KeyValue(KeyValueData *pkvd) } } +TYPEDESCRIPTION CEnvSound::m_SaveData[] = +{ + DEFINE_FIELD(CEnvSound, m_flRadius, FIELD_FLOAT), + DEFINE_FIELD(CEnvSound, m_flRoomtype, FIELD_FLOAT), +}; + LINK_ENTITY_TO_CLASS(env_sound, CEnvSound, CCSEnvSound) IMPLEMENT_SAVERESTORE(CEnvSound, CBaseEntity) @@ -1497,13 +1488,13 @@ char *memfgets(byte *pMemFile, int fileSize, int &filePos, char *pBuffer, int bu if (last - filePos > (bufferSize - 1)) last = filePos + (bufferSize - 1); - int stop = 0; + bool bStop = false; // Stop at the next newline (inclusive) or end of buffer - while (i < last && !stop) + while (i < last && !bStop) { if (pMemFile[i] == '\n') - stop = 1; + bStop = true; i++; } @@ -1517,7 +1508,7 @@ char *memfgets(byte *pMemFile, int fileSize, int &filePos, char *pBuffer, int bu // If the buffer isn't full, terminate (this is always true) if (size < bufferSize) - pBuffer[size] = 0; + pBuffer[size] = '\0'; // Update file pointer filePos = i; @@ -1550,7 +1541,7 @@ void TEXTURETYPE_Init() return; // for each line in the file... - while (memfgets(pMemFile, fileSize, filePos, buffer, sizeof(buffer) - 1) && (gcTextures < CTEXTURESMAX)) + while (memfgets(pMemFile, fileSize, filePos, buffer, sizeof(buffer) - 1) && (gcTextures < MAX_TEXTURES)) { // skip whitespace i = 0; @@ -1583,8 +1574,9 @@ void TEXTURETYPE_Init() continue; // null-terminate name and save in sentences array - j = Q_min(j, CBTEXTURENAMEMAX - 1 + i); - buffer[j] = 0; + j = Q_min(j, MAX_TEXTURENAME_LENGHT - 1 + i); + buffer[j] = '\0'; + Q_strcpy(&(grgszTextureName[gcTextures++][0]), &(buffer[i])); } @@ -1604,8 +1596,8 @@ char TEXTURETYPE_Find(char *name) for (int i = 0; i < gcTextures; ++i) { - if (!Q_strnicmp(name, &(grgszTextureName[ i ][0]), CBTEXTURENAMEMAX - 1)) - return (grgchTextureType[ i ]); + if (!Q_strnicmp(name, &(grgszTextureName[i][0]), MAX_TEXTURENAME_LENGHT - 1)) + return (grgchTextureType[i]); } return CHAR_TEX_CONCRETE; @@ -1621,7 +1613,7 @@ float TEXTURETYPE_PlaySound(TraceResult *ptr, Vector vecSrc, Vector vecEnd, int char chTextureType; float fvol; float fvolbar; - char szbuffer[64]; + char szBuffer[64]; const char *pTextureName; float rgfl1[3]; float rgfl2[3]; @@ -1634,7 +1626,7 @@ float TEXTURETYPE_PlaySound(TraceResult *ptr, Vector vecSrc, Vector vecEnd, int CBaseEntity *pEntity = CBaseEntity::Instance(ptr->pHit); - chTextureType = 0; + chTextureType = '\0'; if (pEntity && pEntity->Classify() != CLASS_NONE && pEntity->Classify() != CLASS_MACHINE) { @@ -1667,11 +1659,11 @@ float TEXTURETYPE_PlaySound(TraceResult *ptr, Vector vecSrc, Vector vecEnd, int pTextureName++; // '}}' - Q_strcpy(szbuffer, pTextureName); - szbuffer[CBTEXTURENAMEMAX - 1] = '\0'; + Q_strcpy(szBuffer, pTextureName); + szBuffer[MAX_TEXTURENAME_LENGHT - 1] = '\0'; // get texture type - chTextureType = TEXTURETYPE_Find(szbuffer); + chTextureType = TEXTURETYPE_Find(szBuffer); } } @@ -1813,10 +1805,14 @@ float TEXTURETYPE_PlaySound(TraceResult *ptr, Vector vecSrc, Vector vecEnd, int // play material hit sound UTIL_EmitAmbientSound(ENT(0), ptr->vecEndPos, rgsz[RANDOM_LONG(0, cnt - 1)], fvol, fattn, 0, 96 + RANDOM_LONG(0, 0xf)); - return fvolbar; } +TYPEDESCRIPTION CSpeaker::m_SaveData[] = +{ + DEFINE_FIELD(CSpeaker, m_preset, FIELD_INTEGER), +}; + LINK_ENTITY_TO_CLASS(speaker, CSpeaker, CCSSpeaker) IMPLEMENT_SAVERESTORE(CSpeaker, CBaseEntity) diff --git a/regamedll/dlls/sound.h b/regamedll/dlls/sound.h index 1aa0ca19..11ebdfff 100644 --- a/regamedll/dlls/sound.h +++ b/regamedll/dlls/sound.h @@ -122,7 +122,7 @@ public: void InitModulationParms(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[4]; + static TYPEDESCRIPTION m_SaveData[]; float m_flAttenuation; // Attenuation value dynpitchvol_t m_dpv; @@ -140,7 +140,7 @@ public: virtual void Think(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[2]; + static TYPEDESCRIPTION m_SaveData[]; float m_flRadius; float m_flRoomtype; @@ -163,7 +163,7 @@ public: void EXPORT SpeakerThink(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[1]; + static TYPEDESCRIPTION m_SaveData[]; int m_preset; // Preset number }; diff --git a/regamedll/dlls/soundent.cpp b/regamedll/dlls/soundent.cpp index f1a3056f..cff3a745 100644 --- a/regamedll/dlls/soundent.cpp +++ b/regamedll/dlls/soundent.cpp @@ -1,14 +1,7 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - CSoundEnt *pSoundEnt = nullptr; -#endif - // The entity that spawns when the world spawns, // and handles the world's active and free sound lists. LINK_ENTITY_TO_CLASS(soundent, CSoundEnt, CCSSoundEnt) @@ -80,9 +73,9 @@ void CSoundEnt::Think() while (iSound != SOUNDLIST_EMPTY) { - if (m_SoundPool[ iSound ].m_flExpireTime <= gpGlobals->time && m_SoundPool[ iSound ].m_flExpireTime != SOUND_NEVER_EXPIRE) + if (m_SoundPool[iSound].m_flExpireTime <= gpGlobals->time && m_SoundPool[iSound].m_flExpireTime != SOUND_NEVER_EXPIRE) { - int iNext = m_SoundPool[ iSound ].m_iNext; + int iNext = m_SoundPool[iSound].m_iNext; // move this sound back into the free list FreeSound(iSound, iPreviousSound); @@ -92,7 +85,7 @@ void CSoundEnt::Think() else { iPreviousSound = iSound; - iSound = m_SoundPool[ iSound ].m_iNext; + iSound = m_SoundPool[iSound].m_iNext; } } @@ -124,17 +117,17 @@ void CSoundEnt::FreeSound(int iSound, int iPrevious) { // iSound is not the head of the active list, so // must fix the index for the Previous sound - // pSoundEnt->m_SoundPool[ iPrevious ].m_iNext = m_SoundPool[ iSound ].m_iNext; - pSoundEnt->m_SoundPool[ iPrevious ].m_iNext = pSoundEnt->m_SoundPool[ iSound ].m_iNext; + // pSoundEnt->m_SoundPool[iPrevious].m_iNext = m_SoundPool[iSound].m_iNext; + pSoundEnt->m_SoundPool[iPrevious].m_iNext = pSoundEnt->m_SoundPool[iSound].m_iNext; } else { // the sound we're freeing IS the head of the active list. - pSoundEnt->m_iActiveSound = pSoundEnt->m_SoundPool[ iSound ].m_iNext; + pSoundEnt->m_iActiveSound = pSoundEnt->m_SoundPool[iSound].m_iNext; } // make iSound the head of the Free list. - pSoundEnt->m_SoundPool[ iSound ].m_iNext = pSoundEnt->m_iFreeSound; + pSoundEnt->m_SoundPool[iSound].m_iNext = pSoundEnt->m_iFreeSound; pSoundEnt->m_iFreeSound = iSound; } @@ -158,10 +151,10 @@ int CSoundEnt::IAllocSound() iNewSound = m_iFreeSound; // move the index down into the free list. - m_iFreeSound = m_SoundPool[ iNewSound ].m_iNext; + m_iFreeSound = m_SoundPool[iNewSound].m_iNext; // point the new sound at the top of the active list. - m_SoundPool[ iNewSound ].m_iNext = m_iActiveSound; + m_SoundPool[iNewSound].m_iNext = m_iActiveSound; // now make the new sound the top of the active list. You're done. m_iActiveSound = iNewSound; @@ -189,10 +182,10 @@ void CSoundEnt::InsertSound(int iType, const Vector &vecOrigin, int iVolume, flo return; } - pSoundEnt->m_SoundPool[ iThisSound ].m_vecOrigin = vecOrigin; - pSoundEnt->m_SoundPool[ iThisSound ].m_iType = iType; - pSoundEnt->m_SoundPool[ iThisSound ].m_iVolume = iVolume; - pSoundEnt->m_SoundPool[ iThisSound ].m_flExpireTime = gpGlobals->time + flDuration; + pSoundEnt->m_SoundPool[iThisSound].m_vecOrigin = vecOrigin; + pSoundEnt->m_SoundPool[iThisSound].m_iType = iType; + pSoundEnt->m_SoundPool[iThisSound].m_iVolume = iVolume; + pSoundEnt->m_SoundPool[iThisSound].m_flExpireTime = gpGlobals->time + flDuration; } // Initialize - clears all sounds and moves them into the @@ -209,12 +202,12 @@ void CSoundEnt::Initialize() // clear all sounds, and link them into the free sound list. for (i = 0; i < MAX_WORLD_SOUNDS; ++i) { - m_SoundPool[ i ].Clear(); - m_SoundPool[ i ].m_iNext = i + 1; + m_SoundPool[i].Clear(); + m_SoundPool[i].m_iNext = i + 1; } // terminate the list here. - m_SoundPool[ i - 1 ].m_iNext = SOUNDLIST_EMPTY; + m_SoundPool[i - 1].m_iNext = SOUNDLIST_EMPTY; // now reserve enough sounds for each client for (i = 0; i < gpGlobals->maxClients; ++i) @@ -227,7 +220,7 @@ void CSoundEnt::Initialize() return; } - pSoundEnt->m_SoundPool[ iSound ].m_flExpireTime = SOUND_NEVER_EXPIRE; + pSoundEnt->m_SoundPool[iSound].m_flExpireTime = SOUND_NEVER_EXPIRE; } if (CVAR_GET_FLOAT("displaysoundlist") == 1) @@ -270,7 +263,7 @@ int CSoundEnt::ISoundsInList(int iListType) while (iThisSound != SOUNDLIST_EMPTY) { i++; - iThisSound = m_SoundPool[ iThisSound ].m_iNext; + iThisSound = m_SoundPool[iThisSound].m_iNext; } return i; @@ -319,7 +312,7 @@ CSound *CSoundEnt::SoundPointerForIndex(int iIndex) return nullptr; } - return &pSoundEnt->m_SoundPool[ iIndex ]; + return &pSoundEnt->m_SoundPool[iIndex]; } // Clients are numbered from 1 to MAXCLIENTS, but the client @@ -330,13 +323,11 @@ int CSoundEnt::ClientSoundIndex(edict_t *pClient) { int iReturn = ENTINDEX(pClient) - 1; -#if defined(_DEBUG) && !defined(HOOK_GAMEDLL) - +#ifdef _DEBUG if (iReturn < 0 || iReturn > gpGlobals->maxClients) { ALERT(at_console, "** ClientSoundIndex returning a bogus value! **\n"); } - #endif return iReturn; diff --git a/regamedll/dlls/soundent.h b/regamedll/dlls/soundent.h index 5ffadaa3..430d2d0b 100644 --- a/regamedll/dlls/soundent.h +++ b/regamedll/dlls/soundent.h @@ -105,7 +105,7 @@ public: BOOL m_fShowReport; // if true, dump information about free/active sounds. private: - CSound m_SoundPool[ MAX_WORLD_SOUNDS ]; + CSound m_SoundPool[MAX_WORLD_SOUNDS]; }; extern CSoundEnt *pSoundEnt; diff --git a/regamedll/dlls/subs.cpp b/regamedll/dlls/subs.cpp index 04dc055a..f5d06eef 100644 --- a/regamedll/dlls/subs.cpp +++ b/regamedll/dlls/subs.cpp @@ -1,43 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - -// Global Savedata for Delay -TYPEDESCRIPTION CBaseDelay::m_SaveData[] = -{ - DEFINE_FIELD(CBaseDelay, m_flDelay, FIELD_FLOAT), - DEFINE_FIELD(CBaseDelay, m_iszKillTarget, FIELD_STRING), -}; - -// Global Savedata for Toggle -TYPEDESCRIPTION CBaseToggle::m_SaveData[] = -{ - DEFINE_FIELD(CBaseToggle, m_toggle_state, FIELD_INTEGER), - DEFINE_FIELD(CBaseToggle, m_flActivateFinished, FIELD_TIME), - DEFINE_FIELD(CBaseToggle, m_flMoveDistance, FIELD_FLOAT), - DEFINE_FIELD(CBaseToggle, m_flWait, FIELD_FLOAT), - DEFINE_FIELD(CBaseToggle, m_flLip, FIELD_FLOAT), - DEFINE_FIELD(CBaseToggle, m_flTWidth, FIELD_FLOAT), - DEFINE_FIELD(CBaseToggle, m_flTLength, FIELD_FLOAT), - DEFINE_FIELD(CBaseToggle, m_vecPosition1, FIELD_POSITION_VECTOR), - DEFINE_FIELD(CBaseToggle, m_vecPosition2, FIELD_POSITION_VECTOR), - DEFINE_FIELD(CBaseToggle, m_vecAngle1, FIELD_VECTOR), // UNDONE: Position could go through transition, but also angle? - DEFINE_FIELD(CBaseToggle, m_vecAngle2, FIELD_VECTOR), // UNDONE: Position could go through transition, but also angle? - DEFINE_FIELD(CBaseToggle, m_cTriggersLeft, FIELD_INTEGER), - DEFINE_FIELD(CBaseToggle, m_flHeight, FIELD_FLOAT), - DEFINE_FIELD(CBaseToggle, m_hActivator, FIELD_EHANDLE), - DEFINE_FIELD(CBaseToggle, m_pfnCallWhenMoveDone, FIELD_FUNCTION), - DEFINE_FIELD(CBaseToggle, m_vecFinalDest, FIELD_POSITION_VECTOR), - DEFINE_FIELD(CBaseToggle, m_vecFinalAngle, FIELD_VECTOR), - DEFINE_FIELD(CBaseToggle, m_sMaster, FIELD_STRING), - DEFINE_FIELD(CBaseToggle, m_bitsDamageInflict, FIELD_INTEGER), // damage type inflicted -}; - -#endif - // Landmark class void CPointEntity::Spawn() { @@ -57,6 +19,7 @@ LINK_ENTITY_TO_CLASS(info_player_deathmatch, CBaseDMStart, CCSDMStart) LINK_ENTITY_TO_CLASS(info_player_start, CPointEntity, CCSPointEntity) LINK_ENTITY_TO_CLASS(info_vip_start, CBaseDMStart, CCSDMStart) LINK_ENTITY_TO_CLASS(info_landmark, CPointEntity, CCSPointEntity) +LINK_ENTITY_TO_CLASS(info_target, CPointEntity, CCSPointEntity) LINK_ENTITY_TO_CLASS(info_hostage_rescue, CPointEntity, CCSPointEntity) LINK_ENTITY_TO_CLASS(info_bomb_target, CPointEntity, CCSPointEntity) @@ -75,9 +38,7 @@ void CBaseDMStart::KeyValue(KeyValueData *pkvd) BOOL CBaseDMStart::IsTriggered(CBaseEntity *pEntity) { - BOOL master = UTIL_IsMasterTriggered(pev->netname, pEntity); - - return master; + return UTIL_IsMasterTriggered(pev->netname, pEntity); } // This updates global tables that need to know about entities being removed @@ -112,6 +73,13 @@ void CBaseEntity::SUB_DoNothing() ; } +// Global Savedata for Delay +TYPEDESCRIPTION CBaseDelay::m_SaveData[] = +{ + DEFINE_FIELD(CBaseDelay, m_flDelay, FIELD_FLOAT), + DEFINE_FIELD(CBaseDelay, m_iszKillTarget, FIELD_STRING), +}; + IMPLEMENT_SAVERESTORE(CBaseDelay, CBaseEntity) void CBaseDelay::KeyValue(KeyValueData *pkvd) @@ -283,6 +251,30 @@ void CBaseDelay::DelayThink() REMOVE_ENTITY(ENT(pev)); } +// Global Savedata for Toggle +TYPEDESCRIPTION CBaseToggle::m_SaveData[] = +{ + DEFINE_FIELD(CBaseToggle, m_toggle_state, FIELD_INTEGER), + DEFINE_FIELD(CBaseToggle, m_flActivateFinished, FIELD_TIME), + DEFINE_FIELD(CBaseToggle, m_flMoveDistance, FIELD_FLOAT), + DEFINE_FIELD(CBaseToggle, m_flWait, FIELD_FLOAT), + DEFINE_FIELD(CBaseToggle, m_flLip, FIELD_FLOAT), + DEFINE_FIELD(CBaseToggle, m_flTWidth, FIELD_FLOAT), + DEFINE_FIELD(CBaseToggle, m_flTLength, FIELD_FLOAT), + DEFINE_FIELD(CBaseToggle, m_vecPosition1, FIELD_POSITION_VECTOR), + DEFINE_FIELD(CBaseToggle, m_vecPosition2, FIELD_POSITION_VECTOR), + DEFINE_FIELD(CBaseToggle, m_vecAngle1, FIELD_VECTOR), // UNDONE: Position could go through transition, but also angle? + DEFINE_FIELD(CBaseToggle, m_vecAngle2, FIELD_VECTOR), // UNDONE: Position could go through transition, but also angle? + DEFINE_FIELD(CBaseToggle, m_cTriggersLeft, FIELD_INTEGER), + DEFINE_FIELD(CBaseToggle, m_flHeight, FIELD_FLOAT), + DEFINE_FIELD(CBaseToggle, m_hActivator, FIELD_EHANDLE), + DEFINE_FIELD(CBaseToggle, m_pfnCallWhenMoveDone, FIELD_FUNCTION), + DEFINE_FIELD(CBaseToggle, m_vecFinalDest, FIELD_POSITION_VECTOR), + DEFINE_FIELD(CBaseToggle, m_vecFinalAngle, FIELD_VECTOR), + DEFINE_FIELD(CBaseToggle, m_sMaster, FIELD_STRING), + DEFINE_FIELD(CBaseToggle, m_bitsDamageInflict, FIELD_INTEGER), // damage type inflicted +}; + IMPLEMENT_SAVERESTORE(CBaseToggle, CBaseAnimating) void CBaseToggle::KeyValue(KeyValueData *pkvd) diff --git a/regamedll/dlls/training_gamerules.cpp b/regamedll/dlls/training_gamerules.cpp index 2e0724e1..fbd2cf15 100644 --- a/regamedll/dlls/training_gamerules.cpp +++ b/regamedll/dlls/training_gamerules.cpp @@ -1,31 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - -TYPEDESCRIPTION CFuncWeaponCheck::m_SaveData[] = -{ - DEFINE_FIELD(CFuncWeaponCheck, sTriggerWithItems, FIELD_STRING), - DEFINE_FIELD(CFuncWeaponCheck, sTriggerNoItems, FIELD_STRING), - DEFINE_FIELD(CFuncWeaponCheck, iItemCount, FIELD_INTEGER), - DEFINE_FIELD(CFuncWeaponCheck, sMaster, FIELD_STRING), - DEFINE_ARRAY(CFuncWeaponCheck, sItemName, FIELD_STRING, MAX_ITEM_COUNTS), - DEFINE_FIELD(CFuncWeaponCheck, iAnyWeapon, FIELD_INTEGER), -}; - -TYPEDESCRIPTION CBaseGrenCatch::m_SaveData[] = -{ - DEFINE_FIELD(CBaseGrenCatch, m_NeedGrenadeType, FIELD_INTEGER), - DEFINE_FIELD(CBaseGrenCatch, m_fSmokeTouching, FIELD_BOOLEAN), - DEFINE_FIELD(CBaseGrenCatch, m_fFlashTouched, FIELD_BOOLEAN), - DEFINE_FIELD(CBaseGrenCatch, sTriggerOnGrenade, FIELD_STRING), - DEFINE_FIELD(CBaseGrenCatch, sDisableOnGrenade, FIELD_STRING), -}; - -#endif - CHalfLifeTraining::CHalfLifeTraining() { PRECACHE_MODEL("models/w_weaponbox.mdl"); @@ -108,7 +82,7 @@ void CHalfLifeTraining::PlayerThink(CBasePlayer *pPlayer) if (pPlayer->HasNamedPlayerItem("weapon_c4")) { - if (pPlayer->m_rgAmmo[ pPlayer->GetAmmoIndex("C4") ] <= 0) + if (pPlayer->m_rgAmmo[pPlayer->GetAmmoIndex("C4")] <= 0) { pPlayer->m_bHasC4 = false; @@ -310,6 +284,15 @@ void CHalfLifeTraining::CheckWinConditions() } } +TYPEDESCRIPTION CBaseGrenCatch::m_SaveData[] = +{ + DEFINE_FIELD(CBaseGrenCatch, m_NeedGrenadeType, FIELD_INTEGER), + DEFINE_FIELD(CBaseGrenCatch, m_fSmokeTouching, FIELD_BOOLEAN), + DEFINE_FIELD(CBaseGrenCatch, m_fFlashTouched, FIELD_BOOLEAN), + DEFINE_FIELD(CBaseGrenCatch, sTriggerOnGrenade, FIELD_STRING), + DEFINE_FIELD(CBaseGrenCatch, sDisableOnGrenade, FIELD_STRING), +}; + IMPLEMENT_SAVERESTORE(CBaseGrenCatch, CBaseEntity) LINK_ENTITY_TO_CLASS(func_grencatch, CBaseGrenCatch, CCSGrenCatch) @@ -338,16 +321,14 @@ void CBaseGrenCatch::Touch(CBaseEntity *pOther) void CBaseGrenCatch::Think() { - CGrenade *pGrenade; bool m_fSmokeTouchingLastFrame; - CBaseEntity *pTrigger; Vector vMax, vMin; m_fSmokeTouchingLastFrame = m_fSmokeTouching; m_fSmokeTouching = false; - pGrenade = nullptr; - while ((pGrenade = (CGrenade *)UTIL_FindEntityByClassname(pGrenade, "grenade"))) + CGrenade *pGrenade = nullptr; + while ((pGrenade = UTIL_FindEntityByClassname(pGrenade, "grenade"))) { vMin = pGrenade->pev->mins; vMax = pGrenade->pev->maxs; @@ -371,8 +352,7 @@ void CBaseGrenCatch::Think() if (m_NeedGrenadeType == GRENADETYPE_SMOKE) { - pTrigger = nullptr; - + CBaseEntity *pTrigger = nullptr; while ((pTrigger = UTIL_FindEntityByTargetname(pTrigger, STRING(sDisableOnGrenade)))) { // save solid @@ -388,8 +368,7 @@ void CBaseGrenCatch::Think() if (m_fSmokeTouchingLastFrame && !m_fSmokeTouching) { - pTrigger = nullptr; - + CBaseEntity *pTrigger = nullptr; while ((pTrigger = UTIL_FindEntityByTargetname(pTrigger, STRING(sDisableOnGrenade)))) { // restore solid @@ -433,6 +412,19 @@ void CBaseGrenCatch::KeyValue(KeyValueData *pkvd) } } +TYPEDESCRIPTION CFuncWeaponCheck::m_SaveData[] = +{ + DEFINE_FIELD(CFuncWeaponCheck, sTriggerWithItems, FIELD_STRING), + DEFINE_FIELD(CFuncWeaponCheck, sTriggerNoItems, FIELD_STRING), + DEFINE_FIELD(CFuncWeaponCheck, iItemCount, FIELD_INTEGER), + DEFINE_FIELD(CFuncWeaponCheck, sMaster, FIELD_STRING), + DEFINE_ARRAY(CFuncWeaponCheck, sItemName, FIELD_STRING, MAX_ITEM_COUNTS), + DEFINE_FIELD(CFuncWeaponCheck, iAnyWeapon, FIELD_INTEGER), +}; + +IMPLEMENT_SAVERESTORE(CFuncWeaponCheck, CBaseEntity) +LINK_ENTITY_TO_CLASS(func_weaponcheck, CFuncWeaponCheck, CCSFuncWeaponCheck) + void CFuncWeaponCheck::Spawn() { pev->dmgtime = 0; @@ -443,8 +435,47 @@ void CFuncWeaponCheck::Spawn() SET_MODEL(ENT(pev), STRING(pev->model)); } -IMPLEMENT_SAVERESTORE(CFuncWeaponCheck, CBaseEntity) -LINK_ENTITY_TO_CLASS(func_weaponcheck, CFuncWeaponCheck, CCSFuncWeaponCheck) +void CFuncWeaponCheck::KeyValue(KeyValueData *pkvd) +{ + if (FStrEq(pkvd->szKeyName, "trigger_items")) + { + sTriggerWithItems = ALLOC_STRING(pkvd->szValue); + pkvd->fHandled = TRUE; + } + else if (FStrEq(pkvd->szKeyName, "trigger_noitems")) + { + sTriggerNoItems = ALLOC_STRING(pkvd->szValue); + pkvd->fHandled = TRUE; + } + else if (FStrEq(pkvd->szKeyName, "trigger_noitems_delay")) + { + pev->speed = Q_atof(pkvd->szValue); + pkvd->fHandled = TRUE; + } + else if (Q_strstr(pkvd->szKeyName, "item")) + { + if (iItemCount < MAX_ITEM_COUNTS) + { + sItemName[iItemCount++] = ALLOC_STRING(pkvd->szValue); + } + + pkvd->fHandled = TRUE; + } + else if (FStrEq(pkvd->szKeyName, "master")) + { + sMaster = ALLOC_STRING(pkvd->szValue); + pkvd->fHandled = TRUE; + } + else if (FStrEq(pkvd->szKeyName, "any_weapon")) + { + iAnyWeapon = Q_atoi(pkvd->szValue); + pkvd->fHandled = TRUE; + } + else + { + CBaseEntity::KeyValue(pkvd); + } +} void CFuncWeaponCheck::Touch(CBaseEntity *pOther) { @@ -458,7 +489,7 @@ void CFuncWeaponCheck::Touch(CBaseEntity *pOther) return; CBasePlayer *pPlayer = static_cast(pOther); - for (int i = 1; i <= iItemCount; ++i) + for (int i = 1; i <= iItemCount; i++) { if (iAnyWeapon) { @@ -491,45 +522,3 @@ void CFuncWeaponCheck::Touch(CBaseEntity *pOther) FireTargets(STRING(sTriggerWithItems), pOther, pOther, USE_TOGGLE, 0); SUB_Remove(); } - -void CFuncWeaponCheck::KeyValue(KeyValueData *pkvd) -{ - if (FStrEq(pkvd->szKeyName, "trigger_items")) - { - sTriggerWithItems = ALLOC_STRING(pkvd->szValue); - pkvd->fHandled = TRUE; - } - else if (FStrEq(pkvd->szKeyName, "trigger_noitems")) - { - sTriggerNoItems = ALLOC_STRING(pkvd->szValue); - pkvd->fHandled = TRUE; - } - else if (FStrEq(pkvd->szKeyName, "trigger_noitems_delay")) - { - pev->speed = Q_atof(pkvd->szValue); - pkvd->fHandled = TRUE; - } - else if (Q_strstr(pkvd->szKeyName, "item")) - { - if (iItemCount < MAX_ITEM_COUNTS) - { - sItemName[ iItemCount++ ] = ALLOC_STRING(pkvd->szValue); - } - - pkvd->fHandled = TRUE; - } - else if (FStrEq(pkvd->szKeyName, "master")) - { - sMaster = ALLOC_STRING(pkvd->szValue); - pkvd->fHandled = TRUE; - } - else if (FStrEq(pkvd->szKeyName, "any_weapon")) - { - iAnyWeapon = Q_atoi(pkvd->szValue); - pkvd->fHandled = TRUE; - } - else - { - CBaseEntity::KeyValue(pkvd); - } -} diff --git a/regamedll/dlls/training_gamerules.h b/regamedll/dlls/training_gamerules.h index e6effd0d..8679e89c 100644 --- a/regamedll/dlls/training_gamerules.h +++ b/regamedll/dlls/training_gamerules.h @@ -76,7 +76,7 @@ public: virtual void Touch(CBaseEntity *pOther); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[5]; + static TYPEDESCRIPTION m_SaveData[]; GrenCatchType m_NeedGrenadeType; string_t sTriggerOnGrenade; @@ -97,7 +97,7 @@ public: virtual void Touch(CBaseEntity *pOther); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[6]; + static TYPEDESCRIPTION m_SaveData[]; private: string_t sTriggerWithItems; diff --git a/regamedll/dlls/trains.h b/regamedll/dlls/trains.h index c383aa38..d82b28d2 100644 --- a/regamedll/dlls/trains.h +++ b/regamedll/dlls/trains.h @@ -51,7 +51,7 @@ public: CPathTrack *ValidPath(CPathTrack *ppath, int testFlag); void Project(CPathTrack *pstart, CPathTrack *pend, Vector *origin, float dist); - static CPathTrack *Instance(edict_t *pent); + static CPathTrack *Instance(edict_t *pEdict); CPathTrack *LookAhead(Vector *origin, float dist, int move); CPathTrack *Nearest(Vector origin); @@ -60,7 +60,7 @@ public: CPathTrack *GetPrevious(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[5]; + static TYPEDESCRIPTION m_SaveData[]; float m_length; string_t m_altName; @@ -106,7 +106,7 @@ public: void UpdateSound(); static CFuncTrackTrain *Instance(edict_t *pent); - static TYPEDESCRIPTION IMPL(m_SaveData)[12]; + static TYPEDESCRIPTION m_SaveData[]; CPathTrack *m_ppath; float m_length; @@ -164,7 +164,7 @@ public: public: static CFuncVehicle *Instance(edict_t *pent); - static TYPEDESCRIPTION IMPL(m_SaveData)[12]; + static TYPEDESCRIPTION m_SaveData[]; CPathTrack *m_ppath; float m_length; diff --git a/regamedll/dlls/triggers.cpp b/regamedll/dlls/triggers.cpp index 5e618cb1..eb0c5abc 100644 --- a/regamedll/dlls/triggers.cpp +++ b/regamedll/dlls/triggers.cpp @@ -1,71 +1,11 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - // Global Savedata for changelevel friction modifier TYPEDESCRIPTION CFrictionModifier::m_SaveData[] = { DEFINE_FIELD(CFrictionModifier, m_frictionFraction, FIELD_FLOAT), }; -TYPEDESCRIPTION CAutoTrigger::m_SaveData[] = -{ - DEFINE_FIELD(CAutoTrigger, m_globalstate, FIELD_STRING), - DEFINE_FIELD(CAutoTrigger, m_triggerType, FIELD_INTEGER), -}; - -TYPEDESCRIPTION CTriggerRelay::m_SaveData[1] = -{ - DEFINE_FIELD(CTriggerRelay, m_triggerType, FIELD_INTEGER), -}; - -// Global Savedata for multi_manager -TYPEDESCRIPTION CMultiManager::m_SaveData[] = -{ - DEFINE_FIELD(CMultiManager, m_cTargets, FIELD_INTEGER), - DEFINE_FIELD(CMultiManager, m_index, FIELD_INTEGER), - DEFINE_FIELD(CMultiManager, m_startTime, FIELD_TIME), - DEFINE_ARRAY(CMultiManager, m_iTargetName, FIELD_STRING, MAX_MM_TARGETS), - DEFINE_ARRAY(CMultiManager, m_flTargetDelay, FIELD_FLOAT, MAX_MM_TARGETS), -}; - -// Global Savedata for changelevel trigger -TYPEDESCRIPTION CChangeLevel::m_SaveData[] = -{ - DEFINE_ARRAY(CChangeLevel, m_szMapName, FIELD_CHARACTER, MAX_MAPNAME_LENGHT), - DEFINE_ARRAY(CChangeLevel, m_szLandmarkName, FIELD_CHARACTER, MAX_MAPNAME_LENGHT), - DEFINE_FIELD(CChangeLevel, m_changeTarget, FIELD_STRING), - DEFINE_FIELD(CChangeLevel, m_changeTargetDelay, FIELD_FLOAT), -}; - -TYPEDESCRIPTION CTriggerChangeTarget::m_SaveData[] = -{ - DEFINE_FIELD(CTriggerChangeTarget, m_iszNewTarget, FIELD_STRING), -}; - -// Global Savedata for changelevel friction modifier -TYPEDESCRIPTION CTriggerCamera::m_SaveData[] = -{ - DEFINE_FIELD(CTriggerCamera, m_hPlayer, FIELD_EHANDLE), - DEFINE_FIELD(CTriggerCamera, m_hTarget, FIELD_EHANDLE), - DEFINE_FIELD(CTriggerCamera, m_pentPath, FIELD_CLASSPTR), - DEFINE_FIELD(CTriggerCamera, m_sPath, FIELD_STRING), - DEFINE_FIELD(CTriggerCamera, m_flWait, FIELD_FLOAT), - DEFINE_FIELD(CTriggerCamera, m_flReturnTime, FIELD_TIME), - DEFINE_FIELD(CTriggerCamera, m_flStopTime, FIELD_TIME), - DEFINE_FIELD(CTriggerCamera, m_moveDistance, FIELD_FLOAT), - DEFINE_FIELD(CTriggerCamera, m_targetSpeed, FIELD_FLOAT), - DEFINE_FIELD(CTriggerCamera, m_initialSpeed, FIELD_FLOAT), - DEFINE_FIELD(CTriggerCamera, m_acceleration, FIELD_FLOAT), - DEFINE_FIELD(CTriggerCamera, m_deceleration, FIELD_FLOAT), - DEFINE_FIELD(CTriggerCamera, m_state, FIELD_INTEGER), -}; - -#endif // HOOK_GAMEDLL - LINK_ENTITY_TO_CLASS(func_friction, CFrictionModifier, CCSFrictionModifier) IMPLEMENT_SAVERESTORE(CFrictionModifier, CBaseEntity) @@ -103,6 +43,12 @@ void CFrictionModifier::KeyValue(KeyValueData *pkvd) } } +TYPEDESCRIPTION CAutoTrigger::m_SaveData[] = +{ + DEFINE_FIELD(CAutoTrigger, m_globalstate, FIELD_STRING), + DEFINE_FIELD(CAutoTrigger, m_triggerType, FIELD_INTEGER), +}; + LINK_ENTITY_TO_CLASS(trigger_auto, CAutoTrigger, CCSAutoTrigger) IMPLEMENT_SAVERESTORE(CAutoTrigger, CBaseDelay) @@ -173,6 +119,11 @@ void CAutoTrigger::Restart() } #endif +TYPEDESCRIPTION CTriggerRelay::m_SaveData[] = +{ + DEFINE_FIELD(CTriggerRelay, m_triggerType, FIELD_INTEGER), +}; + LINK_ENTITY_TO_CLASS(trigger_relay, CTriggerRelay, CCSTriggerRelay) IMPLEMENT_SAVERESTORE(CTriggerRelay, CBaseDelay) @@ -215,6 +166,16 @@ void CTriggerRelay::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE } } +// Global Savedata for multi_manager +TYPEDESCRIPTION CMultiManager::m_SaveData[] = +{ + DEFINE_FIELD(CMultiManager, m_cTargets, FIELD_INTEGER), + DEFINE_FIELD(CMultiManager, m_index, FIELD_INTEGER), + DEFINE_FIELD(CMultiManager, m_startTime, FIELD_TIME), + DEFINE_ARRAY(CMultiManager, m_iTargetName, FIELD_STRING, MAX_MM_TARGETS), + DEFINE_ARRAY(CMultiManager, m_flTargetDelay, FIELD_FLOAT, MAX_MM_TARGETS), +}; + LINK_ENTITY_TO_CLASS(multi_manager, CMultiManager, CCSMultiManager) IMPLEMENT_SAVERESTORE(CMultiManager, CBaseToggle) @@ -330,9 +291,9 @@ void CMultiManager::ManagerThink() float time; time = gpGlobals->time - m_startTime; - while (m_index < m_cTargets && m_flTargetDelay[ m_index ] <= time) + while (m_index < m_cTargets && m_flTargetDelay[m_index] <= time) { - FireTargets(STRING(m_iTargetName[ m_index ]), m_hActivator, this, USE_TOGGLE, 0); + FireTargets(STRING(m_iTargetName[m_index]), m_hActivator, this, USE_TOGGLE, 0); m_index++; } @@ -350,7 +311,7 @@ void CMultiManager::ManagerThink() SetUse(&CMultiManager::ManagerUse); } else - pev->nextthink = m_startTime + m_flTargetDelay[ m_index ]; + pev->nextthink = m_startTime + m_flTargetDelay[m_index]; } CMultiManager *CMultiManager::Clone() @@ -433,7 +394,7 @@ void CRenderFxManager::Restart() continue; } - RenderGroup_t *pGroup = &m_RenderGroups[ index ]; + RenderGroup_t *pGroup = &m_RenderGroups[index]; if (!(pev->spawnflags & SF_RENDER_MASKFX)) pevTarget->renderfx = pGroup->renderfx; @@ -1210,6 +1171,15 @@ void CFireAndDie::Think() UTIL_Remove(this); } +// Global Savedata for changelevel trigger +TYPEDESCRIPTION CChangeLevel::m_SaveData[] = +{ + DEFINE_ARRAY(CChangeLevel, m_szMapName, FIELD_CHARACTER, MAX_MAPNAME_LENGHT), + DEFINE_ARRAY(CChangeLevel, m_szLandmarkName, FIELD_CHARACTER, MAX_MAPNAME_LENGHT), + DEFINE_FIELD(CChangeLevel, m_changeTarget, FIELD_STRING), + DEFINE_FIELD(CChangeLevel, m_changeTargetDelay, FIELD_FLOAT), +}; + LINK_ENTITY_TO_CLASS(trigger_changelevel, CChangeLevel, CCSChangeLevel) IMPLEMENT_SAVERESTORE(CChangeLevel, CBaseTrigger) @@ -1424,11 +1394,11 @@ int CChangeLevel::AddTransitionToList(LEVELLIST *pLevelList, int listCount, cons } } - Q_strcpy(pLevelList[ listCount ].mapName, pMapName); - Q_strcpy(pLevelList[ listCount ].landmarkName, pLandmarkName); + Q_strcpy(pLevelList[listCount].mapName, pMapName); + Q_strcpy(pLevelList[listCount].landmarkName, pLandmarkName); - pLevelList[ listCount ].pentLandmark = pentLandmark; - pLevelList[ listCount ].vecLandmarkOrigin = VARS(pentLandmark)->origin; + pLevelList[listCount].pentLandmark = pentLandmark; + pLevelList[listCount].vecLandmarkOrigin = VARS(pentLandmark)->origin; return 1; } @@ -1554,8 +1524,8 @@ int CChangeLevel::ChangeList(LEVELLIST *pLevelList, int maxList) if (flags) { - pEntList[ entityCount ] = pEntity; - entityFlags[ entityCount ] = flags; + pEntList[entityCount] = pEntity; + entityFlags[entityCount] = flags; entityCount++; if (entityCount > MAX_ENTITY) @@ -2070,6 +2040,11 @@ void CTriggerGravity::GravityTouch(CBaseEntity *pOther) pOther->pev->gravity = pev->gravity; } +TYPEDESCRIPTION CTriggerChangeTarget::m_SaveData[] = +{ + DEFINE_FIELD(CTriggerChangeTarget, m_iszNewTarget, FIELD_STRING), +}; + LINK_ENTITY_TO_CLASS(trigger_changetarget, CTriggerChangeTarget, CCSTriggerChangeTarget) IMPLEMENT_SAVERESTORE(CTriggerChangeTarget, CBaseDelay) @@ -2106,6 +2081,24 @@ void CTriggerChangeTarget::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, US } } +// Global Savedata for changelevel friction modifier +TYPEDESCRIPTION CTriggerCamera::m_SaveData[] = +{ + DEFINE_FIELD(CTriggerCamera, m_hPlayer, FIELD_EHANDLE), + DEFINE_FIELD(CTriggerCamera, m_hTarget, FIELD_EHANDLE), + DEFINE_FIELD(CTriggerCamera, m_pentPath, FIELD_CLASSPTR), + DEFINE_FIELD(CTriggerCamera, m_sPath, FIELD_STRING), + DEFINE_FIELD(CTriggerCamera, m_flWait, FIELD_FLOAT), + DEFINE_FIELD(CTriggerCamera, m_flReturnTime, FIELD_TIME), + DEFINE_FIELD(CTriggerCamera, m_flStopTime, FIELD_TIME), + DEFINE_FIELD(CTriggerCamera, m_moveDistance, FIELD_FLOAT), + DEFINE_FIELD(CTriggerCamera, m_targetSpeed, FIELD_FLOAT), + DEFINE_FIELD(CTriggerCamera, m_initialSpeed, FIELD_FLOAT), + DEFINE_FIELD(CTriggerCamera, m_acceleration, FIELD_FLOAT), + DEFINE_FIELD(CTriggerCamera, m_deceleration, FIELD_FLOAT), + DEFINE_FIELD(CTriggerCamera, m_state, FIELD_INTEGER), +}; + LINK_ENTITY_TO_CLASS(trigger_camera, CTriggerCamera, CCSTriggerCamera) IMPLEMENT_SAVERESTORE(CTriggerCamera, CBaseDelay) diff --git a/regamedll/dlls/triggers.h b/regamedll/dlls/triggers.h index f62e3b1d..dfbfa30b 100644 --- a/regamedll/dlls/triggers.h +++ b/regamedll/dlls/triggers.h @@ -41,7 +41,7 @@ public: public: void EXPORT ChangeFriction(CBaseEntity *pOther); - static TYPEDESCRIPTION IMPL(m_SaveData)[1]; + static TYPEDESCRIPTION m_SaveData[]; float m_frictionFraction; }; @@ -67,7 +67,7 @@ public: #endif public: - static TYPEDESCRIPTION IMPL(m_SaveData)[2]; + static TYPEDESCRIPTION m_SaveData[]; int m_globalstate; USE_TYPE m_triggerType; @@ -86,7 +86,7 @@ public: virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[1]; + static TYPEDESCRIPTION m_SaveData[]; USE_TYPE m_triggerType; }; @@ -142,7 +142,7 @@ private: CMultiManager *Clone(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[5]; + static TYPEDESCRIPTION m_SaveData[]; int m_cTargets; int m_index; @@ -355,7 +355,7 @@ public: static int InTransitionVolume(CBaseEntity *pEntity, char *pVolumeName); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[4]; + static TYPEDESCRIPTION m_SaveData[]; char m_szMapName[MAX_MAPNAME_LENGHT]; // next map char m_szLandmarkName[MAX_MAPNAME_LENGHT]; // landmark on next map @@ -480,7 +480,7 @@ public: virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[1]; + static TYPEDESCRIPTION m_SaveData[]; private: int m_iszNewTarget; @@ -504,7 +504,7 @@ public: void EXPORT FollowTarget(); void Move(); - static TYPEDESCRIPTION IMPL(m_SaveData)[13]; + static TYPEDESCRIPTION m_SaveData[]; EntityHandle m_hPlayer; EntityHandle m_hTarget; diff --git a/regamedll/dlls/tutor.cpp b/regamedll/dlls/tutor.cpp index e17b18c4..bf75bc7e 100644 --- a/regamedll/dlls/tutor.cpp +++ b/regamedll/dlls/tutor.cpp @@ -1,27 +1,20 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL +cvar_t cv_tutor_message_repeats = { "_tutor_message_repeats", "5", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_tutor_debug_level = { "_tutor_debug_level", "0", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_tutor_view_distance = { "_tutor_view_distance", "1000", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_tutor_viewable_check_interval = { "_tutor_bomb_viewable_check_interval", "0.5", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_tutor_look_distance = { "_tutor_look_distance", "200", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_tutor_look_angle = { "_tutor_look_angle", "10", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_tutor_examine_time = { "_tutor_examine_time", "0.5", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_tutor_message_minimum_display_time = { "_tutor_message_minimum_display_time", "1", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_tutor_message_character_display_time_coefficient = { "_tutor_message_character_display_time_coefficient", "0.07", FCVAR_SERVER, 0.0f, nullptr }; +cvar_t cv_tutor_hint_interval_time = { "_tutor_hint_interval_time", "10.0", FCVAR_SERVER, 0.0f, nullptr }; bool s_tutorDisabledThisGame = false; float s_nextCvarCheckTime = 0.0f; -cvar_t cv_tutor_message_repeats = { "_tutor_message_repeats", "5", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_tutor_debug_level = { "_tutor_debug_level", "0", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_tutor_view_distance = { "_tutor_view_distance", "1000", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_tutor_viewable_check_interval = { "_tutor_bomb_viewable_check_interval", "0.5", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_tutor_look_distance = { "_tutor_look_distance", "200", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_tutor_look_angle = { "_tutor_look_angle", "10", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_tutor_examine_time = { "_tutor_examine_time", "0.5", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_tutor_message_minimum_display_time = { "_tutor_message_minimum_display_time", "1", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_tutor_message_character_display_time_coefficient = { "_tutor_message_character_display_time_coefficient", "0.07", FCVAR_SERVER, 0.0f, nullptr }; -cvar_t cv_tutor_hint_interval_time = { "_tutor_hint_interval_time", "10.0", FCVAR_SERVER, 0.0f, nullptr }; - -#endif - -void InstallTutor(bool start) +void InstallTutor(bool bCreate) { if (TheTutor) { @@ -29,7 +22,7 @@ void InstallTutor(bool start) TheTutor = nullptr; } - if (start) + if (bCreate) { TheTutor = new CCSTutor; } diff --git a/regamedll/dlls/tutor.h b/regamedll/dlls/tutor.h index e474555a..4a5c14bd 100644 --- a/regamedll/dlls/tutor.h +++ b/regamedll/dlls/tutor.h @@ -39,6 +39,6 @@ extern cvar_t cv_tutor_message_minimum_display_time; extern cvar_t cv_tutor_message_character_display_time_coefficient; extern cvar_t cv_tutor_hint_interval_time; -void InstallTutor(bool start); +void InstallTutor(bool bCreate); void Tutor_RegisterCVars(); void MonitorTutorStatus(); diff --git a/regamedll/dlls/tutor_base_states.cpp b/regamedll/dlls/tutor_base_states.cpp index d5cd6c0e..205bdc7a 100644 --- a/regamedll/dlls/tutor_base_states.cpp +++ b/regamedll/dlls/tutor_base_states.cpp @@ -20,6 +20,30 @@ TutorStateType CBaseTutorStateSystem::GetCurrentStateType() const return TUTORSTATE_UNDEFINED; } +const char *CBaseTutorState::m_TutorStateStrings[] = +{ + "#Cstrike_TutorState_Undefined", // TUTORSTATE_UNDEFINED + "#Cstrike_TutorState_Looking_For_Hostage", // TUTORSTATE_LOOKING_FOR_HOSTAGE + "#Cstrike_TutorState_Escorting_Hostage", // TUTORSTATE_ESCORTING_HOSTAGE + "#Cstrike_TutorState_Following_Hostage_Escort", // TUTORSTATE_FOLLOWING_HOSTAGE_ESCORT + "#Cstrike_TutorState_Moving_To_Bombsite", // TUTORSTATE_MOVING_TO_BOMBSITE, + "#Cstrike_TutorState_Looking_For_Bomb_Carrier", // TUTORSTATE_LOOKING_FOR_BOMB_CARRIER + "#Cstrike_TutorState_Guarding_Loose_Bomb", // TUTORSTATE_GUARDING_LOOSE_BOMB + "#Cstrike_TutorState_Defusing_Bomb", // TUTORSTATE_DEFUSING_BOMB + "#Cstrike_TutorState_Guarding_Hostage", // TUTORSTATE_GUARDING_HOSTAGE + "#Cstrike_TutorState_Moving_To_Intercept_Enemy", // TUTORSTATE_MOVING_TO_INTERCEPT_ENEMY + "#Cstrike_TutorState_Looking_For_Hostage_Escort", // TUTORSTATE_LOOKING_FOR_HOSTAGE_ESCORT + "#Cstrike_TutorState_Attacking_Hostage_Escort", // TUTORSTATE_ATTACKING_HOSTAGE_ESCORT + "#Cstrike_TutorState_Escorting_Bomb_Carrier", // TUTORSTATE_ESCORTING_BOMB_CARRIER + "#Cstrike_TutorState_Moving_To_Bomb_Site", // TUTORSTATE_MOVING_TO_BOMB_SITE + "#Cstrike_TutorState_Planting_Bomb", // TUTORSTATE_PLANTING_BOMB + "#Cstrike_TutorState_Guarding_Bomb", // TUTORSTATE_GUARDING_BOMB + "#Cstrike_TutorState_Looking_For_Loose_Bomb", // TUTORSTATE_LOOKING_FOR_LOOSE_BOMB + "#Cstrike_TutorState_Running_Away_From_Ticking_Bomb", // TUTORSTATE_RUNNING_AWAY_FROM_TICKING_BOMB + "#Cstrike_TutorState_Buy_Time", // TUTORSTATE_BUYTIME + "#Cstrike_TutorState_Waiting_For_Start" // TUTORSTATE_WAITING_FOR_START +}; + CBaseTutorState::CBaseTutorState() { m_type = TUTORSTATE_UNDEFINED; diff --git a/regamedll/dlls/tutor_base_states.h b/regamedll/dlls/tutor_base_states.h index c87a66d0..9a52f69b 100644 --- a/regamedll/dlls/tutor_base_states.h +++ b/regamedll/dlls/tutor_base_states.h @@ -66,6 +66,7 @@ public: TutorStateType GetType() const; protected: + static const char *m_TutorStateStrings[]; TutorStateType m_type; }; diff --git a/regamedll/dlls/tutor_cs_states.cpp b/regamedll/dlls/tutor_cs_states.cpp index 4bb9cc73..bb81b985 100644 --- a/regamedll/dlls/tutor_cs_states.cpp +++ b/regamedll/dlls/tutor_cs_states.cpp @@ -1,36 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - -const char *g_TutorStateStrings[] = -{ - "#Cstrike_TutorState_Undefined", // TUTORSTATE_UNDEFINED - "#Cstrike_TutorState_Looking_For_Hostage", // TUTORSTATE_LOOKING_FOR_HOSTAGE - "#Cstrike_TutorState_Escorting_Hostage", // TUTORSTATE_ESCORTING_HOSTAGE - "#Cstrike_TutorState_Following_Hostage_Escort", // TUTORSTATE_FOLLOWING_HOSTAGE_ESCORT - "#Cstrike_TutorState_Moving_To_Bombsite", // TUTORSTATE_MOVING_TO_BOMBSITE, - "#Cstrike_TutorState_Looking_For_Bomb_Carrier", // TUTORSTATE_LOOKING_FOR_BOMB_CARRIER - "#Cstrike_TutorState_Guarding_Loose_Bomb", // TUTORSTATE_GUARDING_LOOSE_BOMB - "#Cstrike_TutorState_Defusing_Bomb", // TUTORSTATE_DEFUSING_BOMB - "#Cstrike_TutorState_Guarding_Hostage", // TUTORSTATE_GUARDING_HOSTAGE - "#Cstrike_TutorState_Moving_To_Intercept_Enemy", // TUTORSTATE_MOVING_TO_INTERCEPT_ENEMY - "#Cstrike_TutorState_Looking_For_Hostage_Escort", // TUTORSTATE_LOOKING_FOR_HOSTAGE_ESCORT - "#Cstrike_TutorState_Attacking_Hostage_Escort", // TUTORSTATE_ATTACKING_HOSTAGE_ESCORT - "#Cstrike_TutorState_Escorting_Bomb_Carrier", // TUTORSTATE_ESCORTING_BOMB_CARRIER - "#Cstrike_TutorState_Moving_To_Bomb_Site", // TUTORSTATE_MOVING_TO_BOMB_SITE - "#Cstrike_TutorState_Planting_Bomb", // TUTORSTATE_PLANTING_BOMB - "#Cstrike_TutorState_Guarding_Bomb", // TUTORSTATE_GUARDING_BOMB - "#Cstrike_TutorState_Looking_For_Loose_Bomb", // TUTORSTATE_LOOKING_FOR_LOOSE_BOMB - "#Cstrike_TutorState_Running_Away_From_Ticking_Bomb", // TUTORSTATE_RUNNING_AWAY_FROM_TICKING_BOMB - "#Cstrike_TutorState_Buy_Time", // TUTORSTATE_BUYTIME - "#Cstrike_TutorState_Waiting_For_Start" // TUTORSTATE_WAITING_FOR_START -}; - -#endif - CCSTutorStateSystem::CCSTutorStateSystem() { m_currentState = new CCSTutorUndefinedState; @@ -160,7 +129,7 @@ const char *CCSTutorWaitingForStartState::GetStateString() } #endif - return g_TutorStateStrings[m_type]; + return m_TutorStateStrings[m_type]; } TutorStateType CCSTutorWaitingForStartState::HandlePlayerSpawned(CBaseEntity *entity, CBaseEntity *other) @@ -212,7 +181,7 @@ const char *CCSTutorBuyMenuState::GetStateString() } #endif - return g_TutorStateStrings[m_type]; + return m_TutorStateStrings[m_type]; } TutorStateType CCSTutorBuyMenuState::HandleRoundStart(CBaseEntity *entity, CBaseEntity *other) diff --git a/regamedll/dlls/tutor_cs_tutor.cpp b/regamedll/dlls/tutor_cs_tutor.cpp index a1d3b112..c239d3a5 100644 --- a/regamedll/dlls/tutor_cs_tutor.cpp +++ b/regamedll/dlls/tutor_cs_tutor.cpp @@ -1,11 +1,6 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - -const char *TutorIdentifierList[] = +const char *CCSTutor::m_TutorIdentifierList[] = { "YOU_FIRED_A_SHOT", "YOU_SHOULD_RELOAD", @@ -159,8 +154,6 @@ const char *TutorIdentifierList[] = "INGAME_HINT_3" }; -#endif // HOOK_GAMEDLL - CCSTutor::CCSTutor() { m_stateSystem = new CCSTutorStateSystem; @@ -2423,7 +2416,7 @@ TutorMessage *CCSTutor::GetTutorMessageDefinition(int messageID) if (messageID < 0 || messageID >= TUTOR_NUM_MESSAGES) return nullptr; - TutorMessageMapIter iter = m_messageMap.find(TutorIdentifierList[messageID]); + TutorMessageMapIter iter = m_messageMap.find(m_TutorIdentifierList[messageID]); if (iter != m_messageMap.end()) { return (*iter).second; diff --git a/regamedll/dlls/tutor_cs_tutor.h b/regamedll/dlls/tutor_cs_tutor.h index b9217bab..2349a0cc 100644 --- a/regamedll/dlls/tutor_cs_tutor.h +++ b/regamedll/dlls/tutor_cs_tutor.h @@ -258,7 +258,7 @@ struct ClientCorpseStruct int m_team; }; -typedef std::STD_VECTOR ClientCorpseList; +typedef std::vector ClientCorpseList; typedef ClientCorpseList::iterator ClientCorpseListIter; class CCSTutor: public CBaseTutor @@ -389,6 +389,8 @@ public: void ConstructRecentDeathsList(TeamName team, char *buf, int buflen, TutorMessageEvent *event); private: + static const char *m_TutorIdentifierList[]; + float m_nextViewableCheckTime; TutorMessageMap m_messageMap; TutorMessageID m_currentlyShownMessageID; diff --git a/regamedll/dlls/util.cpp b/regamedll/dlls/util.cpp index c2965cf0..ecd6f6dd 100644 --- a/regamedll/dlls/util.cpp +++ b/regamedll/dlls/util.cpp @@ -3,11 +3,6 @@ unsigned int glSeed; CUtlVector stringsHashTable; -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - unsigned int seed_table[256] = { 28985U, 27138U, 26457U, 9451U, 17764U, 10909U, 28790U, 8716U, 6361U, 4853U, 17798U, 21977U, 19643U, 20662U, 10834U, 20103, @@ -28,103 +23,11 @@ unsigned int seed_table[256] = 25678U, 18555U, 13256U, 23316U, 22407U, 16727U, 991U, 9236U, 5373U, 29402U, 6117U, 15241U, 27715U, 19291U, 19888U, 19847U }; -TYPEDESCRIPTION gEntvarsDescription[86] = -{ - DEFINE_ENTITY_FIELD(classname, FIELD_STRING), - DEFINE_ENTITY_GLOBAL_FIELD(globalname, FIELD_STRING), - DEFINE_ENTITY_FIELD(origin, FIELD_POSITION_VECTOR), - DEFINE_ENTITY_FIELD(oldorigin, FIELD_POSITION_VECTOR), - DEFINE_ENTITY_FIELD(velocity, FIELD_VECTOR), - DEFINE_ENTITY_FIELD(basevelocity, FIELD_VECTOR), - DEFINE_ENTITY_FIELD(movedir, FIELD_VECTOR), - DEFINE_ENTITY_FIELD(angles, FIELD_VECTOR), - DEFINE_ENTITY_FIELD(avelocity, FIELD_VECTOR), - DEFINE_ENTITY_FIELD(punchangle, FIELD_VECTOR), - DEFINE_ENTITY_FIELD(v_angle, FIELD_VECTOR), - DEFINE_ENTITY_FIELD(fixangle, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(idealpitch, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(pitch_speed, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(ideal_yaw, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(yaw_speed, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(modelindex, FIELD_INTEGER), - DEFINE_ENTITY_GLOBAL_FIELD(model, FIELD_MODELNAME), - DEFINE_ENTITY_FIELD(viewmodel, FIELD_MODELNAME), - DEFINE_ENTITY_FIELD(weaponmodel, FIELD_MODELNAME), - DEFINE_ENTITY_FIELD(absmin, FIELD_POSITION_VECTOR), - DEFINE_ENTITY_FIELD(absmax, FIELD_POSITION_VECTOR), - DEFINE_ENTITY_GLOBAL_FIELD(mins, FIELD_VECTOR), - DEFINE_ENTITY_GLOBAL_FIELD(maxs, FIELD_VECTOR), - DEFINE_ENTITY_GLOBAL_FIELD(size, FIELD_VECTOR), - DEFINE_ENTITY_FIELD(ltime, FIELD_TIME), - DEFINE_ENTITY_FIELD(nextthink, FIELD_TIME), - DEFINE_ENTITY_FIELD(solid, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(movetype, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(skin, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(body, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(effects, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(gravity, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(friction, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(light_level, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(frame, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(scale, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(sequence, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(animtime, FIELD_TIME), - DEFINE_ENTITY_FIELD(framerate, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(controller, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(blending, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(rendermode, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(renderamt, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(rendercolor, FIELD_VECTOR), - DEFINE_ENTITY_FIELD(renderfx, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(health, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(frags, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(weapons, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(takedamage, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(deadflag, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(view_ofs, FIELD_VECTOR), - DEFINE_ENTITY_FIELD(button, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(impulse, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(chain, FIELD_EDICT), - DEFINE_ENTITY_FIELD(dmg_inflictor, FIELD_EDICT), - DEFINE_ENTITY_FIELD(enemy, FIELD_EDICT), - DEFINE_ENTITY_FIELD(aiment, FIELD_EDICT), - DEFINE_ENTITY_FIELD(owner, FIELD_EDICT), - DEFINE_ENTITY_FIELD(groundentity, FIELD_EDICT), - DEFINE_ENTITY_FIELD(spawnflags, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(flags, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(colormap, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(team, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(max_health, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(teleport_time, FIELD_TIME), - DEFINE_ENTITY_FIELD(armortype, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(armorvalue, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(waterlevel, FIELD_INTEGER), - DEFINE_ENTITY_FIELD(watertype, FIELD_INTEGER), - DEFINE_ENTITY_GLOBAL_FIELD(target, FIELD_STRING), - DEFINE_ENTITY_GLOBAL_FIELD(targetname, FIELD_STRING), - DEFINE_ENTITY_FIELD(netname, FIELD_STRING), - DEFINE_ENTITY_FIELD(message, FIELD_STRING), - DEFINE_ENTITY_FIELD(dmg_take, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(dmg_save, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(dmg, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(dmgtime, FIELD_TIME), - DEFINE_ENTITY_FIELD(noise, FIELD_SOUNDNAME), - DEFINE_ENTITY_FIELD(noise1, FIELD_SOUNDNAME), - DEFINE_ENTITY_FIELD(noise2, FIELD_SOUNDNAME), - DEFINE_ENTITY_FIELD(noise3, FIELD_SOUNDNAME), - DEFINE_ENTITY_FIELD(speed, FIELD_FLOAT), - DEFINE_ENTITY_FIELD(air_finished, FIELD_TIME), - DEFINE_ENTITY_FIELD(pain_finished, FIELD_TIME), - DEFINE_ENTITY_FIELD(radsuit_finished, FIELD_TIME), -}; + int g_groupmask = 0; int g_groupop = 0; -const int gSizes[18] = { 4, 4, 4, 4, 4, 4, 4, 12, 12, 4, 4, 4, 4, 2, 1, 4, 4, 4 }; - -#endif // HOOK_GAMEDLL - float UTIL_WeaponTimeBase() { #ifdef CLIENT_WEAPONS @@ -423,7 +326,7 @@ CBaseEntity *EXT_FUNC UTIL_FindEntityByString(CBaseEntity *pStartEntity, const c hash = CaseInsensitiveHash(szValue, stringsHashTable.Count()); count = stringsHashTable.Count(); - item = &stringsHashTable[ hash ]; + item = &stringsHashTable[hash]; if (!item->pev) { @@ -437,7 +340,7 @@ CBaseEntity *EXT_FUNC UTIL_FindEntityByString(CBaseEntity *pStartEntity, const c break; hash = (hash + 1) % count; - item = &stringsHashTable[ hash ]; + item = &stringsHashTable[hash]; } if (!item->pev) @@ -463,13 +366,13 @@ CBaseEntity *EXT_FUNC UTIL_FindEntityByString(CBaseEntity *pStartEntity, const c if (item->pevIndex == startEntityIndex) { - stringsHashTable[ hash ].lastHash = nullptr; + stringsHashTable[hash].lastHash = nullptr; return nullptr; } } } - stringsHashTable[ hash ].lastHash = item; + stringsHashTable[hash].lastHash = item; pentEntity = ENT(item->pev); } else @@ -914,7 +817,7 @@ void UTIL_ShowMessageArgs(const char *pString, CBaseEntity *pPlayer, CUtlVector< } else { - MESSAGE_BEGIN(MSG_ONE, gmsgHudText, nullptr, pPlayer->pev); + MESSAGE_BEGIN(MSG_ONE, gmsgHudTextPro, nullptr, pPlayer->pev); WRITE_STRING(pString); WRITE_BYTE(isHint); MESSAGE_END(); @@ -926,7 +829,7 @@ void UTIL_ShowMessage(const char *pString, CBaseEntity *pEntity, bool isHint) if (!pEntity || !pEntity->IsNetClient()) return; - MESSAGE_BEGIN(MSG_ONE, gmsgHudText, nullptr, pEntity->edict()); + MESSAGE_BEGIN(MSG_ONE, gmsgHudTextPro, nullptr, pEntity->edict()); WRITE_STRING(pString); WRITE_BYTE(int(isHint)); MESSAGE_END(); @@ -1175,7 +1078,7 @@ void UTIL_BloodDrips(const Vector &origin, const Vector &direction, int color, i WRITE_SHORT(g_sModelIndexBloodSpray); WRITE_SHORT(g_sModelIndexBloodDrop); WRITE_BYTE(color); - WRITE_BYTE(Q_min(Q_max(3, amount / 10), 16)); + WRITE_BYTE(clamp(amount / 10, 3, 16)); MESSAGE_END(); } @@ -1653,764 +1556,6 @@ NOXREF float UTIL_DotPoints(const Vector &vecSrc, const Vector &vecCheck, const return DotProduct(vec2LOS, (vecDir.Make2D())); } -CSaveRestoreBuffer::CSaveRestoreBuffer() -{ - m_pdata = nullptr; -} - -CSaveRestoreBuffer::CSaveRestoreBuffer(SAVERESTOREDATA *pdata) -{ - m_pdata = pdata; -} - -CSaveRestoreBuffer::~CSaveRestoreBuffer() -{ - ; -} - -int CSaveRestoreBuffer::EntityIndex(CBaseEntity *pEntity) -{ - if (!pEntity) - return -1; - - return EntityIndex(pEntity->pev); -} - -int CSaveRestoreBuffer::EntityIndex(entvars_t *pevLookup) -{ - if (!pevLookup) - return -1; - - return EntityIndex(ENT(pevLookup)); -} - -int CSaveRestoreBuffer::EntityIndex(EOFFSET eoLookup) -{ - return EntityIndex(ENT(eoLookup)); -} - -int CSaveRestoreBuffer::EntityIndex(edict_t *pentLookup) -{ - if (!m_pdata || !pentLookup) - return -1; - - for (int i = 0; i < m_pdata->tableCount; i++) - { - ENTITYTABLE *pTable = &m_pdata->pTable[i]; - if (pTable->pent == pentLookup) - return i; - } - - return -1; -} - -edict_t *CSaveRestoreBuffer::EntityFromIndex(int entityIndex) -{ - if (!m_pdata || entityIndex < 0) - return nullptr; - - for (int i = 0; i < m_pdata->tableCount; i++) - { - ENTITYTABLE *pTable = &m_pdata->pTable[i]; - if (pTable->id == entityIndex) - return pTable->pent; - } - - return nullptr; -} - -int CSaveRestoreBuffer::EntityFlagsSet(int entityIndex, int flags) -{ - if (!m_pdata || entityIndex < 0) - return 0; - - if (!m_pdata || entityIndex < 0 || entityIndex > m_pdata->tableCount) - return 0; - - m_pdata->pTable[ entityIndex ].flags |= flags; - return m_pdata->pTable[ entityIndex ].flags; -} - -void CSaveRestoreBuffer::BufferRewind(int size) -{ - if (!m_pdata) - return; - - if (m_pdata->size < size) - size = m_pdata->size; - - m_pdata->pCurrentData -= size; - m_pdata->size -= size; -} - -#ifndef _WIN32 -extern "C" -{ - inline unsigned _rotr(unsigned val, int shift) - { - register unsigned lobit; - register unsigned num = val; - - shift &= 0x1f; - - while (shift--) - { - lobit = num & 1; - num >>= 1; - if (lobit) - num |= 0x80000000; - } - - return num; - } -} -#endif // _WIN32 - -unsigned int CSaveRestoreBuffer::HashString(const char *pszToken) -{ - unsigned int hash = 0; - while (*pszToken) - hash = _rotr(hash, 4) ^ *pszToken++; - - return hash; -} - -unsigned short CSaveRestoreBuffer::TokenHash(const char *pszToken) -{ - unsigned short hash = (unsigned short)(HashString(pszToken) % (unsigned)m_pdata->tokenCount); - for (int i = 0; i < m_pdata->tokenCount; i++) - { - int index = hash + i; - if (index >= m_pdata->tokenCount) - index -= m_pdata->tokenCount; - - if (!m_pdata->pTokens[index] || !Q_strcmp(pszToken, m_pdata->pTokens[index])) - { - m_pdata->pTokens[index] = (char *)pszToken; - return index; - } - } - - ALERT(at_error, "CSaveRestoreBuffer :: TokenHash() is COMPLETELY FULL!"); - return 0; -} - -void CSave::WriteData(const char *pname, int size, const char *pdata) -{ - BufferField(pname, size, pdata); -} - -NOXREF void CSave::WriteShort(const char *pname, const short *data, int count) -{ - BufferField(pname, sizeof(short) * count, (const char *)data); -} - -void CSave::WriteInt(const char *pname, const int *data, int count) -{ - BufferField(pname, sizeof(int) * count, (const char *)data); -} - -void CSave::WriteFloat(const char *pname, const float *data, int count) -{ - BufferField(pname, sizeof(float) * count, (const char *)data); -} - -void CSave::WriteTime(const char *pname, const float *data, int count) -{ - int i; - BufferHeader(pname, sizeof(float) * count); - - for (i = 0; i < count; i++) - { - float tmp = data[0]; - - if (m_pdata) - tmp -= m_pdata->time; - - BufferData((const char *)&tmp, sizeof(float)); - data++; - } -} - -NOXREF void CSave::WriteString(const char *pname, const char *pdata) -{ - BufferField(pname, Q_strlen(pdata) + 1, pdata); -} - -void CSave::WriteString(const char *pname, const int *stringId, int count) -{ - int i; - int size = 0; - - for (i = 0; i < count; i++) - size += Q_strlen(STRING(stringId[i])) + 1; - - BufferHeader(pname, size); - for (i = 0; i < count; i++) - { - const char *pString = STRING(stringId[i]); - BufferData(pString, Q_strlen(pString) + 1); - } -} - -void CSave::WriteVector(const char *pname, const Vector &value) -{ - WriteVector(pname, &value.x, 1); -} - -void CSave::WriteVector(const char *pname, const float *value, int count) -{ - BufferHeader(pname, sizeof(float) * 3 * count); - BufferData((const char *)value, sizeof(float) * 3 * count); -} - -NOXREF void CSave::WritePositionVector(const char *pname, const Vector &value) -{ - if (m_pdata && m_pdata->fUseLandmark) - { - Vector tmp = value - m_pdata->vecLandmarkOffset; - WriteVector(pname, tmp); - } - WriteVector(pname, value); -} - -void CSave::WritePositionVector(const char *pname, const float *value, int count) -{ - BufferHeader(pname, sizeof(float) * 3 * count); - for (int i = 0; i < count; i++) - { - Vector tmp(value[0], value[1], value[2]); - - if (m_pdata && m_pdata->fUseLandmark) - tmp = tmp - m_pdata->vecLandmarkOffset; - - BufferData((const char *)&tmp.x, sizeof(float) * 3); - value += 3; - } -} - -void CSave::WriteFunction(const char *pname, void **data, int count) -{ - const char *functionName = NAME_FOR_FUNCTION((uint32)*data); - - if (functionName) - BufferField(pname, Q_strlen(functionName) + 1, functionName); - else - ALERT(at_error, "Invalid function pointer in entity!"); -} - -void EntvarsKeyvalue(entvars_t *pev, KeyValueData *pkvd) -{ - for (int i = 0; i < ARRAYSIZE(gEntvarsDescription); i++) - { - TYPEDESCRIPTION *pField = &gEntvarsDescription[i]; - - if (!Q_stricmp(pField->fieldName, pkvd->szKeyName)) - { - switch (pField->fieldType) - { - case FIELD_STRING: - case FIELD_MODELNAME: - case FIELD_SOUNDNAME: - *(string_t *)((char *)pev + pField->fieldOffset) = ALLOC_STRING(pkvd->szValue); - break; - case FIELD_FLOAT: - case FIELD_TIME: - *(float *)((char *)pev + pField->fieldOffset) = Q_atof(pkvd->szValue); - break; - case FIELD_INTEGER: - *(string_t *)((char *)pev + pField->fieldOffset) = Q_atoi(pkvd->szValue); - break; - case FIELD_VECTOR: - case FIELD_POSITION_VECTOR: - UTIL_StringToVector((float *)((char *)pev + pField->fieldOffset), pkvd->szValue); - break; - - default: - case FIELD_EVARS: - case FIELD_CLASSPTR: - case FIELD_EDICT: - case FIELD_ENTITY: - case FIELD_POINTER: - ALERT(at_error, "Bad field in entity!!\n"); - break; - } - pkvd->fHandled = TRUE; - break; - } - } -} - -int CSave::WriteEntVars(const char *pname, entvars_t *pev) -{ - return WriteFields(pname, pev, gEntvarsDescription, ARRAYSIZE(gEntvarsDescription)); -} - -int CSave::WriteFields(const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount) -{ - int i; - int emptyCount = 0; - - for (i = 0; i < fieldCount; i++) - { - void *pOutputData = ((char *)pBaseData + pFields[i].fieldOffset); - if (DataEmpty((const char *)pOutputData, pFields[i].fieldSize * gSizes[pFields[i].fieldType])) - emptyCount++; - } - - int entityArray[ MAX_ENTITY_ARRAY ]; - int actualCount = fieldCount - emptyCount; - - WriteInt(pname, &actualCount, 1); - for (i = 0; i < fieldCount; i++) - { - TYPEDESCRIPTION *pTest = &pFields[i]; - void *pOutputData = ((char *)pBaseData + pTest->fieldOffset); - - if (DataEmpty((const char *)pOutputData, pTest->fieldSize * gSizes[pTest->fieldType])) - continue; - - switch (pTest->fieldType) - { - case FIELD_FLOAT: - WriteFloat(pTest->fieldName, (float *)pOutputData, pTest->fieldSize); - break; - - case FIELD_TIME: - WriteTime(pTest->fieldName, (float *)pOutputData, pTest->fieldSize); - break; - - case FIELD_MODELNAME: - case FIELD_SOUNDNAME: - case FIELD_STRING: - WriteString(pTest->fieldName, (int *)pOutputData, pTest->fieldSize); - break; - - case FIELD_CLASSPTR: - case FIELD_EVARS: - case FIELD_EDICT: - case FIELD_ENTITY: - case FIELD_EHANDLE: - { - if (pTest->fieldSize > MAX_ENTITY_ARRAY) - ALERT(at_error, "Can't save more than %d entities in an array!!!\n", MAX_ENTITY_ARRAY); - - for (int j = 0; j < pTest->fieldSize; j++) - { - switch (pTest->fieldType) - { - case FIELD_EVARS: - entityArray[j] = EntityIndex(((entvars_t **)pOutputData)[j]); - break; - case FIELD_CLASSPTR: - entityArray[j] = EntityIndex(((CBaseEntity **)pOutputData)[j]); - break; - case FIELD_EDICT: - entityArray[j] = EntityIndex(((edict_t **)pOutputData)[j]); - break; - case FIELD_ENTITY: - entityArray[j] = EntityIndex(((EOFFSET *)pOutputData)[j]); - break; - case FIELD_EHANDLE: - entityArray[j] = EntityIndex((CBaseEntity *)(((EHANDLE *)pOutputData)[j])); - break; - default: - break; - } - } - WriteInt(pTest->fieldName, entityArray, pTest->fieldSize); - break; - } - case FIELD_POSITION_VECTOR: - WritePositionVector(pTest->fieldName, (float *)pOutputData, pTest->fieldSize); - break; - case FIELD_VECTOR: - WriteVector(pTest->fieldName, (float *)pOutputData, pTest->fieldSize); - break; - case FIELD_BOOLEAN: - case FIELD_INTEGER: - WriteInt(pTest->fieldName, (int *)pOutputData, pTest->fieldSize); - break; - case FIELD_SHORT: - WriteData(pTest->fieldName, 2 * pTest->fieldSize, ((char *)pOutputData)); - break; - case FIELD_CHARACTER: - WriteData(pTest->fieldName, pTest->fieldSize, ((char *)pOutputData)); - break; - case FIELD_POINTER: - WriteInt(pTest->fieldName, (int *)(char *)pOutputData, pTest->fieldSize); - break; - case FIELD_FUNCTION: - WriteFunction(pTest->fieldName, &pOutputData, pTest->fieldSize); - break; - - default: ALERT(at_error, "Bad field type\n"); - } - } - - return 1; -} - -NOXREF void CSave::BufferString(char *pdata, int len) -{ - char c = 0; - BufferData(pdata, len); - BufferData(&c, 1); -} - -int CSave::DataEmpty(const char *pdata, int size) -{ - for (int i = 0; i < size; i++) - { - if (pdata[i]) - return 0; - } - - return 1; -} - -void CSave::BufferField(const char *pname, int size, const char *pdata) -{ - BufferHeader(pname, size); - BufferData(pdata, size); -} - -void CSave::BufferHeader(const char *pname, int size) -{ - short hashvalue = TokenHash(pname); - if (size > (1 << (sizeof(short) * 8))) - ALERT(at_error, "CSave :: BufferHeader() size parameter exceeds 'short'!"); - - BufferData((const char *)&size, sizeof(short)); - BufferData((const char *)&hashvalue, sizeof(short)); -} - -void CSave::BufferData(const char *pdata, int size) -{ - if (!m_pdata) - return; - - if (m_pdata->size + size > m_pdata->bufferSize) - { - ALERT(at_error, "Save/Restore overflow!"); - m_pdata->size = m_pdata->bufferSize; - return; - } - - Q_memcpy(m_pdata->pCurrentData, pdata, size); - m_pdata->pCurrentData += size; - m_pdata->size += size; -} - -int CRestore::ReadField(void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount, int startField, int size, char *pName, void *pData) -{ - float time = 0.0f; - Vector position(0, 0, 0); - - if (m_pdata) - { - time = m_pdata->time; - if (m_pdata->fUseLandmark) - position = m_pdata->vecLandmarkOffset; - } - for (int i = 0; i < fieldCount; i++) - { - int fieldNumber = (i + startField) % fieldCount; - TYPEDESCRIPTION *pTest = &pFields[fieldNumber]; - - if (!Q_stricmp(pTest->fieldName, pName)) - { - if (!m_global || !(pTest->flags & FTYPEDESC_GLOBAL)) - { - for (int j = 0; j < pTest->fieldSize; j++) - { - void *pOutputData = ((char *)pBaseData + pTest->fieldOffset + (j * gSizes[pTest->fieldType])); - void *pInputData = (char *)pData + j * gSizes[pTest->fieldType]; - - switch (pTest->fieldType) - { - case FIELD_TIME: - { - float timeData = *(float *)pInputData; - timeData += time; - *((float *)pOutputData) = timeData; - break; - } - case FIELD_FLOAT: *((float *)pOutputData) = *(float *)pInputData; break; - case FIELD_MODELNAME: - case FIELD_SOUNDNAME: - case FIELD_STRING: - { - char *pString = (char *)pData; - for (int stringCount = 0; stringCount < j; stringCount++) - { - while (*pString) - pString++; - - pString++; - } - - pInputData = pString; - if (!Q_strlen((char *)pInputData)) - *((int *)pOutputData) = 0; - else - { - int string = ALLOC_STRING((char *)pInputData); - *((int *)pOutputData) = string; - - if (!FStringNull(string) && m_precache) - { - if (pTest->fieldType == FIELD_MODELNAME) - PRECACHE_MODEL((char *)STRING(string)); - else if (pTest->fieldType == FIELD_SOUNDNAME) - PRECACHE_SOUND((char *)STRING(string)); - } - } - break; - } - case FIELD_EVARS: - { - int entityIndex = *(int *)pInputData; - edict_t *pent = EntityFromIndex(entityIndex); - - if (pent) - *((entvars_t **)pOutputData) = VARS(pent); - else - *((entvars_t **)pOutputData) = nullptr; - - break; - } - case FIELD_CLASSPTR: - { - int entityIndex = *(int *)pInputData; - edict_t *pent = EntityFromIndex(entityIndex); - - if (pent) - *((CBaseEntity **)pOutputData) = CBaseEntity::Instance(pent); - else - *((CBaseEntity **)pOutputData) = nullptr; - - break; - } - case FIELD_EDICT: - { - int entityIndex = *(int *)pInputData; - edict_t *pent = EntityFromIndex(entityIndex); - *((edict_t **)pOutputData) = pent; - break; - } - case FIELD_EHANDLE: - { - pOutputData = (char *)pOutputData + j * (sizeof(EHANDLE) - gSizes[pTest->fieldType]); - int entityIndex = *(int *)pInputData; - edict_t *pent = EntityFromIndex(entityIndex); - - if (pent) - *((EHANDLE *)pOutputData) = CBaseEntity::Instance(pent); - else - *((EHANDLE *)pOutputData) = nullptr; - - break; - } - case FIELD_ENTITY: - { - int entityIndex = *(int *)pInputData; - edict_t *pent = EntityFromIndex(entityIndex); - - if (pent) - *((EOFFSET *)pOutputData) = OFFSET(pent); - else - *((EOFFSET *)pOutputData) = 0; - - break; - } - case FIELD_VECTOR: - { - ((float *)pOutputData)[0] = ((float *)pInputData)[0]; - ((float *)pOutputData)[1] = ((float *)pInputData)[1]; - ((float *)pOutputData)[2] = ((float *)pInputData)[2]; - break; - } - case FIELD_POSITION_VECTOR: - { - ((float *)pOutputData)[0] = ((float *)pInputData)[0] + position.x; - ((float *)pOutputData)[1] = ((float *)pInputData)[1] + position.y; - ((float *)pOutputData)[2] = ((float *)pInputData)[2] + position.z; - break; - } - case FIELD_BOOLEAN: - case FIELD_INTEGER: - *((int *)pOutputData) = *(int *)pInputData; - break; - case FIELD_SHORT: - *((short *)pOutputData) = *(short *)pInputData; - break; - case FIELD_CHARACTER: - *((char *)pOutputData) = *(char *)pInputData; - break; - case FIELD_POINTER: - *((int *)pOutputData) = *(int *)pInputData; - break; - case FIELD_FUNCTION: - { - if (!Q_strlen((char *)pInputData)) - *((int *)pOutputData) = 0; - else - *((int *)pOutputData) = FUNCTION_FROM_NAME((char *)pInputData); - - break; - } - default: - ALERT(at_error, "Bad field type\n"); - break; - } - } - } - return fieldNumber; - } - } - return -1; -} - -int CRestore::ReadEntVars(const char *pname, entvars_t *pev) -{ - return ReadFields(pname, pev, gEntvarsDescription, ARRAYSIZE(gEntvarsDescription)); -} - -int CRestore::ReadFields(const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount) -{ - unsigned short i = ReadShort(); - unsigned short token = ReadShort(); - - if (token != TokenHash(pname)) - { - BufferRewind(2 * sizeof(short)); - return 0; - } - - int fileCount = ReadInt(); - int lastField = 0; - - for (i = 0; i < fieldCount; i++) - { - if (!m_global || !(pFields[i].flags & FTYPEDESC_GLOBAL)) - Q_memset(((char *)pBaseData + pFields[i].fieldOffset), 0, pFields[i].fieldSize * gSizes[pFields[i].fieldType]); - } - for (i = 0; i < fileCount; i++) - { - HEADER header; - BufferReadHeader(&header); - - lastField = ReadField(pBaseData, pFields, fieldCount, lastField, header.size, m_pdata->pTokens[header.token], header.pData); - lastField++; - } - - return 1; -} - -void CRestore::BufferReadHeader(HEADER *pheader) -{ - pheader->size = ReadShort(); - pheader->token = ReadShort(); - pheader->pData = BufferPointer(); - - BufferSkipBytes(pheader->size); -} - -short CRestore::ReadShort() -{ - short tmp = 0; - BufferReadBytes((char *)&tmp, sizeof(short)); - return tmp; -} - -int CRestore::ReadInt() -{ - int tmp = 0; - BufferReadBytes((char *)&tmp, sizeof(int)); - return tmp; -} - -NOXREF int CRestore::ReadNamedInt(const char *pName) -{ - HEADER header; - BufferReadHeader(&header); - return ((int *)header.pData)[0]; -} - -NOXREF char *CRestore::ReadNamedString(const char *pName) -{ - HEADER header; - BufferReadHeader(&header); - return (char *)header.pData; -} - -char *CRestore::BufferPointer() -{ - if (!m_pdata) - return nullptr; - - return m_pdata->pCurrentData; -} - -void CRestore::BufferReadBytes(char *pOutput, int size) -{ - if (!m_pdata || Empty()) - return; - - if ((m_pdata->size + size) > m_pdata->bufferSize) - { - ALERT(at_error, "Restore overflow!"); - m_pdata->size = m_pdata->bufferSize; - return; - } - - if (pOutput) - Q_memcpy(pOutput, m_pdata->pCurrentData, size); - - m_pdata->pCurrentData += size; - m_pdata->size += size; -} - -void CRestore::BufferSkipBytes(int bytes) -{ - BufferReadBytes(nullptr, bytes); -} - -NOXREF int CRestore::BufferSkipZString() -{ - if (!m_pdata) - return 0; - - int maxLen = m_pdata->bufferSize - m_pdata->size; - int len = 0; - char *pszSearch = m_pdata->pCurrentData; - - while (*pszSearch++ && len < maxLen) - len++; - - len++; - BufferSkipBytes(len); - return len; -} - -NOXREF int CRestore::BufferCheckZString(const char *string) -{ - if (!m_pdata) - return 0; - - int maxLen = m_pdata->bufferSize - m_pdata->size; - int len = Q_strlen(string); - - if (len <= maxLen) - { - if (!Q_strncmp(string, m_pdata->pCurrentData, len)) - return 1; - } - - return 0; -} - char UTIL_TextureHit(TraceResult *ptr, Vector vecSrc, Vector vecEnd) { char chTextureType; diff --git a/regamedll/dlls/vehicle.cpp b/regamedll/dlls/vehicle.cpp index e2649ebe..417f158e 100644 --- a/regamedll/dlls/vehicle.cpp +++ b/regamedll/dlls/vehicle.cpp @@ -1,10 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - TYPEDESCRIPTION CFuncVehicle::m_SaveData[] = { DEFINE_FIELD(CFuncVehicle, m_ppath, FIELD_CLASSPTR), @@ -21,8 +16,6 @@ TYPEDESCRIPTION CFuncVehicle::m_SaveData[] = DEFINE_FIELD(CFuncVehicle, m_oldSpeed, FIELD_FLOAT), }; -#endif - IMPLEMENT_SAVERESTORE(CFuncVehicle, CBaseEntity) LINK_ENTITY_TO_CLASS(func_vehicle, CFuncVehicle, CCSFuncVehicle) diff --git a/regamedll/dlls/weapons.cpp b/regamedll/dlls/weapons.cpp index 8e986e3c..3d53ef39 100644 --- a/regamedll/dlls/weapons.cpp +++ b/regamedll/dlls/weapons.cpp @@ -1,51 +1,13 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - -ItemInfo CBasePlayerItem::m_ItemInfoArray[MAX_WEAPONS]; -AmmoInfo CBasePlayerItem::m_AmmoInfoArray[MAX_AMMO_SLOTS]; - -TYPEDESCRIPTION CBasePlayerItem::m_SaveData[] = -{ - DEFINE_FIELD(CBasePlayerItem, m_pPlayer, FIELD_CLASSPTR), - DEFINE_FIELD(CBasePlayerItem, m_pNext, FIELD_CLASSPTR), - DEFINE_FIELD(CBasePlayerItem, m_iId, FIELD_INTEGER), -}; - -TYPEDESCRIPTION CBasePlayerWeapon::m_SaveData[] = -{ - DEFINE_FIELD(CBasePlayerWeapon, m_flNextPrimaryAttack, FIELD_TIME), - DEFINE_FIELD(CBasePlayerWeapon, m_flNextSecondaryAttack, FIELD_TIME), - DEFINE_FIELD(CBasePlayerWeapon, m_flTimeWeaponIdle, FIELD_TIME), - DEFINE_FIELD(CBasePlayerWeapon, m_iPrimaryAmmoType, FIELD_INTEGER), - DEFINE_FIELD(CBasePlayerWeapon, m_iSecondaryAmmoType, FIELD_INTEGER), - DEFINE_FIELD(CBasePlayerWeapon, m_iClip, FIELD_INTEGER), - DEFINE_FIELD(CBasePlayerWeapon, m_iDefaultAmmo, FIELD_INTEGER), -}; - -TYPEDESCRIPTION CWeaponBox::m_SaveData[] = -{ - DEFINE_ARRAY(CWeaponBox, m_rgAmmo, FIELD_INTEGER, MAX_AMMO_SLOTS), - DEFINE_ARRAY(CWeaponBox, m_rgiszAmmo, FIELD_STRING, MAX_AMMO_SLOTS), - DEFINE_ARRAY(CWeaponBox, m_rgpPlayerItems, FIELD_CLASSPTR, MAX_ITEM_TYPES), - DEFINE_FIELD(CWeaponBox, m_cAmmoTypes, FIELD_INTEGER), -}; - -const char *g_pModelNameLaser = "sprites/laserbeam.spr"; - -#endif - short g_sModelIndexLaser; // holds the index for the laser beam -short g_sModelIndexLaserDot; // holds the index for the laser beam dot -short g_sModelIndexFireball; // holds the index for the fireball +short g_sModelIndexLaserDot; // holds the index for the laser beam dot +short g_sModelIndexFireball; // holds the index for the fireball short g_sModelIndexSmoke; // holds the index for the smoke cloud -short g_sModelIndexWExplosion; // holds the index for the underwater explosion +short g_sModelIndexWExplosion; // holds the index for the underwater explosion short g_sModelIndexBubbles; // holds the index for the bubbles model -short g_sModelIndexBloodDrop; // holds the sprite index for the initial blood -short g_sModelIndexBloodSpray; // holds the sprite index for splattered blood +short g_sModelIndexBloodDrop; // holds the sprite index for the initial blood +short g_sModelIndexBloodSpray; // holds the sprite index for splattered blood short g_sModelIndexSmokePuff; short g_sModelIndexFireball2; short g_sModelIndexFireball3; @@ -60,14 +22,13 @@ int giAmmoIndex; MULTIDAMAGE gMultiDamage; -// MaxAmmoCarry - pass in a name and this function will tell -// you the maximum amount of that type of ammunition that a -// player can carry. +// Pass in a name and this function will tell +// you the maximum amount of that type of ammunition that a player can carry. int MaxAmmoCarry(const char *szName) { for (int i = 0; i < MAX_WEAPONS; i++) { - ItemInfo *info = &IMPL_CLASS(CBasePlayerItem, m_ItemInfoArray)[i]; + ItemInfo *info = &CBasePlayerItem::m_ItemInfoArray[i]; if (info->pszAmmo1 && !Q_stricmp(szName, info->pszAmmo1)) { return info->iMaxAmmo1; @@ -85,24 +46,20 @@ int MaxAmmoCarry(const char *szName) int MaxAmmoCarry(WeaponIdType weaponId) { - return IMPL_CLASS(CBasePlayerItem, m_ItemInfoArray)[weaponId].iMaxAmmo1; + return CBasePlayerItem::m_ItemInfoArray[weaponId].iMaxAmmo1; } -// ClearMultiDamage - resets the global multi damage accumulator +// Resets the global multi damage accumulator void ClearMultiDamage() { - gMultiDamage.pEntity = NULL; + gMultiDamage.pEntity = nullptr; gMultiDamage.amount = 0; gMultiDamage.type = 0; } -// ApplyMultiDamage - inflicts contents of global multi damage register on gMultiDamage.pEntity +// Inflicts contents of global multi damage register on gMultiDamage.pEntity void ApplyMultiDamage(entvars_t *pevInflictor, entvars_t *pevAttacker) { - //Vector vecSpot1;//where blood comes from - //Vector vecDir;//direction blood should go - //TraceResult tr; - if (!gMultiDamage.pEntity) return; @@ -187,7 +144,7 @@ void EjectBrass(const Vector &vecOrigin, const Vector &vecLeft, const Vector &ve NOXREF void EjectBrass2(const Vector &vecOrigin, const Vector &vecVelocity, float rotation, int model, int soundtype, entvars_t *pev) { - MESSAGE_BEGIN(MSG_ONE, SVC_TEMPENTITY, NULL, pev); + MESSAGE_BEGIN(MSG_ONE, SVC_TEMPENTITY, nullptr, pev); WRITE_BYTE(TE_MODEL); WRITE_COORD(vecOrigin.x); WRITE_COORD(vecOrigin.y); @@ -231,10 +188,10 @@ void AddAmmoNameToAmmoRegistry(const char *szAmmoname) // make sure it's not already in the registry for (int i = 0; i < MAX_AMMO_SLOTS; i++) { - if (!IMPL_CLASS(CBasePlayerItem, m_AmmoInfoArray)[i].pszName) + if (!CBasePlayerItem::m_AmmoInfoArray[i].pszName) continue; - if (!Q_stricmp(IMPL_CLASS(CBasePlayerItem, m_AmmoInfoArray)[i].pszName, szAmmoname)) + if (!Q_stricmp(CBasePlayerItem::m_AmmoInfoArray[i].pszName, szAmmoname)) { // ammo already in registry, just quite return; @@ -260,91 +217,53 @@ void AddAmmoNameToAmmoRegistry(const char *szAmmoname) } #endif - IMPL_CLASS(CBasePlayerItem, m_AmmoInfoArray)[giAmmoIndex].pszName = szAmmoname; + CBasePlayerItem::m_AmmoInfoArray[giAmmoIndex].pszName = szAmmoname; - // yes, this info is redundant - IMPL_CLASS(CBasePlayerItem, m_AmmoInfoArray)[giAmmoIndex].iId = giAmmoIndex; + // Yes, this info is redundant + CBasePlayerItem::m_AmmoInfoArray[giAmmoIndex].iId = giAmmoIndex; } // Precaches the weapon and queues the weapon info for sending to clients void UTIL_PrecacheOtherWeapon(const char *szClassname) { - edict_t *pent = CREATE_NAMED_ENTITY(MAKE_STRING(szClassname)); - - if (FNullEnt(pent)) + edict_t *pEdict = CREATE_NAMED_ENTITY(MAKE_STRING(szClassname)); + if (FNullEnt(pEdict)) { - ALERT(at_console, "NULL Ent in UTIL_PrecacheOtherWeapon\n"); + ALERT(at_console, "NULL Ent in UTIL_PrecacheOtherWeapon classname `%s`\n", szClassname); return; } - CBaseEntity *pEntity = CBaseEntity::Instance(VARS(pent)); - if (pEntity) + CBasePlayerItem *pItem = GET_PRIVATE(pEdict); + if (pItem) { - ItemInfo II; - Q_memset(&II, 0, sizeof(II)); + ItemInfo info; + Q_memset(&info, 0, sizeof(info)); - pEntity->Precache(); - if (((CBasePlayerItem *)pEntity)->GetItemInfo(&II)) + pItem->Precache(); + if (pItem->GetItemInfo(&info)) { - IMPL_CLASS(CBasePlayerItem, m_ItemInfoArray)[ II.iId ] = II; + CBasePlayerItem::m_ItemInfoArray[info.iId] = info; - if (II.pszAmmo1 != NULL && *II.pszAmmo1 != '\0') + if (info.pszAmmo1 && info.pszAmmo1[0] != '\0') { - AddAmmoNameToAmmoRegistry(II.pszAmmo1); + AddAmmoNameToAmmoRegistry(info.pszAmmo1); } - if (II.pszAmmo2 != NULL && *II.pszAmmo2 != '\0') + if (info.pszAmmo2 && info.pszAmmo2[0] != '\0') { - AddAmmoNameToAmmoRegistry(II.pszAmmo2); + AddAmmoNameToAmmoRegistry(info.pszAmmo2); } } } - REMOVE_ENTITY(pent); + REMOVE_ENTITY(pEdict); } -NOXREF void UTIL_PrecacheOtherWeapon2(const char *szClassname) -{ - edict_t *pent = CREATE_NAMED_ENTITY(MAKE_STRING(szClassname)); - - if (FNullEnt(pent)) - { - ALERT(at_console, "NULL Ent in UTIL_PrecacheOtherWeapon\n"); - return; - } - - CBaseEntity *pEntity = CBaseEntity::Instance(VARS(pent)); - - if (pEntity != NULL) - { - ItemInfo II; - Q_memset(&II, 0, sizeof(II)); - - pEntity->Precache(); - if (((CBasePlayerItem *)pEntity)->GetItemInfo(&II)) - { - IMPL_CLASS(CBasePlayerItem, m_ItemInfoArray)[ II.iId ] = II; - - if (II.pszAmmo1 != NULL && *II.pszAmmo1 != '\0') - { - AddAmmoNameToAmmoRegistry(II.pszAmmo1); - } - - if (II.pszAmmo2 != NULL && *II.pszAmmo2 != '\0') - { - AddAmmoNameToAmmoRegistry(II.pszAmmo2); - } - } - } - - REMOVE_ENTITY(pent); -} - -// called by worldspawn +// Called by worldspawn void W_Precache() { - Q_memset(IMPL_CLASS(CBasePlayerItem, m_ItemInfoArray), 0, sizeof(IMPL_CLASS(CBasePlayerItem, m_ItemInfoArray))); - Q_memset(IMPL_CLASS(CBasePlayerItem, m_AmmoInfoArray), 0, sizeof(IMPL_CLASS(CBasePlayerItem, m_AmmoInfoArray))); + Q_memset(CBasePlayerItem::m_ItemInfoArray, 0, sizeof(CBasePlayerItem::m_ItemInfoArray)); + Q_memset(CBasePlayerItem::m_AmmoInfoArray, 0, sizeof(CBasePlayerItem::m_AmmoInfoArray)); giAmmoIndex = 0; @@ -427,33 +346,33 @@ void W_Precache() UTIL_PrecacheOther("weaponbox"); } - g_sModelIndexFireball = PRECACHE_MODEL("sprites/zerogxplode.spr"); // fireball - g_sModelIndexWExplosion = PRECACHE_MODEL("sprites/WXplo1.spr"); // underwater fireball - g_sModelIndexSmoke = PRECACHE_MODEL("sprites/steam1.spr"); // smoke - g_sModelIndexBubbles = PRECACHE_MODEL("sprites/bubble.spr"); // bubbles - g_sModelIndexBloodSpray = PRECACHE_MODEL("sprites/bloodspray.spr"); // initial blood - g_sModelIndexBloodDrop = PRECACHE_MODEL("sprites/blood.spr"); // splattered blood + g_sModelIndexFireball = PRECACHE_MODEL("sprites/zerogxplode.spr"); // fireball + g_sModelIndexWExplosion = PRECACHE_MODEL("sprites/WXplo1.spr"); // underwater fireball + g_sModelIndexSmoke = PRECACHE_MODEL("sprites/steam1.spr"); // smoke + g_sModelIndexBubbles = PRECACHE_MODEL("sprites/bubble.spr"); // bubbles + g_sModelIndexBloodSpray = PRECACHE_MODEL("sprites/bloodspray.spr"); // initial blood + g_sModelIndexBloodDrop = PRECACHE_MODEL("sprites/blood.spr"); // splattered blood - g_sModelIndexSmokePuff = PRECACHE_MODEL("sprites/smokepuff.spr"); - g_sModelIndexFireball2 = PRECACHE_MODEL("sprites/eexplo.spr"); - g_sModelIndexFireball3 = PRECACHE_MODEL("sprites/fexplo.spr"); - g_sModelIndexFireball4 = PRECACHE_MODEL("sprites/fexplo1.spr"); - g_sModelIndexRadio = PRECACHE_MODEL("sprites/radio.spr"); + g_sModelIndexSmokePuff = PRECACHE_MODEL("sprites/smokepuff.spr"); + g_sModelIndexFireball2 = PRECACHE_MODEL("sprites/eexplo.spr"); + g_sModelIndexFireball3 = PRECACHE_MODEL("sprites/fexplo.spr"); + g_sModelIndexFireball4 = PRECACHE_MODEL("sprites/fexplo1.spr"); + g_sModelIndexRadio = PRECACHE_MODEL("sprites/radio.spr"); - g_sModelIndexCTGhost = PRECACHE_MODEL("sprites/b-tele1.spr"); - g_sModelIndexTGhost = PRECACHE_MODEL("sprites/c-tele1.spr"); - g_sModelIndexC4Glow = PRECACHE_MODEL("sprites/ledglow.spr"); + g_sModelIndexCTGhost = PRECACHE_MODEL("sprites/b-tele1.spr"); + g_sModelIndexTGhost = PRECACHE_MODEL("sprites/c-tele1.spr"); + g_sModelIndexC4Glow = PRECACHE_MODEL("sprites/ledglow.spr"); - g_sModelIndexLaser = PRECACHE_MODEL((char *)g_pModelNameLaser); - g_sModelIndexLaserDot = PRECACHE_MODEL("sprites/laserdot.spr"); + g_sModelIndexLaser = PRECACHE_MODEL("sprites/laserbeam.spr"); + g_sModelIndexLaserDot = PRECACHE_MODEL("sprites/laserdot.spr"); // used by explosions PRECACHE_MODEL("models/grenade.mdl"); PRECACHE_MODEL("sprites/explode1.spr"); - PRECACHE_SOUND("weapons/debris1.wav"); // explosion aftermaths - PRECACHE_SOUND("weapons/debris2.wav"); // explosion aftermaths - PRECACHE_SOUND("weapons/debris3.wav"); // explosion aftermaths + PRECACHE_SOUND("weapons/debris1.wav"); // explosion aftermaths + PRECACHE_SOUND("weapons/debris2.wav"); // explosion aftermaths + PRECACHE_SOUND("weapons/debris3.wav"); // explosion aftermaths PRECACHE_SOUND("weapons/grenade_hit1.wav"); // grenade PRECACHE_SOUND("weapons/grenade_hit2.wav"); // grenade @@ -466,7 +385,29 @@ void W_Precache() PRECACHE_SOUND("weapons/generic_reload.wav"); } +ItemInfo CBasePlayerItem::m_ItemInfoArray[MAX_WEAPONS]; +AmmoInfo CBasePlayerItem::m_AmmoInfoArray[MAX_AMMO_SLOTS]; + +TYPEDESCRIPTION CBasePlayerItem::m_SaveData[] = +{ + DEFINE_FIELD(CBasePlayerItem, m_pPlayer, FIELD_CLASSPTR), + DEFINE_FIELD(CBasePlayerItem, m_pNext, FIELD_CLASSPTR), + DEFINE_FIELD(CBasePlayerItem, m_iId, FIELD_INTEGER), +}; + IMPLEMENT_SAVERESTORE(CBasePlayerItem, CBaseAnimating) + +TYPEDESCRIPTION CBasePlayerWeapon::m_SaveData[] = +{ + DEFINE_FIELD(CBasePlayerWeapon, m_flNextPrimaryAttack, FIELD_TIME), + DEFINE_FIELD(CBasePlayerWeapon, m_flNextSecondaryAttack, FIELD_TIME), + DEFINE_FIELD(CBasePlayerWeapon, m_flTimeWeaponIdle, FIELD_TIME), + DEFINE_FIELD(CBasePlayerWeapon, m_iPrimaryAmmoType, FIELD_INTEGER), + DEFINE_FIELD(CBasePlayerWeapon, m_iSecondaryAmmoType, FIELD_INTEGER), + DEFINE_FIELD(CBasePlayerWeapon, m_iClip, FIELD_INTEGER), + DEFINE_FIELD(CBasePlayerWeapon, m_iDefaultAmmo, FIELD_INTEGER), +}; + IMPLEMENT_SAVERESTORE(CBasePlayerWeapon, CBasePlayerItem) void CBasePlayerItem::SetObjectCollisionBox() @@ -507,8 +448,7 @@ void CBasePlayerItem::FallThink() // don't clatter if the gun is waiting to respawn (if it's waiting, it is invisible!) if (!FNullEnt(pev->owner)) { - int pitch = RANDOM_LONG(0, 29) + 95; - EMIT_SOUND_DYN(ENT(pev), CHAN_VOICE, "items/weapondrop1.wav", VOL_NORM, ATTN_NORM, 0, pitch); + EMIT_SOUND_DYN(ENT(pev), CHAN_VOICE, "items/weapondrop1.wav", VOL_NORM, ATTN_NORM, 0, RANDOM_LONG(0, 29) + 95); } // lie flat @@ -544,14 +484,16 @@ void CBasePlayerItem::Materialize() { if (!CanDrop()) { - SetTouch(NULL); + SetTouch(nullptr); } SetThink(&CBaseEntity::SUB_Remove); pev->nextthink = gpGlobals->time + 1.0f; } else - SetThink(NULL); + { + SetThink(nullptr); + } } // AttemptToMaterialize - the item is trying to rematerialize, @@ -588,15 +530,15 @@ CBaseEntity *CBasePlayerItem::Respawn() { // make a copy of this weapon that is invisible and inaccessible to players (no touch function). The weapon spawn/respawn code // will decide when to make the weapon visible and touchable. - CBaseEntity *pNewWeapon = CBaseEntity::Create((char *)STRING(pev->classname), g_pGameRules->VecWeaponRespawnSpot(this), pev->angles, pev->owner); + CBaseEntity *pNewWeapon = CBaseEntity::Create(pev->classname, g_pGameRules->VecWeaponRespawnSpot(this), pev->angles, pev->owner); - if (pNewWeapon != NULL) + if (pNewWeapon) { // invisible for now pNewWeapon->pev->effects |= EF_NODRAW; // no touch - pNewWeapon->SetTouch(NULL); + pNewWeapon->SetTouch(nullptr); pNewWeapon->SetThink(&CBasePlayerItem::AttemptToMaterialize); DROP_TO_FLOOR(ENT(pev)); @@ -650,7 +592,7 @@ void CBasePlayerItem::DefaultTouch(CBaseEntity *pOther) { AttachToPlayer(pPlayer); #ifndef REGAMEDLL_FIXES - SetThink(NULL); + SetThink(nullptr); #endif EMIT_SOUND(ENT(pPlayer->pev), CHAN_ITEM, "items/gunpickup2.wav", VOL_NORM, ATTN_NORM); } @@ -1071,7 +1013,7 @@ void CBasePlayerWeapon::ItemPostFrame() void CBasePlayerItem::DestroyItem() { - if (m_pPlayer != NULL) + if (m_pPlayer) { // if attached to a player, remove. m_pPlayer->RemovePlayerItem(this); @@ -1084,7 +1026,7 @@ int CBasePlayerItem::AddToPlayer(CBasePlayer *pPlayer) { m_pPlayer = pPlayer; - MESSAGE_BEGIN(MSG_ONE, gmsgWeapPickup, NULL, pPlayer->pev); + MESSAGE_BEGIN(MSG_ONE, gmsgWeapPickup, nullptr, pPlayer->pev); WRITE_BYTE(m_iId); MESSAGE_END(); @@ -1093,14 +1035,14 @@ int CBasePlayerItem::AddToPlayer(CBasePlayer *pPlayer) void CBasePlayerItem::Drop() { - SetTouch(NULL); + SetTouch(nullptr); SetThink(&CBaseEntity::SUB_Remove); pev->nextthink = gpGlobals->time + 0.1f; } void CBasePlayerItem::Kill() { - SetTouch(NULL); + SetTouch(nullptr); SetThink(&CBaseEntity::SUB_Remove); pev->nextthink = gpGlobals->time + 0.1f; } @@ -1128,10 +1070,10 @@ void CBasePlayerItem::AttachToPlayer(CBasePlayer *pPlayer) #else // Remove think - prevents futher attempts to materialize pev->nextthink = 0; - SetThink(NULL); + SetThink(nullptr); #endif - SetTouch(NULL); + SetTouch(nullptr); } // CALLED THROUGH the newly-touched weapon's instance. The existing player weapon is pOriginal @@ -1194,7 +1136,7 @@ int CBasePlayerWeapon::UpdateClientData(CBasePlayer *pPlayer) if (bSend) { - MESSAGE_BEGIN(MSG_ONE, gmsgCurWeapon, NULL, pPlayer->pev); + MESSAGE_BEGIN(MSG_ONE, gmsgCurWeapon, nullptr, pPlayer->pev); WRITE_BYTE(state); WRITE_BYTE(m_iId); WRITE_BYTE(m_iClip); @@ -1222,9 +1164,9 @@ void CBasePlayerWeapon::SendWeaponAnim(int iAnim, int skiplocal) return; #endif - MESSAGE_BEGIN(MSG_ONE, SVC_WEAPONANIM, NULL, m_pPlayer->pev); - WRITE_BYTE(iAnim); // sequence number - WRITE_BYTE(pev->body); // weaponmodel bodygroup. + MESSAGE_BEGIN(MSG_ONE, SVC_WEAPONANIM, nullptr, m_pPlayer->pev); + WRITE_BYTE(iAnim); // sequence number + WRITE_BYTE(pev->body); // weaponmodel bodygroup. MESSAGE_END(); } @@ -1285,7 +1227,7 @@ BOOL CBasePlayerWeapon::IsUseable() { if (m_iClip <= 0) { - if (m_pPlayer->m_rgAmmo[ PrimaryAmmoIndex() ] <= 0 && iMaxAmmo1() != -1) + if (m_pPlayer->m_rgAmmo[PrimaryAmmoIndex()] <= 0 && iMaxAmmo1() != -1) { // clip is empty (or nonexistant) and the player has no more ammo of this type. return FALSE; @@ -1327,13 +1269,8 @@ BOOL CBasePlayerWeapon::DefaultDeploy(char *szViewModel, char *szWeaponModel, in void CBasePlayerWeapon::ReloadSound() { - Vector origin; - CBaseEntity *pPlayer = NULL; - float distance; - - m_pPlayer->pev->origin.CopyToArray(origin); - - while ((pPlayer = (CBasePlayer *)UTIL_FindEntityByClassname(pPlayer, "player")) != NULL) + CBasePlayer *pPlayer = nullptr; + while ((pPlayer = UTIL_FindEntityByClassname(pPlayer, "player"))) { if (pPlayer->IsDormant()) break; @@ -1341,11 +1278,10 @@ void CBasePlayerWeapon::ReloadSound() if (pPlayer == m_pPlayer) continue; - distance = (origin - pPlayer->pev->origin).Length(); - + float distance = (m_pPlayer->pev->origin - pPlayer->pev->origin).Length(); if (distance <= MAX_DIST_RELOAD_SOUND) { - MESSAGE_BEGIN(MSG_ONE, gmsgReloadSound, NULL, pPlayer->pev); + MESSAGE_BEGIN(MSG_ONE, gmsgReloadSound, nullptr, pPlayer->pev); WRITE_BYTE(int((1.0f - (distance / MAX_DIST_RELOAD_SOUND)) * 255.0f)); if (!Q_strcmp(STRING(pev->classname), "weapon_m3") || !Q_strcmp(STRING(pev->classname), "weapon_xm1014")) WRITE_BYTE(0); @@ -1432,22 +1368,21 @@ void CBasePlayerWeapon::Holster(int skiplocal) // the weapon clip comes along. int CBasePlayerWeapon::ExtractAmmo(CBasePlayerWeapon *pWeapon) { - int iReturn = 0; - - if (pszAmmo1() != NULL) + int res = 0; + if (pszAmmo1()) { // blindly call with m_iDefaultAmmo. It's either going to be a value or zero. If it is zero, // we only get the ammo in the weapon's clip, which is what we want. - iReturn = pWeapon->AddPrimaryAmmo(m_iDefaultAmmo, (char *)pszAmmo1(), iMaxClip(), iMaxAmmo1()); + res = pWeapon->AddPrimaryAmmo(m_iDefaultAmmo, (char *)pszAmmo1(), iMaxClip(), iMaxAmmo1()); m_iDefaultAmmo = 0; } - if (pszAmmo2() != NULL) + if (pszAmmo2()) { - iReturn = AddSecondaryAmmo(0, (char *)pszAmmo2(), iMaxAmmo2()); + res = AddSecondaryAmmo(0, (char *)pszAmmo2(), iMaxAmmo2()); } - return iReturn; + return res; } // called by the new item's class with the existing item as parameter @@ -1520,6 +1455,14 @@ float CBasePlayerWeapon::GetNextAttackDelay(float delay) return flNextAttack; } +TYPEDESCRIPTION CWeaponBox::m_SaveData[] = +{ + DEFINE_ARRAY(CWeaponBox, m_rgAmmo, FIELD_INTEGER, MAX_AMMO_SLOTS), + DEFINE_ARRAY(CWeaponBox, m_rgiszAmmo, FIELD_STRING, MAX_AMMO_SLOTS), + DEFINE_ARRAY(CWeaponBox, m_rgpPlayerItems, FIELD_CLASSPTR, MAX_ITEM_TYPES), + DEFINE_FIELD(CWeaponBox, m_cAmmoTypes, FIELD_INTEGER), +}; + LINK_ENTITY_TO_CLASS(weaponbox, CWeaponBox, CCSWeaponBox) IMPLEMENT_SAVERESTORE(CWeaponBox, CBaseEntity) @@ -1548,20 +1491,20 @@ void CWeaponBox::BombThink() if (!m_bIsBomb) return; - CBaseEntity *pEntity = NULL; - while ((pEntity = UTIL_FindEntityByClassname(pEntity, "player")) != NULL) + CBasePlayer *pPlayer = nullptr; + while ((pPlayer = UTIL_FindEntityByClassname(pPlayer, "player"))) { - if (FNullEnt(pEntity->edict())) + if (FNullEnt(pPlayer->edict())) break; - if (!pEntity->IsPlayer() || pEntity->IsDormant()) + if (!pPlayer->IsPlayer() || pPlayer->IsDormant()) continue; - CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pEntity->pev); + CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pPlayer->pev); if (pTempPlayer->pev->deadflag == DEAD_NO && pTempPlayer->m_iTeam == TERRORIST) { - MESSAGE_BEGIN(MSG_ONE, gmsgBombDrop, NULL, pTempPlayer->edict()); + MESSAGE_BEGIN(MSG_ONE, gmsgBombDrop, nullptr, pTempPlayer->edict()); WRITE_COORD(pev->origin.x); WRITE_COORD(pev->origin.y); WRITE_COORD(pev->origin.z); @@ -1586,18 +1529,13 @@ void CWeaponBox::Spawn() SET_MODEL(ENT(pev), "models/w_weaponbox.mdl"); } -// CWeaponBox - Kill - the think function that removes the -// box from the world. +// The think function that removes the box from the world. void CWeaponBox::Kill() { - CBasePlayerItem *pWeapon; - int i; - // destroy the weapons - for (i = 0; i < MAX_ITEM_TYPES; ++i) + for (int i = 0; i < MAX_ITEM_TYPES; i++) { - pWeapon = m_rgpPlayerItems[i]; - + CBasePlayerItem *pWeapon = m_rgpPlayerItems[i]; while (pWeapon) { pWeapon->SetThink(&CBaseEntity::SUB_Remove); @@ -1610,8 +1548,7 @@ void CWeaponBox::Kill() UTIL_Remove(this); } -// CWeaponBox - Touch: try to add my contents to the toucher -// if the toucher is a player. +// Try to add my contents to the toucher if the toucher is a player. void CWeaponBox::Touch(CBaseEntity *pOther) { if (!(pev->flags & FL_ONGROUND)) @@ -1644,7 +1581,7 @@ void CWeaponBox::Touch(CBaseEntity *pOther) // go through my weapons and try to give the usable ones to the player. // it's important the the player be given ammo first, so the weapons code doesn't refuse // to deploy a better weapon that the player may pick up because he has no ammo for it. - for (int i = 0; i < MAX_ITEM_TYPES; ++i) + for (int i = 0; i < MAX_ITEM_TYPES; i++) { if (!m_rgpPlayerItems[i]) continue; @@ -1655,7 +1592,7 @@ void CWeaponBox::Touch(CBaseEntity *pOther) while (pItem) { if ((pPlayer->HasShield() && pItem->m_iId == WEAPON_ELITE) - || (pPlayer->IsBot() && (TheCSBots() != NULL && !TheCSBots()->IsWeaponUseable(pItem)))) + || (pPlayer->IsBot() && (TheCSBots() != nullptr && !TheCSBots()->IsWeaponUseable(pItem)))) { return; } @@ -1723,14 +1660,14 @@ void CWeaponBox::Touch(CBaseEntity *pOther) ClientPrint(pTempPlayer->pev, HUD_PRINTCENTER, "#Game_bomb_pickup", STRING(pPlayer->pev->netname)); } - MESSAGE_BEGIN(MSG_ONE, gmsgBombPickup, NULL, pTempPlayer->pev); + MESSAGE_BEGIN(MSG_ONE, gmsgBombPickup, nullptr, pTempPlayer->pev); MESSAGE_END(); } } if (TheCSBots()) { - TheCSBots()->SetLooseBomb(NULL); + TheCSBots()->SetLooseBomb(nullptr); } if (TheBots) @@ -1853,12 +1790,12 @@ void CWeaponBox::Touch(CBaseEntity *pOther) if (bRemove) { - SetTouch(NULL); + SetTouch(nullptr); UTIL_Remove(this); } } -// CWeaponBox - PackWeapon: Add this weapon to the box +// Add this weapon to the box BOOL CWeaponBox::PackWeapon(CBasePlayerItem *pWeapon) { // is one of these weapons already packed in this box? @@ -1893,7 +1830,7 @@ BOOL CWeaponBox::PackWeapon(CBasePlayerItem *pWeapon) { // first weapon we have for this slot m_rgpPlayerItems[iWeaponSlot] = pWeapon; - pWeapon->m_pNext = NULL; + pWeapon->m_pNext = nullptr; } // never respawn @@ -1904,9 +1841,9 @@ BOOL CWeaponBox::PackWeapon(CBasePlayerItem *pWeapon) pWeapon->pev->modelindex = 0; pWeapon->pev->model = 0; pWeapon->pev->owner = ENT(pev); - pWeapon->SetThink(NULL); - pWeapon->SetTouch(NULL); - pWeapon->m_pPlayer = NULL; + pWeapon->SetThink(nullptr); + pWeapon->SetTouch(nullptr); + pWeapon->m_pPlayer = nullptr; return TRUE; } @@ -1933,7 +1870,7 @@ BOOL CWeaponBox::PackAmmo(string_t iszName, int iCount) int CWeaponBox::GiveAmmo(int iCount, char *szName, int iMax, int *pIndex) { int i; - for (i = 1; i < MAX_AMMO_SLOTS && !FStringNull(m_rgiszAmmo[i]); ++i) + for (i = 1; i < MAX_AMMO_SLOTS && !FStringNull(m_rgiszAmmo[i]); i++) { if (!Q_stricmp(szName, STRING(m_rgiszAmmo[i]))) { @@ -1966,16 +1903,13 @@ int CWeaponBox::GiveAmmo(int iCount, char *szName, int iMax, int *pIndex) return i; } -// CWeaponBox::HasWeapon - is a weapon of this type already -// packed in this box? +// Is a weapon of this type already packed in this box? BOOL CWeaponBox::HasWeapon(CBasePlayerItem *pCheckItem) { CBasePlayerItem *pItem = m_rgpPlayerItems[pCheckItem->iItemSlot()]; - - while (pItem != NULL) + while (pItem) { - if (FClassnameIs(pItem->pev, STRING(pCheckItem->pev->classname))) - { + if (FClassnameIs(pItem->pev, pCheckItem->pev->classname)) { return TRUE; } @@ -1985,12 +1919,11 @@ BOOL CWeaponBox::HasWeapon(CBasePlayerItem *pCheckItem) return FALSE; } -// CWeaponBox::IsEmpty - is there anything in this box? +// Is there anything in this box? BOOL CWeaponBox::IsEmpty() { int i; - - for (i = 0; i < MAX_ITEM_TYPES; ++i) + for (i = 0; i < MAX_ITEM_TYPES; i++) { if (m_rgpPlayerItems[i]) { @@ -1998,7 +1931,7 @@ BOOL CWeaponBox::IsEmpty() } } - for (i = 0; i < MAX_AMMO_SLOTS; ++i) + for (i = 0; i < MAX_AMMO_SLOTS; i++) { if (m_rgiszAmmo[i]) { @@ -2260,7 +2193,7 @@ void CArmoury::ArmouryTouch(CBaseEntity *pOther) // secondary weapons (pistols) else if (m_iCount > 0 && m_iItem >= ARMOURY_GLOCK18) { - if (p->m_rgpPlayerItems[ PISTOL_SLOT ]) + if (p->m_rgpPlayerItems[PISTOL_SLOT]) return; m_iCount--; @@ -2323,7 +2256,7 @@ void CArmoury::ArmouryTouch(CBaseEntity *pOther) #ifdef REGAMEDLL_ADD case ARMOURY_SHIELD: { - if (p->m_bHasPrimary || (p->m_rgpPlayerItems[ PISTOL_SLOT ] && p->GetItemById(WEAPON_ELITE))) + if (p->m_bHasPrimary || (p->m_rgpPlayerItems[PISTOL_SLOT] && p->GetItemById(WEAPON_ELITE))) return; p->GiveNamedItemEx("weapon_shield"); diff --git a/regamedll/dlls/weapons.h b/regamedll/dlls/weapons.h index b8ba8875..24952125 100644 --- a/regamedll/dlls/weapons.h +++ b/regamedll/dlls/weapons.h @@ -217,7 +217,7 @@ public: void EXPORT C4Think(); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[15]; + static TYPEDESCRIPTION m_SaveData[]; bool m_bStartDefuse; bool m_bIsC4; @@ -245,6 +245,7 @@ public: BOOL m_fRegisteredSound; }; +class CCSPlayerItem; class CBasePlayerItem: public CBaseAnimating { public: @@ -285,26 +286,48 @@ public: void CheckRespawn(); public: - inline int iItemPosition() const { return IMPL(m_ItemInfoArray)[m_iId].iPosition; } - inline const char *pszAmmo1() const { return IMPL(m_ItemInfoArray)[m_iId].pszAmmo1; } - inline int iMaxAmmo1() const { return IMPL(m_ItemInfoArray)[m_iId].iMaxAmmo1; } - inline const char *pszAmmo2() const { return IMPL(m_ItemInfoArray)[m_iId].pszAmmo2; } - inline int iMaxAmmo2() const { return IMPL(m_ItemInfoArray)[m_iId].iMaxAmmo2; } - inline const char *pszName() const { return IMPL(m_ItemInfoArray)[m_iId].pszName; } - inline int iMaxClip() const { return IMPL(m_ItemInfoArray)[m_iId].iMaxClip; } - inline int iWeight() const { return IMPL(m_ItemInfoArray)[m_iId].iWeight; } - inline int iFlags() const { return IMPL(m_ItemInfoArray)[m_iId].iFlags; } + +#ifdef REGAMEDLL_API + CCSPlayerItem *CSPlayerItem() const; + + int iPosition() const; + const char *pszAmmo1() const; + int iMaxAmmo1() const; + const char *pszAmmo2() const; + int iMaxAmmo2() const; + const char *pszName() const; + int iMaxClip() const; + int iWeight() const; + int iFlags() const; +#else + int iPosition() const { return m_ItemInfoArray[m_iId].iPosition; } + const char *pszAmmo1() const { return m_ItemInfoArray[m_iId].pszAmmo1; } + int iMaxAmmo1() const { return m_ItemInfoArray[m_iId].iMaxAmmo1; } + const char *pszAmmo2() const { return m_ItemInfoArray[m_iId].pszAmmo2; } + int iMaxAmmo2() const { return m_ItemInfoArray[m_iId].iMaxAmmo2; } + const char *pszName() const { return m_ItemInfoArray[m_iId].pszName; } + int iMaxClip() const { return m_ItemInfoArray[m_iId].iMaxClip; } + int iWeight() const { return m_ItemInfoArray[m_iId].iWeight; } + int iFlags() const { return m_ItemInfoArray[m_iId].iFlags; } +#endif public: - static TYPEDESCRIPTION IMPL(m_SaveData)[3]; - static ItemInfo IMPL(m_ItemInfoArray)[MAX_WEAPONS]; - static AmmoInfo IMPL(m_AmmoInfoArray)[MAX_AMMO_SLOTS]; + static TYPEDESCRIPTION m_SaveData[]; + static ItemInfo m_ItemInfoArray[MAX_WEAPONS]; + static AmmoInfo m_AmmoInfoArray[MAX_AMMO_SLOTS]; CBasePlayer *m_pPlayer; CBasePlayerItem *m_pNext; int m_iId; // WEAPON_??? }; +#ifdef REGAMEDLL_API +inline CCSPlayerItem *CBasePlayerItem::CSPlayerItem() const +{ + return reinterpret_cast(this->m_pEntity); +} +#endif + // inventory items that class CBasePlayerWeapon: public CBasePlayerItem { @@ -364,7 +387,7 @@ public: void InstantReload(bool bCanRefillBPAmmo = false); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[7]; + static TYPEDESCRIPTION m_SaveData[]; int m_iPlayEmptySound; int m_fFireOnEmpty; @@ -428,7 +451,7 @@ public: BOOL PackAmmo(string_t iszName, int iCount); public: - static TYPEDESCRIPTION IMPL(m_SaveData)[4]; + static TYPEDESCRIPTION m_SaveData[]; CBasePlayerItem *m_rgpPlayerItems[MAX_ITEM_TYPES]; string_t m_rgiszAmmo[MAX_AMMO_SLOTS]; @@ -1918,7 +1941,6 @@ public: }; extern short g_sModelIndexLaser; -extern const char *g_pModelNameLaser; extern short g_sModelIndexLaserDot; extern short g_sModelIndexFireball; @@ -1954,6 +1976,5 @@ void EjectBrass(const Vector &vecOrigin, const Vector &vecLeft, const Vector &ve void EjectBrass2(const Vector &vecOrigin, const Vector &vecVelocity, float rotation, int model, int soundtype, entvars_t *pev); void AddAmmoNameToAmmoRegistry(const char *szAmmoname); void UTIL_PrecacheOtherWeapon(const char *szClassname); -void UTIL_PrecacheOtherWeapon2(const char *szClassname); void W_Precache(); BOOL CanAttack(float attack_time, float curtime, BOOL isPredicted); diff --git a/regamedll/dlls/weapontype.cpp b/regamedll/dlls/weapontype.cpp index 4ceb1ed8..fe912912 100644 --- a/regamedll/dlls/weapontype.cpp +++ b/regamedll/dlls/weapontype.cpp @@ -1,10 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - WeaponStruct g_weaponStruct[MAX_WEAPONS] = { { 0, 0, 0, 0, 0 }, @@ -274,8 +269,6 @@ WeaponInfoStruct g_weaponInfo_default[] = #endif }; -#endif // HOOK_GAMEDLL - AmmoInfoStruct g_ammoInfo[14]; AmmoInfoStruct g_ammoInfo_default[] = { @@ -490,10 +483,8 @@ AmmoInfoStruct *GetAmmoInfo(AmmoType ammoID) void WeaponInfoReset() { -#ifndef HOOK_GAMEDLL Q_memcpy(g_weaponInfo, g_weaponInfo_default, sizeof(g_weaponInfo)); Q_memcpy(g_ammoInfo, g_ammoInfo_default, sizeof(g_ammoInfo)); -#endif } WeaponSlotInfo *GetWeaponSlot(WeaponIdType weaponID) diff --git a/regamedll/dlls/world.cpp b/regamedll/dlls/world.cpp index 2812c5d8..46f63f01 100644 --- a/regamedll/dlls/world.cpp +++ b/regamedll/dlls/world.cpp @@ -4,11 +4,6 @@ edict_t *g_pBodyQueueHead; CGlobalState gGlobalState; float g_flWeaponCheat; -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - DLL_DECALLIST gDecals[] = { DEFINE_DECAL("{shot1"), // DECAL_GUNSHOT1 @@ -55,20 +50,6 @@ DLL_DECALLIST gDecals[] = DEFINE_DECAL("{mommablob"), // DECAL_MOMMASPLAT // BM Mortar spray?? need decal*/ }; -TYPEDESCRIPTION CGlobalState::m_SaveData[] = -{ - DEFINE_FIELD(CGlobalState, m_listCount, FIELD_INTEGER) -}; - -TYPEDESCRIPTION gGlobalEntitySaveData[] = -{ - DEFINE_ARRAY(globalentity_t, name, FIELD_CHARACTER, 64), - DEFINE_ARRAY(globalentity_t, levelName, FIELD_CHARACTER, 32), - DEFINE_FIELD(globalentity_t, state, FIELD_INTEGER) -}; - -#endif // HOOK_GAMEDLL - char g_szMapBriefingText[512]; #define SF_DECAL_NOTINDEATHMATCH BIT(11) @@ -225,193 +206,6 @@ void ClearBodyQue() ; } -CGlobalState::CGlobalState() -{ - Reset(); -} - -void CGlobalState::Reset() -{ - m_pList = nullptr; - m_listCount = 0; -} - -globalentity_t *CGlobalState::Find(string_t globalname) -{ - if (!globalname) - return nullptr; - - globalentity_t *pTest = m_pList; - const char *pEntityName = STRING(globalname); - - while (pTest) - { - if (!Q_strcmp(pEntityName, pTest->name)) - break; - - pTest = pTest->pNext; - } - - return pTest; -} - -// This is available all the time now on impulse 104, remove later -void CGlobalState::DumpGlobals() -{ - static char *estates[] = { "Off", "On", "Dead" }; - globalentity_t *pTest; - - ALERT(at_console, "-- Globals --\n"); - pTest = m_pList; - - while (pTest) - { - ALERT(at_console, "%s: %s (%s)\n", pTest->name, pTest->levelName, estates[ pTest->state ]); - pTest = pTest->pNext; - } -} - -void CGlobalState::EntityAdd(string_t globalname, string_t mapName, GLOBALESTATE state) -{ - assert(!Find(globalname)); - - globalentity_t *pNewEntity = (globalentity_t *)calloc(sizeof(globalentity_t), 1); - assert(pNewEntity != nullptr); - - pNewEntity->pNext = m_pList; - m_pList = pNewEntity; - Q_strcpy(pNewEntity->name, STRING(globalname)); - Q_strcpy(pNewEntity->levelName, STRING(mapName)); - pNewEntity->state = state; - - m_listCount++; -} - -void CGlobalState::EntitySetState(string_t globalname, GLOBALESTATE state) -{ - globalentity_t *pEnt = Find(globalname); - if (pEnt) - { - pEnt->state = state; - } -} - -const globalentity_t *CGlobalState::EntityFromTable(string_t globalname) -{ - globalentity_t *pEnt = Find(globalname); - - return pEnt; -} - -GLOBALESTATE CGlobalState::EntityGetState(string_t globalname) -{ - globalentity_t *pEnt = Find(globalname); - if (pEnt) - { - return pEnt->state; - } - - return GLOBAL_OFF; -} - -int CGlobalState::Save(CSave &save) -{ - int i; - globalentity_t *pEntity; - - if (!save.WriteFields("GLOBAL", this, IMPL(m_SaveData), ARRAYSIZE(IMPL(m_SaveData)))) - { - return 0; - } - - pEntity = m_pList; - for (i = 0; i < m_listCount && pEntity; i++) - { - if (!save.WriteFields("GENT", pEntity, gGlobalEntitySaveData, ARRAYSIZE(gGlobalEntitySaveData))) - { - return 0; - } - - pEntity = pEntity->pNext; - } - - return 1; -} - -int CGlobalState::Restore(CRestore &restore) -{ - int i, listCount; - globalentity_t tmpEntity; - - ClearStates(); - - if (!restore.ReadFields("GLOBAL", this, IMPL(m_SaveData), ARRAYSIZE(IMPL(m_SaveData)))) - { - return 0; - } - - // Get new list count - listCount = m_listCount; - - // Clear loaded data - m_listCount = 0; - - for (i = 0; i < listCount; ++i) - { - if (!restore.ReadFields("GENT", &tmpEntity, gGlobalEntitySaveData, ARRAYSIZE(gGlobalEntitySaveData))) - { - return 0; - } - - EntityAdd(MAKE_STRING(tmpEntity.name), MAKE_STRING(tmpEntity.levelName), tmpEntity.state); - } - - return 1; -} - -void CGlobalState::EntityUpdate(string_t globalname, string_t mapname) -{ - globalentity_t *pEnt = Find(globalname); - if (pEnt) - { - Q_strcpy(pEnt->levelName, STRING(mapname)); - } -} - -void CGlobalState::ClearStates() -{ - globalentity_t *pFree = m_pList; - while (pFree) - { - globalentity_t *pNext = pFree->pNext; - - free(pFree); - pFree = pNext; - } - - Reset(); -} - -void EXT_FUNC SaveGlobalState(SAVERESTOREDATA *pSaveData) -{ - CSave saveHelper(pSaveData); - gGlobalState.Save(saveHelper); -} - -void EXT_FUNC RestoreGlobalState(SAVERESTOREDATA *pSaveData) -{ - CRestore restoreHelper(pSaveData); - gGlobalState.Restore(restoreHelper); -} - -void EXT_FUNC ResetGlobalState() -{ - gGlobalState.ClearStates(); - - // Init the HUD on a new game / load game - gInitHUD = TRUE; -} - LINK_ENTITY_TO_CLASS(worldspawn, CWorld, CCSWorld) void CWorld::Spawn() @@ -432,7 +226,7 @@ void CWorld::Spawn() if (pFile && flength) { Q_strncpy(g_szMapBriefingText, pFile, ARRAYSIZE(g_szMapBriefingText) - 2); - g_szMapBriefingText[ ARRAYSIZE(g_szMapBriefingText) - 2 ] = '\0'; + g_szMapBriefingText[ARRAYSIZE(g_szMapBriefingText) - 2] = '\0'; PRECACHE_GENERIC(szMapBriefingFile); } @@ -442,7 +236,7 @@ void CWorld::Spawn() if (pFile && flength) { Q_strncpy(g_szMapBriefingText, pFile, ARRAYSIZE(g_szMapBriefingText) - 2); - g_szMapBriefingText[ ARRAYSIZE(g_szMapBriefingText) - 2 ] = '\0'; + g_szMapBriefingText[ARRAYSIZE(g_szMapBriefingText) - 2] = '\0'; PRECACHE_GENERIC("maps/default.txt"); } diff --git a/regamedll/dlls/world.h b/regamedll/dlls/world.h index 4292661c..31a8bcb7 100644 --- a/regamedll/dlls/world.h +++ b/regamedll/dlls/world.h @@ -42,10 +42,6 @@ public: void CopyToBodyQue(entvars_t *pev); void ClearBodyQue(); -void SaveGlobalState(SAVERESTOREDATA *pSaveData); -void RestoreGlobalState(SAVERESTOREDATA *pSaveData); -void ResetGlobalState(); -extern CGlobalState gGlobalState; extern float g_flWeaponCheat; extern char g_szMapBriefingText[512]; diff --git a/regamedll/dlls/wpn_shared/wpn_ak47.cpp b/regamedll/dlls/wpn_shared/wpn_ak47.cpp index 93d6128c..adc38031 100644 --- a/regamedll/dlls/wpn_shared/wpn_ak47.cpp +++ b/regamedll/dlls/wpn_shared/wpn_ak47.cpp @@ -14,6 +14,7 @@ void CAK47::Spawn() m_iShotsFired = 0; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CAK47::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_aug.cpp b/regamedll/dlls/wpn_shared/wpn_aug.cpp index d2d7f33b..b7576e76 100644 --- a/regamedll/dlls/wpn_shared/wpn_aug.cpp +++ b/regamedll/dlls/wpn_shared/wpn_aug.cpp @@ -14,6 +14,7 @@ void CAUG::Spawn() m_iShotsFired = 0; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CAUG::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_awp.cpp b/regamedll/dlls/wpn_shared/wpn_awp.cpp index 8e40336b..462f1487 100644 --- a/regamedll/dlls/wpn_shared/wpn_awp.cpp +++ b/regamedll/dlls/wpn_shared/wpn_awp.cpp @@ -11,6 +11,7 @@ void CAWP::Spawn() m_iDefaultAmmo = AWP_DEFAULT_GIVE; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CAWP::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_c4.cpp b/regamedll/dlls/wpn_shared/wpn_c4.cpp index b615c7ae..1295cf22 100644 --- a/regamedll/dlls/wpn_shared/wpn_c4.cpp +++ b/regamedll/dlls/wpn_shared/wpn_c4.cpp @@ -26,6 +26,7 @@ void CC4::Spawn() FallInit(); SetThink(&CBasePlayerItem::FallThink); pev->nextthink = UTIL_WeaponTimeBase() + 0.1f; + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CC4::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_deagle.cpp b/regamedll/dlls/wpn_shared/wpn_deagle.cpp index f0fafef9..ad6f7e59 100644 --- a/regamedll/dlls/wpn_shared/wpn_deagle.cpp +++ b/regamedll/dlls/wpn_shared/wpn_deagle.cpp @@ -15,6 +15,7 @@ void CDEAGLE::Spawn() m_flAccuracy = 0.9f; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CDEAGLE::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_elite.cpp b/regamedll/dlls/wpn_shared/wpn_elite.cpp index 67745f5d..32e0671e 100644 --- a/regamedll/dlls/wpn_shared/wpn_elite.cpp +++ b/regamedll/dlls/wpn_shared/wpn_elite.cpp @@ -13,6 +13,7 @@ void CELITE::Spawn() m_flAccuracy = 0.88f; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CELITE::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_famas.cpp b/regamedll/dlls/wpn_shared/wpn_famas.cpp index 03e2bb81..87eb7925 100644 --- a/regamedll/dlls/wpn_shared/wpn_famas.cpp +++ b/regamedll/dlls/wpn_shared/wpn_famas.cpp @@ -14,6 +14,7 @@ void CFamas::Spawn() m_flFamasShoot = 0; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CFamas::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_fiveseven.cpp b/regamedll/dlls/wpn_shared/wpn_fiveseven.cpp index acb9f3a2..dd3157a8 100644 --- a/regamedll/dlls/wpn_shared/wpn_fiveseven.cpp +++ b/regamedll/dlls/wpn_shared/wpn_fiveseven.cpp @@ -14,6 +14,7 @@ void CFiveSeven::Spawn() m_flAccuracy = 0.92f; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CFiveSeven::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_flashbang.cpp b/regamedll/dlls/wpn_shared/wpn_flashbang.cpp index 97e58bc5..16111669 100644 --- a/regamedll/dlls/wpn_shared/wpn_flashbang.cpp +++ b/regamedll/dlls/wpn_shared/wpn_flashbang.cpp @@ -18,6 +18,7 @@ void CFlashbang::Spawn() // get ready to fall down. FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CFlashbang::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_g3sg1.cpp b/regamedll/dlls/wpn_shared/wpn_g3sg1.cpp index f1656e00..6b9c4843 100644 --- a/regamedll/dlls/wpn_shared/wpn_g3sg1.cpp +++ b/regamedll/dlls/wpn_shared/wpn_g3sg1.cpp @@ -13,6 +13,7 @@ void CG3SG1::Spawn() m_flLastFire = 0; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CG3SG1::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_galil.cpp b/regamedll/dlls/wpn_shared/wpn_galil.cpp index 7b4d400b..7205e5c3 100644 --- a/regamedll/dlls/wpn_shared/wpn_galil.cpp +++ b/regamedll/dlls/wpn_shared/wpn_galil.cpp @@ -12,6 +12,7 @@ void CGalil::Spawn() m_iDefaultAmmo = GALIL_DEFAULT_GIVE; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CGalil::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_glock18.cpp b/regamedll/dlls/wpn_shared/wpn_glock18.cpp index 63851774..077e353b 100644 --- a/regamedll/dlls/wpn_shared/wpn_glock18.cpp +++ b/regamedll/dlls/wpn_shared/wpn_glock18.cpp @@ -18,6 +18,7 @@ void CGLOCK18::Spawn() m_flAccuracy = 0.9f; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CGLOCK18::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_hegrenade.cpp b/regamedll/dlls/wpn_shared/wpn_hegrenade.cpp index ffac7a1b..a883f6c7 100644 --- a/regamedll/dlls/wpn_shared/wpn_hegrenade.cpp +++ b/regamedll/dlls/wpn_shared/wpn_hegrenade.cpp @@ -18,6 +18,7 @@ void CHEGrenade::Spawn() // get ready to fall down. FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CHEGrenade::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_knife.cpp b/regamedll/dlls/wpn_shared/wpn_knife.cpp index 211428b1..34fe79fd 100644 --- a/regamedll/dlls/wpn_shared/wpn_knife.cpp +++ b/regamedll/dlls/wpn_shared/wpn_knife.cpp @@ -13,6 +13,7 @@ void CKnife::Spawn() m_iClip = WEAPON_NOCLIP; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CKnife::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_m249.cpp b/regamedll/dlls/wpn_shared/wpn_m249.cpp index 890aac29..0ad66dc7 100644 --- a/regamedll/dlls/wpn_shared/wpn_m249.cpp +++ b/regamedll/dlls/wpn_shared/wpn_m249.cpp @@ -14,6 +14,7 @@ void CM249::Spawn() m_iShotsFired = 0; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CM249::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_m3.cpp b/regamedll/dlls/wpn_shared/wpn_m3.cpp index fa1f7e2b..a522c6a8 100644 --- a/regamedll/dlls/wpn_shared/wpn_m3.cpp +++ b/regamedll/dlls/wpn_shared/wpn_m3.cpp @@ -12,6 +12,7 @@ void CM3::Spawn() m_iDefaultAmmo = M3_DEFAULT_GIVE; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CM3::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_m4a1.cpp b/regamedll/dlls/wpn_shared/wpn_m4a1.cpp index 39769c5e..e40ba98e 100644 --- a/regamedll/dlls/wpn_shared/wpn_m4a1.cpp +++ b/regamedll/dlls/wpn_shared/wpn_m4a1.cpp @@ -15,6 +15,7 @@ void CM4A1::Spawn() m_bDelayFire = true; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CM4A1::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_mac10.cpp b/regamedll/dlls/wpn_shared/wpn_mac10.cpp index 5208de20..8f9a003a 100644 --- a/regamedll/dlls/wpn_shared/wpn_mac10.cpp +++ b/regamedll/dlls/wpn_shared/wpn_mac10.cpp @@ -14,6 +14,7 @@ void CMAC10::Spawn() m_bDelayFire = false; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CMAC10::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_mp5navy.cpp b/regamedll/dlls/wpn_shared/wpn_mp5navy.cpp index be339e5f..49633a41 100644 --- a/regamedll/dlls/wpn_shared/wpn_mp5navy.cpp +++ b/regamedll/dlls/wpn_shared/wpn_mp5navy.cpp @@ -14,6 +14,7 @@ void CMP5N::Spawn() m_bDelayFire = false; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CMP5N::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_p228.cpp b/regamedll/dlls/wpn_shared/wpn_p228.cpp index a313a259..3fdfcd14 100644 --- a/regamedll/dlls/wpn_shared/wpn_p228.cpp +++ b/regamedll/dlls/wpn_shared/wpn_p228.cpp @@ -14,6 +14,7 @@ void CP228::Spawn() m_flAccuracy = 0.9f; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CP228::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_p90.cpp b/regamedll/dlls/wpn_shared/wpn_p90.cpp index 405c54b3..1419778b 100644 --- a/regamedll/dlls/wpn_shared/wpn_p90.cpp +++ b/regamedll/dlls/wpn_shared/wpn_p90.cpp @@ -15,6 +15,7 @@ void CP90::Spawn() m_bDelayFire = false; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CP90::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_scout.cpp b/regamedll/dlls/wpn_shared/wpn_scout.cpp index 4969cea5..351d826a 100644 --- a/regamedll/dlls/wpn_shared/wpn_scout.cpp +++ b/regamedll/dlls/wpn_shared/wpn_scout.cpp @@ -12,6 +12,7 @@ void CSCOUT::Spawn() m_iDefaultAmmo = SCOUT_DEFAULT_GIVE; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CSCOUT::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_sg550.cpp b/regamedll/dlls/wpn_shared/wpn_sg550.cpp index 583ec81d..f631b3f5 100644 --- a/regamedll/dlls/wpn_shared/wpn_sg550.cpp +++ b/regamedll/dlls/wpn_shared/wpn_sg550.cpp @@ -17,6 +17,7 @@ void CSG550::Spawn() #endif FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CSG550::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_sg552.cpp b/regamedll/dlls/wpn_shared/wpn_sg552.cpp index 4124e556..344203fd 100644 --- a/regamedll/dlls/wpn_shared/wpn_sg552.cpp +++ b/regamedll/dlls/wpn_shared/wpn_sg552.cpp @@ -14,6 +14,7 @@ void CSG552::Spawn() m_iShotsFired = 0; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CSG552::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_smokegrenade.cpp b/regamedll/dlls/wpn_shared/wpn_smokegrenade.cpp index b4780aed..80e6660d 100644 --- a/regamedll/dlls/wpn_shared/wpn_smokegrenade.cpp +++ b/regamedll/dlls/wpn_shared/wpn_smokegrenade.cpp @@ -18,6 +18,7 @@ void CSmokeGrenade::Spawn() // get ready to fall down. FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CSmokeGrenade::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_tmp.cpp b/regamedll/dlls/wpn_shared/wpn_tmp.cpp index 706e1e6f..fa8cc2ea 100644 --- a/regamedll/dlls/wpn_shared/wpn_tmp.cpp +++ b/regamedll/dlls/wpn_shared/wpn_tmp.cpp @@ -15,6 +15,7 @@ void CTMP::Spawn() m_bDelayFire = false; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CTMP::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_ump45.cpp b/regamedll/dlls/wpn_shared/wpn_ump45.cpp index b4c06d7b..5a894268 100644 --- a/regamedll/dlls/wpn_shared/wpn_ump45.cpp +++ b/regamedll/dlls/wpn_shared/wpn_ump45.cpp @@ -14,6 +14,7 @@ void CUMP45::Spawn() m_bDelayFire = false; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CUMP45::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_usp.cpp b/regamedll/dlls/wpn_shared/wpn_usp.cpp index e2aa215b..a2ee1169 100644 --- a/regamedll/dlls/wpn_shared/wpn_usp.cpp +++ b/regamedll/dlls/wpn_shared/wpn_usp.cpp @@ -14,6 +14,7 @@ void CUSP::Spawn() m_flAccuracy = 0.92f; FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CUSP::Precache() diff --git a/regamedll/dlls/wpn_shared/wpn_xm1014.cpp b/regamedll/dlls/wpn_shared/wpn_xm1014.cpp index 5e52ff81..d179bddb 100644 --- a/regamedll/dlls/wpn_shared/wpn_xm1014.cpp +++ b/regamedll/dlls/wpn_shared/wpn_xm1014.cpp @@ -13,6 +13,7 @@ void CXM1014::Spawn() // get ready to fall FallInit(); + CSPlayerItem()->SetItemInfo(&m_ItemInfoArray[m_iId]); } void CXM1014::Precache() diff --git a/regamedll/extra/Toolkit/GameDefinitionFile/regamedll-cs.fgd b/regamedll/extra/Toolkit/GameDefinitionFile/regamedll-cs.fgd index f2d787b2..22580717 100644 --- a/regamedll/extra/Toolkit/GameDefinitionFile/regamedll-cs.fgd +++ b/regamedll/extra/Toolkit/GameDefinitionFile/regamedll-cs.fgd @@ -144,7 +144,7 @@ // Master // Target // Trigger delay -// Pitch Yaw Roll (Y Z X) +// Pitch Yaw Roll (X Y Z) // Render FX // Render Mode // FX Amount(1 - 255) @@ -350,7 +350,7 @@ @BaseClass = Angles [ - angles(string) : "Pitch Yaw Roll (Y Z X)" : "0 0 0" + angles(string) : "Pitch Yaw Roll (X Y Z)" : "0 0 0" ] @BaseClass = Appearflags @@ -1958,7 +1958,7 @@ @PointClass base(Targetname, Target, Light) iconsprite("sprites/CS/light_environment.spr") = light_environment : "Environment" [ - angles(string) : "Pitch Yaw Roll (Y Z X)" : "0 270 0" + angles(string) : "Pitch Yaw Roll (X Y Z)" : "0 270 0" pitch(integer) : "Pitch" : -90 // Shade is used only by Adam Foster's hack of HLRAD to vary the color of shade. _diffuse_light(color255) : "Shade" : "255 255 128 200" @@ -2697,7 +2697,7 @@ speed(integer) : "Speed (units per second)" : 64 // avelocity is fixed speed of tumbling, cannot be changed in play - avelocity(string) : "Angular velocity (Y Z X)" : "0 0 0" + avelocity(string) : "Angular velocity (X Y Z)" : "0 0 0" dmg(integer) : "Damage on crush" : 0 skin(choices) : "Contents (if not solid)" : 0 = [ @@ -2931,8 +2931,8 @@ @PointClass base(ArmouryEntity) size(-16 -16 0, 16 16 16) iconsprite("sprites/CS/armoury_entity.spr") = item_airbox : "Items in the armoury and float in the air" [ - angles(string) : "Pitch Yaw Roll (Y Z X)" : "-90 0 0" - avelocity(string) : "Angular velocity (Y Z X)" : "0 150 0" + angles(string) : "Pitch Yaw Roll (X Y Z)" : "-90 0 0" + avelocity(string) : "Angular velocity (X Y Z)" : "0 150 0" flyup(string) : "Speed fly up" : "5" delay(string) : "Delay before fly down" : "1" sprite_model(string) : "Sprite Name " : "" diff --git a/regamedll/game_shared/GameEvent.h b/regamedll/game_shared/GameEvent.h index f767d314..252cd838 100644 --- a/regamedll/game_shared/GameEvent.h +++ b/regamedll/game_shared/GameEvent.h @@ -136,4 +136,4 @@ enum GameEventType NUM_GAME_EVENTS, }; -extern const char *GameEventName[ NUM_GAME_EVENTS + 1 ]; +extern const char *GameEventName[NUM_GAME_EVENTS + 1]; diff --git a/regamedll/game_shared/bitvec.h b/regamedll/game_shared/bitvec.h index 1cb0072f..8fed6f12 100644 --- a/regamedll/game_shared/bitvec.h +++ b/regamedll/game_shared/bitvec.h @@ -73,7 +73,7 @@ private: NUM_DWORDS = NUM_BITS / 32 + !!(NUM_BITS & 31) }; - unsigned int m_DWords[ NUM_DWORDS ]; + unsigned int m_DWords[NUM_DWORDS]; }; inline CBitVecAccessor::CBitVecAccessor(uint32 *pDWords, int iBit) diff --git a/regamedll/game_shared/bot/bot.cpp b/regamedll/game_shared/bot/bot.cpp index 57005d13..557fd589 100644 --- a/regamedll/game_shared/bot/bot.cpp +++ b/regamedll/game_shared/bot/bot.cpp @@ -1,22 +1,9 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - -// 30 times per second, just like human clients -float g_flBotCommandInterval = 1.0 / 30.0; - -// full AI only 10 times per second -float g_flBotFullThinkInterval = 1.0 / 10.0; - // Nasty Hack. See client.cpp/ClientCommand() const char *BotArgs[4] = {}; bool UseBotArgs = false; -#endif - CBot::CBot() { // the profile will be attached after this instance is constructed @@ -220,24 +207,22 @@ void CBot::Reload() // Returns ratio of ammo left to max ammo (1 = full clip, 0 = empty) float CBot::GetActiveWeaponAmmoRatio() const { - CBasePlayerWeapon *weapon = GetActiveWeapon(); - - if (!weapon) + CBasePlayerWeapon *pCurrentWeapon = GetActiveWeapon(); + if (!pCurrentWeapon) return 0.0f; - // weapons with no ammo are always full - if (weapon->m_iClip < 0) + // Weapons with no ammo are always full + if (pCurrentWeapon->m_iClip < 0) return 1.0f; - return float(weapon->m_iClip) / float(weapon->iMaxClip()); + return float(pCurrentWeapon->m_iClip) / float(pCurrentWeapon->iMaxClip()); } // Return true if active weapon has an empty clip bool CBot::IsActiveWeaponClipEmpty() const { - CBasePlayerWeapon *weapon = GetActiveWeapon(); - - if (weapon && weapon->m_iClip == 0) + CBasePlayerWeapon *pCurrentWeapon = GetActiveWeapon(); + if (pCurrentWeapon && pCurrentWeapon->m_iClip == 0) return true; return false; @@ -246,14 +231,14 @@ bool CBot::IsActiveWeaponClipEmpty() const // Return true if active weapon has no ammo at all bool CBot::IsActiveWeaponOutOfAmmo() const { - CBasePlayerWeapon *weapon = GetActiveWeapon(); - if (!weapon) + CBasePlayerWeapon *pCurrentWeapon = GetActiveWeapon(); + if (!pCurrentWeapon) return true; - if (weapon->m_iClip < 0) + if (pCurrentWeapon->m_iClip < 0) return false; - if (weapon->m_iClip == 0 && m_rgAmmo[ weapon->m_iPrimaryAmmoType ] <= 0) + if (pCurrentWeapon->m_iClip == 0 && m_rgAmmo[pCurrentWeapon->m_iPrimaryAmmoType] <= 0) return true; return false; diff --git a/regamedll/game_shared/bot/bot.h b/regamedll/game_shared/bot/bot.h index 18dc731e..e26f280b 100644 --- a/regamedll/game_shared/bot/bot.h +++ b/regamedll/game_shared/bot/bot.h @@ -30,6 +30,12 @@ #include "gamerules.h" +// 30 times per second, just like human clients +constexpr float g_flBotCommandInterval = 1.0 / 30.0; + +// full AI only 10 times per second +constexpr float g_flBotFullThinkInterval = 1.0 / 10.0; + class BotProfile; template @@ -408,9 +414,6 @@ inline CBot::BotRelationshipTeam CBot::BotRelationship(CBasePlayer *pTarget) con return pTarget->m_iTeam == m_iTeam ? BOT_TEAMMATE : BOT_ENEMY; } -extern float g_flBotCommandInterval; -extern float g_flBotFullThinkInterval; - extern const char *BotArgs[4]; extern bool UseBotArgs; diff --git a/regamedll/game_shared/bot/bot_manager.cpp b/regamedll/game_shared/bot/bot_manager.cpp index 129c17fe..ac7aa61f 100644 --- a/regamedll/game_shared/bot/bot_manager.cpp +++ b/regamedll/game_shared/bot/bot_manager.cpp @@ -1,10 +1,5 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - const char *GameEventName[NUM_GAME_EVENTS + 1] = { "EVENT_INVALID", @@ -105,8 +100,6 @@ const char *GameEventName[NUM_GAME_EVENTS + 1] = nullptr, }; -#endif // HOOK_GAMEDLL - // STL uses exceptions, but we are not compiling with them - ignore warning #pragma warning(disable : 4530) @@ -119,8 +112,9 @@ GameEventType NameToGameEvent(const char *name) int index = 0; for (auto event : GameEventName) { - if (!Q_stricmp(event, name)) + if (!Q_stricmp(event, name)) { return static_cast(index); + } index++; } diff --git a/regamedll/game_shared/bot/bot_manager.h b/regamedll/game_shared/bot/bot_manager.h index bead0e9d..131d7623 100644 --- a/regamedll/game_shared/bot/bot_manager.h +++ b/regamedll/game_shared/bot/bot_manager.h @@ -56,7 +56,7 @@ private: float m_dieTimestamp; }; -typedef std::STD_LIST ActiveGrenadeList; +typedef std::list ActiveGrenadeList; class CBotManager { diff --git a/regamedll/game_shared/bot/bot_profile.cpp b/regamedll/game_shared/bot/bot_profile.cpp index 7bd70ff9..1cc77181 100644 --- a/regamedll/game_shared/bot/bot_profile.cpp +++ b/regamedll/game_shared/bot/bot_profile.cpp @@ -1,15 +1,6 @@ #include "precompiled.h" -#include "game_shared/simple_checksum.h" - -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL BotProfileManager *TheBotProfiles = nullptr; -char *BotDifficultyName[] = { "EASY", "NORMAL", "HARD", "EXPERT", nullptr }; - -#endif // Generates a filename-decorated skin name const char *GetDecoratedSkinName(const char *name, const char *filename) @@ -78,6 +69,8 @@ BotProfileManager::BotProfileManager() // Load the bot profile database void BotProfileManager::Init(const char *filename, unsigned int *checksum) { + static const char *BotDifficultyName[] = { "EASY", "NORMAL", "HARD", "EXPERT", nullptr }; + int dataLength; char *dataPointer = (char *)LOAD_FILE_FOR_ME(const_cast(filename), &dataLength); char *dataFile = dataPointer; diff --git a/regamedll/game_shared/bot/bot_profile.h b/regamedll/game_shared/bot/bot_profile.h index adddebc7..216cf197 100644 --- a/regamedll/game_shared/bot/bot_profile.h +++ b/regamedll/game_shared/bot/bot_profile.h @@ -28,6 +28,8 @@ #pragma once +#include "game_shared/simple_checksum.h" + // long STL names get truncated in browse info. #pragma warning(disable : 4786) @@ -80,9 +82,10 @@ public: } const char *GetName() const { return m_name; } float GetAggression() const { return m_aggression; } - float GetSkill() const { return m_skill; } - float GetTeamwork() const { return m_teamwork; } + float GetSkill() const { return m_skill; } + float GetTeamwork() const { return m_teamwork; } int GetWeaponPreference(int i) const { return m_weaponPreference[i]; } + const char *GetWeaponPreferenceAsString(int i) const; int GetWeaponPreferenceCount() const { return m_weaponPreferenceCount; } bool HasPrimaryPreference() const; @@ -90,12 +93,12 @@ public: int GetCost() const { return m_cost; } int GetSkin() const { return m_skin; } bool IsDifficulty(BotDifficultyType diff) const; - int GetVoicePitch() const { return m_voicePitch; } + int GetVoicePitch() const { return m_voicePitch; } float GetReactionTime() const { return m_reactionTime; } - float GetAttackDelay() const { return m_attackDelay; } - int GetVoiceBank() const { return m_voiceBank; } + float GetAttackDelay() const { return m_attackDelay; } + int GetVoiceBank() const { return m_voiceBank; } bool IsValidForTeam(BotProfileTeamType team) const; - bool PrefersSilencer() const { return m_prefersSilencer; } + bool PrefersSilencer() const { return m_prefersSilencer; } private: void Inherit(const BotProfile *parent, const BotProfile *baseline); @@ -107,7 +110,6 @@ private: float m_teamwork; enum { MAX_WEAPON_PREFS = 16 }; - int m_weaponPreference[MAX_WEAPON_PREFS]; int m_weaponPreferenceCount; @@ -142,8 +144,9 @@ inline void BotProfile::Inherit(const BotProfile *parent, const BotProfile *base if (parent->m_weaponPreferenceCount != baseline->m_weaponPreferenceCount) { m_weaponPreferenceCount = parent->m_weaponPreferenceCount; - for (int i = 0; i < parent->m_weaponPreferenceCount; ++i) + for (int i = 0; i < parent->m_weaponPreferenceCount; i++) { m_weaponPreference[i] = parent->m_weaponPreference[i]; + } } if (parent->m_cost != baseline->m_cost) @@ -171,7 +174,7 @@ inline void BotProfile::Inherit(const BotProfile *parent, const BotProfile *base m_voiceBank = parent->m_voiceBank; } -typedef std::STD_LIST BotProfileList; +typedef std::list BotProfileList; class BotProfileManager { @@ -184,10 +187,9 @@ public: const BotProfile *GetProfile(const char *name, BotProfileTeamType team) const { - for (BotProfileList::const_iterator iter = m_profileList.begin(); iter != m_profileList.end(); ++iter) - { - if (!Q_stricmp(name, (*iter)->GetName()) && (*iter)->IsValidForTeam(team)) - return (*iter); + for (auto profile : m_profileList) { + if (!Q_stricmp(name, profile->GetName()) && profile->IsValidForTeam(team)) + return profile; } return nullptr; @@ -200,7 +202,7 @@ public: const char *GetCustomSkinFname(int index); int GetCustomSkinIndex(const char *name, const char *filename = nullptr); - typedef std::STD_VECTOR VoiceBankList; + typedef std::vector VoiceBankList; const VoiceBankList *GetVoiceBanks() const { return &m_voiceBanks; } int FindVoiceBankIndex(const char *filename); diff --git a/regamedll/game_shared/bot/bot_util.cpp b/regamedll/game_shared/bot/bot_util.cpp index 22ed99e3..663a2162 100644 --- a/regamedll/game_shared/bot/bot_util.cpp +++ b/regamedll/game_shared/bot/bot_util.cpp @@ -1,14 +1,9 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - short s_iBeamSprite = 0; -float cosTable[COS_TABLE_SIZE]; -#endif +constexpr int COS_TABLE_SIZE = 256; +float cosTable[COS_TABLE_SIZE]; bool UTIL_IsNameTaken(const char *name, bool ignoreHumans) { @@ -470,6 +465,57 @@ void UTIL_DrawBeamPoints(Vector vecStart, Vector vecEnd, int iLifetime, byte bRe MESSAGE_END(); } +void UTIL_DrawBox(Extent *extent, int lifetime, int red, int green, int blue) +{ + Vector v[8]; + v[0].x = extent->lo.x; v[0].y = extent->lo.y; v[0].z = extent->lo.z; + v[1].x = extent->hi.x; v[1].y = extent->lo.y; v[1].z = extent->lo.z; + v[2].x = extent->hi.x; v[2].y = extent->hi.y; v[2].z = extent->lo.z; + v[3].x = extent->lo.x; v[3].y = extent->hi.y; v[3].z = extent->lo.z; + v[4].x = extent->lo.x; v[4].y = extent->lo.y; v[4].z = extent->hi.z; + v[5].x = extent->hi.x; v[5].y = extent->lo.y; v[5].z = extent->hi.z; + v[6].x = extent->hi.x; v[6].y = extent->hi.y; v[6].z = extent->hi.z; + v[7].x = extent->lo.x; v[7].y = extent->hi.y; v[7].z = extent->hi.z; + + static int edge[] = + { + 1, 2, 3, 4, -1, + 5, 6, 7, 8, -5, + 1, -5, + 2, -6, + 3, -7, + 4, -8, + 0 // end iterator + }; + + Vector from, to; + bool restart = true; + + for (int i = 0; edge[i] != 0; i++) + { + if (restart) + { + to = v[edge[i] - 1]; + restart = false; + continue; + } + + from = to; + + int index = edge[i]; + if (index < 0) + { + restart = true; + index = -index; + } + + to = v[index - 1]; + + UTIL_DrawBeamPoints(from, to, lifetime, red, green, blue); + UTIL_DrawBeamPoints(to, from, lifetime, red, green, blue); + } +} + void CONSOLE_ECHO(const char *pszMsg, ...) { va_list argptr; diff --git a/regamedll/game_shared/bot/bot_util.h b/regamedll/game_shared/bot/bot_util.h index 6d43b0d3..e29cbe8f 100644 --- a/regamedll/game_shared/bot/bot_util.h +++ b/regamedll/game_shared/bot/bot_util.h @@ -28,14 +28,9 @@ #pragma once -#define COS_TABLE_SIZE 256 - #define RAD_TO_DEG(deg) ((deg) * 180.0 / M_PI) #define DEG_TO_RAD(rad) ((rad) * M_PI / 180.0) -#define SIGN(num) (((num) < 0) ? -1 : 1) -#define ABS(num) (SIGN(num) * (num)) - class CBasePlayer; class BotProfile; @@ -48,16 +43,16 @@ enum PriorityType class IntervalTimer { public: - IntervalTimer() { m_timestamp = -1.0f; } - void Reset() { m_timestamp = gpGlobals->time; } - void Start() { m_timestamp = gpGlobals->time; } + IntervalTimer() { m_timestamp = -1.0f; } + void Reset() { m_timestamp = gpGlobals->time; } + void Start() { m_timestamp = gpGlobals->time; } void Invalidate() { m_timestamp = -1.0f; } bool HasStarted() const { return (m_timestamp > 0.0f); } // if not started, elapsed time is very large - float GetElapsedTime() const { return (HasStarted()) ? (gpGlobals->time - m_timestamp) : 99999.9f; } - bool IsLessThen(float duration) const { return (gpGlobals->time - m_timestamp < duration) ? true : false; } + float GetElapsedTime() const { return (HasStarted()) ? (gpGlobals->time - m_timestamp) : 99999.9f; } + bool IsLessThen(float duration) const { return (gpGlobals->time - m_timestamp < duration) ? true : false; } bool IsGreaterThen(float duration) const { return (gpGlobals->time - m_timestamp > duration) ? true : false; } private: @@ -83,18 +78,18 @@ private: }; // Return true if the given entity is valid -inline bool IsEntityValid(CBaseEntity *entity) +inline bool IsEntityValid(CBaseEntity *pEntity) { - if (!entity) + if (!pEntity) return false; - if (FNullEnt(entity->pev)) + if (FNullEnt(pEntity->pev)) return false; - if (FStrEq(STRING(entity->pev->netname), "")) + if (FStrEq(STRING(pEntity->pev->netname), "")) return false; - if (entity->pev->flags & FL_DORMANT) + if (pEntity->pev->flags & FL_DORMANT) return false; return true; @@ -150,65 +145,20 @@ bool ForEachPlayer(Functor &func) { for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = UTIL_PlayerByIndex(i); - if (!IsEntityValid((CBaseEntity *)player)) + CBasePlayer *pPlayer = UTIL_PlayerByIndex(i); + if (!IsEntityValid(pPlayer)) continue; - if (!player->IsPlayer()) + if (!pPlayer->IsPlayer()) continue; - if (func(player) == false) + if (func(pPlayer) == false) return false; } return true; } -// For zombie game -inline bool IsZombieGame() -{ -#ifdef TERRORSTRIKE - return true; -#else - return false; -#endif // TERRORSTRIKE -} - -extern cvar_t cv_bot_traceview; -extern cvar_t cv_bot_stop; -extern cvar_t cv_bot_show_nav; -extern cvar_t cv_bot_show_danger; -extern cvar_t cv_bot_nav_edit; -extern cvar_t cv_bot_nav_zdraw; -extern cvar_t cv_bot_walk; -extern cvar_t cv_bot_difficulty; -extern cvar_t cv_bot_debug; -extern cvar_t cv_bot_quicksave; -extern cvar_t cv_bot_quota; -extern cvar_t cv_bot_quota_match; -extern cvar_t cv_bot_prefix; -extern cvar_t cv_bot_allow_rogues; -extern cvar_t cv_bot_allow_pistols; -extern cvar_t cv_bot_allow_shotguns; -extern cvar_t cv_bot_allow_sub_machine_guns; -extern cvar_t cv_bot_allow_rifles; -extern cvar_t cv_bot_allow_machine_guns; -extern cvar_t cv_bot_allow_grenades; -extern cvar_t cv_bot_allow_snipers; -extern cvar_t cv_bot_allow_shield; -extern cvar_t cv_bot_join_team; -extern cvar_t cv_bot_join_after_player; -extern cvar_t cv_bot_auto_vacate; -extern cvar_t cv_bot_zombie; -extern cvar_t cv_bot_defer_to_human; -extern cvar_t cv_bot_chatter; -extern cvar_t cv_bot_profile_db; - -#ifdef REGAMEDLL_ADD -extern cvar_t cv_bot_deathmatch; -extern cvar_t cv_bot_quota_mode; -#endif - #define IS_ALIVE true int UTIL_HumansOnTeam(int teamID, bool isAlive = false); @@ -232,6 +182,7 @@ Vector UTIL_ComputeOrigin(CBaseEntity *pEntity); Vector UTIL_ComputeOrigin(edict_t *pentEdict); void UTIL_DrawBeamFromEnt(int iIndex, Vector vecEnd, int iLifetime, byte bRed, byte bGreen, byte bBlue); void UTIL_DrawBeamPoints(Vector vecStart, Vector vecEnd, int iLifetime, byte bRed, byte bGreen, byte bBlue); +void UTIL_DrawBox(struct Extent *extent, int lifetime, int red, int green, int blue); // Echos text to the console, and prints it on the client's screen. This is NOT tied to the developer cvar. // If you are adding debugging output in cstrike, use UTIL_DPrintf() (debug.h) instead. diff --git a/regamedll/game_shared/bot/nav.h b/regamedll/game_shared/bot/nav.h index 3cd86cef..fb82ccd9 100644 --- a/regamedll/game_shared/bot/nav.h +++ b/regamedll/game_shared/bot/nav.h @@ -146,7 +146,7 @@ struct Extent float SizeX() const { return hi.x - lo.x; } float SizeY() const { return hi.y - lo.y; } float SizeZ() const { return hi.z - lo.z; } - float Area() const { return SizeX() * SizeY(); } + float Area() const { return SizeX() * SizeY(); } // return true if 'pos' is inside of this extent bool Contains(const Vector *pos) const diff --git a/regamedll/game_shared/bot/nav_area.cpp b/regamedll/game_shared/bot/nav_area.cpp index cc85342b..92e6aec3 100644 --- a/regamedll/game_shared/bot/nav_area.cpp +++ b/regamedll/game_shared/bot/nav_area.cpp @@ -20,13 +20,6 @@ #include #endif // _WIN32 -enum { MAX_BLOCKED_AREAS = 256 }; - -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - unsigned int CNavArea::m_nextID = 1; unsigned int CNavArea::m_masterMarker = 1; @@ -59,20 +52,15 @@ bool isPlacePainting = false; float editTimestamp = 0.0f; +const int MAX_BLOCKED_AREAS = 256; unsigned int BlockedID[MAX_BLOCKED_AREAS]; int BlockedIDCount = 0; -#endif // HOOK_GAMEDLL - NOXREF void buildGoodSizedList() { const float minSize = 200.0f; - - NavAreaList::iterator iter; - for (iter = TheNavAreaList.begin(); iter != TheNavAreaList.end(); iter++) + for (auto area : TheNavAreaList) { - CNavArea *area = (*iter); - // skip the small areas const Extent *extent = area->GetExtent(); if (extent->SizeX() < minSize || extent->SizeY() < minSize) @@ -85,17 +73,14 @@ NOXREF void buildGoodSizedList() void DestroyHidingSpots() { // remove all hiding spot references from the nav areas - for (NavAreaList::iterator areaIter = TheNavAreaList.begin(); areaIter != TheNavAreaList.end(); areaIter++) - { - CNavArea *area = *areaIter; + for (auto area : TheNavAreaList) area->m_hidingSpotList.clear(); - } - IMPL_CLASS(HidingSpot, m_nextID) = 0; + HidingSpot::m_nextID = 0; // free all the HidingSpots - for (HidingSpotList::iterator iter = TheHidingSpotList.begin(); iter != TheHidingSpotList.end(); iter++) - delete (*iter); + for (auto spot : TheHidingSpotList) + delete spot; TheHidingSpotList.clear(); } @@ -114,7 +99,7 @@ HidingSpot::HidingSpot() HidingSpot::HidingSpot(const Vector *pos, unsigned char flags) { m_pos = *pos; - m_id = IMPL(m_nextID)++; + m_id = m_nextID++; m_flags = flags; TheHidingSpotList.push_back(this); @@ -134,8 +119,9 @@ void HidingSpot::Load(SteamFile *file, unsigned int version) file->Read(&m_flags, sizeof(unsigned char)); // update next ID to avoid ID collisions by later spots - if (m_id >= IMPL(m_nextID)) - IMPL(m_nextID) = m_id + 1; + if (m_id >= m_nextID) { + m_nextID = m_id + 1; + } } // Given a HidingSpot ID, return the associated HidingSpot @@ -171,7 +157,7 @@ void CNavArea::Initialize() m_approachCount = 0; // set an ID for splitting and other interactive editing - loads will overwrite this - m_id = IMPL(m_nextID)++; + m_id = m_nextID++; m_prevHash = nullptr; m_nextHash = nullptr; @@ -264,7 +250,7 @@ CNavArea::CNavArea(CNavNode *nwNode, class CNavNode *neNode, class CNavNode *seN CNavArea::~CNavArea() { // if we are resetting the system, don't bother cleaning up - all areas are being destroyed - if (IMPL(m_isReset)) + if (m_isReset) return; // tell the other areas we are going away @@ -841,11 +827,11 @@ bool CNavArea::MergeEdit(CNavArea *adj) // check that these areas can be merged const float tolerance = 1.0f; bool merge = false; - if (ABS(m_extent.lo.x - adj->m_extent.lo.x) < tolerance && ABS(m_extent.hi.x - adj->m_extent.hi.x) < tolerance) + if (abs(m_extent.lo.x - adj->m_extent.lo.x) < tolerance && abs(m_extent.hi.x - adj->m_extent.hi.x) < tolerance) merge = true; - if (ABS(m_extent.lo.y - adj->m_extent.lo.y) < tolerance && - ABS(m_extent.hi.y - adj->m_extent.hi.y) < tolerance) + if (abs(m_extent.lo.y - adj->m_extent.lo.y) < tolerance && + abs(m_extent.hi.y - adj->m_extent.hi.y) < tolerance) merge = true; if (merge == false) @@ -909,7 +895,7 @@ void DestroyLadders() // Free navigation map data void DestroyNavigationMap() { - IMPL_CLASS(CNavArea, m_isReset) = true; + CNavArea::m_isReset = true; // remove each element of the list and delete them while (!TheNavAreaList.empty()) @@ -919,7 +905,7 @@ void DestroyNavigationMap() delete area; } - IMPL_CLASS(CNavArea, m_isReset) = false; + CNavArea::m_isReset = false; // destroy ladder representations DestroyLadders(); @@ -929,13 +915,13 @@ void DestroyNavigationMap() // destroy navigation nodes created during map learning CNavNode *node, *next; - for (node = IMPL_CLASS(CNavNode, m_list); node; node = next) + for (node = CNavNode::m_list; node; node = next) { next = node->m_next; delete node; } - IMPL_CLASS(CNavNode, m_list) = nullptr; + CNavNode::m_list = nullptr; // reset the grid TheNavAreaGrid.Reset(); @@ -2427,12 +2413,12 @@ void CNavArea::DrawMarkedCorner(NavCornerType corner, byte red, byte green, byte void CNavArea::AddToOpenList() { // mark as being on open list for quick check - m_openMarker = IMPL(m_masterMarker); + m_openMarker = m_masterMarker; // if list is empty, add and return - if (!IMPL(m_openList)) + if (!m_openList) { - IMPL(m_openList) = this; + m_openList = this; this->m_prevOpen = nullptr; this->m_nextOpen = nullptr; return; @@ -2440,7 +2426,7 @@ void CNavArea::AddToOpenList() // insert self in ascending cost order CNavArea *area, *last = nullptr; - for (area = IMPL(m_openList); area; area = area->m_nextOpen) + for (area = m_openList; area; area = area->m_nextOpen) { if (this->GetTotalCost() < area->GetTotalCost()) break; @@ -2455,7 +2441,7 @@ void CNavArea::AddToOpenList() if (this->m_prevOpen) this->m_prevOpen->m_nextOpen = this; else - IMPL(m_openList) = this; + m_openList = this; this->m_nextOpen = area; area->m_prevOpen = this; @@ -2491,7 +2477,7 @@ void CNavArea::UpdateOnOpenList() if (before) before->m_nextOpen = this; else - IMPL(m_openList) = this; + m_openList = this; if (after) after->m_prevOpen = other; @@ -2503,7 +2489,7 @@ void CNavArea::RemoveFromOpenList() if (m_prevOpen) m_prevOpen->m_nextOpen = m_nextOpen; else - IMPL(m_openList) = m_nextOpen; + m_openList = m_nextOpen; if (m_nextOpen) m_nextOpen->m_prevOpen = m_prevOpen; @@ -2516,7 +2502,7 @@ void CNavArea::RemoveFromOpenList() void CNavArea::ClearSearchLists() { CNavArea::MakeNewMarker(); - IMPL(m_openList) = nullptr; + m_openList = nullptr; } // Return the coordinates of the area's corner. diff --git a/regamedll/game_shared/bot/nav_area.h b/regamedll/game_shared/bot/nav_area.h index e8f8496f..a40d4387 100644 --- a/regamedll/game_shared/bot/nav_area.h +++ b/regamedll/game_shared/bot/nav_area.h @@ -81,7 +81,7 @@ union NavConnect bool operator==(const NavConnect &other) const { return (area == other.area) ? true : false; } }; -typedef std::STD_LIST NavConnectList; +typedef std::list NavConnectList; enum LadderDirectionType { @@ -137,7 +137,7 @@ public: } }; -typedef std::STD_LIST NavLadderList; +typedef std::list NavLadderList; extern NavLadderList TheNavLadderList; class HidingSpot @@ -166,10 +166,10 @@ public: const Vector *GetPosition() const { return &m_pos; } unsigned int GetID() const { return m_id; } - void Mark() { m_marker = IMPL(m_masterMarker); } - bool IsMarked() const { return (m_marker == IMPL(m_masterMarker)) ? true : false; } + void Mark() { m_marker = m_masterMarker; } + bool IsMarked() const { return (m_marker == m_masterMarker) ? true : false; } - static void ChangeMasterMarker() { IMPL(m_masterMarker)++; } + static void ChangeMasterMarker() { m_masterMarker++; } private: friend void DestroyHidingSpots(); @@ -179,11 +179,11 @@ private: unsigned int m_marker; unsigned char m_flags; - static unsigned int IMPL(m_nextID); - static unsigned int IMPL(m_masterMarker); + static unsigned int m_nextID; + static unsigned int m_masterMarker; }; -typedef std::STD_LIST HidingSpotList; +typedef std::list HidingSpotList; extern HidingSpotList TheHidingSpotList; struct SpotOrder @@ -196,7 +196,7 @@ struct SpotOrder }; }; -typedef std::STD_LIST SpotOrderList; +typedef std::list SpotOrderList; struct SpotEncounter { @@ -208,8 +208,8 @@ struct SpotEncounter SpotOrderList spotList; // list of spots to look at, in order of occurrence }; -typedef std::STD_LIST SpotEncounterList; -typedef std::STD_LIST NavAreaList; +typedef std::list SpotEncounterList; +typedef std::list NavAreaList; // A CNavArea is a rectangular region defining a walkable area in the map class CNavArea @@ -304,11 +304,11 @@ public: // A* pathfinding algorithm static void MakeNewMarker() { - if (++IMPL(m_masterMarker) == 0) - IMPL(m_masterMarker) = 1; + if (++m_masterMarker == 0) + m_masterMarker = 1; } - void Mark() { m_marker = IMPL(m_masterMarker); } - BOOL IsMarked() const { return (m_marker == IMPL(m_masterMarker)) ? true : false; } + void Mark() { m_marker = m_masterMarker; } + BOOL IsMarked() const { return (m_marker == m_masterMarker) ? true : false; } void SetParent(CNavArea *parent, NavTraverseType how = NUM_TRAVERSE_TYPES) { m_parent = parent; m_parentHow = how; } CNavArea *GetParent() const { return m_parent; } NavTraverseType GetParentHow() const { return m_parentHow; } @@ -357,15 +357,14 @@ private: friend class CNavAreaGrid; friend class CCSBotManager; - void Initialize(); // to keep constructors consistent - static bool IMPL(m_isReset); // if true, don't bother cleaning up in destructor since everything is going away - - static unsigned int IMPL(m_nextID); // used to allocate unique IDs - unsigned int m_id; // unique area ID - Extent m_extent; // extents of area in world coords (NOTE: lo.z is not necessarily the minimum Z, but corresponds to Z at point (lo.x, lo.y), etc - Vector m_center; // centroid of area - unsigned char m_attributeFlags; // set of attribute bit flags (see NavAttributeType) - Place m_place; // place descriptor + void Initialize(); // to keep constructors consistent + static bool m_isReset; // if true, don't bother cleaning up in destructor since everything is going away + static unsigned int m_nextID; // used to allocate unique IDs + unsigned int m_id; // unique area ID + Extent m_extent; // extents of area in world coords (NOTE: lo.z is not necessarily the minimum Z, but corresponds to Z at point (lo.x, lo.y), etc + Vector m_center; // centroid of area + unsigned char m_attributeFlags; // set of attribute bit flags (see NavAttributeType) + Place m_place; // place descriptor // height of the implicit corners float m_neZ; @@ -397,14 +396,14 @@ private: void Strip(); // remove "analyzed" data from nav area // A* pathfinding algorithm - static unsigned int IMPL(m_masterMarker); + static unsigned int m_masterMarker; unsigned int m_marker; // used to flag the area as visited CNavArea *m_parent; // the area just prior to this on in the search path NavTraverseType m_parentHow; // how we get from parent to us float m_totalCost; // the distance so far plus an estimate of the distance left float m_costSoFar; // distance travelled so far - static CNavArea *IMPL(m_openList); + static CNavArea *m_openList; CNavArea *m_nextOpen, *m_prevOpen; // only valid if m_openMarker == m_masterMarker unsigned int m_openMarker; // if this equals the current marker value, we are on the open list @@ -446,19 +445,19 @@ inline CNavArea *CNavArea::GetAdjacentArea(NavDirType dir, int i) const inline bool CNavArea::IsOpen() const { - return (m_openMarker == IMPL(m_masterMarker)) ? true : false; + return (m_openMarker == m_masterMarker) ? true : false; } inline bool CNavArea::IsOpenListEmpty() { - return (IMPL(m_openList) != nullptr) ? false : true; + return m_openList ? false : true; } inline CNavArea *CNavArea::PopOpenList() { - if (IMPL(m_openList)) + if (m_openList) { - CNavArea *area = IMPL(m_openList); + CNavArea *area = m_openList; // disconnect from list area->RemoveFromOpenList(); diff --git a/regamedll/game_shared/bot/nav_file.cpp b/regamedll/game_shared/bot/nav_file.cpp index ed76acb9..667819e9 100644 --- a/regamedll/game_shared/bot/nav_file.cpp +++ b/regamedll/game_shared/bot/nav_file.cpp @@ -295,8 +295,8 @@ void CNavArea::Load(SteamFile *file, unsigned int version) file->Read(&m_id, sizeof(unsigned int)); // update nextID to avoid collisions - if (m_id >= IMPL(m_nextID)) - IMPL(m_nextID) = m_id + 1; + if (m_id >= m_nextID) + m_nextID = m_id + 1; // load attribute flags file->Read(&m_attributeFlags, sizeof(unsigned char)); @@ -766,7 +766,7 @@ NavErrorType LoadNavigationMap() DestroyNavigationMap(); placeDirectory.Reset(); - IMPL_CLASS(CNavArea, m_nextID) = 1; + CNavArea::m_nextID = 1; SteamFile navFile(filename); diff --git a/regamedll/game_shared/bot/nav_node.cpp b/regamedll/game_shared/bot/nav_node.cpp index 81eaf6dd..e8af03f5 100644 --- a/regamedll/game_shared/bot/nav_node.cpp +++ b/regamedll/game_shared/bot/nav_node.cpp @@ -1,19 +1,10 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - NavDirType Opposite[NUM_DIRECTIONS] = { SOUTH, WEST, NORTH, EAST }; CNavNode *CNavNode::m_list = nullptr; unsigned int CNavNode::m_listLength = 0; -#endif - -//Extent NodeMapExtent; - CNavNode::CNavNode(const Vector *pos, const Vector *normal, CNavNode *parent) { m_pos = *pos; @@ -28,9 +19,9 @@ CNavNode::CNavNode(const Vector *pos, const Vector *normal, CNavNode *parent) m_visited = 0; m_parent = parent; - m_next = IMPL(m_list); - IMPL(m_list) = this; - IMPL(m_listLength)++; + m_next = m_list; + m_list = this; + m_listLength++; m_isCovered = FALSE; m_area = nullptr; @@ -49,12 +40,11 @@ void CNavNode::ConnectTo(CNavNode *node, NavDirType dir) const CNavNode *CNavNode::GetNode(const Vector *pos) { const float tolerance = 0.45f * GenerationStepSize; - - for (const CNavNode *node = IMPL(m_list); node; node = node->m_next) + for (const CNavNode *node = m_list; node; node = node->m_next) { - float dx = ABS(node->m_pos.x - pos->x); - float dy = ABS(node->m_pos.y - pos->y); - float dz = ABS(node->m_pos.z - pos->z); + float dx = abs(node->m_pos.x - pos->x); + float dy = abs(node->m_pos.y - pos->y); + float dz = abs(node->m_pos.z - pos->z); if (dx < tolerance && dy < tolerance && dz < tolerance) return node; diff --git a/regamedll/game_shared/bot/nav_node.h b/regamedll/game_shared/bot/nav_node.h index 36f8c1a5..785f5d9e 100644 --- a/regamedll/game_shared/bot/nav_node.h +++ b/regamedll/game_shared/bot/nav_node.h @@ -42,8 +42,8 @@ public: const Vector *GetNormal() const { return &m_normal; } unsigned int GetID() const { return m_id; } - static CNavNode *GetFirst() { return IMPL(m_list); } - static unsigned int GetListLength() { return IMPL(m_listLength); } + static CNavNode *GetFirst() { return m_list; } + static unsigned int GetListLength() { return m_listLength; } CNavNode *GetNext() { return m_next; } @@ -70,12 +70,12 @@ private: Vector m_pos; // position of this node in the world Vector m_normal; // surface normal at this location - CNavNode *m_to[ NUM_DIRECTIONS ]; // links to north, south, east, and west. NULL if no link + CNavNode *m_to[NUM_DIRECTIONS]; // links to north, south, east, and west. NULL if no link unsigned int m_id; // unique ID of this node unsigned char m_attributeFlags; // set of attribute bit flags (see NavAttributeType) - static CNavNode *IMPL(m_list); // the master list of all nodes for this map - static unsigned int IMPL(m_listLength); + static CNavNode *m_list; // the master list of all nodes for this map + static unsigned int m_listLength; CNavNode *m_next; // next link in master list @@ -89,7 +89,7 @@ private: inline CNavNode *CNavNode::GetConnectedNode(NavDirType dir) const { - return m_to[ dir ]; + return m_to[dir]; } inline const Vector *CNavNode::GetPosition() const diff --git a/regamedll/game_shared/shared_util.cpp b/regamedll/game_shared/shared_util.cpp index 4fa28b00..c7a2a19d 100644 --- a/regamedll/game_shared/shared_util.cpp +++ b/regamedll/game_shared/shared_util.cpp @@ -1,15 +1,8 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - char s_shared_token[1500]; char s_shared_quote = '\"'; -#endif - NOXREF wchar_t *SharedWVarArgs(wchar_t *format, ...) { va_list argptr; @@ -33,16 +26,16 @@ char *SharedVarArgs(char *format, ...) const int BufLen = 1024; const int NumBuffers = 4; - static char string[ NumBuffers ][ BufLen ]; + static char string[NumBuffers][BufLen]; static int curstring = 0; curstring = (curstring + 1) % NumBuffers; va_start(argptr, format); - Q_vsnprintf(string[ curstring ], BufLen, format, argptr); + Q_vsnprintf(string[curstring], BufLen, format, argptr); va_end(argptr); - return string[ curstring ]; + return string[curstring]; } char *BufPrintf(char *buf, int &len, const char *fmt, ...) @@ -95,7 +88,7 @@ const char *NumAsString(int val) const int BufLen = 16; const int NumBuffers = 4; - static char string[ NumBuffers ][ BufLen ]; + static char string[NumBuffers][BufLen]; static int curstring = 0; int len = 16; diff --git a/regamedll/game_shared/simple_checksum.h b/regamedll/game_shared/simple_checksum.h index 236e7653..69abbeee 100644 --- a/regamedll/game_shared/simple_checksum.h +++ b/regamedll/game_shared/simple_checksum.h @@ -26,11 +26,7 @@ * */ -#ifndef SIMPLE_CHECKSUM_H -#define SIMPLE_CHECKSUM_H -#ifdef _WIN32 #pragma once -#endif // Compute a simple checksum for the given data. // Each byte in the data is multiplied by its position to track re-ordering changes @@ -45,5 +41,3 @@ inline unsigned int ComputeSimpleChecksum(const unsigned char *dataPointer, int return checksum; } - -#endif // SIMPLE_CHECKSUM_H diff --git a/regamedll/game_shared/voice_gamemgr.cpp b/regamedll/game_shared/voice_gamemgr.cpp index e51a26a1..02494183 100644 --- a/regamedll/game_shared/voice_gamemgr.cpp +++ b/regamedll/game_shared/voice_gamemgr.cpp @@ -1,17 +1,10 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - cvar_t voice_serverdebug = { "voice_serverdebug", "0", 0, 0.0f, nullptr }; // Set game rules to allow all clients to talk to each other. // Muted players still can't talk to each other. -cvar_t sv_alltalk = { "sv_alltalk", "0", FCVAR_SERVER, 0.0f, nullptr }; - -#endif +cvar_t sv_alltalk = { "sv_alltalk", "0", FCVAR_SERVER, 0.0f, nullptr }; // These are stored off as CVoiceGameMgr is created and deleted. CPlayerBitVec g_PlayerModEnable; // Set to 1 for each player if the player wants to use voice in this mod. @@ -110,7 +103,7 @@ bool CVoiceGameMgr::PlayerHasBlockedPlayer(CBasePlayer *pReceiver, CBasePlayer * if (iReceiverIndex < 0 || iReceiverIndex >= m_nMaxPlayers || iSenderIndex < 0 || iSenderIndex >= m_nMaxPlayers) return false; - return (g_BanMasks[ iReceiverIndex ][ iSenderIndex ] != 0); + return (g_BanMasks[iReceiverIndex][iSenderIndex] != 0); } bool CVoiceGameMgr::ClientCommand(CBasePlayer *pPlayer, const char *cmd) @@ -133,7 +126,7 @@ bool CVoiceGameMgr::ClientCommand(CBasePlayer *pPlayer, const char *cmd) if (i <= VOICE_MAX_PLAYERS_DW) { VoiceServerDebug("CVoiceGameMgr::ClientCommand: vban (0x%x) from %d\n", mask, playerClientIndex); - g_BanMasks[ playerClientIndex ].SetDWord(i - 1, mask); + g_BanMasks[playerClientIndex].SetDWord(i - 1, mask); } else VoiceServerDebug("CVoiceGameMgr::ClientCommand: invalid index (%d)\n", i); @@ -147,8 +140,8 @@ bool CVoiceGameMgr::ClientCommand(CBasePlayer *pPlayer, const char *cmd) { VoiceServerDebug("CVoiceGameMgr::ClientCommand: VModEnable (%d)\n", !!Q_atoi(CMD_ARGV(1))); - g_PlayerModEnable[ playerClientIndex ] = !!Q_atoi(CMD_ARGV(1)); - g_bWantModEnable[ playerClientIndex ] = false; + g_PlayerModEnable[playerClientIndex] = !!Q_atoi(CMD_ARGV(1)); + g_bWantModEnable[playerClientIndex] = false; //UpdateMasks(); return true; } @@ -177,13 +170,13 @@ void CVoiceGameMgr::UpdateMasks() CPlayerBitVec gameRulesMask; // Request the state of their "VModEnable" cvar. - if (g_bWantModEnable[ iClient ]) + if (g_bWantModEnable[iClient]) { MESSAGE_BEGIN(MSG_ONE, m_msgRequestState, nullptr, pEnt->pev); MESSAGE_END(); } - if (g_PlayerModEnable[ iClient ]) + if (g_PlayerModEnable[iClient]) { // Build a mask of who they can hear based on the game rules. for (int iOtherClient = 0; iOtherClient < m_nMaxPlayers; iOtherClient++) @@ -191,22 +184,22 @@ void CVoiceGameMgr::UpdateMasks() CBaseEntity *pEnt = UTIL_PlayerByIndex(iOtherClient + 1); if (pEnt && (bAllTalk || m_pHelper->CanPlayerHearPlayer(pPlayer, (CBasePlayer *)pEnt))) { - gameRulesMask[ iOtherClient ] = true; + gameRulesMask[iOtherClient] = true; } } } // If this is different from what the client has, send an update. - if (gameRulesMask != g_SentGameRulesMasks[ iClient ] || g_BanMasks[ iClient ] != g_SentBanMasks[ iClient ]) + if (gameRulesMask != g_SentGameRulesMasks[iClient] || g_BanMasks[iClient] != g_SentBanMasks[iClient]) { - g_SentGameRulesMasks[ iClient ] = gameRulesMask; - g_SentBanMasks[ iClient ] = g_BanMasks[ iClient ]; + g_SentGameRulesMasks[iClient] = gameRulesMask; + g_SentBanMasks[iClient] = g_BanMasks[iClient]; MESSAGE_BEGIN(MSG_ONE, m_msgPlayerVoiceMask, nullptr, pPlayer->pev); for (int dw = 0; dw < VOICE_MAX_PLAYERS_DW; dw++) { WRITE_LONG(gameRulesMask.GetDWord(dw)); - WRITE_LONG(g_BanMasks[ iClient ].GetDWord(dw)); + WRITE_LONG(g_BanMasks[iClient].GetDWord(dw)); } // ServerModEnable +1 to buffer size // WRITE_BYTE(1); @@ -216,7 +209,7 @@ void CVoiceGameMgr::UpdateMasks() // Tell the engine. for (int iOtherClient = 0; iOtherClient < m_nMaxPlayers; iOtherClient++) { - bool bCanHear = gameRulesMask[ iOtherClient ] && !g_BanMasks[ iClient ][ iOtherClient ]; + bool bCanHear = gameRulesMask[iOtherClient] && !g_BanMasks[iClient][iOtherClient]; SET_CLIENT_LISTENING(iClient + 1, iOtherClient + 1, bCanHear); } } diff --git a/regamedll/hookers/helper.h b/regamedll/hookers/helper.h deleted file mode 100644 index 23c3632b..00000000 --- a/regamedll/hookers/helper.h +++ /dev/null @@ -1,174 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include -#include - -#ifdef HOOK_GAMEDLL - -#define private public -#define protected public - -template -class MethodThunk { -public: - void Constructor(TArgs ... args) { - new(this) T(args ...); - } - - void Destructor() { - (*(T *)this).~T(); - } -}; - -namespace MsvcMethod { - namespace Detail { - using Counter = std::size_t(*)(); - - template - std::size_t GetIndex() { - return N; - } - - template - constexpr auto GenerateCounters_Helper(std::index_sequence) { - // There is no make_array (and/or deduction guides), so we need to explicitly define array template params - return std::array { &GetIndex ... }; - } - - template - auto counters = GenerateCounters_Helper(std::make_index_sequence{}); - - struct VIndexGetter {}; - struct ThisGetter { - decltype(auto) GetThis() const { - return this; - } - - decltype(auto) GetThis(...) const { - return this; - } - }; - - template - class Singleton { - public: - static T &GetInstance() { - static T instance = {}; - return instance; - } - }; - - // primary template - template - struct is_variadic_function : std::false_type {}; - template - struct is_variadic_function : std::true_type {}; - template - struct is_variadic_function : std::true_type {}; - template - struct is_variadic_function : std::true_type {}; - template - struct is_variadic_function : std::true_type {}; - template - struct is_variadic_function : std::true_type {}; - template - struct is_variadic_function : std::true_type {}; - template - struct is_variadic_function : std::true_type {}; - template - struct is_variadic_function : std::true_type {}; - template - struct is_variadic_function : std::true_type {}; - template - struct is_variadic_function : std::true_type {}; - template - struct is_variadic_function : std::true_type {}; - template - struct is_variadic_function : std::true_type {}; - - template - constexpr bool is_variadic_function_v = is_variadic_function::value; - - template - constexpr bool is_function_v = std::is_function::value; - } // namespace Detail - - static constexpr auto& counters = Detail::counters<256>; - - template - std::enable_if_t, std::uintptr_t> - GetVirtualIndex(TMethod T::*method) - { - decltype(auto) pcounters = counters.data(); - decltype(auto) vIndexGetter = (Detail::VIndexGetter *)&pcounters; - - using VIndexGetterFunction = std::conditional_t, std::size_t (Detail::VIndexGetter::*)(...) const, std::size_t(Detail::VIndexGetter::*)() const>; - VIndexGetterFunction vIndexGetterFunction; - { - *(std::uintptr_t *)&vIndexGetterFunction = *(std::uintptr_t *)&method; - } - - return (vIndexGetter->*vIndexGetterFunction)(); - } - - template - std::enable_if_t, std::uintptr_t> - GetVirtualAddress(TMethod T::*method) - { - using ThisGetterFunction = std::conditional_t, const T *(T::*)(...) const, const T *(T::*)() const>; - ThisGetterFunction thisGetterFunction = *(ThisGetterFunction *)&method; - { - decltype(auto) m = static_cast, const Detail::ThisGetter *(Detail::ThisGetter::*)(...) const, const Detail::ThisGetter *(Detail::ThisGetter::*)() const>>(&Detail::ThisGetter::GetThis); - *(std::uintptr_t *)&thisGetterFunction = *(std::uintptr_t *)&m; - } - - return *(*(std::uintptr_t **)(Detail::Singleton::GetInstance().*thisGetterFunction)() + GetVirtualIndex(method)); - } - - template - std::enable_if_t, std::uintptr_t> - GetVirtualAddressHierarc(TMethod T::*method, void *instance) - { - using ThisGetterFunction = std::conditional_t, const T *(T::*)(...) const, const T *(T::*)() const>; - ThisGetterFunction thisGetterFunction = *(ThisGetterFunction *)&method; - { - decltype(auto) m = static_cast, const Detail::ThisGetter *(Detail::ThisGetter::*)(...) const, const Detail::ThisGetter *(Detail::ThisGetter::*)() const>>(&Detail::ThisGetter::GetThis); - *(std::uintptr_t *)&thisGetterFunction = *(std::uintptr_t *)&m; - } - - return *(*(std::uintptr_t **)(((T *)instance)->*thisGetterFunction)() + GetVirtualIndex(method)); - } - - template - std::enable_if_t, std::uintptr_t> - GetAddress(TMethod (T::*method)) { - return (std::uintptr_t &)method; - } - - template - std::enable_if_t, std::uintptr_t> - GetAddress(TMethod (*method)) { - return (std::uintptr_t &)method; - } - -} // namespace MsvcMethod - -#ifdef _MSC_VER - #define VTABLE_LINK(offset, vtable, count) { offset, vtable, count } - #define GLOBALVAR_LINK(offset, symbol, var, ...) { offset, symbol, (size_t)&##var, __VA_ARGS__ } - #define HOOK_SYMBOLDEF(offset, symbol, func, ...) { offset, symbol, MsvcMethod::GetAddress<__VA_ARGS__>(&func) } - #define HOOK_SYMBOL_VIRTUAL_DEF(offset, symbol, func, ...) { offset, symbol, MsvcMethod::GetVirtualAddress<__VA_ARGS__>(&func) } - #define HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(offset, childclass, symbol, func, ...) { offset, symbol, MsvcMethod::GetVirtualAddressHierarc<__VA_ARGS__>(&func, &MsvcMethod::Detail::Singleton::GetInstance()) } - - #define HOOK_DEF(offset, func, ...) HOOK_SYMBOLDEF(offset, #func, func, __VA_ARGS__) - #define HOOK_VIRTUAL_DEF(offset, func, ...) HOOK_SYMBOL_VIRTUAL_DEF(offset, func, func, __VA_ARGS__) -#else - #error Hooking stuff is only available using MSVC compiler. -#endif // _MSC_VER - -#endif // HOOK_GAMEDLL diff --git a/regamedll/hookers/hooker.cpp b/regamedll/hookers/hooker.cpp deleted file mode 100644 index 7e2c8d37..00000000 --- a/regamedll/hookers/hooker.cpp +++ /dev/null @@ -1,273 +0,0 @@ -/* -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -*/ - -#include "precompiled.h" - -HIDDEN Module g_GameDLLModule = { NULL, NULL, NULL, NULL }; -HIDDEN Module g_EngineModule = { NULL, NULL, NULL, NULL }; - -// Offset where module assumed be loaded to ajust hooks offsets. NULL for the Linux to trigger symbols searching. -#ifdef _WIN32 -const size_t g_BaseOffset = 0x01D00000; -#else -const size_t g_BaseOffset = NULL; -#endif - -VirtualTableRef *GetVirtualTableRefAddr(const char *szClassName) -{ - VirtualTableRef *refData = g_TableRefs; - while (refData->symbolName != NULL) - { - if (!strcmp(refData->symbolName, szClassName)) - { - if (refData->originalAddress != NULL) - { - return refData; - } - } - refData++; - } - - return NULL; -} - -bool GetAddressUsingHook(size_t addr) -{ - for (FunctionHook *cfh = &g_FunctionHooks[0]; cfh->symbolName; cfh++) - { - if (addr == cfh->originalAddress) - { - return true; - } - } - return false; -} - -size_t OffsetToRebase(size_t addr) -{ - return (addr - g_GameDLLModule.base + g_BaseOffset); -} - -void *GetFunctionEntity(const char *szClassName) -{ - return Sys_GetProcAddress((HMODULE)g_GameDLLModule.base, szClassName); -} - -void printAddrRebase(size_t addr, const char *funcName) -{ - static int inum = 0; - addr += g_BaseOffset - g_GameDLLModule.base; - printf("#%d. %s - 0x%p\n", ++inum, funcName, (void *)addr); -} - -FunctionHook *GetFunctionPtrByName(const char *funcName) -{ - for (FunctionHook *cfh = &g_FunctionHooks[0]; cfh->symbolName; cfh++) - { - if (!strcmp(cfh->symbolName, funcName)) - return cfh; - } - - return NULL; -} - -void *GetOriginalFuncAddrOrDie(const char *funcName) -{ - for (FunctionHook *cfh = &g_FunctionHooks[0]; cfh->symbolName; cfh++) - { - if (!strcmp(cfh->symbolName, funcName)) - return (void*) cfh->originalAddress; - } - - Sys_Error("%s: Could not find function '%s'", __func__, funcName); - return NULL; -} - -void *GetOriginalFuncAddrOrDefault(const char *funcName, void *def) -{ - for (FunctionHook *cfh = &g_FunctionHooks[0]; cfh->symbolName; cfh++) - { - if (!strcmp(cfh->symbolName, funcName)) - return (void*)cfh->originalAddress; - } - - return def; -} - -void *GetFuncRefAddrOrDie(const char *funcName) -{ - for (AddressRef *cfh = &g_FunctionRefs[0]; cfh->symbolName; cfh++) - { - if (!strcmp(cfh->symbolName, funcName)) - return (void*)cfh->originalAddress; - } - - Sys_Error("%s: Could not find function '%s'", __func__, funcName); - return NULL; -} - -void *GetFuncRefAddrOrDefault(const char *funcName, void *def) -{ - for (AddressRef *cfh = &g_FunctionRefs[0]; cfh->symbolName; cfh++) - { - if (!strcmp(cfh->symbolName, funcName)) - return (void*)cfh->originalAddress; - } - - return def; -} - -int HookGameDLL(size_t gameAddr, size_t engAddr) -{ - if (gameAddr == NULL - || !FindModuleByAddress(gameAddr, &g_GameDLLModule) - || !FindModuleByAddress(engAddr, &g_EngineModule)) - { - return FALSE; - } - - // Find all addresses - bool success = true; - - AddressRef *refData = g_DataRefs; - while (refData->symbolName != NULL) - { - if (!GetAddress(&g_GameDLLModule, (Address *)refData, g_BaseOffset)) - { - UTIL_Log("%s: symbol not found \"%s\", symbol index: %i", __func__, refData->symbolName, refData->symbolIndex); - success = false; - } - refData++; - } - - AddressRef *refFunc = g_FunctionRefs; - while (refFunc->symbolName != NULL) - { - if (!GetAddress(&g_GameDLLModule, (Address *)refFunc, g_BaseOffset)) - { - UTIL_Log("%s: symbol not found \"%s\", symbol index: %i", __func__, refFunc->symbolName, refFunc->symbolIndex); - success = false; - } - refFunc++; - } - - FunctionHook *hookFunc = g_FunctionHooks; - while (hookFunc->handlerFunc != NULL) - { - if (!GetAddress(&g_GameDLLModule, (Address*)hookFunc, g_BaseOffset)) - { - UTIL_Log("%s: symbol not found \"%s\", symbol index: %i", __func__, hookFunc->symbolName, hookFunc->symbolIndex); - success = false; - } - hookFunc++; - } - - VirtualTableRef *refVtbl = g_TableRefs; - while (refVtbl->symbolName != NULL) - { - if (!GetAddress(&g_GameDLLModule, (Address *)refVtbl, g_BaseOffset)) - { - UTIL_Log("%s: symbol not found \"%s\"", __func__, refVtbl->symbolName); - success = false; - } - refVtbl++; - } - - if (!success) - { - UTIL_Log("%s: failed to hook gamedll!", __func__); - return FALSE; - } - - refData = g_DataRefs; - while (refData->addressRef != NULL) - { - if (!FindDataRef(&g_GameDLLModule, refData)) - return FALSE; - refData++; - } - - refFunc = g_FunctionRefs; - while (refFunc->addressRef != NULL) - { - if (!FindDataRef(&g_GameDLLModule, refFunc)) - return FALSE; - refFunc++; - } - - // Actually hook all things - hookFunc = g_FunctionHooks; - while (hookFunc->handlerFunc != NULL) - { - if (!HookFunction(&g_GameDLLModule, hookFunc)) - return FALSE; - - hookFunc++; - } - - return TRUE; -} - -#ifdef _WIN32 - -void *malloc_wrapper(size_t n) -{ - return malloc(n); -} - -void *_nh_malloc_wrapper(size_t n) -{ - return malloc(n); -} - -void *realloc_wrapper(void *memblock, size_t size) -{ - return realloc(memblock, size); -} - -void free_wrapper(void *p) -{ - free(p); -} - -void *calloc_wrapper(size_t n, size_t s) -{ - return calloc(n, s); -} - -char *strdup_wrapper(const char *s) -{ - return _strdup(s); -} - -int rand_wrapper() -{ - return rand(); -} - -#endif // _WIN32 diff --git a/regamedll/hookers/hooker.h b/regamedll/hookers/hooker.h deleted file mode 100644 index d51eebcc..00000000 --- a/regamedll/hookers/hooker.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include "osconfig.h" - -extern size_t OffsetToRebase(size_t addr); -extern bool GetAddressUsingHook(size_t addr); -extern VirtualTableRef *GetVirtualTableRefAddr(const char *szClassName); -extern void *GetFunctionEntity(const char *szClassName); -extern void printAddrRebase(size_t addr,const char *funcName); -extern FunctionHook *GetFunctionPtrByName(const char *funcName); -extern void *GetOriginalFuncAddrOrDie(const char *funcName); -extern void *GetOriginalFuncAddrOrDefault(const char *funcName, void *def); -extern void *GetFuncRefAddrOrDie(const char *funcName); -extern void *GetFuncRefAddrOrDefault(const char *funcName, void *def); - -extern FunctionHook g_FunctionHooks[]; -extern VirtualTableRef g_TableRefs[]; -extern AddressRef g_FunctionRefs[]; -extern AddressRef g_DataRefs[]; - -#ifdef _WIN32 - -void *malloc_wrapper(size_t size); -void *_nh_malloc_wrapper(size_t n); -void *realloc_wrapper(void *orig, size_t newSize); -void free_wrapper(void *mem); -void *calloc_wrapper(size_t count, size_t size); -char *strdup_wrapper(const char *s); -int rand_wrapper(); - -#endif // _WIN32 diff --git a/regamedll/hookers/hooker_impl.cpp b/regamedll/hookers/hooker_impl.cpp deleted file mode 100644 index baf58ef6..00000000 --- a/regamedll/hookers/hooker_impl.cpp +++ /dev/null @@ -1,661 +0,0 @@ -#include "precompiled.h" - -// xrefs -void (*pBotPhrase__Randomize)(); -void (*pCCSBotManager__AddBot)(); -void (*pCCSBot__UpdateLookAngles)(); - -// custom -char *CGameRules::m_GameDesc = nullptr; -bool CGameRules::m_bGameOver = false; - -bool CHalfLifeMultiplay::m_bSkipShowMenu = false; -bool CHalfLifeMultiplay::m_bNeededPlayers = false; -float CHalfLifeMultiplay::m_flEscapeRatio = 0; -float CHalfLifeMultiplay::m_flTimeLimit = 0; -float CHalfLifeMultiplay::m_flGameStartTime = 0; - -// globals -TYPEDESCRIPTION IMPL_CLASS(CBaseEntity, m_SaveData)[5]; -TYPEDESCRIPTION IMPL_CLASS(CAirtank, m_SaveData)[1]; -TYPEDESCRIPTION IMPL_CLASS(CBaseAnimating, m_SaveData)[5]; -TYPEDESCRIPTION IMPL_CLASS(CFuncRotating, m_SaveData)[5]; -TYPEDESCRIPTION IMPL_CLASS(CPendulum, m_SaveData)[8]; -TYPEDESCRIPTION IMPL_CLASS(CEnvGlobal, m_SaveData)[3]; -TYPEDESCRIPTION IMPL_CLASS(CMultiSource, m_SaveData)[4]; -TYPEDESCRIPTION IMPL_CLASS(CBaseButton, m_SaveData)[8]; -TYPEDESCRIPTION IMPL_CLASS(CMomentaryRotButton, m_SaveData)[6]; -TYPEDESCRIPTION IMPL_CLASS(CEnvSpark, m_SaveData)[1]; -TYPEDESCRIPTION IMPL_CLASS(CAmbientGeneric, m_SaveData)[4]; -TYPEDESCRIPTION IMPL_CLASS(CEnvSound, m_SaveData)[2]; -TYPEDESCRIPTION IMPL_CLASS(CSpeaker, m_SaveData)[1]; -TYPEDESCRIPTION IMPL_CLASS(CGlobalState, m_SaveData)[1]; -TYPEDESCRIPTION IMPL_CLASS(CBaseDoor, m_SaveData)[7]; -TYPEDESCRIPTION IMPL_CLASS(CMomentaryDoor, m_SaveData)[1]; -TYPEDESCRIPTION IMPL_CLASS(CBubbling, m_SaveData)[3]; -TYPEDESCRIPTION IMPL_CLASS(CLightning, m_SaveData)[13]; -TYPEDESCRIPTION IMPL_CLASS(CLaser, m_SaveData)[3]; -TYPEDESCRIPTION IMPL_CLASS(CGlow, m_SaveData)[2]; -TYPEDESCRIPTION IMPL_CLASS(CSprite, m_SaveData)[2]; -TYPEDESCRIPTION IMPL_CLASS(CGibShooter, m_SaveData)[7]; -TYPEDESCRIPTION IMPL_CLASS(CEnvExplosion, m_SaveData)[2]; -TYPEDESCRIPTION IMPL_CLASS(CBreakable, m_SaveData)[5]; -TYPEDESCRIPTION IMPL_CLASS(CPushable, m_SaveData)[2]; -TYPEDESCRIPTION IMPL_CLASS(CFuncTank, m_SaveData)[26]; -TYPEDESCRIPTION IMPL_CLASS(CFuncTankLaser, m_SaveData)[2]; -TYPEDESCRIPTION IMPL_CLASS(CFuncTankControls, m_SaveData)[1]; -TYPEDESCRIPTION IMPL_CLASS(CGrenade, m_SaveData)[15]; -TYPEDESCRIPTION IMPL_CLASS(CRecharge, m_SaveData)[5]; -TYPEDESCRIPTION IMPL_CLASS(CCycler, m_SaveData)[1]; -TYPEDESCRIPTION IMPL_CLASS(CCyclerSprite, m_SaveData)[3]; -TYPEDESCRIPTION IMPL_CLASS(CWreckage, m_SaveData)[1]; -TYPEDESCRIPTION IMPL_CLASS(CWallHealth, m_SaveData)[5]; -TYPEDESCRIPTION IMPL_CLASS(CLight, m_SaveData)[2]; -TYPEDESCRIPTION IMPL_CLASS(CRuleEntity, m_SaveData)[1]; -TYPEDESCRIPTION IMPL_CLASS(CGameText, m_SaveData)[1]; -TYPEDESCRIPTION IMPL_CLASS(CGamePlayerZone, m_SaveData)[4]; -TYPEDESCRIPTION IMPL_CLASS(CFuncMortarField, m_SaveData)[6]; -TYPEDESCRIPTION IMPL_CLASS(CPathCorner, m_SaveData)[1]; -TYPEDESCRIPTION IMPL_CLASS(CPathTrack, m_SaveData)[5]; -TYPEDESCRIPTION IMPL_CLASS(CBasePlatTrain, m_SaveData)[3]; -TYPEDESCRIPTION IMPL_CLASS(CFuncPlatRot, m_SaveData)[2]; -TYPEDESCRIPTION IMPL_CLASS(CFuncTrain, m_SaveData)[3]; -TYPEDESCRIPTION IMPL_CLASS(CFuncTrackTrain, m_SaveData)[12]; -TYPEDESCRIPTION IMPL_CLASS(CFuncTrackChange, m_SaveData)[9]; -TYPEDESCRIPTION IMPL_CLASS(CGunTarget, m_SaveData)[1]; -TYPEDESCRIPTION IMPL_CLASS(CBaseDelay, m_SaveData)[2]; -TYPEDESCRIPTION IMPL_CLASS(CBaseToggle, m_SaveData)[19]; -TYPEDESCRIPTION IMPL_CLASS(CFuncWeaponCheck, m_SaveData)[6]; -TYPEDESCRIPTION IMPL_CLASS(CBaseGrenCatch, m_SaveData)[5]; -TYPEDESCRIPTION IMPL_CLASS(CFrictionModifier, m_SaveData)[1]; -TYPEDESCRIPTION IMPL_CLASS(CAutoTrigger, m_SaveData)[2]; -TYPEDESCRIPTION IMPL_CLASS(CTriggerRelay, m_SaveData)[1]; -TYPEDESCRIPTION IMPL_CLASS(CMultiManager, m_SaveData)[5]; -TYPEDESCRIPTION IMPL_CLASS(CChangeLevel, m_SaveData)[4]; -TYPEDESCRIPTION IMPL_CLASS(CTriggerChangeTarget, m_SaveData)[1]; -TYPEDESCRIPTION IMPL_CLASS(CTriggerCamera, m_SaveData)[13]; -TYPEDESCRIPTION IMPL_CLASS(CFuncVehicle, m_SaveData)[12]; -TYPEDESCRIPTION IMPL_CLASS(CBasePlayerItem, m_SaveData)[3]; -TYPEDESCRIPTION IMPL_CLASS(CBasePlayerWeapon, m_SaveData)[7]; -TYPEDESCRIPTION IMPL_CLASS(CWeaponBox, m_SaveData)[4]; -TYPEDESCRIPTION IMPL_CLASS(CRevertSaved, m_SaveData)[2]; - -TYPEDESCRIPTION IMPL_CLASS(CBasePlayer, m_playerSaveData)[40]; -TYPEDESCRIPTION gGlobalEntitySaveData[3]; - -// globals gamerules -CGameRules *g_pGameRules; -//char mp_com_token[1500]; -cvar_t *sv_clienttrace; - -// globals player.cpp -int giPrecacheGrunt, gmsgWeapPickup, gmsgHudText, gmsgHudTextArgs, gmsgShake, gmsgFade, gmsgFlashlight, gmsgFlashBattery, gmsgResetHUD, -gmsgInitHUD, gmsgViewMode, gmsgShowGameTitle, gmsgCurWeapon, gmsgHealth, gmsgDamage, gmsgBattery, gmsgTrain, gmsgLogo, -gmsgWeaponList, gmsgAmmoX, gmsgDeathMsg, gmsgScoreAttrib, gmsgScoreInfo, gmsgTeamInfo, gmsgTeamScore, gmsgGameMode, gmsgMOTD, -gmsgServerName, gmsgAmmoPickup, gmsgItemPickup, gmsgHideWeapon, gmsgSayText, gmsgTextMsg, gmsgSetFOV, gmsgShowMenu, gmsgSendAudio, -gmsgRoundTime, gmsgMoney, gmsgBlinkAcct, gmsgArmorType, gmsgStatusValue, gmsgStatusText, gmsgStatusIcon, gmsgBarTime, gmsgReloadSound, -gmsgCrosshair, gmsgNVGToggle, gmsgRadar, gmsgSpectator, gmsgVGUIMenu, gmsgCZCareer, gmsgCZCareerHUD, gmsgTaskTime, gmsgTutorText, -gmsgTutorLine, gmsgShadowIdx, gmsgTutorState, gmsgTutorClose, gmsgAllowSpec, gmsgBombDrop, gmsgBombPickup, gmsgHostagePos, gmsgHostageK, -gmsgGeigerRange, gmsgSendCorpse, gmsgHLTV, gmsgSpecHealth, gmsgForceCam, gmsgADStop, gmsgReceiveW, gmsgScenarioIcon, gmsgBotVoice, -gmsgBuyClose, gmsgItemStatus, gmsgLocation, gmsgSpecHealth2, gmsgBarTime2, gmsgBotProgress, gmsgBrass, gmsgFog, gmsgShowTimer; -BOOL gInitHUD; -cvar_t *sv_aim; -WeaponStruct g_weaponStruct[ MAX_WEAPONS ]; -char *(*CDeadHEV::pm_szPoses)[4]; - -// globals hostages -CHostageManager *g_pHostages; -int g_iHostageNumber; - -cvar_t cv_hostage_debug; -cvar_t cv_hostage_stop; - -float (*CLocalNav::ps_flStepSize); -int (*CLocalNav::pqptr); -EHANDLE (*CLocalNav::pqueue)[20]; -int (*CLocalNav::ptot_inqueue); -float (*CLocalNav::pnodeval); -float (*CLocalNav::pflNextCvarCheck); -float (*CLocalNav::pflLastThinkTime); -EHANDLE (*CLocalNav::phostages)[20]; -int (*CLocalNav::ptot_hostages); - -// soundent -CSoundEnt *pSoundEnt; - -// globals weapons -const char *g_pModelNameLaser; -ItemInfo IMPL_CLASS(CBasePlayerItem, m_ItemInfoArray)[32]; -AmmoInfo IMPL_CLASS(CBasePlayerItem, m_AmmoInfoArray)[32]; - -AutoBuyInfoStruct g_autoBuyInfo[35]; -WeaponAliasInfo g_weaponAliasInfo[39]; -WeaponBuyAliasInfo g_weaponBuyAliasInfo[43]; -WeaponClassAliasInfo g_weaponClassAliasInfo[46]; -WeaponInfoStruct g_weaponInfo[27]; - -// globals utils -TYPEDESCRIPTION gEntvarsDescription[86]; -unsigned int seed_table[256]; -int g_groupop; -int g_groupmask; -const int gSizes[18]; - -// globals bots -CBotManager *TheBots; -BotPhraseManager *TheBotPhrases; -//CBaseEntity *g_pSelectedZombieSpawn; - -CountdownTimer IMPL_CLASS(BotChatterInterface, m_encourageTimer); -IntervalTimer IMPL_CLASS(BotChatterInterface, m_radioSilenceInterval)[ 2 ]; - -float IMPL_CLASS(CCSBotManager, m_flNextCVarCheck); -bool IMPL_CLASS(CCSBotManager, m_isMapDataLoaded); -bool IMPL_CLASS(CCSBotManager, m_isLearningMap); -bool IMPL_CLASS(CCSBotManager, m_isAnalysisRequested); -NavEditCmdType IMPL_CLASS(CCSBotManager, m_editCmd); - -cvar_t cv_bot_traceview; -cvar_t cv_bot_stop; -cvar_t cv_bot_show_nav; -cvar_t cv_bot_show_danger; -cvar_t cv_bot_nav_edit; -cvar_t cv_bot_nav_zdraw; -cvar_t cv_bot_walk; -cvar_t cv_bot_difficulty; -cvar_t cv_bot_debug; -cvar_t cv_bot_quicksave; -cvar_t cv_bot_quota; -cvar_t cv_bot_quota_match; -cvar_t cv_bot_prefix; -cvar_t cv_bot_allow_rogues; -cvar_t cv_bot_allow_pistols; -cvar_t cv_bot_allow_shotguns; -cvar_t cv_bot_allow_sub_machine_guns; -cvar_t cv_bot_allow_rifles; -cvar_t cv_bot_allow_machine_guns; -cvar_t cv_bot_allow_grenades; -cvar_t cv_bot_allow_snipers; -cvar_t cv_bot_allow_shield; -cvar_t cv_bot_join_team; -cvar_t cv_bot_join_after_player; -cvar_t cv_bot_auto_vacate; -cvar_t cv_bot_zombie; -cvar_t cv_bot_defer_to_human; -cvar_t cv_bot_chatter; -cvar_t cv_bot_profile_db; - -// globals globals.cpp -const Vector g_vecZero; -u_long g_ulFrameCount; - -// globals func_tank.cpp -Vector gTankSpread[5]; - -// globals func_break.cpp -const char *(*CBreakable::ppSpawnObjects)[32]; -const char *(*CBreakable::ppSoundsWood)[3]; -const char *(*CBreakable::ppSoundsFlesh)[6]; -const char *(*CBreakable::ppSoundsMetal)[3]; -const char *(*CBreakable::ppSoundsConcrete)[3]; -const char *(*CBreakable::ppSoundsGlass)[3]; -char *(*CPushable::pm_soundNames)[3]; - -// globals sound.cpp -dynpitchvol_t rgdpvpreset[CDPVPRESETMAX]; -int fSentencesInit; -int gcallsentences; - -// globals cbase.cpp -DLL_FUNCTIONS gFunctionTable; -NEW_DLL_FUNCTIONS gNewDLLFunctions; -CMemoryPool hashItemMemPool; -BOOL gTouchDisabled; - -// globals world.cpp -DLL_DECALLIST gDecals[42]; - -// globals animation.cpp -sv_blending_interface_t svBlending; - -// globals career_tasks.cpp -CCareerTaskManager *TheCareerTasks; -const TaskInfo taskInfo[21]; - -// globals client.cpp -BOOL g_fGameOver; // moved from gamerules -float g_flTimeLimit; // moved from gamerules -float g_flResetTime; // moved from gamerules -bool g_bClientPrintEnable; - -char *sPlayerModelFiles[12]; -bool g_skipCareerInitialSpawn; - -entity_field_alias_t entity_field_alias[6]; -entity_field_alias_t player_field_alias[3]; -entity_field_alias_t custom_entity_field_alias[9]; -int g_serveractive; - -// globals debug.cpp -DebugOutputLevel outputLevel[6]; -unsigned int theDebugOutputTypes; -char theDebugBuffer[MAX_DEBUG_BUFF_SIZE]; - -// globals tutors -const char *g_TutorStateStrings[20]; -const char *TutorIdentifierList[150]; - -bool s_tutorDisabledThisGame; -float s_nextCvarCheckTime; - -cvar_t cv_tutor_message_repeats; -cvar_t cv_tutor_debug_level; -cvar_t cv_tutor_view_distance; -cvar_t cv_tutor_viewable_check_interval; -cvar_t cv_tutor_look_distance; -cvar_t cv_tutor_look_angle; -cvar_t cv_tutor_examine_time; -cvar_t cv_tutor_message_minimum_display_time; -cvar_t cv_tutor_message_character_display_time_coefficient; -cvar_t cv_tutor_hint_interval_time; - -// globals game.cpp -cvar_t *g_psv_gravity; -cvar_t *g_psv_aim; -cvar_t *g_footsteps; -cvar_t *g_psv_accelerate; -cvar_t *g_psv_friction; -cvar_t *g_psv_stopspeed; - -cvar_t displaysoundlist; -cvar_t timelimit; -cvar_t flashlight; -cvar_t decalfrequency; -cvar_t fadetoblack; -cvar_t fragsleft; -cvar_t timeleft; -cvar_t friendlyfire; -cvar_t allowmonsters; -cvar_t roundtime; -cvar_t buytime; -cvar_t freezetime; -cvar_t c4timer; -cvar_t ghostfrequency; -cvar_t autokick; -cvar_t autokick_timeout; -cvar_t restartround; -cvar_t sv_restart; -cvar_t limitteams; -cvar_t autoteambalance; -cvar_t tkpunish; -cvar_t hostagepenalty; -cvar_t mirrordamage; -cvar_t logmessages; -cvar_t forcecamera; -cvar_t forcechasecam; -cvar_t mapvoteratio; -cvar_t logdetail; -cvar_t startmoney; -cvar_t maxrounds; -cvar_t winlimit; -cvar_t windifference; -cvar_t playerid; -cvar_t allow_spectators; -cvar_t mp_chattime; -cvar_t kick_percent; -cvar_t humans_join_team; - -// NOXREF -//cvar_t sk_agrunt_health1; -//cvar_t sk_agrunt_health2; -//cvar_t sk_agrunt_health3; -//cvar_t sk_agrunt_dmg_punch1; -//cvar_t sk_agrunt_dmg_punch2; -//cvar_t sk_agrunt_dmg_punch3; -//cvar_t sk_apache_health1; -//cvar_t sk_apache_health2; -//cvar_t sk_apache_health3; -//cvar_t sk_barney_health1; -//cvar_t sk_barney_health2; -//cvar_t sk_barney_health3; -//cvar_t sk_bullsquid_health1; -//cvar_t sk_bullsquid_health2; -//cvar_t sk_bullsquid_health3; -//cvar_t sk_bullsquid_dmg_bite1; -//cvar_t sk_bullsquid_dmg_bite2; -//cvar_t sk_bullsquid_dmg_bite3; -//cvar_t sk_bullsquid_dmg_whip1; -//cvar_t sk_bullsquid_dmg_whip2; -//cvar_t sk_bullsquid_dmg_whip3; -//cvar_t sk_bullsquid_dmg_spit1; -//cvar_t sk_bullsquid_dmg_spit2; -//cvar_t sk_bullsquid_dmg_spit3; -//cvar_t sk_bigmomma_health_factor1; -//cvar_t sk_bigmomma_health_factor2; -//cvar_t sk_bigmomma_health_factor3; -//cvar_t sk_bigmomma_dmg_slash1; -//cvar_t sk_bigmomma_dmg_slash2; -//cvar_t sk_bigmomma_dmg_slash3; -//cvar_t sk_bigmomma_dmg_blast1; -//cvar_t sk_bigmomma_dmg_blast2; -//cvar_t sk_bigmomma_dmg_blast3; -//cvar_t sk_bigmomma_radius_blast1; -//cvar_t sk_bigmomma_radius_blast2; -//cvar_t sk_bigmomma_radius_blast3; -//cvar_t sk_gargantua_health1; -//cvar_t sk_gargantua_health2; -//cvar_t sk_gargantua_health3; -//cvar_t sk_gargantua_dmg_slash1; -//cvar_t sk_gargantua_dmg_slash2; -//cvar_t sk_gargantua_dmg_slash3; -//cvar_t sk_gargantua_dmg_fire1; -//cvar_t sk_gargantua_dmg_fire2; -//cvar_t sk_gargantua_dmg_fire3; -//cvar_t sk_gargantua_dmg_stomp1; -//cvar_t sk_gargantua_dmg_stomp2; -//cvar_t sk_gargantua_dmg_stomp3; -//cvar_t sk_hassassin_health1; -//cvar_t sk_hassassin_health2; -//cvar_t sk_hassassin_health3; -//cvar_t sk_headcrab_health1; -//cvar_t sk_headcrab_health2; -//cvar_t sk_headcrab_health3; -//cvar_t sk_headcrab_dmg_bite1; -//cvar_t sk_headcrab_dmg_bite2; -//cvar_t sk_headcrab_dmg_bite3; -//cvar_t sk_hgrunt_health1; -//cvar_t sk_hgrunt_health2; -//cvar_t sk_hgrunt_health3; -//cvar_t sk_hgrunt_kick1; -//cvar_t sk_hgrunt_kick2; -//cvar_t sk_hgrunt_kick3; -//cvar_t sk_hgrunt_pellets1; -//cvar_t sk_hgrunt_pellets2; -//cvar_t sk_hgrunt_pellets3; -//cvar_t sk_hgrunt_gspeed1; -//cvar_t sk_hgrunt_gspeed2; -//cvar_t sk_hgrunt_gspeed3; -//cvar_t sk_houndeye_health1; -//cvar_t sk_houndeye_health2; -//cvar_t sk_houndeye_health3; -//cvar_t sk_houndeye_dmg_blast1; -//cvar_t sk_houndeye_dmg_blast2; -//cvar_t sk_houndeye_dmg_blast3; -//cvar_t sk_islave_health1; -//cvar_t sk_islave_health2; -//cvar_t sk_islave_health3; -//cvar_t sk_islave_dmg_claw1; -//cvar_t sk_islave_dmg_claw2; -//cvar_t sk_islave_dmg_claw3; -//cvar_t sk_islave_dmg_clawrake1; -//cvar_t sk_islave_dmg_clawrake2; -//cvar_t sk_islave_dmg_clawrake3; -//cvar_t sk_islave_dmg_zap1; -//cvar_t sk_islave_dmg_zap2; -//cvar_t sk_islave_dmg_zap3; -//cvar_t sk_ichthyosaur_health1; -//cvar_t sk_ichthyosaur_health2; -//cvar_t sk_ichthyosaur_health3; -//cvar_t sk_ichthyosaur_shake1; -//cvar_t sk_ichthyosaur_shake2; -//cvar_t sk_ichthyosaur_shake3; -//cvar_t sk_leech_health1; -//cvar_t sk_leech_health2; -//cvar_t sk_leech_health3; -//cvar_t sk_leech_dmg_bite1; -//cvar_t sk_leech_dmg_bite2; -//cvar_t sk_leech_dmg_bite3; -//cvar_t sk_controller_health1; -//cvar_t sk_controller_health2; -//cvar_t sk_controller_health3; -//cvar_t sk_controller_dmgzap1; -//cvar_t sk_controller_dmgzap2; -//cvar_t sk_controller_dmgzap3; -//cvar_t sk_controller_speedball1; -//cvar_t sk_controller_speedball2; -//cvar_t sk_controller_speedball3; -//cvar_t sk_controller_dmgball1; -//cvar_t sk_controller_dmgball2; -//cvar_t sk_controller_dmgball3; -//cvar_t sk_nihilanth_health1; -//cvar_t sk_nihilanth_health2; -//cvar_t sk_nihilanth_health3; -//cvar_t sk_nihilanth_zap1; -//cvar_t sk_nihilanth_zap2; -//cvar_t sk_nihilanth_zap3; -//cvar_t sk_scientist_health1; -//cvar_t sk_scientist_health2; -//cvar_t sk_scientist_health3; -//cvar_t sk_snark_health1; -//cvar_t sk_snark_health2; -//cvar_t sk_snark_health3; -//cvar_t sk_snark_dmg_bite1; -//cvar_t sk_snark_dmg_bite2; -//cvar_t sk_snark_dmg_bite3; -//cvar_t sk_snark_dmg_pop1; -//cvar_t sk_snark_dmg_pop2; -//cvar_t sk_snark_dmg_pop3; -//cvar_t sk_zombie_health1; -//cvar_t sk_zombie_health2; -//cvar_t sk_zombie_health3; -//cvar_t sk_zombie_dmg_one_slash1; -//cvar_t sk_zombie_dmg_one_slash2; -//cvar_t sk_zombie_dmg_one_slash3; -//cvar_t sk_zombie_dmg_both_slash1; -//cvar_t sk_zombie_dmg_both_slash2; -//cvar_t sk_zombie_dmg_both_slash3; -//cvar_t sk_turret_health1; -//cvar_t sk_turret_health2; -//cvar_t sk_turret_health3; -//cvar_t sk_miniturret_health1; -//cvar_t sk_miniturret_health2; -//cvar_t sk_miniturret_health3; -//cvar_t sk_sentry_health1; -//cvar_t sk_sentry_health2; -//cvar_t sk_sentry_health3; -//cvar_t sk_plr_crowbar1; -//cvar_t sk_plr_crowbar2; -//cvar_t sk_plr_crowbar3; - -cvar_t sk_plr_9mm_bullet1; -cvar_t sk_plr_9mm_bullet2; -cvar_t sk_plr_9mm_bullet3; -cvar_t sk_plr_357_bullet1; -cvar_t sk_plr_357_bullet2; -cvar_t sk_plr_357_bullet3; -cvar_t sk_plr_9mmAR_bullet1; -cvar_t sk_plr_9mmAR_bullet2; -cvar_t sk_plr_9mmAR_bullet3; -cvar_t sk_plr_9mmAR_grenade1; -cvar_t sk_plr_9mmAR_grenade2; -cvar_t sk_plr_9mmAR_grenade3; -cvar_t sk_plr_buckshot1; -cvar_t sk_plr_buckshot2; -cvar_t sk_plr_buckshot3; - -// NOXREF -//cvar_t sk_plr_xbow_bolt_client1; -//cvar_t sk_plr_xbow_bolt_client2; -//cvar_t sk_plr_xbow_bolt_client3; -//cvar_t sk_plr_xbow_bolt_monster1; -//cvar_t sk_plr_xbow_bolt_monster2; -//cvar_t sk_plr_xbow_bolt_monster3; - -cvar_t sk_plr_rpg1; -cvar_t sk_plr_rpg2; -cvar_t sk_plr_rpg3; - -// NOXREF -//cvar_t sk_plr_gauss1; -//cvar_t sk_plr_gauss2; -//cvar_t sk_plr_gauss3; -//cvar_t sk_plr_egon_narrow1; -//cvar_t sk_plr_egon_narrow2; -//cvar_t sk_plr_egon_narrow3; -//cvar_t sk_plr_egon_wide1; -//cvar_t sk_plr_egon_wide2; -//cvar_t sk_plr_egon_wide3; -//cvar_t sk_plr_hand_grenade1; -//cvar_t sk_plr_hand_grenade2; -//cvar_t sk_plr_hand_grenade3; -//cvar_t sk_plr_satchel1; -//cvar_t sk_plr_satchel2; -//cvar_t sk_plr_satchel3; -//cvar_t sk_plr_tripmine1; -//cvar_t sk_plr_tripmine2; -//cvar_t sk_plr_tripmine3; - -cvar_t sk_12mm_bullet1; -cvar_t sk_12mm_bullet2; -cvar_t sk_12mm_bullet3; -cvar_t sk_9mmAR_bullet1; -cvar_t sk_9mmAR_bullet2; -cvar_t sk_9mmAR_bullet3; -cvar_t sk_9mm_bullet1; -cvar_t sk_9mm_bullet2; -cvar_t sk_9mm_bullet3; - -// NOXREF -//cvar_t sk_hornet_dmg1; -//cvar_t sk_hornet_dmg2; -//cvar_t sk_hornet_dmg3; - -cvar_t sk_suitcharger1; -cvar_t sk_suitcharger2; -cvar_t sk_suitcharger3; -cvar_t sk_battery1; -cvar_t sk_battery2; -cvar_t sk_battery3; -cvar_t sk_healthcharger1; -cvar_t sk_healthcharger2; -cvar_t sk_healthcharger3; -cvar_t sk_healthkit1; -cvar_t sk_healthkit2; -cvar_t sk_healthkit3; -cvar_t sk_scientist_heal1; -cvar_t sk_scientist_heal2; -cvar_t sk_scientist_heal3; - -// NOXREF -//cvar_t sk_monster_head1; -//cvar_t sk_monster_head2; -//cvar_t sk_monster_head3; -//cvar_t sk_monster_chest1; -//cvar_t sk_monster_chest2; -//cvar_t sk_monster_chest3; -//cvar_t sk_monster_stomach1; -//cvar_t sk_monster_stomach2; -//cvar_t sk_monster_stomach3; -//cvar_t sk_monster_arm1; -//cvar_t sk_monster_arm2; -//cvar_t sk_monster_arm3; -//cvar_t sk_monster_leg1; -//cvar_t sk_monster_leg2; -//cvar_t sk_monster_leg3; -//cvar_t sk_player_head1; -//cvar_t sk_player_head2; -//cvar_t sk_player_head3; -//cvar_t sk_player_chest1; -//cvar_t sk_player_chest2; -//cvar_t sk_player_chest3; -//cvar_t sk_player_stomach1; -//cvar_t sk_player_stomach2; -//cvar_t sk_player_stomach3; -//cvar_t sk_player_arm1; -//cvar_t sk_player_arm2; -//cvar_t sk_player_arm3; -//cvar_t sk_player_leg1; -//cvar_t sk_player_leg2; -//cvar_t sk_player_leg3; - -// globals shared_util -char s_shared_token[1500]; -char s_shared_quote; - -// bot util -const char *GameEventName[ NUM_GAME_EVENTS + 1 ]; - -// voice_gamemgr -cvar_t voice_serverdebug; -cvar_t sv_alltalk; - -// bot -float g_flBotCommandInterval; -float g_flBotFullThinkInterval; -const char *BotArgs[4]; -bool UseBotArgs; - -// utlsymbol -LessCtx_t g_LessCtx; - -// bot_profile -BotProfileManager *TheBotProfiles; -char *BotDifficultyName[5]; - -// bot_util -short s_iBeamSprite; -float cosTable[256]; - -// nav_area -unsigned int IMPL_CLASS(CNavArea, m_nextID); -unsigned int IMPL_CLASS(CNavArea, m_masterMarker); -unsigned int IMPL_CLASS(HidingSpot, m_nextID); -unsigned int IMPL_CLASS(HidingSpot, m_masterMarker); -NavLadderList TheNavLadderList; -HidingSpotList TheHidingSpotList; -NavAreaList TheNavAreaList; -CNavAreaGrid TheNavAreaGrid; -CNavArea *IMPL_CLASS(CNavArea, m_openList); -bool IMPL_CLASS(CNavArea, m_isReset); -float lastDrawTimestamp; -NavAreaList goodSizedAreaList; -CNavArea *markedArea; -CNavArea *lastSelectedArea; -NavCornerType markedCorner; -bool isCreatingNavArea; -bool isAnchored; -Vector anchor; -bool isPlaceMode; -bool isPlacePainting; -float editTimestamp; -unsigned int BlockedID[256]; -int BlockedIDCount; - -// nav_node -NavDirType Opposite[4]; -CNavNode *IMPL_CLASS(CNavNode, m_list); -unsigned int IMPL_CLASS(CNavNode, m_listLength); - -// pm_shared -int pm_shared_initialized; -vec3_t rgv3tStuckTable[54]; -int rgStuckLast[MAX_CLIENTS][2]; -int pm_gcTextures; -char pm_grgszTextureName[1024][17]; -char pm_grgchTextureType[1024]; -playermove_t *pmove; -int g_onladder; - -// pm_math -vec3_t vec3_origin; -int nanmask; - -// sound -int gcTextures; -BOOL fTextureTypeInit; - -/*void HostageEscapeToCoverState::OnMoveToFailure_(const Vector &goal, MoveToFailureType reason) -{ - // TODO: why this - 1? Hacks? - // need investigation - HostageEscapeState *escape = (HostageEscapeState *)*((int *)this - 1); - escape->LookAround(); -}*/ - -// cs_bot_chatter -// you can not hook this function, because it uses the rand() function -// which does not allow us to carry out tests because different results at the output. -void __declspec(naked) BotPhrase::Randomize() { __asm { jmp pBotPhrase__Randomize } } - -// cs_bot_vision -void __declspec(naked) CCSBot::UpdateLookAngles() { __asm { jmp pCCSBot__UpdateLookAngles } } diff --git a/regamedll/hookers/hooker_impl.h b/regamedll/hookers/hooker_impl.h deleted file mode 100644 index 887f1686..00000000 --- a/regamedll/hookers/hooker_impl.h +++ /dev/null @@ -1,949 +0,0 @@ -/* -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -*/ - -#ifndef HOOKER_IMPL_H -#define HOOKER_IMPL_H -#ifdef _WIN32 -#pragma once -#endif - -#include "studio.h" -#include "game_shared/voice_common.h" - -class CBaseEntity; -class CBaseMonster; -class CBasePlayer; -class CGrenade; - -class CBot; -class CCSBot; -class CCSBotManager; -class BotStatement; -class BotPhrase; -class CSGameState; - -class CImprov; -class CNavArea; -class HidingSpot; -class CNavNode; -class PathCost; -class ShortestPathCost; -class HostagePathCost; -class CHostageImprov; -class CLocalNav; -class HostageAnimateState; - -class CSave; -class CGraph; -class CRestore; -class CSaveRestoreBuffer; - -typedef Vector VectorRef; -typedef float FloatRef; - -#undef CUSTOM_MEMBER -#define CUSTOM_MEMBER static - -#define __API_HOOK(fname)\ - fname - -#define IMPL(var)\ - (*p##var) - -#define IMPL_CLASS(baseClass,var)\ - (*baseClass::p##var) - -#define LINK_HOOK_CLASS_VOID_CHAIN(...) -#define LINK_HOOK_CLASS_VOID_CHAIN2(...) -#define LINK_HOOK_CLASS_CHAIN(...) -#define LINK_HOOK_CLASS_CHAIN2(...) -#define LINK_HOOK_CLASS_VOID_CUSTOM_CHAIN(...) -#define LINK_HOOK_CLASS_VOID_CUSTOM_CHAIN2(...) -#define LINK_HOOK_CLASS_CUSTOM_CHAIN(...) -#define LINK_HOOK_CLASS_CUSTOM_CHAIN2(...) -#define LINK_HOOK_VOID_CHAIN(...) -#define LINK_HOOK_VOID_CHAIN2(...) -#define LINK_HOOK_CHAIN(...) -#define LINK_HOOK_CHAIN2(...) - -// refs -extern void (*pBotPhrase__Randomize)(); -extern void (*pCCSBotManager__AddBot)(); -extern void (*pCCSBot__UpdateLookAngles)(); - -// globals export -#define g_engfuncs (*pg_engfuncs) -#define gpGlobals (*pgpGlobals) - -// globals cbase -#define stringsHashTable (*pstringsHashTable) -#define hashItemMemPool (*phashItemMemPool) -#define gTouchDisabled (*pgTouchDisabled) -#define gFunctionTable (*pgFunctionTable) -#define gNewDLLFunctions (*pgNewDLLFunctions) -#define grgszTextureName (*pgrgszTextureName) -#define grgchTextureType (*pgrgchTextureType) -#define fTextureTypeInit (*pfTextureTypeInit) -#define gcTextures (*pgcTextures) - -// globals player -#define m_szPoses (*pm_szPoses) -#define g_weaponStruct (*pg_weaponStruct) -#define gEvilImpulse101 (*pgEvilImpulse101) -#define g_szMapBriefingText (*pg_szMapBriefingText) -#define g_pevLastInflictor (*pg_pevLastInflictor) -#define g_pLastSpawn (*pg_pLastSpawn) -#define g_pLastCTSpawn (*pg_pLastCTSpawn) -#define g_pLastTerroristSpawn (*pg_pLastTerroristSpawn) -#define gInitHUD (*pgInitHUD) -#define sv_aim (*psv_aim) -//#define zombieSpawnCount (*pzombieSpawnCount) -//#define zombieSpawn (*pzombieSpawn) -//#define g_pSelectedZombieSpawn (*pg_pSelectedZombieSpawn) -#define giPrecacheGrunt (*pgiPrecacheGrunt) -#define gmsgWeapPickup (*pgmsgWeapPickup) -#define gmsgHudText (*pgmsgHudText) -#define gmsgHudTextArgs (*pgmsgHudTextArgs) -#define gmsgShake (*pgmsgShake) -#define gmsgFade (*pgmsgFade) -#define gmsgFlashlight (*pgmsgFlashlight) -#define gmsgFlashBattery (*pgmsgFlashBattery) -#define gmsgResetHUD (*pgmsgResetHUD) -#define gmsgInitHUD (*pgmsgInitHUD) -#define gmsgViewMode (*pgmsgViewMode) -#define gmsgShowGameTitle (*pgmsgShowGameTitle) -#define gmsgCurWeapon (*pgmsgCurWeapon) -#define gmsgHealth (*pgmsgHealth) -#define gmsgDamage (*pgmsgDamage) -#define gmsgBattery (*pgmsgBattery) -#define gmsgTrain (*pgmsgTrain) -#define gmsgLogo (*pgmsgLogo) -#define gmsgWeaponList (*pgmsgWeaponList) -#define gmsgAmmoX (*pgmsgAmmoX) -#define gmsgDeathMsg (*pgmsgDeathMsg) -#define gmsgScoreAttrib (*pgmsgScoreAttrib) -#define gmsgScoreInfo (*pgmsgScoreInfo) -#define gmsgTeamInfo (*pgmsgTeamInfo) -#define gmsgTeamScore (*pgmsgTeamScore) -#define gmsgGameMode (*pgmsgGameMode) -#define gmsgMOTD (*pgmsgMOTD) -#define gmsgServerName (*pgmsgServerName) -#define gmsgAmmoPickup (*pgmsgAmmoPickup) -#define gmsgItemPickup (*pgmsgItemPickup) -#define gmsgHideWeapon (*pgmsgHideWeapon) -#define gmsgSayText (*pgmsgSayText) -#define gmsgTextMsg (*pgmsgTextMsg) -#define gmsgSetFOV (*pgmsgSetFOV) -#define gmsgShowMenu (*pgmsgShowMenu) -#define gmsgSendAudio (*pgmsgSendAudio) -#define gmsgRoundTime (*pgmsgRoundTime) -#define gmsgMoney (*pgmsgMoney) -#define gmsgBlinkAcct (*pgmsgBlinkAcct) -#define gmsgArmorType (*pgmsgArmorType) -#define gmsgStatusValue (*pgmsgStatusValue) -#define gmsgStatusText (*pgmsgStatusText) -#define gmsgStatusIcon (*pgmsgStatusIcon) -#define gmsgBarTime (*pgmsgBarTime) -#define gmsgReloadSound (*pgmsgReloadSound) -#define gmsgCrosshair (*pgmsgCrosshair) -#define gmsgNVGToggle (*pgmsgNVGToggle) -#define gmsgRadar (*pgmsgRadar) -#define gmsgSpectator (*pgmsgSpectator) -#define gmsgVGUIMenu (*pgmsgVGUIMenu) -#define gmsgCZCareer (*pgmsgCZCareer) -#define gmsgCZCareerHUD (*pgmsgCZCareerHUD) -#define gmsgTaskTime (*pgmsgTaskTime) -#define gmsgTutorText (*pgmsgTutorText) -#define gmsgTutorLine (*pgmsgTutorLine) -#define gmsgShadowIdx (*pgmsgShadowIdx) -#define gmsgTutorState (*pgmsgTutorState) -#define gmsgTutorClose (*pgmsgTutorClose) -#define gmsgAllowSpec (*pgmsgAllowSpec) -#define gmsgBombDrop (*pgmsgBombDrop) -#define gmsgBombPickup (*pgmsgBombPickup) -#define gmsgHostagePos (*pgmsgHostagePos) -#define gmsgHostageK (*pgmsgHostageK) -#define gmsgGeigerRange (*pgmsgGeigerRange) -#define gmsgSendCorpse (*pgmsgSendCorpse) -#define gmsgHLTV (*pgmsgHLTV) -#define gmsgSpecHealth (*pgmsgSpecHealth) -#define gmsgForceCam (*pgmsgForceCam) -#define gmsgADStop (*pgmsgADStop) -#define gmsgReceiveW (*pgmsgReceiveW) -#define gmsgScenarioIcon (*pgmsgScenarioIcon) -#define gmsgBotVoice (*pgmsgBotVoice) -#define gmsgBuyClose (*pgmsgBuyClose) -#define gmsgItemStatus (*pgmsgItemStatus) -#define gmsgLocation (*pgmsgLocation) -#define gmsgSpecHealth2 (*pgmsgSpecHealth2) -#define gmsgBarTime2 (*pgmsgBarTime2) -#define gmsgBotProgress (*pgmsgBotProgress) -#define gmsgBrass (*pgmsgBrass) -#define gmsgFog (*pgmsgFog) -#define gmsgShowTimer (*pgmsgShowTimer) - -// globals skill -#define gSkillData (*pgSkillData) - -// globals career -#define TheCareerTasks (*pTheCareerTasks) -#define taskInfo (*ptaskInfo) - -// globals triggers -#define st_szNextMap (*pst_szNextMap) -#define st_szNextSpot (*pst_szNextSpot) - -// globals animation -#define svBlending (*psvBlending) -#define IEngineStudio (*pIEngineStudio) -#define g_pstudiohdr (*pg_pstudiohdr) -#define g_pRotationMatrix (*pg_pRotationMatrix) -#define g_pBoneTransform (*pg_pBoneTransform) - -// globals sound -#define gszallsentencenames (*pgszallsentencenames) -#define rgsentenceg (*prgsentenceg) -#define fSentencesInit (*pfSentencesInit) -#define gcallsentences (*pgcallsentences) -#define rgdpvpreset (*prgdpvpreset) - -// globals world -#define gDecals (*pgDecals) - -// globals client -#define g_flTimeLimit (*pg_flTimeLimit) -#define g_flResetTime (*pg_flResetTime) -#define g_bClientPrintEnable (*pg_bClientPrintEnable) -#define g_PVSStatus (*pg_PVSStatus) -#define m_usResetDecals (*pm_usResetDecals) -#define g_iShadowSprite (*pg_iShadowSprite) -#define sPlayerModelFiles (*psPlayerModelFiles) -#define g_skipCareerInitialSpawn (*pg_skipCareerInitialSpawn) -#define entity_field_alias (*pentity_field_alias) -#define player_field_alias (*pplayer_field_alias) -#define custom_entity_field_alias (*pcustom_entity_field_alias) -#define g_serveractive (*pg_serveractive) - -// globals debug -#define outputLevel (*poutputLevel) -#define theDebugOutputTypes (*ptheDebugOutputTypes) -#define theDebugBuffer (*ptheDebugBuffer) - -// globals func_break -#define pSoundsWood (*ppSoundsWood) -#define pSoundsFlesh (*ppSoundsFlesh) -#define pSoundsGlass (*ppSoundsGlass) -#define pSoundsMetal (*ppSoundsMetal) -#define pSoundsConcrete (*ppSoundsConcrete) -#define pSpawnObjects (*ppSpawnObjects) -#define m_soundNames (*pm_soundNames) - -// globals func_tank -#define gTankSpread (*pgTankSpread) - -// globals game -#define g_psv_gravity (*pg_psv_gravity) -#define g_psv_aim (*pg_psv_aim) -#define g_footsteps (*pg_footsteps) -#define g_psv_accelerate (*pg_psv_accelerate) -#define g_psv_friction (*pg_psv_friction) -#define g_psv_stopspeed (*pg_psv_stopspeed) -#define displaysoundlist (*pdisplaysoundlist) -#define timelimit (*ptimelimit) -#define flashlight (*pflashlight) -#define decalfrequency (*pdecalfrequency) -#define fadetoblack (*pfadetoblack) -#define fragsleft (*pfragsleft) -#define timeleft (*ptimeleft) -#define friendlyfire (*pfriendlyfire) -#define allowmonsters (*pallowmonsters) -#define roundtime (*proundtime) -#define buytime (*pbuytime) -#define freezetime (*pfreezetime) -#define c4timer (*pc4timer) -#define ghostfrequency (*pghostfrequency) -#define autokick (*pautokick) -#define autokick_timeout (*pautokick_timeout) -#define restartround (*prestartround) -#define sv_restart (*psv_restart) -#define limitteams (*plimitteams) -#define autoteambalance (*pautoteambalance) -#define tkpunish (*ptkpunish) -#define hostagepenalty (*phostagepenalty) -#define mirrordamage (*pmirrordamage) -#define logmessages (*plogmessages) -#define forcecamera (*pforcecamera) -#define forcechasecam (*pforcechasecam) -#define mapvoteratio (*pmapvoteratio) -#define logdetail (*plogdetail) -#define startmoney (*pstartmoney) -#define maxrounds (*pmaxrounds) -#define winlimit (*pwinlimit) -#define windifference (*pwindifference) -#define playerid (*pplayerid) -#define allow_spectators (*pallow_spectators) -#define mp_chattime (*pmp_chattime) -#define kick_percent (*pkick_percent) -#define humans_join_team (*phumans_join_team) -#define sk_plr_9mm_bullet1 (*psk_plr_9mm_bullet1) -#define sk_plr_9mm_bullet2 (*psk_plr_9mm_bullet2) -#define sk_plr_9mm_bullet3 (*psk_plr_9mm_bullet3) -#define sk_plr_357_bullet1 (*psk_plr_357_bullet1) -#define sk_plr_357_bullet2 (*psk_plr_357_bullet2) -#define sk_plr_357_bullet3 (*psk_plr_357_bullet3) -#define sk_plr_9mmAR_bullet1 (*psk_plr_9mmAR_bullet1) -#define sk_plr_9mmAR_bullet2 (*psk_plr_9mmAR_bullet2) -#define sk_plr_9mmAR_bullet3 (*psk_plr_9mmAR_bullet3) -#define sk_plr_9mmAR_grenade1 (*psk_plr_9mmAR_grenade1) -#define sk_plr_9mmAR_grenade2 (*psk_plr_9mmAR_grenade2) -#define sk_plr_9mmAR_grenade3 (*psk_plr_9mmAR_grenade3) -#define sk_plr_buckshot1 (*psk_plr_buckshot1) -#define sk_plr_buckshot2 (*psk_plr_buckshot2) -#define sk_plr_buckshot3 (*psk_plr_buckshot3) -#define sk_plr_rpg1 (*psk_plr_rpg1) -#define sk_plr_rpg2 (*psk_plr_rpg2) -#define sk_plr_rpg3 (*psk_plr_rpg3) -#define sk_12mm_bullet1 (*psk_12mm_bullet1) -#define sk_12mm_bullet2 (*psk_12mm_bullet2) -#define sk_12mm_bullet3 (*psk_12mm_bullet3) -#define sk_9mmAR_bullet1 (*psk_9mmAR_bullet1) -#define sk_9mmAR_bullet2 (*psk_9mmAR_bullet2) -#define sk_9mmAR_bullet3 (*psk_9mmAR_bullet3) -#define sk_9mm_bullet1 (*psk_9mm_bullet1) -#define sk_9mm_bullet2 (*psk_9mm_bullet2) -#define sk_9mm_bullet3 (*psk_9mm_bullet3) -#define sk_suitcharger1 (*psk_suitcharger1) -#define sk_suitcharger2 (*psk_suitcharger2) -#define sk_suitcharger3 (*psk_suitcharger3) -#define sk_battery1 (*psk_battery1) -#define sk_battery2 (*psk_battery2) -#define sk_battery3 (*psk_battery3) -#define sk_healthcharger1 (*psk_healthcharger1) -#define sk_healthcharger2 (*psk_healthcharger2) -#define sk_healthcharger3 (*psk_healthcharger3) -#define sk_healthkit1 (*psk_healthkit1) -#define sk_healthkit2 (*psk_healthkit2) -#define sk_healthkit3 (*psk_healthkit3) -#define sk_scientist_heal1 (*psk_scientist_heal1) -#define sk_scientist_heal2 (*psk_scientist_heal2) -#define sk_scientist_heal3 (*psk_scientist_heal3) - -// globals gamerules -#define g_pGameRules (*pg_pGameRules) -#define g_GameMgrHelper (*pg_GameMgrHelper) -#define sv_clienttrace (*psv_clienttrace) -#define g_pMPGameRules (*pg_pMPGameRules) -//#define mp_com_token (*pmp_com_token) - -// globals soundent -#define pSoundEnt (*ppSoundEnt) - -// globals weapons -#define g_sModelIndexLaser (*pg_sModelIndexLaser) -#define g_pModelNameLaser (*pg_pModelNameLaser) -#define g_sModelIndexLaserDot (*pg_sModelIndexLaserDot) -#define g_sModelIndexFireball (*pg_sModelIndexFireball) -#define g_sModelIndexSmoke (*pg_sModelIndexSmoke) -#define g_sModelIndexWExplosion (*pg_sModelIndexWExplosion) -#define g_sModelIndexBubbles (*pg_sModelIndexBubbles) -#define g_sModelIndexBloodDrop (*pg_sModelIndexBloodDrop) -#define g_sModelIndexBloodSpray (*pg_sModelIndexBloodSpray) -#define g_sModelIndexSmokePuff (*pg_sModelIndexSmokePuff) -#define g_sModelIndexFireball2 (*pg_sModelIndexFireball2) -#define g_sModelIndexFireball3 (*pg_sModelIndexFireball3) -#define g_sModelIndexFireball4 (*pg_sModelIndexFireball4) -#define g_sModelIndexCTGhost (*pg_sModelIndexCTGhost) -#define g_sModelIndexTGhost (*pg_sModelIndexTGhost) -#define g_sModelIndexC4Glow (*pg_sModelIndexC4Glow) -#define giAmmoIndex (*pgiAmmoIndex) -#define g_sModelIndexRadio (*pg_sModelIndexRadio) -#define gMultiDamage (*pgMultiDamage) - -// globals weapontype -#define g_autoBuyInfo (*pg_autoBuyInfo) -#define g_weaponAliasInfo (*pg_weaponAliasInfo) -#define g_weaponBuyAliasInfo (*pg_weaponBuyAliasInfo) -#define g_weaponClassAliasInfo (*pg_weaponClassAliasInfo) -#define g_weaponInfo (*pg_weaponInfo) - -// globals wolrd -#define g_pBodyQueueHead (*pg_pBodyQueueHead) -#define gGlobalState (*pgGlobalState) -#define g_flWeaponCheat (*pg_flWeaponCheat) -#define gGlobalEntitySaveData (*pgGlobalEntitySaveData) - -// globals globals -#define g_vecZero (*pg_vecZero) -#define g_Language (*pg_Language) - -//#define g_ulFrameCount (*pg_ulFrameCount) -//#define g_ulModelIndexEyes (*pg_ulModelIndexEyes) - -#define g_vecAttackDir (*pg_vecAttackDir) -#define g_iSkillLevel (*pg_iSkillLevel) -#define gDisplayTitle (*pgDisplayTitle) -#define g_fGameOver (*pg_fGameOver) - -#define WorldGraph (*pWorldGraph) - -// hostages -#define g_pHostages (*pg_pHostages) -#define g_iHostageNumber (*pg_iHostageNumber) - -#define cv_hostage_debug (*pcv_hostage_debug) -#define cv_hostage_stop (*pcv_hostage_stop) -#define s_flStepSize_LocalNav (*m_LocalNav->ps_flStepSize) - -#define flNextCvarCheck (*pflNextCvarCheck) -#define s_flStepSize (*ps_flStepSize) -#define flLastThinkTime (*pflLastThinkTime) -#define nodeval (*pnodeval) -#define tot_hostages (*ptot_hostages) -#define tot_inqueue (*ptot_inqueue) -#define qptr (*pqptr) -#define _queue (*pqueue) -#define hostages (*phostages) - -// utils -#define gEntvarsDescription (*pgEntvarsDescription) -#define seed_table (*pseed_table) -#define glSeed (*pglSeed) -#define g_groupmask (*pg_groupmask) -#define g_groupop (*pg_groupop) -#define gSizes (*pgSizes) - -// tutor -#define TheTutor (*pTheTutor) -#define g_TutorStateStrings (*pg_TutorStateStrings) -#define TutorIdentifierList (*pTutorIdentifierList) - -#define s_tutorDisabledThisGame (*ps_tutorDisabledThisGame) -#define s_nextCvarCheckTime (*ps_nextCvarCheckTime) - -#define cv_tutor_message_repeats (*pcv_tutor_message_repeats) -#define cv_tutor_debug_level (*pcv_tutor_debug_level) -#define cv_tutor_view_distance (*pcv_tutor_view_distance) -#define cv_tutor_viewable_check_interval (*pcv_tutor_viewable_check_interval) -#define cv_tutor_look_distance (*pcv_tutor_look_distance) -#define cv_tutor_look_angle (*pcv_tutor_look_angle) -#define cv_tutor_examine_time (*pcv_tutor_examine_time) -#define cv_tutor_message_minimum_display_time (*pcv_tutor_message_minimum_display_time) -#define cv_tutor_message_character_display_time_coefficient (*pcv_tutor_message_character_display_time_coefficient) -#define cv_tutor_hint_interval_time (*pcv_tutor_hint_interval_time) - -// bots -#define _navAreaCount (*pnavAreaCount) -#define _currentIndex (*pcurrentIndex) -#define primaryWeaponBuyInfoCT (*pprimaryWeaponBuyInfoCT) -#define secondaryWeaponBuyInfoCT (*psecondaryWeaponBuyInfoCT) -#define primaryWeaponBuyInfoT (*pprimaryWeaponBuyInfoT) -#define secondaryWeaponBuyInfoT (*psecondaryWeaponBuyInfoT) -#define TheBotPhrases (*pTheBotPhrases) -#define TheBots (*pTheBots) - -// bot_util -#define s_iBeamSprite (*ps_iBeamSprite) -#define cosTable (*pcosTable) - -#define cv_bot_traceview (*pcv_bot_traceview) -#define cv_bot_stop (*pcv_bot_stop) -#define cv_bot_show_nav (*pcv_bot_show_nav) -#define cv_bot_show_danger (*pcv_bot_show_danger) -#define cv_bot_nav_edit (*pcv_bot_nav_edit) -#define cv_bot_nav_zdraw (*pcv_bot_nav_zdraw) -#define cv_bot_walk (*pcv_bot_walk) -#define cv_bot_difficulty (*pcv_bot_difficulty) -#define cv_bot_debug (*pcv_bot_debug) -#define cv_bot_quicksave (*pcv_bot_quicksave) -#define cv_bot_quota (*pcv_bot_quota) -#define cv_bot_quota_match (*pcv_bot_quota_match) -#define cv_bot_prefix (*pcv_bot_prefix) -#define cv_bot_allow_rogues (*pcv_bot_allow_rogues) -#define cv_bot_allow_pistols (*pcv_bot_allow_pistols) -#define cv_bot_allow_shotguns (*pcv_bot_allow_shotguns) -#define cv_bot_allow_sub_machine_guns (*pcv_bot_allow_sub_machine_guns) -#define cv_bot_allow_rifles (*pcv_bot_allow_rifles) -#define cv_bot_allow_machine_guns (*pcv_bot_allow_machine_guns) -#define cv_bot_allow_grenades (*pcv_bot_allow_grenades) -#define cv_bot_allow_snipers (*pcv_bot_allow_snipers) -#define cv_bot_allow_shield (*pcv_bot_allow_shield) -#define cv_bot_join_team (*pcv_bot_join_team) -#define cv_bot_join_after_player (*pcv_bot_join_after_player) -#define cv_bot_auto_vacate (*pcv_bot_auto_vacate) -#define cv_bot_zombie (*pcv_bot_zombie) -#define cv_bot_defer_to_human (*pcv_bot_defer_to_human) -#define cv_bot_chatter (*pcv_bot_chatter) -#define cv_bot_profile_db (*pcv_bot_profile_db) - -// shared_util -#define s_shared_token (*ps_shared_token) -#define s_shared_quote (*ps_shared_quote) - -// bot util -#define GameEventName (*pGameEventName) - -// voice_gamemgr -#define voice_serverdebug (*pvoice_serverdebug) -#define sv_alltalk (*psv_alltalk) - -#define g_PlayerModEnable (*pg_PlayerModEnable) -#define g_BanMasks (*pg_BanMasks) -#define g_SentGameRulesMasks (*pg_SentGameRulesMasks) -#define g_SentBanMasks (*pg_SentBanMasks) -#define g_bWantModEnable (*pg_bWantModEnable) - -// bot -#define g_flBotCommandInterval (*pg_flBotCommandInterval) -#define g_flBotFullThinkInterval (*pg_flBotFullThinkInterval) -#define BotArgs (*pBotArgs) -#define UseBotArgs (*pUseBotArgs) -#define BotDifficultyName (*pBotDifficultyName) - -// utlsymbol -//#define g_LessCtx (*pg_LessCtx) - -// bot_profile -#define TheBotProfiles (*pTheBotProfiles) - -// nav_area -#define TheNavLadderList (*pTheNavLadderList) -#define TheHidingSpotList (*pTheHidingSpotList) -#define TheNavAreaList (*pTheNavAreaList) -#define TheNavAreaGrid (*pTheNavAreaGrid) -#define lastDrawTimestamp (*plastDrawTimestamp) -#define goodSizedAreaList (*pgoodSizedAreaList) -#define markedArea (*pmarkedArea) -#define lastSelectedArea (*plastSelectedArea) -#define markedCorner (*pmarkedCorner) -#define isCreatingNavArea (*pisCreatingNavArea) -#define isAnchored (*pisAnchored) -#define anchor (*panchor) -#define isPlaceMode (*pisPlaceMode) -#define isPlacePainting (*pisPlacePainting) -#define editTimestamp (*peditTimestamp) -#define BlockedID (*pBlockedID) -#define BlockedIDCount (*pBlockedIDCount) - -// nav_node -#define Opposite (*pOpposite) - -// pm_shared -#define pmove (*pg_ppmove) -#define pm_shared_initialized (*ppm_shared_initialized) -#define rgv3tStuckTable (*prgv3tStuckTable) -#define pm_gcTextures (*ppm_gcTextures) -#define pm_grgszTextureName (*ppm_grgszTextureName) -#define pm_grgchTextureType (*ppm_grgchTextureType) -#define rgStuckLast (*prgStuckLast) -#define g_onladder (*pg_onladder) - -// pm_math -#define vec3_origin (*pvec3_origin) -#define nanmask (*pnanmask) - -// linked objects 196 -C_DLLEXPORT void ammo_9mm(entvars_t *pev); -C_DLLEXPORT void ammo_buckshot(entvars_t *pev); -C_DLLEXPORT void ammo_556nato(entvars_t *pev); -C_DLLEXPORT void ammo_556natobox(entvars_t *pev); -C_DLLEXPORT void ammo_762nato(entvars_t *pev); -C_DLLEXPORT void ammo_45acp(entvars_t *pev); -C_DLLEXPORT void ammo_50ae(entvars_t *pev); -C_DLLEXPORT void ammo_338magnum(entvars_t *pev); -C_DLLEXPORT void ammo_57mm(entvars_t *pev); -C_DLLEXPORT void ammo_357sig(entvars_t *pev); -C_DLLEXPORT void func_wall(entvars_t *pev); -C_DLLEXPORT void func_wall_toggle(entvars_t *pev); -C_DLLEXPORT void func_conveyor(entvars_t *pev); -C_DLLEXPORT void func_illusionary(entvars_t *pev); -C_DLLEXPORT void func_monsterclip(entvars_t *pev); -C_DLLEXPORT void func_rotating(entvars_t *pev); -C_DLLEXPORT void func_pendulum(entvars_t *pev); -C_DLLEXPORT void func_button(entvars_t *pev); -C_DLLEXPORT void func_rot_button(entvars_t *pev); -C_DLLEXPORT void func_door(entvars_t *pev); -C_DLLEXPORT void func_water(entvars_t *pev); -C_DLLEXPORT void func_door_rotating(entvars_t *pev); -C_DLLEXPORT void func_breakable(entvars_t *pev); -C_DLLEXPORT void func_pushable(entvars_t *pev); -C_DLLEXPORT void func_tank(entvars_t *pev); -C_DLLEXPORT void func_tanklaser(entvars_t *pev); -C_DLLEXPORT void func_tankrocket(entvars_t *pev); -C_DLLEXPORT void func_tankmortar(entvars_t *pev); -C_DLLEXPORT void func_tankcontrols(entvars_t *pev); -C_DLLEXPORT void func_recharge(entvars_t *pev); -C_DLLEXPORT void func_healthcharger(entvars_t *pev); -C_DLLEXPORT void func_mortar_field(entvars_t *pev); -C_DLLEXPORT void func_plat(entvars_t *pev); -C_DLLEXPORT void func_platrot(entvars_t *pev); -C_DLLEXPORT void func_train(entvars_t *pev); -C_DLLEXPORT void func_tracktrain(entvars_t *pev); -C_DLLEXPORT void func_traincontrols(entvars_t *pev); -C_DLLEXPORT void func_trackchange(entvars_t *pev); -C_DLLEXPORT void func_trackautochange(entvars_t *pev); -C_DLLEXPORT void func_guntarget(entvars_t *pev); -C_DLLEXPORT void func_grencatch(entvars_t *pev); -C_DLLEXPORT void func_weaponcheck(entvars_t *pev); -C_DLLEXPORT void func_friction(entvars_t *pev); -C_DLLEXPORT void func_ladder(entvars_t *pev); -C_DLLEXPORT void func_buyzone(entvars_t *pev); -C_DLLEXPORT void func_bomb_target(entvars_t *pev); -C_DLLEXPORT void func_hostage_rescue(entvars_t *pev); -C_DLLEXPORT void func_escapezone(entvars_t *pev); -C_DLLEXPORT void func_vip_safetyzone(entvars_t *pev); -C_DLLEXPORT void func_snow(entvars_t *pev); -C_DLLEXPORT void func_rain(entvars_t *pev); -C_DLLEXPORT void func_vehicle(entvars_t *pev); -C_DLLEXPORT void func_vehiclecontrols(entvars_t *pev); -C_DLLEXPORT void env_sound(entvars_t *pev); -C_DLLEXPORT void env_global(entvars_t *pev); -C_DLLEXPORT void env_spark(entvars_t *pev); -C_DLLEXPORT void env_debris(entvars_t *pev); -C_DLLEXPORT void env_bubbles(entvars_t *pev); -C_DLLEXPORT void env_lightning(entvars_t *pev); -C_DLLEXPORT void env_beam(entvars_t *pev); -C_DLLEXPORT void env_laser(entvars_t *pev); -C_DLLEXPORT void env_glow(entvars_t *pev); -C_DLLEXPORT void env_bombglow(entvars_t *pev); -C_DLLEXPORT void env_sprite(entvars_t *pev); -C_DLLEXPORT void env_shooter(entvars_t *pev); -C_DLLEXPORT void env_blood(entvars_t *pev); -C_DLLEXPORT void env_shake(entvars_t *pev); -C_DLLEXPORT void env_fade(entvars_t *pev); -C_DLLEXPORT void env_message(entvars_t *pev); -C_DLLEXPORT void env_funnel(entvars_t *pev); -C_DLLEXPORT void env_beverage(entvars_t *pev); -C_DLLEXPORT void env_explosion(entvars_t *pev); -C_DLLEXPORT void env_render(entvars_t *pev); -C_DLLEXPORT void env_snow(entvars_t *pev); -C_DLLEXPORT void env_rain(entvars_t *pev); -C_DLLEXPORT void env_fog(entvars_t *pev); -C_DLLEXPORT void weapon_knife(entvars_t *pev); -C_DLLEXPORT void weapon_glock18(entvars_t *pev); -C_DLLEXPORT void weapon_c4(entvars_t *pev); -C_DLLEXPORT void weapon_usp(entvars_t *pev); -C_DLLEXPORT void weapon_smokegrenade(entvars_t *pev); -C_DLLEXPORT void weapon_m4a1(entvars_t *pev); -C_DLLEXPORT void weapon_hegrenade(entvars_t *pev); -C_DLLEXPORT void weapon_flashbang(entvars_t *pev); -C_DLLEXPORT void weapon_famas(entvars_t *pev); -C_DLLEXPORT void weapon_elite(entvars_t *pev); -C_DLLEXPORT void weapon_fiveseven(entvars_t *pev); -C_DLLEXPORT void weapon_p228(entvars_t *pev); -C_DLLEXPORT void weapon_xm1014(entvars_t *pev); -C_DLLEXPORT void weapon_g3sg1(entvars_t *pev); -C_DLLEXPORT void weapon_sg550(entvars_t *pev); -C_DLLEXPORT void weapon_deagle(entvars_t *pev); -C_DLLEXPORT void weapon_awp(entvars_t *pev); -C_DLLEXPORT void weapon_scout(entvars_t *pev); -C_DLLEXPORT void weapon_sg552(entvars_t *pev); -C_DLLEXPORT void weapon_m3(entvars_t *pev); -C_DLLEXPORT void weapon_aug(entvars_t *pev); -C_DLLEXPORT void weapon_galil(entvars_t *pev); -C_DLLEXPORT void weapon_ak47(entvars_t *pev); -C_DLLEXPORT void weapon_m249(entvars_t *pev); -C_DLLEXPORT void weapon_p90(entvars_t *pev); -C_DLLEXPORT void weapon_mac10(entvars_t *pev); -C_DLLEXPORT void weapon_ump45(entvars_t *pev); -C_DLLEXPORT void weapon_mp5navy(entvars_t *pev); -C_DLLEXPORT void weapon_tmp(entvars_t *pev); -C_DLLEXPORT void weapon_shield(entvars_t *pev); -C_DLLEXPORT void trigger(entvars_t *pev); -C_DLLEXPORT void trigger_auto(entvars_t *pev); -C_DLLEXPORT void trigger_relay(entvars_t *pev); -C_DLLEXPORT void trigger_hurt(entvars_t *pev); -C_DLLEXPORT void trigger_monsterjump(entvars_t *pev); -C_DLLEXPORT void trigger_cdaudio(entvars_t *pev); -C_DLLEXPORT void trigger_multiple(entvars_t *pev); -C_DLLEXPORT void trigger_once(entvars_t *pev); -C_DLLEXPORT void trigger_counter(entvars_t *pev); -C_DLLEXPORT void trigger_transition(entvars_t *pev); -C_DLLEXPORT void trigger_changelevel(entvars_t *pev); -C_DLLEXPORT void trigger_push(entvars_t *pev); -C_DLLEXPORT void trigger_teleport(entvars_t *pev); -C_DLLEXPORT void trigger_autosave(entvars_t *pev); -C_DLLEXPORT void trigger_endsection(entvars_t *pev); -C_DLLEXPORT void trigger_gravity(entvars_t *pev); -C_DLLEXPORT void trigger_changetarget(entvars_t *pev); -C_DLLEXPORT void trigger_camera(entvars_t *pev); -C_DLLEXPORT void game_score(entvars_t *pev); -C_DLLEXPORT void game_end(entvars_t *pev); -C_DLLEXPORT void game_text(entvars_t *pev); -C_DLLEXPORT void game_team_master(entvars_t *pev); -C_DLLEXPORT void game_team_set(entvars_t *pev); -C_DLLEXPORT void game_zone_player(entvars_t *pev); -C_DLLEXPORT void game_player_hurt(entvars_t *pev); -C_DLLEXPORT void game_counter(entvars_t *pev); -C_DLLEXPORT void game_counter_set(entvars_t *pev); -C_DLLEXPORT void game_player_equip(entvars_t *pev); -C_DLLEXPORT void game_player_team(entvars_t *pev); -C_DLLEXPORT void info_null(entvars_t *pev); -C_DLLEXPORT void info_target(entvars_t *pev); -C_DLLEXPORT void info_intermission(entvars_t *pev); -C_DLLEXPORT void info_map_parameters(entvars_t *pev); -C_DLLEXPORT void info_player_deathmatch(entvars_t *pev); -C_DLLEXPORT void info_player_start(entvars_t *pev); -C_DLLEXPORT void info_teleport_destination(entvars_t *pev); -C_DLLEXPORT void info_vip_start(entvars_t *pev); -C_DLLEXPORT void info_landmark(entvars_t *pev); -C_DLLEXPORT void info_hostage_rescue(entvars_t *pev); -C_DLLEXPORT void info_bomb_target(entvars_t *pev); -C_DLLEXPORT void item_airtank(entvars_t *pev); -C_DLLEXPORT void item_sodacan(entvars_t *pev); -C_DLLEXPORT void item_healthkit(entvars_t *pev); -C_DLLEXPORT void item_suit(entvars_t *pev); -C_DLLEXPORT void item_battery(entvars_t *pev); -C_DLLEXPORT void item_antidote(entvars_t *pev); -C_DLLEXPORT void item_security(entvars_t *pev); -C_DLLEXPORT void item_longjump(entvars_t *pev); -C_DLLEXPORT void item_kevlar(entvars_t *pev); -C_DLLEXPORT void item_assaultsuit(entvars_t *pev); -C_DLLEXPORT void item_thighpack(entvars_t *pev); -C_DLLEXPORT void light(entvars_t *pev); -C_DLLEXPORT void light_environment(entvars_t *pev); -C_DLLEXPORT void light_spot(entvars_t *pev); -C_DLLEXPORT void cycler(entvars_t *pev); -C_DLLEXPORT void cycler_prdroid(entvars_t *pev); -C_DLLEXPORT void cycler_sprite(entvars_t *pev); -C_DLLEXPORT void cycler_weapon(entvars_t *pev); -C_DLLEXPORT void cycler_wreckage(entvars_t *pev); -C_DLLEXPORT void monster_mortar(entvars_t *pev); -C_DLLEXPORT void monster_scientist(entvars_t *pev); -C_DLLEXPORT void monster_hevsuit_dead(entvars_t *pev); -C_DLLEXPORT void player(entvars_t *pev); -C_DLLEXPORT void player_loadsaved(entvars_t *pev); -C_DLLEXPORT void player_weaponstrip(entvars_t *pev); -C_DLLEXPORT void path_corner(entvars_t *pev); -C_DLLEXPORT void path_track(entvars_t *pev); -C_DLLEXPORT void worldspawn(entvars_t *pev); -C_DLLEXPORT void infodecal(entvars_t *pev); -C_DLLEXPORT void bodyque(entvars_t *pev); -C_DLLEXPORT void spark_shower(entvars_t *pev); -C_DLLEXPORT void beam(entvars_t *pev); -C_DLLEXPORT void gibshooter(entvars_t *pev); -C_DLLEXPORT void test_effect(entvars_t *pev); -C_DLLEXPORT void soundent(entvars_t *pev); -C_DLLEXPORT void ambient_generic(entvars_t *pev); -C_DLLEXPORT void target_cdaudio(entvars_t *pev); -C_DLLEXPORT void speaker(entvars_t *pev); -C_DLLEXPORT void DelayedUse(entvars_t *pev); -C_DLLEXPORT void multi_manager(entvars_t *pev); -C_DLLEXPORT void fireanddie(entvars_t *pev); -C_DLLEXPORT void multisource(entvars_t *pev); -C_DLLEXPORT void button_target(entvars_t *pev); -C_DLLEXPORT void momentary_rot_button(entvars_t *pev); -C_DLLEXPORT void momentary_door(entvars_t *pev); -C_DLLEXPORT void hostage_entity(entvars_t *pev); -C_DLLEXPORT void armoury_entity(entvars_t *pev); -C_DLLEXPORT void weaponbox(entvars_t *pev); -C_DLLEXPORT void grenade(entvars_t *pev); -C_DLLEXPORT void world_items(entvars_t *pev); - -// externs -extern struct WeaponAliasInfo g_weaponAliasInfo[39]; -extern struct WeaponBuyAliasInfo g_weaponBuyAliasInfo[43]; -extern struct WeaponClassAliasInfo g_weaponClassAliasInfo[46]; -extern struct WeaponInfoStruct g_weaponInfo[27]; -extern edict_t *g_pBodyQueueHead; -extern TYPEDESCRIPTION gGlobalEntitySaveData[3]; -extern TYPEDESCRIPTION gEntvarsDescription[86]; -extern unsigned int seed_table[256]; -extern unsigned int glSeed; -extern const int gSizes[18]; -extern bool s_tutorDisabledThisGame; -extern float s_nextCvarCheckTime; -extern const char *g_TutorStateStrings[20]; -extern const char *TutorIdentifierList[150]; -extern struct sv_blending_interface_s svBlending; -extern struct server_studio_api_s IEngineStudio; -extern studiohdr_t *g_pstudiohdr; -extern float (*g_pRotationMatrix)[3][4]; -extern float (*g_pBoneTransform)[128][3][4]; -extern float omega; -extern float cosom; -extern float sinom; -extern float sclp; -extern float sclq; -extern const struct TaskInfo taskInfo[21]; -extern CMemoryPool hashItemMemPool; -extern BOOL gTouchDisabled; -extern DLL_FUNCTIONS gFunctionTable; -extern NEW_DLL_FUNCTIONS gNewDLLFunctions; -extern char grgszTextureName[1024][17]; -extern char grgchTextureType[1024]; -extern BOOL fTextureTypeInit; -extern struct sentenceg rgsentenceg[200]; -extern int fSentencesInit; -extern int gcallsentences; -extern struct dynpitchvol rgdpvpreset[27]; -extern struct PLAYERPVSSTATUS g_PVSStatus[32]; -extern bool g_bClientPrintEnable; -extern char *sPlayerModelFiles[12]; -extern struct entity_field_alias_t entity_field_alias[6]; -extern struct entity_field_alias_t player_field_alias[3]; -extern struct entity_field_alias_t custom_entity_field_alias[9]; -extern int g_serveractive; -extern struct DebugOutputLevel outputLevel[6]; -extern unsigned int theDebugOutputTypes; -extern char theDebugBuffer[1024]; -extern Vector gTankSpread[5]; -extern class CCStrikeGameMgrHelper g_GameMgrHelper; -extern cvar_t *sv_clienttrace; -extern class CHalfLifeMultiplay *g_pMPGameRules; -//extern char mp_com_token[1500]; -extern int giAmmoIndex; -extern char *m_szPoses[4]; -extern struct WeaponStruct g_weaponStruct[32]; -//extern int zombieSpawnCount; -//extern struct ZombieSpawn zombieSpawn[256]; -//extern CBaseEntity *g_pSelectedZombieSpawn; -extern char st_szNextMap[32]; -extern char st_szNextSpot[32]; -extern char s_shared_token[1500]; -extern char s_shared_quote; -extern cvar_t voice_serverdebug; -extern cvar_t sv_alltalk; -extern CPlayerBitVec g_PlayerModEnable; -extern CBitVec g_BanMasks[VOICE_MAX_PLAYERS]; -extern CBitVec g_SentGameRulesMasks[VOICE_MAX_PLAYERS]; -extern CBitVec g_SentBanMasks[VOICE_MAX_PLAYERS]; -extern CPlayerBitVec g_bWantModEnable; -//extern struct LessCtx_t g_LessCtx; -extern short s_iBeamSprite; -extern float cosTable[256]; -extern float lastDrawTimestamp; -extern std::list_vs6 goodSizedAreaList; -extern CNavArea *markedArea; -extern CNavArea *lastSelectedArea; -extern enum NavCornerType markedCorner; -extern bool isCreatingNavArea; -extern bool isAnchored; -extern Vector anchor; -extern bool isPlaceMode; -extern bool isPlacePainting; -extern float editTimestamp; -extern unsigned int BlockedID[256]; -extern int BlockedIDCount; -extern enum NavDirType Opposite[4]; -extern int pm_shared_initialized; -extern vec3_t rgv3tStuckTable[54]; -extern int rgStuckLast[32][2]; -extern int g_onladder; -extern int pm_gcTextures; -extern char pm_grgszTextureName[1024][17]; -extern char pm_grgchTextureType[1024]; -extern char *BotDifficultyName[5]; - -extern BOOL g_fGameOver; -extern float g_flResetTime; -C_DLLEXPORT float g_flTimeLimit; - -// declared functions -C_DLLEXPORT void WINAPI GiveFnptrsToDll(enginefuncs_t *pEnginefuncsTable, globalvars_t *pGlobals); -bool NavAreaBuildPath__HostagePathCost__wrapper(CNavArea *startArea, CNavArea *goalArea, const Vector *goalPos, HostagePathCost &costFunc, CNavArea **closestArea); -bool NavAreaBuildPath__ShortestPathCost__wrapper(CNavArea *startArea, CNavArea *goalArea, const Vector *goalPos, ShortestPathCost &costFunc, CNavArea **closestArea); -bool NavAreaBuildPath__PathCost__wrapper(CNavArea *startArea, CNavArea *goalArea, const Vector *goalPos, PathCost &costFunc, CNavArea **closestArea); -float_precision NavAreaTravelDistance__PathCost__wrapper(CNavArea *startArea, CNavArea *endArea, PathCost &costFunc); - -// PM -void PM_SwapTextures(int i, int j); -qboolean PM_IsThereGrassTexture(); -void PM_SortTextures(); -void PM_InitTextureTypes(); -void PM_PlayStepSound(int step, float fvol); -int PM_MapTextureTypeStepType(char chTextureType); -void PM_CatagorizeTextureType(); -void PM_UpdateStepSound(); -qboolean PM_AddToTouched(struct pmtrace_s tr, vec_t *impactvelocity); -void PM_CheckVelocity(); -int PM_ClipVelocity(vec_t *in, vec_t *normal, vec_t *out, float overbounce); -void PM_AddCorrectGravity(); -void PM_FixupGravityVelocity(); -int PM_FlyMove(); -void PM_Accelerate(vec_t *wishdir, float_precision wishspeed, float accel); -void PM_WalkMove(); -void PM_Friction(); -void PM_AirAccelerate(vec_t *wishdir, float wishspeed, float accel); -void PM_WaterMove(); -void PM_AirMove(int playerIndex = 0); -qboolean PM_InWater(); -qboolean PM_CheckWater(); -void PM_CategorizePosition(); -int PM_GetRandomStuckOffsets(int nIndex, int server, vec_t *offset); -void PM_ResetStuckOffsets(int nIndex, int server); -qboolean PM_CheckStuck(); -void PM_SpectatorMove(); -float PM_SplineFraction(float value, float scale); -float PM_SimpleSpline(float value); -void PM_FixPlayerCrouchStuck(int direction); -void PM_Duck(); -void PM_LadderMove(struct physent_s *pLadder); -struct physent_s *PM_Ladder(); -void PM_WaterJump(); -void PM_AddGravity(); -struct pmtrace_s PM_PushEntity(vec_t *push); -void PM_Physics_Toss(); -void PM_NoClip(); -void PM_PreventMegaBunnyJumping(); -void PM_Jump(); -void PM_CheckWaterJump(); -void PM_CheckFalling(); -void PM_PlayWaterSounds(); -float PM_CalcRoll(vec_t *angles, vec_t *velocity, float rollangle, float rollspeed); -void PM_DropPunchAngle(vec_t *punchangle); -void PM_CheckParameters(); -void PM_ReduceTimers(); -qboolean PM_ShouldDoSpectMode(); -void PM_PlayerMove(qboolean server); -void PM_CreateStuckTable(); -int PM_GetVisEntInfo(int ent); -int PM_GetPhysEntInfo(int ent); - -// Animation -C_DLLEXPORT int Server_GetBlendingInterface(int version, struct sv_blending_interface_s **ppinterface, struct engine_studio_api_s *pstudio, float *rotationmatrix, float *bonetransform); -void AngleQuaternion(vec_t *angles, vec_t *quaternion); -void QuaternionSlerp(vec_t *p, vec_t *q, float t, vec_t *qt); -void QuaternionMatrix(vec_t *quaternion, float (*matrix)[4]); -mstudioanim_t *StudioGetAnim(struct model_s *m_pSubModel, mstudioseqdesc_t *pseqdesc); -mstudioanim_t *LookupAnimation(struct model_s *model, mstudioseqdesc_t *pseqdesc, int index); -void StudioCalcBoneAdj(float dadt, float *adj, const byte *pcontroller1, const byte *pcontroller2, byte mouthopen); -void StudioCalcBoneQuaterion(int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *q); -void StudioCalcBonePosition(int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *pos); -void StudioSlerpBones(vec4_t *q1, float pos1[][3], vec4_t *q2, float pos2[][3], float s); -void StudioCalcRotations(mstudiobone_t *pbones, int *chain, int chainlength, float *adj, float pos[128][3], vec4_t *q, mstudioseqdesc_t *pseqdesc, mstudioanim_t *panim, float f, float s); -void ConcatTransforms(float in1[3][4], float in2[3][4], float out[3][4]); -void SV_StudioSetupBones(struct model_s *pModel, float frame, int sequence, const vec_t *angles, const vec_t *origin, const byte *pcontroller, const byte *pblending, int iBone, const edict_t *pEdict); - -// basemonster -float GetAmountOfPlayerVisible(Vector vecSrc, CBaseEntity *entity); -char *vstr(float *v); - -//cbase -/*C_DLLEXPORT*/ int GetEntityAPI2(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion); - -#endif // HOOKER_IMPL_H diff --git a/regamedll/hookers/hooklist.cpp b/regamedll/hookers/hooklist.cpp deleted file mode 100644 index 8455bff8..00000000 --- a/regamedll/hookers/hooklist.cpp +++ /dev/null @@ -1,6184 +0,0 @@ -/* -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License,or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful,but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not,write to the Free Software Foundation, -* Inc.,59 Temple Place,Suite 330,Boston,MA 02111-1307 USA -* -* In addition,as a special exception,the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file,you may extend this exception -* to your version of the file,but you are not obligated to do so. If -* you do not wish to do so,delete this exception statement from your -* version. -* -*/ - -#include "precompiled.h" - -#define CBASE_VIRTUAL_COUNT 58 -#define CWEAPON_VIRTUAL_COUNT 94 - -//#define Mem_Region -//#define Export_Region -//#define Monsters_Region -//#define AirTank_Region -//#define PM_Shared_Region -//#define Triggers_Region -//#define Cbase_Region -//#define Client_Region -//#define Spectator_Region -//#define BaseMonster_Region -//#define Player_Region -//#define Effects_Region -//#define Plats_Region -//#define PathCorner_Region -//#define Vehicle_Region -//#define Func_Tank_Region -//#define Func_Break_Region -//#define Door_Region -//#define BModels_Region -//#define Button_Region -//#define Explode_Region -//#define Mortar_Region -//#define Healkit_Region -//#define Lights_Region -//#define MapRules_Region -//#define HintMessage_Region -//#define Items_Region -//#define SharedUtil_Region -//#define World_Region -//#define Graph_Region -//#define SoundEnt_Region -//#define Sound_Region -//#define Util_Region -//#define WeaponType_Region -//#define Weapons_Region -//#define GGrenade_Region -//#define Animation_Region -//#define GameRules_Region -//#define Multiplay_GameRules_Region -//#define Singleplay_GameRules_Region -//#define Training_Gamerules_Region -//#define CareerTasks_Region -//#define MemoryPool_Region -//#define Unicode_StrTools_Region -//#define CUtlSymbol_Region -//#define Debug_Region -//#define CS_Bot_Region -//#define CS_BotState_Region -//#define Bot_Region -//#define Bot_Profile -//#define CS_Util_Region -//#define CS_Init_Region -//#define H_Region -//#define Tutor_CS_Region -//#define Nav_Region -//#define Hostage_Region -//#define VoiceManager_Region -//#define Vector_Region - -//#define Data_References_Region -//#define Function_References_Region - -FunctionHook g_FunctionHooks[] = -{ - -#ifndef Mem_Region - -#ifdef _WIN32 - - //HOOK_SYMBOLDEF(0x01DE015D, "__heap_alloc_base", malloc_wrapper), - HOOK_SYMBOLDEF(0x01DE0131, "_nh_malloc", _nh_malloc_wrapper), - HOOK_SYMBOLDEF(0x01DE011F, "malloc", malloc_wrapper), - - HOOK_SYMBOLDEF(0x01DE12A5, "realloc", realloc_wrapper), - HOOK_SYMBOLDEF(0x01DE0E7B, "free", free_wrapper), - HOOK_SYMBOLDEF(0x01DE2331, "calloc", calloc_wrapper), - HOOK_SYMBOLDEF(0x01DF27C9, "strdup", strdup_wrapper), - //HOOK_SYMBOLDEF(0x01DDFD40, "rand", rand_wrapper), - -#endif // _WIN32 - -#endif // Mem_Region - -#ifndef Export_Region - - HOOK_DEF(0x01D86730, GiveFnptrsToDll), - -#endif // Export_Region - -#ifndef PM_Shared_Region - - HOOK_DEF(0x01DB6640, PM_Move), - HOOK_DEF(0x01DB6710, PM_Init), - HOOK_DEF(0x01DB1020, PM_FindTextureType), -//pm_debug - //HOOK_DEF(0x01DAEEE0, PM_ShowClipBox), // NOXREF - //HOOK_DEF(0x01DAEEF0, PM_ParticleLine), // NOXREF - //HOOK_DEF(0x01DAEFC0, PM_DrawRectangle), // NOXREF - //HOOK_DEF(0x01DAF290, PM_DrawPhysEntBBox), // NOXREF - //HOOK_DEF(0x01DAFB50, PM_DrawBBox), // NOXREF - //HOOK_DEF(0x01DAFF20, PM_ViewEntity), // NOXREF -//pm_shared - //HOOK_DEF(0x01DB0AB0, PM_SwapTextures), // NOXREF - //HOOK_DEF(0x01DB0B30, PM_IsThereGrassTexture), // NOXREF - //HOOK_DEF(0x01DB0B60, PM_SortTextures), // NOXREF - HOOK_DEF(0x01DB0C80, PM_InitTextureTypes), - //HOOK_DEF(0x0, PM_FindTextureType), - HOOK_DEF(0x01DB1080, PM_PlayStepSound), - //HOOK_DEF(0x01DB17E0, PM_MapTextureTypeStepType), // NOXREF - HOOK_DEF(0x01DB1860, PM_CatagorizeTextureType), - HOOK_DEF(0x01DB19B0, PM_UpdateStepSound), - //HOOK_DEF(0x01DB1CB0, PM_AddToTouched), // NOXREF - HOOK_DEF(0x01DB1D50, PM_CheckVelocity), - HOOK_DEF(0x01DB1E40, PM_ClipVelocity), - //HOOK_DEF(0x01DB1EF0, PM_AddCorrectGravity), // NOXREF - //HOOK_DEF(0x01DB1F70, PM_FixupGravityVelocity), // NOXREF - HOOK_DEF(0x01DB1FD0, PM_FlyMove), - //HOOK_DEF(0x01DB24E0, PM_Accelerate), // NOXREF - HOOK_DEF(0x01DB2580, PM_WalkMove), - HOOK_DEF(0x01DB2B50, PM_Friction), - HOOK_DEF(0x01DB2CF0, PM_AirAccelerate), - HOOK_DEF(0x01DB2DB0, PM_WaterMove), - HOOK_DEF(0x01DB30C0, PM_AirMove_internal), - //HOOK_DEF(0x01DB3200, PM_InWater), // NOXREF - HOOK_DEF(0x01DB3220, PM_CheckWater), - HOOK_DEF(0x01DB33E0, PM_CategorizePosition), - //HOOK_DEF(0x01DB3590, PM_GetRandomStuckOffsets), // NOXREF - //HOOK_DEF(0x01DB35E0, PM_ResetStuckOffsets), // NOXREF - HOOK_DEF(0x01DB3600, PM_CheckStuck), - HOOK_DEF(0x01DB3970, PM_SpectatorMove), - //HOOK_DEF(0x01DB3C70, PM_SplineFraction), // NOXREF - //HOOK_DEF(0x01DB3C90, PM_SimpleSpline), // NOXREF - //HOOK_DEF(0x01DB3CB0, PM_FixPlayerCrouchStuck), // NOXREF - HOOK_DEF(0x01DB3D50, PM_Duck), - HOOK_DEF(0x01DB4110, PM_LadderMove), - HOOK_DEF(0x01DB44D0, PM_Ladder), - //HOOK_DEF(0x01DB45A0, PM_WaterJump), // NOXREF - //HOOK_DEF(0x01DB4660, PM_AddGravity), // NOXREF - //HOOK_DEF(0x01DB46C0, PM_PushEntity), // NOXREF - HOOK_DEF(0x01DB4820, PM_Physics_Toss), - HOOK_DEF(0x01DB4DE0, PM_NoClip), - //HOOK_DEF(0x01DB4E90, PM_PreventMegaBunnyJumping), // NOXREF - HOOK_DEF(0x01DB4F00, PM_Jump), - HOOK_DEF(0x01DB52F0, PM_CheckWaterJump), - HOOK_DEF(0x01DB5560, PM_CheckFalling), - //HOOK_DEF(0x01DB5810, PM_PlayWaterSounds), // NOXREF - //HOOK_DEF(0x01DB5810, PM_CalcRoll), // NOXREF - //HOOK_DEF(0x01DB58A0, PM_DropPunchAngle), // NOXREF - HOOK_DEF(0x01DB58F0, PM_CheckParameters), - HOOK_DEF(0x01DB5BE0, PM_ReduceTimers), - //HOOK_DEF(0x01DB5D20, PM_ShouldDoSpectMode), // NOXREF - HOOK_DEF(0x01DB5D50, PM_PlayerMove), - HOOK_DEF(0x01DB6430, PM_CreateStuckTable), - //HOOK_DEF(0x01DB66B0, PM_GetVisEntInfo), // NOXREF - //HOOK_DEF(0x01DB66E0, PM_GetPhysEntInfo), // NOXREF -//pm_math - //HOOK_DEF(0x0, anglemod), - HOOK_DEF(0x01DB0000, AngleVectors), - //HOOK_DEF(0x01DB0100, AngleVectorsTranspose), // NOXREF - HOOK_DEF(0x01DB0200, AngleMatrix), - //HOOK_DEF(0x01DB02D0, AngleIMatrix), // NOXREF - //HOOK_DEF(0x01DB03A0, NormalizeAngles), // NOXREF - //HOOK_DEF(0x01DB03F0, InterpolateAngles), // NOXREF - //HOOK_DEF(0x01DB0510, AngleBetweenVectors), // NOXREF - //HOOK_DEF(0x01DB05B0, VectorTransform), // NOXREF - HOOK_DEF(0x01DB0610, VectorCompare), - HOOK_DEF(0x01DB0640, VectorMA), - //HOOK_DEF(0x01DB0680, _DotProduct), // NOXREF - //HOOK_DEF(0x01DB06A0, _VectorSubtract), // NOXREF - //HOOK_DEF(0x01DB06D0, _VectorAdd), // NOXREF - //HOOK_DEF(0x01DB0700, _VectorCopy), // NOXREF - //HOOK_DEF(0x01DB0720, CrossProduct), // NOXREF - HOOK_DEF(0x01DB0760, Length), - //HOOK_DEF(0x01DB0780, Distance), // NOXREF - HOOK_DEF(0x01DB07D0, VectorNormalize), - //HOOK_DEF(0x01DB0820, VectorInverse), - HOOK_DEF(0x01DB0840, VectorScale), - //HOOK_DEF(0x01DB0870, Q_log2), - //HOOK_DEF(0x01DB0880, VectorMatrix), - //HOOK_DEF(0x01DB09D0, VectorAngles), - -#endif // PM_Shared_Region - -#ifndef Monsters_Region -//CGib - // virtual func - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D70C90, "_ZN4CGib10ObjectCapsEv", CGib::ObjectCaps), // DEFAULT - // non-virtual func - HOOK_SYMBOLDEF(0x01D6FFE0, "_ZN4CGib5SpawnEPKc", CGib::Spawn), - HOOK_SYMBOLDEF(0x01D6FCA0, "_ZN4CGib14BounceGibTouchEP11CBaseEntity", CGib::BounceGibTouch), - HOOK_SYMBOLDEF(0x01D6FE40, "_ZN4CGib14StickyGibTouchEP11CBaseEntity", CGib::StickyGibTouch), - HOOK_SYMBOLDEF(0x01D6FBF0, "_ZN4CGib12WaitTillLandEv", CGib::WaitTillLand), - HOOK_SYMBOLDEF(0x01D6E550, "_ZN4CGib13LimitVelocityEv", CGib::LimitVelocity), - HOOK_SYMBOLDEF(0x01D6EAB0, "_ZN4CGib12SpawnHeadGibEP9entvars_s", CGib::SpawnHeadGib), - HOOK_SYMBOLDEF(0x01D6EEB0, "_ZN4CGib15SpawnRandomGibsEP9entvars_sii", CGib::SpawnRandomGibs), - //HOOK_SYMBOLDEF(0x01D6E640, "_ZN4CGib15SpawnStickyGibsEP9entvars_s6Vectori", CGib::SpawnStickyGibs), // NOXREF -#endif // Monsters_Region - -#ifndef AirTank_Region - - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D592B0, "_ZN8CAirtank5SpawnEv", CAirtank::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D593A0, "_ZN8CAirtank8PrecacheEv", CAirtank::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59250, "_ZN8CAirtank4SaveER5CSave", CAirtank::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59280, "_ZN8CAirtank7RestoreER8CRestore", CAirtank::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D593C0, "_ZN8CAirtank6KilledEP9entvars_si", CAirtank::Killed), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D59240, "_ZN8CAirtank10BloodColorEv", CAirtank::BloodColor), // DEFAULT - // non-virtual func - HOOK_SYMBOLDEF(0x01D59410, "_ZN8CAirtank9TankThinkEv", CAirtank::TankThink), - HOOK_SYMBOLDEF(0x01D59430, "_ZN8CAirtank9TankTouchEP11CBaseEntity", CAirtank::TankTouch), - HOOK_DEF(0x01D591F0, item_airtank), - -#endif // AirTank_Region - -#ifndef Client_Region - - //HOOK_SYMBOLDEF(0x0, "_ZL8CMD_ARGCv", CMD_ARGC_), - //HOOK_SYMBOLDEF(0x0, "_ZL8CMD_ARGVi", CMD_ARGV_), - //HOOK_SYMBOLDEF(0x01D63CE0, "_Z17set_suicide_frameP9entvars_s", set_suicide_frame), // NOXREF - HOOK_SYMBOLDEF(0x01D63D30, "_Z13ClientConnectP7edict_sPKcS2_Pc", ClientConnect), - HOOK_SYMBOLDEF(0x01D63D50, "_Z16ClientDisconnectP7edict_s", ClientDisconnect), - HOOK_SYMBOLDEF(0x01D63E50, "_Z7respawnP9entvars_si", respawn), - HOOK_SYMBOLDEF(0x01D63F60, "_Z10ClientKillP7edict_s", ClientKill), - HOOK_SYMBOLDEF(0x01D64010, "_Z8ShowMenuP11CBasePlayeriiiPc_constprop_32", ShowMenu), - //HOOK_SYMBOLDEF(0x01D64070, "_Z12ShowVGUIMenuP11CBasePlayeriiPc", ShowVGUIMenu), - HOOK_DEF(0x01D64130, CountTeams), //extern c func - HOOK_SYMBOLDEF(0x01D64260, "_Z11ListPlayersP11CBasePlayer", ListPlayers), - HOOK_DEF(0x01D64460, CountTeamPlayers), //extern c func - HOOK_SYMBOLDEF(0x01D64580, "_Z15ProcessKickVoteP11CBasePlayerS0_", ProcessKickVote), - //HOOK_SYMBOLDEF(0x01D64920, "_Z17SelectDefaultTeamv", SelectDefaultTeam), - HOOK_SYMBOLDEF(0x01D649A0, "_Z15CheckStartMoneyv", CheckStartMoney), - HOOK_SYMBOLDEF(0x01D649F0, "_Z17ClientPutInServerP7edict_s", ClientPutInServer), - //HOOK_DEF(0x01D64F00, Q_strlen_), // NOXREF - HOOK_SYMBOLDEF(0x01D64F20, "_Z8Host_SayP7edict_si", Host_Say), - //HOOK_DEF(0x0, DropSecondary), // NOXREF - //HOOK_SYMBOLDEF(0x01D656F0, "_Z11DropPrimaryP11CBasePlayer", DropPrimary), - HOOK_SYMBOLDEF(0x01D65740, "_Z10CanBuyThisP11CBasePlayeri", CanBuyThis), - HOOK_SYMBOLDEF(0x01D65850, "_Z9BuyPistolP11CBasePlayeri", BuyPistol), - HOOK_SYMBOLDEF(0x01D65A30, "_Z10BuyShotgunP11CBasePlayeri", BuyShotgun), - HOOK_SYMBOLDEF(0x01D65B70, "_Z16BuySubMachineGunP11CBasePlayeri", BuySubMachineGun), - //HOOK_SYMBOLDEF(0x01D65D00, "_Z19BuyWeaponByWeaponIDP11CBasePlayer12WeaponIdType", BuyWeaponByWeaponID), - HOOK_SYMBOLDEF(0x01D65E80, "_Z8BuyRifleP11CBasePlayeri", BuyRifle), - HOOK_SYMBOLDEF(0x01D66070, "_Z13BuyMachineGunP11CBasePlayeri", BuyMachineGun), - HOOK_SYMBOLDEF(0x01D66170, "_Z7BuyItemP11CBasePlayeri", BuyItem), - HOOK_SYMBOLDEF(0x01D669A0, "_Z27HandleMenu_ChooseAppearanceP11CBasePlayeri", HandleMenu_ChooseAppearance), - HOOK_SYMBOLDEF(0x01D66D10, "_Z21HandleMenu_ChooseTeamP11CBasePlayeri", HandleMenu_ChooseTeam), - HOOK_SYMBOLDEF(0x01D67930, "_Z6Radio1P11CBasePlayeri", Radio1), - HOOK_SYMBOLDEF(0x01D67A20, "_Z6Radio2P11CBasePlayeri", Radio2), - HOOK_SYMBOLDEF(0x01D67B10, "_Z6Radio3P11CBasePlayeri", Radio3), - HOOK_SYMBOLDEF(0x01D67C70, "_Z10BuyGunAmmoR11CBasePlayerR15CBasePlayerItemb", BuyGunAmmo), - //HOOK_SYMBOLDEF(0x01D67E50, "_Z7BuyAmmoP11CBasePlayerib", BuyAmmo), // NOXREF - //HOOK_SYMBOLDEF(0x01D67EC0, "_Z16EntityFromUserIDi", EntityFromUserID), // NOXREF - //HOOK_SYMBOLDEF(0x01D67FC0, "_Z20CountPlayersInServerv", CountPlayersInServer), // NOXREF - HOOK_SYMBOLDEF(0x01D680D0, "_Z22HandleBuyAliasCommandsP11CBasePlayerPKc", HandleBuyAliasCommands), - HOOK_SYMBOLDEF(0x01D68540, "_Z24HandleRadioAliasCommandsP11CBasePlayerPKc", HandleRadioAliasCommands), - HOOK_SYMBOLDEF(0x01D68840, "_Z13ClientCommandP7edict_s", ClientCommand_), - HOOK_SYMBOLDEF(0x01D6B230, "_Z21ClientUserInfoChangedP7edict_sPc", ClientUserInfoChanged), - HOOK_SYMBOLDEF(0x01D6B4D0, "_Z16ServerDeactivatev", ServerDeactivate), - HOOK_SYMBOLDEF(0x01D6B520, "_Z14ServerActivateP7edict_sii", ServerActivate), - HOOK_SYMBOLDEF(0x01D6B620, "_Z14PlayerPreThinkP7edict_s", PlayerPreThink), - HOOK_SYMBOLDEF(0x01D6B640, "_Z15PlayerPostThinkP7edict_s", PlayerPostThink), - //HOOK_SYMBOLDEF(0x01D6B660, "_Z13ParmsNewLevelv", ParmsNewLevel), // PURE - HOOK_SYMBOLDEF(0x01D6B670, "_Z16ParmsChangeLevelv", ParmsChangeLevel), - HOOK_SYMBOLDEF(0x01D6B6A0, "_Z10StartFramev", StartFrame), - HOOK_SYMBOLDEF(0x01D6B740, "_Z14ClientPrecachev", ClientPrecache), - HOOK_SYMBOLDEF(0x01D6CCE0, "_Z18GetGameDescriptionv", GetGameDescription), - HOOK_SYMBOLDEF(0x01D6CD00, "_Z9Sys_ErrorPKc", SysEngine_Error), - HOOK_SYMBOLDEF(0x01D6CD10, "_Z19PlayerCustomizationP7edict_sP15customization_s", PlayerCustomization), - HOOK_SYMBOLDEF(0x01D6CD90, "_Z16SpectatorConnectP7edict_s", SpectatorConnect), - HOOK_SYMBOLDEF(0x01D6CDB0, "_Z19SpectatorDisconnectP7edict_s", SpectatorDisconnect), - HOOK_SYMBOLDEF(0x01D6CDD0, "_Z14SpectatorThinkP7edict_s", SpectatorThink), - HOOK_SYMBOLDEF(0x01D6CDF0, "_Z15SetupVisibilityP7edict_sS0_PPhS2_", SetupVisibility), - //HOOK_SYMBOLDEF(0x01D6CF60, "_Z14ResetPlayerPVSP7edict_si", ResetPlayerPVS), // NOXREF - //HOOK_SYMBOLDEF(0x01D6CFB0, "_Z25CheckPlayerPVSLeafChangedP7edict_si", CheckPlayerPVSLeafChanged), // NOXREF - //HOOK_SYMBOLDEF(0x01D6D020, "_Z15MarkEntityInPVSiifb", MarkEntityInPVS), // NOXREF - //HOOK_SYMBOLDEF(0x01D6D060, "_Z24CheckEntityRecentlyInPVSiif", CheckEntityRecentlyInPVS), // NOXREF - HOOK_SYMBOLDEF(0x01D6D0B0, "_Z13AddToFullPackP14entity_state_siP7edict_sS2_iiPh", AddToFullPack), - HOOK_SYMBOLDEF(0x01D6D5F0, "_Z14CreateBaselineiiP14entity_state_sP7edict_si6VectorS3_", CreateBaseline), - //HOOK_SYMBOLDEF(0x01D6D790, "_Z16Entity_FieldInitP7delta_s", Entity_FieldInit), // NOXREF - HOOK_SYMBOLDEF(0x01D6D800, "_Z13Entity_EncodeP7delta_sPKhS2_", Entity_Encode), - //HOOK_SYMBOLDEF(0x01D6D9C0, "_Z16Player_FieldInitP7delta_s", Player_FieldInit), // NOXREF - HOOK_SYMBOLDEF(0x01D6DA00, "_Z13Player_EncodeP7delta_sPKhS2_", Player_Encode), - HOOK_SYMBOLDEF(0x01D6DB10, "_Z23Custom_Entity_FieldInitP7delta_s", Custom_Entity_FieldInit), - HOOK_SYMBOLDEF(0x01D6DBC0, "_Z13Custom_EncodeP7delta_sPKhS2_", Custom_Encode), - HOOK_SYMBOLDEF(0x01D6DCB0, "_Z16RegisterEncodersv", RegisterEncoders), - HOOK_SYMBOLDEF(0x01D6DCF0, "_Z13GetWeaponDataP7edict_sP13weapon_data_s", GetWeaponData), - HOOK_SYMBOLDEF(0x01D6DF00, "_Z16UpdateClientDataPK7edict_siP12clientdata_s", UpdateClientData), - HOOK_SYMBOLDEF(0x01D6E2F0, "_Z8CmdStartPK7edict_sPK9usercmd_sj", CmdStart), - HOOK_SYMBOLDEF(0x01D6E360, "_Z6CmdEndPK7edict_s", CmdEnd), - HOOK_SYMBOLDEF(0x01D6E410, "_Z20ConnectionlessPacketPK8netadr_sPKcPcPi", ConnectionlessPacket), - HOOK_SYMBOLDEF(0x01D6E420, "_Z13GetHullBoundsiPfS_", GetHullBounds), - HOOK_SYMBOLDEF(0x01D6E440, "_Z24CreateInstancedBaselinesv", CreateInstancedBaselines), - HOOK_SYMBOLDEF(0x01D6E450, "_Z16InconsistentFilePK7edict_sPKcPc", InconsistentFile), - HOOK_SYMBOLDEF(0x01D6E490, "_Z20AllowLagCompensationv", AllowLagCompensation), - -#endif // Client_Region - -#ifndef Cbase_Region - - // base func - HOOK_SYMBOLDEF(0x01D61A30, "_Z19CaseInsensitiveHashPKci", CaseInsensitiveHash), - HOOK_SYMBOLDEF(0x01D61A70, "_Z20EmptyEntityHashTablev", EmptyEntityHashTable), - HOOK_SYMBOLDEF(0x01D61AE0, "_Z18AddEntityHashValueP9entvars_sPKc12hash_types_e", AddEntityHashValue), - HOOK_SYMBOLDEF(0x01D61CA0, "_Z21RemoveEntityHashValueP9entvars_sPKc12hash_types_e", RemoveEntityHashValue), - HOOK_SYMBOLDEF(0x01D61E20, "_Z13printEntitiesv", SV_PrintEntities_f), - HOOK_SYMBOLDEF(0x01D61ED0, "_Z19CREATE_NAMED_ENTITYj", CREATE_NAMED_ENTITY), - HOOK_SYMBOLDEF(0x01D61F10, "_Z13REMOVE_ENTITYP7edict_s", REMOVE_ENTITY), - HOOK_SYMBOLDEF(0x01D62540, "_Z12CONSOLE_ECHOPcz", CONSOLE_ECHO), - HOOK_SYMBOLDEF(0x01D61F30, "_Z15loopPerformancev", SV_LoopPerformance_f), - HOOK_DEF(0x01D62570, GetEntityAPI), - //HOOK_SYMBOLDEF(0x01D62670, "_Z13GetEntityAPI2P13DLL_FUNCTIONSPi", GetEntityAPI2), // NOXREF - HOOK_DEF(0x01D626B0, GetNewDLLFunctions), - //HOOK_SYMBOLDEF(0x01D62B20, "_Z16FindGlobalEntityjj", FindGlobalEntity), // NOXREF - HOOK_SYMBOLDEF(0x01D63700, "_ZL21SetObjectCollisionBoxP9entvars_s", SetObjectCollisionBox), - HOOK_SYMBOLDEF(0x01D63BE0, "_Z20OnFreeEntPrivateDataP7edict_s", OnFreeEntPrivateData), - HOOK_SYMBOLDEF(0x01D80630, "_Z11GameDLLInitv", GameDLLInit), - //HOOK_SYMBOLDEF(0x01DB6BD0, "_Z12GetSkillCvarPc", GetSkillCvar), //NOXREF - HOOK_SYMBOLDEF(0x01D626F0, "_Z13DispatchSpawnP7edict_s", DispatchSpawn), - HOOK_SYMBOLDEF(0x01D629D0, "_Z13DispatchThinkP7edict_s", DispatchThink), - HOOK_SYMBOLDEF(0x01D62990, "_Z11DispatchUseP7edict_sS0_", DispatchUse), - HOOK_SYMBOLDEF(0x01D62930, "_Z13DispatchTouchP7edict_sS0_", DispatchTouch), - HOOK_SYMBOLDEF(0x01D62A20, "_Z15DispatchBlockedP7edict_sS0_", DispatchBlocked), - HOOK_SYMBOLDEF(0x01D628F0, "_Z16DispatchKeyValueP7edict_sP14KeyValueData_s", DispatchKeyValue), - HOOK_SYMBOLDEF(0x01D62A50, "_Z12DispatchSaveP7edict_sP13saverestore_s", DispatchSave), - HOOK_SYMBOLDEF(0x01D62BD0, "_Z15DispatchRestoreP7edict_sP13saverestore_si", DispatchRestore), - HOOK_SYMBOLDEF(0x01D62FF0, "_Z25DispatchObjectCollsionBoxP7edict_s", DispatchObjectCollsionBox), - HOOK_SYMBOLDEF(0x01D63020, "_Z15SaveWriteFieldsP13saverestore_sPKcPvP15TYPEDESCRIPTIONi", SaveWriteFields), - HOOK_SYMBOLDEF(0x01D63060, "_Z14SaveReadFieldsP13saverestore_sPKcPvP15TYPEDESCRIPTIONi", SaveReadFields), - - // virtual func -//CBaseEntity - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D18590, "_ZN11CBaseEntity5SpawnEv", CBaseEntity::Spawn), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D185A0, "_ZN11CBaseEntity8PrecacheEv", CBaseEntity::Precache), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01B90, "_ZN11CBaseEntity7RestartEv", CBaseEntity::Restart), // PURE - ////HOOK_SYMBOL_VIRTUAL_DEF(0x01D185B0, "_ZN11CBaseEntity8KeyValueEP14KeyValueData_s", CBaseEntity::KeyValue), // default - HOOK_SYMBOL_VIRTUAL_DEF(0x01D635D0, "_ZN11CBaseEntity4SaveER5CSave", CBaseEntity::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D63610, "_ZN11CBaseEntity7RestoreER8CRestore", CBaseEntity::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01BA0, "_ZN11CBaseEntity10ObjectCapsEv", CBaseEntity::ObjectCaps), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01BB0, "_ZN11CBaseEntity8ActivateEv", CBaseEntity::Activate), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D638B0, "_ZN11CBaseEntity21SetObjectCollisionBoxEv", CBaseEntity::SetObjectCollisionBox), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01BC0, "_ZN11CBaseEntity8ClassifyEv", CBaseEntity::Classify), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01BD0, "_ZN11CBaseEntity11DeathNoticeEP9entvars_s", CBaseEntity::DeathNotice), // default - HOOK_SYMBOL_VIRTUAL_DEF(0x01D719D0, "_ZN11CBaseEntity11TraceAttackEP9entvars_sf6VectorP11TraceResulti", CBaseEntity::TraceAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D63210, "_ZN11CBaseEntity10TakeDamageEP9entvars_sS1_fi", CBaseEntity::TakeDamage), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D63190, "_ZN11CBaseEntity10TakeHealthEfi", CBaseEntity::TakeHealth), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D63550, "_ZN11CBaseEntity6KilledEP9entvars_si", CBaseEntity::Killed), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01BE0, "_ZN11CBaseEntity10BloodColorEv", CBaseEntity::BloodColor), // default - HOOK_SYMBOL_VIRTUAL_DEF(0x01D72EE0, "_ZN11CBaseEntity10TraceBleedEf6VectorP11TraceResulti", CBaseEntity::TraceBleed), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01BF0, "_ZN11CBaseEntity11IsTriggeredEPS_", CBaseEntity::IsTriggered), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01C00, "_ZN11CBaseEntity16MyMonsterPointerEv", CBaseEntity::MyMonsterPointer), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01C10, "_ZN11CBaseEntity21MySquadMonsterPointerEv", CBaseEntity::MySquadMonsterPointer), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01C20, "_ZN11CBaseEntity14GetToggleStateEv", CBaseEntity::GetToggleState), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01C30, "_ZN11CBaseEntity9AddPointsEii", CBaseEntity::AddPoints), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01C40, "_ZN11CBaseEntity15AddPointsToTeamEii", CBaseEntity::AddPointsToTeam), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01C50, "_ZN11CBaseEntity13AddPlayerItemEP15CBasePlayerItem", CBaseEntity::AddPlayerItem), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01C60, "_ZN11CBaseEntity16RemovePlayerItemEP15CBasePlayerItem", CBaseEntity::RemovePlayerItem), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01C70, "_ZN11CBaseEntity8GiveAmmoEiPci", CBaseEntity::GiveAmmo), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01C80, "_ZN11CBaseEntity8GetDelayEv", CBaseEntity::GetDelay), // DEFAULT - ////HOOK_SYMBOL_VIRTUAL_DEF(0x01D01C90, "_ZN11CBaseEntity8IsMovingEv", CBaseEntity::IsMoving), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01CE0, "_ZN11CBaseEntity13OverrideResetEv", CBaseEntity::OverrideReset), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01D63AF0, "_ZN11CBaseEntity11DamageDecalEi", CBaseEntity::DamageDecal), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01CF0, "_ZN11CBaseEntity14SetToggleStateEi", CBaseEntity::SetToggleState), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01D00, "_ZN11CBaseEntity13StartSneakingEv", CBaseEntity::StartSneaking), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01D10, "_ZN11CBaseEntity12StopSneakingEv", CBaseEntity::StopSneaking), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01D20, "_ZN11CBaseEntity10OnControlsEP9entvars_s", CBaseEntity::OnControls), // default - ////HOOK_SYMBOL_VIRTUAL_DEF(0x01D01D30, "_ZN11CBaseEntity10IsSneakingEv", CBaseEntity::IsSneaking), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01D40, "_ZN11CBaseEntity7IsAliveEv", CBaseEntity::IsAlive), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01D70, "_ZN11CBaseEntity10IsBSPModelEv", CBaseEntity::IsBSPModel), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01D90, "_ZN11CBaseEntity12ReflectGaussEv", CBaseEntity::ReflectGauss), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01DC0, "_ZN11CBaseEntity9HasTargetEj", CBaseEntity::HasTarget), // default - HOOK_SYMBOL_VIRTUAL_DEF(0x01D639C0, "_ZN11CBaseEntity9IsInWorldEv", CBaseEntity::IsInWorld), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01E30, "_ZN11CBaseEntity8IsPlayerEv", CBaseEntity::IsPlayer), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01E40, "_ZN11CBaseEntity11IsNetClientEv", CBaseEntity::IsNetClient), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01E50, "_ZN11CBaseEntity6TeamIDEv", CBaseEntity::TeamID), // default - HOOK_SYMBOL_VIRTUAL_DEF(0x01D63580, "_ZN11CBaseEntity13GetNextTargetEv", CBaseEntity::GetNextTarget), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01E60, "_ZN11CBaseEntity5ThinkEv", CBaseEntity::Think), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01E70, "_ZN11CBaseEntity5TouchEPS_", CBaseEntity::Touch), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01E80, "_ZN11CBaseEntity3UseEPS_S0_8USE_TYPEf", CBaseEntity::Use), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01EA0, "_ZN11CBaseEntity7BlockedEPS_", CBaseEntity::Blocked), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D18B00, "_ZN11CBaseEntity7RespawnEv", CBaseEntity::Respawn), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01EC0, "_ZN11CBaseEntity11UpdateOwnerEv", CBaseEntity::UpdateOwner), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01ED0, "_ZN11CBaseEntity12FBecomeProneEv", CBaseEntity::FBecomeProne), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01EE0, "_ZN11CBaseEntity6CenterEv", CBaseEntity::Center), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01F40, "_ZN11CBaseEntity11EyePositionEv", CBaseEntity::EyePosition), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01F70, "_ZN11CBaseEntity11EarPositionEv", CBaseEntity::EarPosition), // default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01FA0, "_ZN11CBaseEntity10BodyTargetERK6Vector", CBaseEntity::BodyTarget),// default - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01FC0, "_ZN11CBaseEntity12IlluminationEv", CBaseEntity::Illumination), // default - HOOK_SYMBOL_VIRTUAL_DEF(0x01D71840, "_ZN11CBaseEntity8FVisibleEPS_", CBaseEntity::FVisible, BOOL (CBaseEntity *)), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D71950, "_ZN11CBaseEntity8FVisibleERK6Vector", CBaseEntity::FVisible, BOOL (const Vector &)), - - // non-virtual func - //HOOK_DEF(0x01DA7FD0, CBaseEntity::Instance, CBaseEntity *(edict_t *)), - HOOK_SYMBOLDEF(0x01DBAF90, "_ZN11CBaseEntity14UpdateOnRemoveEv", CBaseEntity::UpdateOnRemove), - HOOK_SYMBOLDEF(0x01DBAFF0, "_ZN11CBaseEntity10SUB_RemoveEv", CBaseEntity::SUB_Remove), - HOOK_SYMBOLDEF(0x01DBB0A0, "_ZN11CBaseEntity13SUB_DoNothingEv", CBaseEntity::SUB_DoNothing), - HOOK_SYMBOLDEF(0x01D6FB10, "_ZN11CBaseEntity16SUB_StartFadeOutEv", CBaseEntity::SUB_StartFadeOut), - HOOK_SYMBOLDEF(0x01D6FB80, "_ZN11CBaseEntity11SUB_FadeOutEv", CBaseEntity::SUB_FadeOut), - HOOK_SYMBOLDEF(0x01D01EB0, "_ZN11CBaseEntity17SUB_CallUseToggleEv", CBaseEntity::SUB_CallUseToggle), - HOOK_SYMBOLDEF(0x01D63AC0, "_ZN11CBaseEntity12ShouldToggleE8USE_TYPEi", CBaseEntity::ShouldToggle), - HOOK_SYMBOLDEF(0x01D71BC0, "_ZN11CBaseEntity11FireBulletsEj6VectorS0_S0_fiiiP9entvars_s", CBaseEntity::FireBullets), - HOOK_SYMBOLDEF(0x01D72480, "_ZN11CBaseEntity12FireBullets3E6VectorS0_ffiiifP9entvars_sbi", CBaseEntity::FireBullets3), - HOOK_SYMBOLDEF(0x01DBB190, "_ZN11CBaseEntity14SUB_UseTargetsEPS_8USE_TYPEf", CBaseEntity::SUB_UseTargets), - HOOK_SYMBOLDEF(0x01DBB260, "_Z11FireTargetsPKcP11CBaseEntityS2_8USE_TYPEf", FireTargets), - //HOOK_SYMBOLDEF(0x01D638C0, "_ZN11CBaseEntity10IntersectsEPS_", CBaseEntity::Intersects), - //HOOK_SYMBOLDEF(0x01D63950, "_ZN11CBaseEntity11MakeDormantEv", CBaseEntity::MakeDormant), // NOXREF - HOOK_SYMBOLDEF(0x01D639B0, "_ZN11CBaseEntity9IsDormantEv", CBaseEntity::IsDormant), - //HOOK_SYMBOLDEF(0x0, "_ZN11CBaseEntity16IsLockedByMasterEv", CBaseEntity::IsLockedByMaster), // NOXREF - HOOK_SYMBOLDEF(0x01D63B20, "_ZN11CBaseEntity6CreateEPcRK6VectorS3_P7edict_s", CBaseEntity::Create), -//CPointEntity - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBACC0, "_ZN12CPointEntity5SpawnEv", CPointEntity::Spawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D60CB0, "_ZN12CPointEntity10ObjectCapsEv", CPointEntity::ObjectCaps), // default -//CNullEntity - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBACD0, "_ZN11CNullEntity5SpawnEv", CNullEntity::Spawn), -//CBaseDMStart - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBAF20, "_ZN12CBaseDMStart8KeyValueEP14KeyValueData_s", CBaseDMStart::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBAF70, "_ZN12CBaseDMStart11IsTriggeredEP11CBaseEntity", CBaseDMStart::IsTriggered), -//CBaseDelay - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBB110, "_ZN10CBaseDelay8KeyValueEP14KeyValueData_s", CBaseDelay::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBB0B0, "_ZN10CBaseDelay4SaveER5CSave", CBaseDelay::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBB0E0, "_ZN10CBaseDelay7RestoreER8CRestore", CBaseDelay::Restore), - // non-virtual func - HOOK_SYMBOLDEF(0x01DBB620, "_Z10SetMovedirP9entvars_s", SetMovedir), - HOOK_SYMBOLDEF(0x01DBB360, "_ZN10CBaseDelay14SUB_UseTargetsEP11CBaseEntity8USE_TYPEf", CBaseDelay::SUB_UseTargets), - HOOK_SYMBOLDEF(0x01DBB730, "_ZN10CBaseDelay10DelayThinkEv", CBaseDelay::DelayThink), -//CBaseAnimating - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59E70, "_ZN14CBaseAnimating4SaveER5CSave", CBaseAnimating::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59EA0, "_ZN14CBaseAnimating7RestoreER8CRestore", CBaseAnimating::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01FE0, "_ZN14CBaseAnimating15HandleAnimEventEP14MonsterEvent_t", CBaseAnimating::HandleAnimEvent), // PURE - // non-virtual func - HOOK_SYMBOLDEF(0x01D59ED0, "_ZN14CBaseAnimating18StudioFrameAdvanceEf", CBaseAnimating::StudioFrameAdvance), - //HOOK_SYMBOLDEF(0x01D5A130, "_ZN14CBaseAnimating16GetSequenceFlagsEv", CBaseAnimating::GetSequenceFlags), // NOXREF - HOOK_SYMBOLDEF(0x01D5A010, "_ZN14CBaseAnimating14LookupActivityEi", CBaseAnimating::LookupActivity), - HOOK_SYMBOLDEF(0x01D5A040, "_ZN14CBaseAnimating22LookupActivityHeaviestEi", CBaseAnimating::LookupActivityHeaviest), - HOOK_SYMBOLDEF(0x01D5A070, "_ZN14CBaseAnimating14LookupSequenceEPKc", CBaseAnimating::LookupSequence), - HOOK_SYMBOLDEF(0x01D5A0A0, "_ZN14CBaseAnimating17ResetSequenceInfoEv", CBaseAnimating::ResetSequenceInfo), - HOOK_SYMBOLDEF(0x01D5A160, "_ZN14CBaseAnimating18DispatchAnimEventsEf", CBaseAnimating::DispatchAnimEvents), - HOOK_SYMBOLDEF(0x01D5A280, "_ZN14CBaseAnimating17SetBoneControllerEif", CBaseAnimating::SetBoneController), - HOOK_SYMBOLDEF(0x01D5A2B0, "_ZN14CBaseAnimating19InitBoneControllersEv", CBaseAnimating::InitBoneControllers), - //HOOK_SYMBOLDEF(0x01D5A310, "_ZN14CBaseAnimating11SetBlendingEif", CBaseAnimating::SetBlending), // NOXREF - //HOOK_SYMBOLDEF(0x01D5A340, "_ZN14CBaseAnimating15GetBonePositionEiR6VectorS1_", CBaseAnimating::GetBonePosition), // NOXREF - //HOOK_SYMBOLDEF(0x01D5A370, "_ZN14CBaseAnimating13GetAttachmentEiR6VectorS1_", CBaseAnimating::GetAttachment), // NOXREF - //HOOK_SYMBOLDEF(0x01D5A3A0, "_ZN14CBaseAnimating14FindTransitionEiiPi", CBaseAnimating::FindTransition), // NOXREF - //HOOK_SYMBOLDEF(0x01D5A400, "_ZN14CBaseAnimating15GetAutomovementER6VectorS1_f", CBaseAnimating::GetAutomovement), // NOXREF - //HOOK_SYMBOLDEF(0x01D5A410, "_ZN14CBaseAnimating12SetBodygroupEii", CBaseAnimating::SetBodygroup), // NOXREF - //HOOK_SYMBOLDEF(0x01D5A440, "_ZN14CBaseAnimating12GetBodygroupEi", CBaseAnimating::GetBodygroup), // NOXREF - //HOOK_SYMBOLDEF(0x01D5A470, "_ZN14CBaseAnimating11ExtractBboxEiPfS0_", CBaseAnimating::ExtractBbox), // NOXREF - HOOK_SYMBOLDEF(0x01D5A4A0, "_ZN14CBaseAnimating14SetSequenceBoxEv", CBaseAnimating::SetSequenceBox), -//CBaseToggle - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBB7D0, "_ZN11CBaseToggle8KeyValueEP14KeyValueData_s", CBaseToggle::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBB770, "_ZN11CBaseToggle4SaveER5CSave", CBaseToggle::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBB7A0, "_ZN11CBaseToggle7RestoreER8CRestore", CBaseToggle::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D20F20, "_ZN11CBaseToggle14GetToggleStateEv", CBaseToggle::GetToggleState), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D20F30, "_ZN11CBaseToggle8GetDelayEv", CBaseToggle::GetDelay), - // non-virtual func - HOOK_SYMBOLDEF(0x01DBB920, "_ZN11CBaseToggle10LinearMoveE6Vectorf", CBaseToggle::LinearMove), - HOOK_SYMBOLDEF(0x01DBBA60, "_ZN11CBaseToggle14LinearMoveDoneEv", CBaseToggle::LinearMoveDone), - HOOK_SYMBOLDEF(0x01DBBAC0, "_ZN11CBaseToggle16IsLockedByMasterEv", CBaseToggle::IsLockedByMaster), // NOXREF - HOOK_SYMBOLDEF(0x01DBBB00, "_ZN11CBaseToggle11AngularMoveE6Vectorf", CBaseToggle::AngularMove), - HOOK_SYMBOLDEF(0x01DBBC40, "_ZN11CBaseToggle15AngularMoveDoneEv", CBaseToggle::AngularMoveDone), - HOOK_SYMBOLDEF(0x01DBBCA0, "_ZN11CBaseToggle9AxisValueEiRK6Vector", CBaseToggle::AxisValue), - HOOK_SYMBOLDEF(0x01DBBCD0, "_ZN11CBaseToggle7AxisDirEP9entvars_s", CBaseToggle::AxisDir), - HOOK_SYMBOLDEF(0x01DBBD60, "_ZN11CBaseToggle9AxisDeltaEiRK6VectorS2_", CBaseToggle::AxisDelta), - //HOOK_SYMBOLDEF(0x01DBBDA0, "_Z13FEntIsVisibleP9entvars_sS0_", FEntIsVisible), // NOXREF - -//CWorld - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD1EE0, "_ZN6CWorld5SpawnEv", CWorld::Spawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DD2000, "_ZN6CWorld8PrecacheEv", CWorld::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD2440, "_ZN6CWorld8KeyValueEP14KeyValueData_s", CWorld::KeyValue), - -//linked objects - HOOK_DEF(0x01DBACF0, info_null), - HOOK_DEF(0x01DBAD40, info_player_deathmatch), - HOOK_DEF(0x01DBAD90, info_player_start), - HOOK_DEF(0x01DBADE0, info_vip_start), - HOOK_DEF(0x01DBAE30, info_landmark), - HOOK_DEF(0x01DBAE80, info_hostage_rescue), - HOOK_DEF(0x01DBAED0, info_bomb_target), - HOOK_DEF(0x01DBB310, DelayedUse), - -#endif // Cbase_Region - -#ifndef Spectator_Region - - // virtual func - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DBAC90, "_ZN14CBaseSpectator5SpawnEv", CBaseSpectator::Spawn), // NOXREF - // non-virtual func - //HOOK_SYMBOLDEF(0x01DBAB20, "_ZN14CBaseSpectator16SpectatorConnectEv", CBaseSpectator::SpectatorConnect), // NOXREF - //HOOK_SYMBOLDEF(0x01DBAB50, "_ZN14CBaseSpectator19SpectatorDisconnectEv", CBaseSpectator::SpectatorDisconnect), // NOXREF - //HOOK_SYMBOLDEF(0x01DBAC40, "_ZN14CBaseSpectator14SpectatorThinkEv", CBaseSpectator::SpectatorThink), // NOXREF - //HOOK_SYMBOLDEF(0x01DBAB60, "_ZN14CBaseSpectator23SpectatorImpulseCommandEv", CBaseSpectator::SpectatorImpulseCommand), - -#endif // Spectator_Region - -#ifndef BaseMonster_Region - - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8AD30, "_ZN12CBaseMonster8KeyValueEP14KeyValueData_s", CBaseMonster::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D71AA0, "_ZN12CBaseMonster11TraceAttackEP9entvars_sf6VectorP11TraceResulti", CBaseMonster::TraceAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D70180, "_ZN12CBaseMonster10TakeDamageEP9entvars_sS1_fi", CBaseMonster::TakeDamage), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D70130, "_ZN12CBaseMonster10TakeHealthEfi", CBaseMonster::TakeHealth), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D6F9D0, "_ZN12CBaseMonster6KilledEP9entvars_si", CBaseMonster::Killed), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D20F50, "_ZN12CBaseMonster10BloodColorEv", CBaseMonster::BloodColor), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D24CF0, "_ZN12CBaseMonster7IsAliveEv", CBaseMonster::IsAlive), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8ABF0, "_ZN12CBaseMonster9ChangeYawEi", CBaseMonster::ChangeYaw), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D6F360, "_ZN12CBaseMonster12HasHumanGibsEv", CBaseMonster::HasHumanGibs), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D6F390, "_ZN12CBaseMonster12HasAlienGibsEv", CBaseMonster::HasAlienGibs), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D6F3C0, "_ZN12CBaseMonster11FadeMonsterEv", CBaseMonster::FadeMonster), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D6F4B0, "_ZN12CBaseMonster10GibMonsterEv", CBaseMonster::GibMonster), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D6F5A0, "_ZN12CBaseMonster16GetDeathActivityEv", CBaseMonster::GetDeathActivity), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D6F880, "_ZN12CBaseMonster10BecomeDeadEv", CBaseMonster::BecomeDead), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8AD10, "_ZN12CBaseMonster17ShouldFadeOnDeathEv", CBaseMonster::ShouldFadeOnDeath), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8AD40, "_ZN12CBaseMonster13IRelationshipEP11CBaseEntity", CBaseMonster::IRelationship), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D20F40, "_ZN12CBaseMonster9PainSoundEv", CBaseMonster::PainSound), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D24AD0, "_ZN12CBaseMonster13ResetMaxSpeedEv", CBaseMonster::ResetMaxSpeed), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D8ABE0, "_ZN12CBaseMonster13ReportAIStateEv", CBaseMonster::ReportAIState), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8AC60, "_ZN12CBaseMonster15MonsterInitDeadEv", CBaseMonster::MonsterInitDead), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8AD70, "_ZN12CBaseMonster4LookEi", CBaseMonster::Look), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8AF10, "_ZN12CBaseMonster16BestVisibleEnemyEv", CBaseMonster::BestVisibleEnemy), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D716D0, "_ZN12CBaseMonster11FInViewConeEP11CBaseEntity", CBaseMonster::FInViewCone, BOOL (CBaseEntity *)), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D71790, "_ZN12CBaseMonster11FInViewConeEP6Vector", CBaseMonster::FInViewCone, BOOL (const Vector *)), - - // non-virtual func - //HOOK_SYMBOLDEF(0x01D8AC00, "_ZN12CBaseMonster12MakeIdealYawE6Vector", CBaseMonster::MakeIdealYaw), // PURE - //HOOK_SYMBOLDEF(0x01D6F7F0, "_ZN12CBaseMonster22GetSmallFlinchActivityEv", CBaseMonster::GetSmallFlinchActivity), // NOXREF - //HOOK_SYMBOLDEF(0x01D6F8C0, "_ZN12CBaseMonster16ShouldGibMonsterEi", CBaseMonster::ShouldGibMonster), // NOXREF - HOOK_SYMBOLDEF(0x01D6F8F0, "_ZN12CBaseMonster14CallGibMonsterEv", CBaseMonster::CallGibMonster), - HOOK_SYMBOLDEF(0x01D8AD20, "_ZN12CBaseMonster15FCheckAITriggerEv", CBaseMonster::FCheckAITrigger), - HOOK_SYMBOLDEF(0x01D705B0, "_ZN12CBaseMonster14DeadTakeDamageEP9entvars_sS1_fi", CBaseMonster::DeadTakeDamage), - //HOOK_SYMBOLDEF(0x01D707C0, "_ZN12CBaseMonster11DamageForceEf", CBaseMonster::DamageForce), // NOXREF - HOOK_SYMBOLDEF(0x01D71470, "_ZN12CBaseMonster12RadiusDamageEP9entvars_sS1_fii", CBaseMonster::RadiusDamage, void (entvars_t *, entvars_t *, float, int, int)), - //HOOK_SYMBOLDEF(0x01D71520, "_ZN12CBaseMonster12RadiusDamageE6VectorP9entvars_sS2_fii", CBaseMonster::RadiusDamage, void(Vector, entvars_t *, entvars_t *, float, int, int)), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN12CBaseMonster13RadiusDamage2E6VectorP9entvars_sS2_fii", CBaseMonster::RadiusDamage2), // NOXREF - HOOK_SYMBOLDEF(0x01D8AC10, "_ZN12CBaseMonster15CorpseFallThinkEv", CBaseMonster::CorpseFallThink), - //HOOK_SYMBOLDEF(0x01D715D0, "_ZN12CBaseMonster20CheckTraceHullAttackEfii", CBaseMonster::CheckTraceHullAttack), // NOXREF - //HOOK_SYMBOLDEF(0x01D730E0, "_ZN12CBaseMonster20MakeDamageBloodDecalEifP11TraceResultRK6Vector", CBaseMonster::MakeDamageBloodDecal), // NOXREF - HOOK_SYMBOLDEF(0x01D73240, "_ZN12CBaseMonster10BloodSplatER6VectorS1_ii", CBaseMonster::BloodSplat), - HOOK_SYMBOLDEF(0x01D70800, "_Z11RadiusFlash6VectorP9entvars_sS1_fii", RadiusFlash), - //HOOK_SYMBOLDEF(0x0, "_ZL24GetAmountOfPlayerVisible6VectorP11CBaseEntity_constprop_21", GetAmountOfPlayerVisible), // NOXREF - HOOK_SYMBOLDEF(0x01D70CA0, "_Z12RadiusDamage6VectorP9entvars_sS1_ffii", RadiusDamage), - HOOK_SYMBOLDEF(0x01D711B0, "_Z13RadiusDamage26VectorP9entvars_sS1_ffii", RadiusDamage2), - //HOOK_SYMBOLDEF(0x01D72430, "_Z4vstrPf", vstr), // NOXREF - -#endif // BaseMonster_Region - -#ifndef Player_Region - -//CBasePlayer - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5200, "_ZN11CBasePlayer5SpawnEv", CBasePlayer::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5E40, "_ZN11CBasePlayer8PrecacheEv", CBasePlayer::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA5EE0, "_ZN11CBasePlayer4SaveER5CSave", CBasePlayer::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6080, "_ZN11CBasePlayer7RestoreER8CRestore", CBasePlayer::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D210A0, "_ZN11CBasePlayer10ObjectCapsEv", CBasePlayer::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA3550, "_ZN11CBasePlayer8ClassifyEv", CBasePlayer::Classify), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D9BE00, "_ZN11CBasePlayer11TraceAttackEP9entvars_sf6VectorP11TraceResulti", CBasePlayer::TraceAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D9C4C0, "_ZN11CBasePlayer10TakeDamageEP9entvars_sS1_fi", CBasePlayer::TakeDamage), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D9BD70, "_ZN11CBasePlayer10TakeHealthEfi", CBasePlayer::TakeHealth), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D9E550, "_ZN11CBasePlayer6KilledEP9entvars_si", CBasePlayer::Killed), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA3560, "_ZN11CBasePlayer9AddPointsEii", CBasePlayer::AddPoints), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA3640, "_ZN11CBasePlayer15AddPointsToTeamEii", CBasePlayer::AddPointsToTeam), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA86C0, "_ZN11CBasePlayer13AddPlayerItemEP15CBasePlayerItem", CBasePlayer::AddPlayerItem), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA8960, "_ZN11CBasePlayer16RemovePlayerItemEP15CBasePlayerItem", CBasePlayer::RemovePlayerItem), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA8AA0, "_ZN11CBasePlayer8GiveAmmoEiPci", CBasePlayer::GiveAmmo), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D20FD0, "_ZN11CBasePlayer13StartSneakingEv", CBasePlayer::StartSneaking), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D20FF0, "_ZN11CBasePlayer12StopSneakingEv", CBasePlayer::StopSneaking), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D21010, "_ZN11CBasePlayer10IsSneakingEv", CBasePlayer::IsSneaking), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D21030, "_ZN11CBasePlayer7IsAliveEv", CBasePlayer::IsAlive), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D21070, "_ZN11CBasePlayer8IsPlayerEv", CBasePlayer::IsPlayer), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D21090, "_ZN11CBasePlayer11IsNetClientEv", CBasePlayer::IsNetClient), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6950, "_ZN11CBasePlayer6TeamIDEv", CBasePlayer::TeamID), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA9BF0, "_ZN11CBasePlayer12FBecomeProneEv", CBasePlayer::FBecomeProne), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D20F60, "_ZN11CBasePlayer10BodyTargetERK6Vector", CBasePlayer::BodyTarget), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA9C50, "_ZN11CBasePlayer12IlluminationEv", CBasePlayer::Illumination), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D21060, "_ZN11CBasePlayer17ShouldFadeOnDeathEv", CBasePlayer::ShouldFadeOnDeath), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA9CB0, "_ZN11CBasePlayer13ResetMaxSpeedEv", CBasePlayer::ResetMaxSpeed), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA3310, "_ZN11CBasePlayer4JumpEv", CBasePlayer::Jump), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA3530, "_ZN11CBasePlayer4DuckEv", CBasePlayer::Duck), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA3850, "_ZN11CBasePlayer8PreThinkEv", CBasePlayer::PreThink), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA4610, "_ZN11CBasePlayer9PostThinkEv", CBasePlayer::PostThink), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D9BD80, "_ZN11CBasePlayer14GetGunPositionEv", CBasePlayer::GetGunPosition), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D25AD0, "_ZN11CBasePlayer5IsBotEv", CBasePlayer::IsBot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA8F90, "_ZN11CBasePlayer16UpdateClientDataEv", CBasePlayer::UpdateClientData), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA7020, "_ZN11CBasePlayer15ImpulseCommandsEv", CBasePlayer::ImpulseCommands), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA2490, "_ZN11CBasePlayer12RoundRespawnEv", CBasePlayer::RoundRespawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA9DC0, "_ZN11CBasePlayer16GetAutoaimVectorEf", CBasePlayer::GetAutoaimVector), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DAA220, "_ZN11CBasePlayer5BlindEfffi", CBasePlayer::Blind), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D25AE0, "_ZN11CBasePlayer16OnTouchingWeaponEP10CWeaponBox", CBasePlayer::OnTouchingWeapon), // DEFAULT - // non-virtual func - HOOK_SYMBOLDEF(0x01DAC8D0, "_ZN11CBasePlayer21SpawnClientSideCorpseEv", CBasePlayer::SpawnClientSideCorpse), - HOOK_SYMBOLDEF(0x01D93750, "_ZN11CBasePlayer23Observer_FindNextPlayerEbPKc", CBasePlayer::Observer_FindNextPlayer), - HOOK_SYMBOLDEF(0x01D936E0, "_ZN11CBasePlayer22Observer_IsValidTargetEib", CBasePlayer::Observer_IsValidTarget), - HOOK_SYMBOLDEF(0x01D93D10, "_ZN11CBasePlayer22Observer_HandleButtonsEv", CBasePlayer::Observer_HandleButtons), - HOOK_SYMBOLDEF(0x01D94280, "_ZN11CBasePlayer16Observer_SetModeEi", CBasePlayer::Observer_SetMode), - HOOK_SYMBOLDEF(0x01D93DF0, "_ZN11CBasePlayer20Observer_CheckTargetEv", CBasePlayer::Observer_CheckTarget), - HOOK_SYMBOLDEF(0x01D93F30, "_ZN11CBasePlayer24Observer_CheckPropertiesEv", CBasePlayer::Observer_CheckProperties), - //HOOK_SYMBOLDEF(0x0, "_ZN11CBasePlayer10IsObserverEv", CBasePlayer::IsObserver), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN11CBasePlayer7PlantC4Ev", CBasePlayer::PlantC4), // NOXREF - HOOK_SYMBOLDEF(0x01D9B670, "_ZN11CBasePlayer5RadioEPKcS1_sb", CBasePlayer::Radio), - //HOOK_SYMBOLDEF(0x01D9B4F0, "_ZN11CBasePlayer21GetNextRadioRecipientEPS_", CBasePlayer::GetNextRadioRecipient), // NOXREF - //HOOK_SYMBOLDEF(0x01D9B9A0, "_ZN11CBasePlayer10SmartRadioEv", CBasePlayer::SmartRadio), // NOXREF - HOOK_SYMBOLDEF(0x01DA07D0, "_ZN11CBasePlayer11ThrowWeaponEPc", CBasePlayer::ThrowWeapon), // NOXREF - //HOOK_SYMBOLDEF(0x01DA0DB0, "_ZN11CBasePlayer12ThrowPrimaryEv", CBasePlayer::ThrowPrimary), // NOXREF - //HOOK_SYMBOLDEF(0x01DA1170, "_ZN11CBasePlayer10AddAccountEib", CBasePlayer::AddAccount), - HOOK_SYMBOLDEF(0x01DA1DA0, "_ZN11CBasePlayer9DisappearEv", CBasePlayer::Disappear), - HOOK_SYMBOLDEF(0x01DA15B0, "_ZN11CBasePlayer7MakeVIPEv", CBasePlayer::MakeVIP), - HOOK_SYMBOLDEF(0x01DA36C0, "_ZN11CBasePlayer12CanPlayerBuyEb", CBasePlayer::CanPlayerBuy), - HOOK_SYMBOLDEF(0x01DAB070, "_ZN11CBasePlayer10SwitchTeamEv", CBasePlayer::SwitchTeam), - HOOK_SYMBOLDEF(0x01DAB820, "_ZN11CBasePlayer12TabulateAmmoEv", CBasePlayer::TabulateAmmo), - HOOK_SYMBOLDEF(0x01D9B9B0, "_ZN11CBasePlayer4PainEib", CBasePlayer::Pain), - HOOK_SYMBOLDEF(0x01D9F410, "_ZN11CBasePlayer9IsBombGuyEv", CBasePlayer::IsBombGuy), - HOOK_SYMBOLDEF(0x01DACC30, "_ZNK11CBasePlayer19IsLookingAtPositionEPK6Vectorf", CBasePlayer::IsLookingAtPosition), - HOOK_SYMBOLDEF(0x01DA6310, "_ZN11CBasePlayer5ResetEv", CBasePlayer::Reset), - HOOK_SYMBOLDEF(0x01DA5F10, "_ZN11CBasePlayer23SetScoreboardAttributesEPS_", CBasePlayer::SetScoreboardAttributes), - //HOOK_SYMBOLDEF(0x01DA6070, "_ZN11CBasePlayer10RenewItemsEv", CBasePlayer::RenewItems), // NOXREF - HOOK_SYMBOLDEF(0x01D9D630, "_ZN11CBasePlayer19PackDeadPlayerItemsEv", CBasePlayer::PackDeadPlayerItems), - HOOK_SYMBOLDEF(0x01D9DAD0, "_ZN11CBasePlayer16GiveDefaultItemsEv", CBasePlayer::GiveDefaultItems), - HOOK_SYMBOLDEF(0x01D9DD60, "_ZN11CBasePlayer14RemoveAllItemsEi", CBasePlayer::RemoveAllItems), - HOOK_SYMBOLDEF(0x01D9E020, "_ZN11CBasePlayer11SetBombIconEi", CBasePlayer::SetBombIcon), - HOOK_SYMBOLDEF(0x01D9E190, "_ZN11CBasePlayer18SetProgressBarTimeEi", CBasePlayer::SetProgressBarTime), - HOOK_SYMBOLDEF(0x01D9E320, "_ZN11CBasePlayer19SetProgressBarTime2Eif", CBasePlayer::SetProgressBarTime2), - //HOOK_SYMBOLDEF(0x01D93690, "_Z14GetForceCamerav", GetForceCamera), // NOXREF - HOOK_SYMBOLDEF(0x01D93A00, "_ZL19UpdateClientEffectsP11CBasePlayeri", UpdateClientEffects), - //HOOK_DEF(0x0, OLD_CheckBuyZone), // NOXREF - //HOOK_DEF(0x0, OLD_CheckBombTarget), // NOXREF - //HOOK_DEF(0x0, OLD_CheckRescueZone), // NOXREF - -#ifdef _WIN32 - - //HOOK_DEF(0x0, BuyZoneIcon_Set), - //HOOK_DEF(0x0, BuyZoneIcon_Clear), // NOXREF - //HOOK_DEF(0x0, BombTargetFlash_Set), - //HOOK_DEF(0x0, BombTargetFlash_Clear), // NOXREF - //HOOK_DEF(0x0, RescueZoneIcon_Set), - //HOOK_DEF(0x0, RescueZoneIcon_Clear), // NOXREF - HOOK_DEF(0x01DA8410, EscapeZoneIcon_Set), - HOOK_DEF(0x01DA84C0, EscapeZoneIcon_Clear), - HOOK_DEF(0x01DA8550, VIP_SafetyZoneIcon_Set), - HOOK_DEF(0x01DA8630, VIP_SafetyZoneIcon_Clear), - -#endif // _WIN32 - - HOOK_SYMBOLDEF(0x01DA4420, "_ZN11CBasePlayer17SetNewPlayerModelEPKc", CBasePlayer::SetNewPlayerModel), - HOOK_SYMBOLDEF(0x01DAB720, "_ZN11CBasePlayer12SwitchWeaponEP15CBasePlayerItem", CBasePlayer::SwitchWeapon), - //HOOK_SYMBOLDEF(0x01DA43F0, "_ZN11CBasePlayer13CheckPowerupsEP9entvars_s", CBasePlayer::CheckPowerups), // NOXREF - HOOK_SYMBOLDEF(0x01DACDA0, "_ZN11CBasePlayer16CanAffordPrimaryEv", CBasePlayer::CanAffordPrimary), - HOOK_SYMBOLDEF(0x01DACE10, "_ZN11CBasePlayer20CanAffordPrimaryAmmoEv", CBasePlayer::CanAffordPrimaryAmmo), - HOOK_SYMBOLDEF(0x01DACE60, "_ZN11CBasePlayer22CanAffordSecondaryAmmoEv", CBasePlayer::CanAffordSecondaryAmmo), - HOOK_SYMBOLDEF(0x01DACEB0, "_ZN11CBasePlayer14CanAffordArmorEv", CBasePlayer::CanAffordArmor), - HOOK_SYMBOLDEF(0x01DACEF0, "_ZN11CBasePlayer18CanAffordDefuseKitEv", CBasePlayer::CanAffordDefuseKit), - HOOK_SYMBOLDEF(0x01DACF00, "_ZN11CBasePlayer16CanAffordGrenadeEv", CBasePlayer::CanAffordGrenade), - HOOK_SYMBOLDEF(0x01DACF20, "_ZN11CBasePlayer16NeedsPrimaryAmmoEv", CBasePlayer::NeedsPrimaryAmmo), - HOOK_SYMBOLDEF(0x01DACF60, "_ZN11CBasePlayer18NeedsSecondaryAmmoEv", CBasePlayer::NeedsSecondaryAmmo), - HOOK_SYMBOLDEF(0x01DACFA0, "_ZN11CBasePlayer10NeedsArmorEv", CBasePlayer::NeedsArmor), - HOOK_SYMBOLDEF(0x01DACFD0, "_ZN11CBasePlayer14NeedsDefuseKitEv", CBasePlayer::NeedsDefuseKit), - HOOK_SYMBOLDEF(0x01DAD000, "_ZN11CBasePlayer12NeedsGrenadeEv", CBasePlayer::NeedsGrenade), - HOOK_SYMBOLDEF(0x01DA07B0, "_ZN11CBasePlayer10IsOnLadderEv", CBasePlayer::IsOnLadder), - //HOOK_SYMBOLDEF(0x01DA6E80, "_ZN11CBasePlayer14FlashlightIsOnEv", CBasePlayer::FlashlightIsOn), // NOXREF - //HOOK_SYMBOLDEF(0x01DA6E90, "_ZN11CBasePlayer16FlashlightTurnOnEv", CBasePlayer::FlashlightTurnOn), // NOXREF - //HOOK_SYMBOLDEF(0x01DA6F40, "_ZN11CBasePlayer17FlashlightTurnOffEv", CBasePlayer::FlashlightTurnOff), // NOXREF - HOOK_SYMBOLDEF(0x01DA4450, "_ZN11CBasePlayer17UpdatePlayerSoundEv", CBasePlayer::UpdatePlayerSound), - //HOOK_SYMBOLDEF(0x01D9BCA0, "_ZN11CBasePlayer10DeathSoundEv", CBasePlayer::DeathSound), // NOXREF - HOOK_SYMBOLDEF(0x01D9F430, "_ZN11CBasePlayer12SetAnimationE11PLAYER_ANIM", CBasePlayer::SetAnimation), - //HOOK_SYMBOLDEF(0x0, "_ZN11CBasePlayer17SetWeaponAnimTypeEPKc", CBasePlayer::SetWeaponAnimType), // NOXREF - HOOK_SYMBOLDEF(0x01DA73C0, "_ZN11CBasePlayer20CheatImpulseCommandsEi", CBasePlayer::CheatImpulseCommands), - //HOOK_SYMBOLDEF(0x01DA2640, "_ZN11CBasePlayer13StartDeathCamEv", CBasePlayer::StartDeathCam), // NOXREF - HOOK_SYMBOLDEF(0x01DA26D0, "_ZN11CBasePlayer13StartObserverE6VectorS0_", CBasePlayer::StartObserver), - HOOK_SYMBOLDEF(0x01DA7FF0, "_ZN11CBasePlayer13HandleSignalsEv", CBasePlayer::HandleSignals), - HOOK_SYMBOLDEF(0x01DAA850, "_ZN11CBasePlayer14DropPlayerItemEPKc", CBasePlayer::DropPlayerItem), - //HOOK_SYMBOLDEF(0x01DAAF30, "_ZN11CBasePlayer13HasPlayerItemEP15CBasePlayerItem", CBasePlayer::HasPlayerItem), - //HOOK_SYMBOLDEF(0x01DAAFC0, "_ZN11CBasePlayer18HasNamedPlayerItemEPKc", CBasePlayer::HasNamedPlayerItem), - //HOOK_SYMBOLDEF(0x01DA6920, "_ZN11CBasePlayer10HasWeaponsEv", CBasePlayer::HasWeapons), // NOXREF - //HOOK_SYMBOLDEF(0x01DA6940, "_ZN11CBasePlayer14SelectPrevItemEi", CBasePlayer::SelectPrevItem), // NOXREF - //HOOK_SYMBOLDEF(0x01DA6470, "_ZN11CBasePlayer14SelectNextItemEi", CBasePlayer::SelectNextItem), // NOXREF - HOOK_SYMBOLDEF(0x01DA65E0, "_ZN11CBasePlayer10SelectItemEPKc", CBasePlayer::SelectItem), - HOOK_SYMBOLDEF(0x01DA67A0, "_ZN11CBasePlayer14SelectLastItemEv", CBasePlayer::SelectLastItem), - //HOOK_SYMBOLDEF(0x01DA8BB0, "_ZN11CBasePlayer12ItemPreFrameEv", CBasePlayer::ItemPreFrame), // NOXREF - //HOOK_SYMBOLDEF(0x01DA8BE0, "_ZN11CBasePlayer13ItemPostFrameEv", CBasePlayer::ItemPostFrame), // NOXREF - //HOOK_SYMBOLDEF(0x01DA6CC0, "_ZN11CBasePlayer13GiveNamedItemEPKc", CBasePlayer::GiveNamedItem), - HOOK_SYMBOLDEF(0x01DA9C80, "_ZN11CBasePlayer13EnableControlEi", CBasePlayer::EnableControl), - HOOK_SYMBOLDEF(0x01DA9D50, "_ZN11CBasePlayer11HintMessageEPKcii", CBasePlayer::HintMessage), - HOOK_SYMBOLDEF(0x01DA8CC0, "_ZN11CBasePlayer14SendAmmoUpdateEv", CBasePlayer::SendAmmoUpdate), - //HOOK_SYMBOLDEF(0x01D9E4F0, "_ZN11CBasePlayer7SendFOVEi", CBasePlayer::SendFOV), // NOXREF - HOOK_SYMBOLDEF(0x01DA0390, "_ZN11CBasePlayer9WaterMoveEv", CBasePlayer::WaterMove), - HOOK_SYMBOLDEF(0x01DA2140, "_ZN11CBasePlayer16PlayerDeathThinkEv", CBasePlayer::PlayerDeathThink), - HOOK_SYMBOLDEF(0x01DA29A0, "_ZN11CBasePlayer9PlayerUseEv", CBasePlayer::PlayerUse), - HOOK_SYMBOLDEF(0x01DA3290, "_ZN11CBasePlayer11HostageUsedEv", CBasePlayer::HostageUsed), - HOOK_SYMBOLDEF(0x01DA1680, "_ZN11CBasePlayer12JoiningThinkEv", CBasePlayer::JoiningThink), - //HOOK_SYMBOLDEF(0x01DA1480, "_ZN11CBasePlayer15RemoveLevelTextEv", CBasePlayer::RemoveLevelText), // NOXREF - //HOOK_SYMBOLDEF(0x01DA14D0, "_ZN11CBasePlayer9MenuPrintEPS_PKc", CBasePlayer::MenuPrint), // hook with attribute __stdcall - //HOOK_SYMBOLDEF(0x01DA11F0, "_ZN11CBasePlayer9ResetMenuEv", CBasePlayer::ResetMenu), // NOXREF - HOOK_SYMBOLDEF(0x01DA1240, "_ZN11CBasePlayer14SyncRoundTimerEv", CBasePlayer::SyncRoundTimer), - HOOK_SYMBOLDEF(0x01DA4220, "_ZN11CBasePlayer15CheckSuitUpdateEv", CBasePlayer::CheckSuitUpdate), - HOOK_SYMBOLDEF(0x01DA43E0, "_ZN11CBasePlayer13SetSuitUpdateEPcii", CBasePlayer::SetSuitUpdate), - //HOOK_SYMBOLDEF(0x01DA4170, "_ZN11CBasePlayer19UpdateGeigerCounterEv", CBasePlayer::UpdateGeigerCounter), // NOXREF - HOOK_SYMBOLDEF(0x01DA3FE0, "_ZN11CBasePlayer20CheckTimeBasedDamageEv", CBasePlayer::CheckTimeBasedDamage), - //HOOK_SYMBOLDEF(0x01DA9C10, "_ZN11CBasePlayer20BarnacleVictimBittenEP9entvars_s", CBasePlayer::BarnacleVictimBitten), // NOXREF - //HOOK_SYMBOLDEF(0x01DA9C40, "_ZN11CBasePlayer22BarnacleVictimReleasedEv", CBasePlayer::BarnacleVictimReleased), // NOXREF - HOOK_SYMBOLDEF(0x01DA8C80, "_ZN11CBasePlayer12GetAmmoIndexEPKc", CBasePlayer::GetAmmoIndex), - HOOK_SYMBOLDEF(0x01DA8C60, "_ZN11CBasePlayer13AmmoInventoryEi", CBasePlayer::AmmoInventory), - //HOOK_SYMBOLDEF(0x01DAA150, "_ZN11CBasePlayer12ResetAutoaimEv", CBasePlayer::ResetAutoaim), // NOXREF - //HOOK_SYMBOLDEF(0x01DAA120, "_ZN11CBasePlayer17AutoaimDeflectionER6Vectorff", CBasePlayer::AutoaimDeflection), // NOXREF - HOOK_SYMBOLDEF(0x01DA6FD0, "_ZN11CBasePlayer20ForceClientDllUpdateEv", CBasePlayer::ForceClientDllUpdate), - //HOOK_SYMBOLDEF(0x0, "_ZN11CBasePlayer12DeathMessageEP9entvars_s", CBasePlayer::DeathMessage), // NOXREF - HOOK_SYMBOLDEF(0x01DAA1E0, "_ZN11CBasePlayer20SetCustomDecalFramesEi", CBasePlayer::SetCustomDecalFrames), - //HOOK_SYMBOLDEF(0x01DAA210, "_ZN11CBasePlayer20GetCustomDecalFramesEv", CBasePlayer::GetCustomDecalFrames), // NOXREF - //HOOK_SYMBOLDEF(0x01DAA260, "_ZN11CBasePlayer13InitStatusBarEv", CBasePlayer::InitStatusBar), // NOXREF - HOOK_SYMBOLDEF(0x01DAA270, "_ZN11CBasePlayer15UpdateStatusBarEv", CBasePlayer::UpdateStatusBar), - HOOK_SYMBOLDEF(0x01DAC0F0, "_ZN11CBasePlayer18StudioEstimateGaitEv", CBasePlayer::StudioEstimateGait), - //HOOK_SYMBOLDEF(0x01DAC400, "_ZN11CBasePlayer17StudioPlayerBlendEPiPf", CBasePlayer::StudioPlayerBlend), // NOXREF - //HOOK_SYMBOLDEF(0x01DAC490, "_ZN11CBasePlayer19CalculatePitchBlendEv", CBasePlayer::CalculatePitchBlend), // NOXREF - HOOK_SYMBOLDEF(0x01DAC510, "_ZN11CBasePlayer17CalculateYawBlendEv", CBasePlayer::CalculateYawBlend), - HOOK_SYMBOLDEF(0x01DAC640, "_ZN11CBasePlayer17StudioProcessGaitEv", CBasePlayer::StudioProcessGait), - //HOOK_SYMBOLDEF(0x01DA8D40, "_ZN11CBasePlayer14SendHostagePosEv", CBasePlayer::SendHostagePos), // NOXREF - HOOK_SYMBOLDEF(0x01DA8DE0, "_ZN11CBasePlayer16SendHostageIconsEv", CBasePlayer::SendHostageIcons), - //HOOK_SYMBOLDEF(0x01DAC7C0, "_ZN11CBasePlayer12ResetStaminaEv", CBasePlayer::ResetStamina), // NOXREF - //HOOK_SYMBOLDEF(0x01DACA10, "_ZN11CBasePlayer9IsArmoredEi", CBasePlayer::IsArmored), // NOXREF - //HOOK_SYMBOLDEF(0x01DACA60, "_ZN11CBasePlayer19ShouldDoLargeFlinchEii", CBasePlayer::ShouldDoLargeFlinch), // NOXREF - HOOK_SYMBOLDEF(0x01DACAD0, "_ZN11CBasePlayer20SetPrefsFromUserinfoEPc", CBasePlayer::SetPrefsFromUserinfo), - HOOK_SYMBOLDEF(0x01DA8EE0, "_ZN11CBasePlayer15SendWeatherInfoEv", CBasePlayer::SendWeatherInfo), - HOOK_SYMBOLDEF(0x01DAB6F0, "_ZN11CBasePlayer21UpdateShieldCrosshairEb", CBasePlayer::UpdateShieldCrosshair), - HOOK_SYMBOLDEF(0x01DA0DA0, "_ZN11CBasePlayer9HasShieldEv", CBasePlayer::HasShield), - //HOOK_SYMBOLDEF(0x0, "_ZN11CBasePlayer19IsProtectedByShieldEv", CBasePlayer::IsProtectedByShield), - //HOOK_SYMBOLDEF(0x01DA0B20, "_ZN11CBasePlayer12RemoveShieldEv", CBasePlayer::RemoveShield), // NOXREF - HOOK_SYMBOLDEF(0x01DA0B60, "_ZN11CBasePlayer10DropShieldEb", CBasePlayer::DropShield), - HOOK_SYMBOLDEF(0x01DA0A90, "_ZN11CBasePlayer10GiveShieldEb", CBasePlayer::GiveShield), - //HOOK_SYMBOLDEF(0x01D9BDB0, "_ZN11CBasePlayer15IsHittingShieldERK6VectorP11TraceResult", CBasePlayer::IsHittingShield), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN11CBasePlayer11IsReloadingEv", CBasePlayer::IsReloading), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK11CBasePlayer7IsBlindEv", CBasePlayer::IsBlind), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK11CBasePlayer19IsAutoFollowAllowedEv", CBasePlayer::IsAutoFollowAllowed), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN11CBasePlayer17InhibitAutoFollowEf", CBasePlayer::InhibitAutoFollow), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN11CBasePlayer15AllowAutoFollowEv", CBasePlayer::AllowAutoFollow), // NOXREF - HOOK_SYMBOLDEF(0x01DAD180, "_ZN11CBasePlayer16ClearAutoBuyDataEv", CBasePlayer::ClearAutoBuyData), - HOOK_SYMBOLDEF(0x01DAD190, "_ZN11CBasePlayer14AddAutoBuyDataEPKc", CBasePlayer::AddAutoBuyData), - HOOK_SYMBOLDEF(0x01DAD280, "_ZN11CBasePlayer7AutoBuyEv", CBasePlayer::AutoBuy), - HOOK_SYMBOLDEF(0x01DAD0D0, "_ZN11CBasePlayer13ClientCommandEPKcS1_S1_S1_", CBasePlayer::ClientCommand), - HOOK_SYMBOLDEF(0x01DADD00, "_ZN11CBasePlayer23PrioritizeAutoBuyStringEPcPKc", CBasePlayer::PrioritizeAutoBuyString), - HOOK_SYMBOLDEF(0x01DAD590, "_ZN11CBasePlayer27PickPrimaryCareerTaskWeaponEv", CBasePlayer::PickPrimaryCareerTaskWeapon), - HOOK_SYMBOLDEF(0x01DAD930, "_ZN11CBasePlayer29PickSecondaryCareerTaskWeaponEv", CBasePlayer::PickSecondaryCareerTaskWeapon), - //HOOK_SYMBOLDEF(0x01DADC60, "_ZN11CBasePlayer25PickFlashKillWeaponStringEv", CBasePlayer::PickFlashKillWeaponString), // NOXREF - //HOOK_SYMBOLDEF(0x01DADCC0, "_ZN11CBasePlayer27PickGrenadeKillWeaponStringEv", CBasePlayer::PickGrenadeKillWeaponString), // NOXREF - //HOOK_SYMBOLDEF(0x01DADF70, "_ZN11CBasePlayer27ShouldExecuteAutoBuyCommandEPK17AutoBuyInfoStructbb", CBasePlayer::ShouldExecuteAutoBuyCommand), // NOXREF - HOOK_SYMBOLDEF(0x01DADFF0, "_ZN11CBasePlayer28PostAutoBuyCommandProcessingEPK17AutoBuyInfoStructRbS3_", CBasePlayer::PostAutoBuyCommandProcessing), - HOOK_SYMBOLDEF(0x01DADE20, "_ZN11CBasePlayer18ParseAutoBuyStringEPKcRbS2_", CBasePlayer::ParseAutoBuyString), - //HOOK_SYMBOLDEF(0x01DADFB0, "_ZN11CBasePlayer21GetAutoBuyCommandInfoEPKc", CBasePlayer::GetAutoBuyCommandInfo), // NOXREF - HOOK_SYMBOLDEF(0x01DAD1F0, "_ZN11CBasePlayer13InitRebuyDataEPKc", CBasePlayer::InitRebuyData), - HOOK_SYMBOLDEF(0x01DAE0A0, "_ZN11CBasePlayer16BuildRebuyStructEv", CBasePlayer::BuildRebuyStruct), - HOOK_SYMBOLDEF(0x01DAE260, "_ZN11CBasePlayer5RebuyEv", CBasePlayer::Rebuy), - //HOOK_SYMBOLDEF(0x01DAE580, "_ZN11CBasePlayer18RebuyPrimaryWeaponEv", CBasePlayer::RebuyPrimaryWeapon), // NOXREF - //HOOK_SYMBOLDEF(0x01DAE5E0, "_ZN11CBasePlayer16RebuyPrimaryAmmoEv", CBasePlayer::RebuyPrimaryAmmo), // NOXREF - //HOOK_SYMBOLDEF(0x01DAE650, "_ZN11CBasePlayer20RebuySecondaryWeaponEv", CBasePlayer::RebuySecondaryWeapon), // NOXREF - //HOOK_SYMBOLDEF(0x01DAE6B0, "_ZN11CBasePlayer18RebuySecondaryAmmoEv", CBasePlayer::RebuySecondaryAmmo), - //HOOK_SYMBOLDEF(0x01DAE720, "_ZN11CBasePlayer14RebuyHEGrenadeEv", CBasePlayer::RebuyHEGrenade), // NOXREF - //HOOK_SYMBOLDEF(0x01DAE7C0, "_ZN11CBasePlayer14RebuyFlashbangEv", CBasePlayer::RebuyFlashbang), // NOXREF - //HOOK_SYMBOLDEF(0x01DAE860, "_ZN11CBasePlayer17RebuySmokeGrenadeEv", CBasePlayer::RebuySmokeGrenade), // NOXREF - HOOK_SYMBOLDEF(0x01DAE900, "_ZN11CBasePlayer12RebuyDefuserEv", CBasePlayer::RebuyDefuser), - HOOK_SYMBOLDEF(0x01DAE960, "_ZN11CBasePlayer16RebuyNightVisionEv", CBasePlayer::RebuyNightVision), - HOOK_SYMBOLDEF(0x01DAE9C0, "_ZN11CBasePlayer10RebuyArmorEv", CBasePlayer::RebuyArmor), - HOOK_SYMBOLDEF(0x01DAEAB0, "_ZN11CBasePlayer14UpdateLocationEb", CBasePlayer::UpdateLocation), - //HOOK_SYMBOLDEF(0x0, "_ZN11CBasePlayer23SetObserverAutoDirectorEb", CBasePlayer::SetObserverAutoDirector), // NOXREF - HOOK_SYMBOLDEF(0x01DAEA40, "_ZN11CBasePlayer17IsObservingPlayerEPS_", CBasePlayer::IsObservingPlayer), - //HOOK_SYMBOLDEF(0x0, "_ZNK11CBasePlayer22CanSwitchObserverModesEv", CBasePlayer::CanSwitchObserverModes), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN11CBasePlayer7IntenseEv", CBasePlayer::Intense), // NOXREF - HOOK_SYMBOLDEF(0x01D9AB20, "_Z16LinkUserMessagesv", LinkUserMessages), - HOOK_SYMBOLDEF(0x01D9B0F0, "_Z18WriteSigonMessagesv", WriteSigonMessages), - //HOOK_SYMBOLDEF(0x01D9B280, "_Z14SendItemStatusP11CBasePlayer", SendItemStatus), - HOOK_SYMBOLDEF(0x01D9D8A0, "_ZL14GetCSModelNamei", GetCSModelName), - HOOK_SYMBOLDEF(0x01D9B2D0, "_ZN11CBasePlayer14SetPlayerModelEi", CBasePlayer::SetPlayerModel), - //HOOK_SYMBOLDEF(0x01D9BB40, "_Z20VecVelocityForDamagef", VecVelocityForDamage), // NOXREF - //HOOK_SYMBOLDEF(0x01D9BC40, "_Z10TrainSpeedii", TrainSpeed), // NOXREF - HOOK_SYMBOLDEF(0x01D9C2B0, "_Z13GetWeaponNameP9entvars_sS0_", GetWeaponName), - HOOK_SYMBOLDEF(0x01D9C3C0, "_Z9LogAttackP11CBasePlayerS0_iiiiiPKc", LogAttack), - HOOK_SYMBOLDEF(0x01D9D770, "_ZL14packPlayerItemP11CBasePlayerP15CBasePlayerItemb", packPlayerItem), - HOOK_SYMBOLDEF(0x01DA3110, "_ZL13CanSeeUseableP11CBasePlayerP11CBaseEntity_isra_13", CanSeeUseable), - //HOOK_SYMBOLDEF(0x01DA34E0, "_Z20FixPlayerCrouchStuckP7edict_s", FixPlayerCrouchStuck), // NOXREF - //HOOK_SYMBOLDEF(0x01DA4A90, "_Z17IsSpawnPointValidP11CBaseEntityS0_", IsSpawnPointValid), // NOXREF - //HOOK_SYMBOLDEF(0x01DA4B20, "_Z16InitZombieSpawnsv", InitZombieSpawns), // NOXREF - //HOOK_SYMBOLDEF(0x01DA4BC0, "_Z15FindZombieSpawnP11CBaseEntityb", FindZombieSpawn), // NOXREF - //HOOK_SYMBOLDEF(0x01DA4BD0, "_Z19EntSelectSpawnPointP11CBaseEntity", EntSelectSpawnPoint), - -#ifdef _WIN32 - //HOOK_DEF(0x01DA5180, SetScoreAttrib), -#endif // _WIN32 - - //HOOK_SYMBOLDEF(0x01DA6D60, "_Z17FindEntityForwardP11CBaseEntity", FindEntityForward), // NOXREF - HOOK_SYMBOLDEF(0x01DAC7E0, "_Z14GetPlayerPitchPK7edict_s", GetPlayerPitch), - HOOK_SYMBOLDEF(0x01DAC830, "_Z12GetPlayerYawPK7edict_s", GetPlayerYaw), - HOOK_SYMBOLDEF(0x01DAC880, "_Z21GetPlayerGaitsequencePK7edict_s", GetPlayerGaitsequence), - //HOOK_SYMBOLDEF(0x01DAD120, "_Z26GetBuyStringForWeaponClassi", GetBuyStringForWeaponClass), // NOXREF - //HOOK_SYMBOLDEF(0x01DAD470, "_Z20IsPrimaryWeaponClassi", IsPrimaryWeaponClass), // NOXREF - //HOOK_SYMBOLDEF(0x01DAD490, "_Z17IsPrimaryWeaponIdi", IsPrimaryWeaponId), // NOXREF - //HOOK_SYMBOLDEF(0x01DAD4C0, "_Z22IsSecondaryWeaponClassi", IsSecondaryWeaponClass), // NOXREF - //HOOK_SYMBOLDEF(0x01DAD4D0, "_Z19IsSecondaryWeaponIdi", IsSecondaryWeaponId), // NOXREF - //HOOK_SYMBOLDEF(0x01DAD500, "_Z22GetWeaponAliasFromNamePKc", GetWeaponAliasFromName), // NOXREF - //HOOK_SYMBOLDEF(0x01DAD520, "_Z22CurrentWeaponSatisfiesP17CBasePlayerWeaponii", CurrentWeaponSatisfies), // NOXREF -//CWShield - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA08D0, "_ZN8CWShield5SpawnEv", CWShield::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA0920, "_ZN8CWShield5TouchEP11CBaseEntity", CWShield::Touch), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN8CWShield23SetCantBePickedUpByUserEP11CBaseEntityf", CWShield::SetCantBePickedUpByUser) // NOXREF - -//CSprayCan - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DA6A30, "_ZN9CSprayCan5ThinkEv", CSprayCan::Think), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DA73B0, "_ZN9CSprayCan10ObjectCapsEv", CSprayCan::ObjectCaps), // DEFAULT - // non-virtual func - HOOK_SYMBOLDEF(0x01DA6970, "_ZN9CSprayCan5SpawnEP9entvars_s", CSprayCan::Spawn), // NOXREF -//CBloodSplat - //HOOK_SYMBOLDEF(0x01DA6B70, "_ZN11CBloodSplat5SpawnEP9entvars_s", CBloodSplat::Spawn), // NOXREF - //HOOK_SYMBOLDEF(0x01DA6C00, "_ZN11CBloodSplat5SprayEv", CBloodSplat::Spray), // NOXREF -//CDeadHEV - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DABAF0, "_ZN8CDeadHEV5SpawnEv", CDeadHEV::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DABAE0, "_ZN8CDeadHEV8ClassifyEv", CDeadHEV::Classify), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DABA40, "_ZN8CDeadHEV8KeyValueEP14KeyValueData_s", CDeadHEV::KeyValue), -//CStripWeapons - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DABC10, "_ZN13CStripWeapons3UseEP11CBaseEntityS1_8USE_TYPEf", CStripWeapons::Use), -//CRevertSaved - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DABD20, "_ZN12CRevertSaved8KeyValueEP14KeyValueData_s", CRevertSaved::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DABCC0, "_ZN12CRevertSaved4SaveER5CSave", CRevertSaved::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DABCF0, "_ZN12CRevertSaved7RestoreER8CRestore", CRevertSaved::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DABE10, "_ZN12CRevertSaved3UseEP11CBaseEntityS1_8USE_TYPEf", CRevertSaved::Use), - // non-virtual func - HOOK_SYMBOLDEF(0x01DABE70, "_ZN12CRevertSaved12MessageThinkEv", CRevertSaved::MessageThink), - HOOK_SYMBOLDEF(0x01DABEF0, "_ZN12CRevertSaved9LoadThinkEv", CRevertSaved::LoadThink), -//CInfoIntermission - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DABF20, "_ZN17CInfoIntermission5SpawnEv", CInfoIntermission::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DABF90, "_ZN17CInfoIntermission5ThinkEv", CInfoIntermission::Think), - //linked objects - HOOK_DEF(0x01D9B1F0, player), - HOOK_DEF(0x01DAC0A0, info_intermission), - HOOK_DEF(0x01DABC70, player_loadsaved), - HOOK_DEF(0x01DABBC0, player_weaponstrip), - HOOK_DEF(0x01DABA90, monster_hevsuit_dead), - HOOK_DEF(0x01DA0880, weapon_shield), - -#endif // Player_Region - -#ifndef Effects_Region - -//CSprite - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D792F0, "_ZN7CSprite5SpawnEv", CSprite::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D79500, "_ZN7CSprite8PrecacheEv", CSprite::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D79440, "_ZN7CSprite7RestartEv", CSprite::Restart), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D79290, "_ZN7CSprite4SaveER5CSave", CSprite::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D792C0, "_ZN7CSprite7RestoreER8CRestore", CSprite::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D78660, "_ZN7CSprite10ObjectCapsEv", CSprite::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D79AE0, "_ZN7CSprite3UseEP11CBaseEntityS1_8USE_TYPEf", CSprite::Use), - // non-virtual func - HOOK_SYMBOLDEF(0x01D79740, "_ZN7CSprite12AnimateThinkEv", CSprite::AnimateThink), - HOOK_SYMBOLDEF(0x01D79930, "_ZN7CSprite11ExpandThinkEv", CSprite::ExpandThink), - //HOOK_SYMBOLDEF(0x01D799C0, "_ZN7CSprite12AnimateThinkEv", CSprite::Animate), // NOXREF - //HOOK_SYMBOLDEF(0x01D798E0, "_ZN7CSprite6ExpandEff", CSprite::Expand), // NOXREF - //HOOK_SYMBOLDEF(0x01D79590, "_ZN7CSprite10SpriteInitEPKcRK6Vector", CSprite::SpriteInit), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN7CSprite13SetAttachmentEP7edict_si", CSprite::SetAttachment), // NOXREF - //HOOK_SYMBOLDEF(0x01D79A40, "_ZN7CSprite7TurnOffEv", CSprite::TurnOff), // NOXREF - HOOK_SYMBOLDEF(0x01D79A60, "_ZN7CSprite6TurnOnEv", CSprite::TurnOn), - //HOOK_SYMBOLDEF(0x0, "_ZN7CSprite6FramesEv", CSprite::Frames), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN7CSprite15SetTransparencyEiiiiii", CSprite::SetTransparency), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN7CSprite10SetTextureEi", CSprite::SetTexture), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN7CSprite8SetScaleEf", CSprite::SetScale), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN7CSprite8SetColorEiii", CSprite::SetColor), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN7CSprite13SetBrightnessEi", CSprite::SetBrightness), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN7CSprite13AnimateAndDieEf", CSprite::AnimateAndDie), // NOXREF - HOOK_SYMBOLDEF(0x01D79800, "_ZN7CSprite16AnimateUntilDeadEv", CSprite::AnimateUntilDead), - HOOK_SYMBOLDEF(0x01D795D0, "_ZN7CSprite12SpriteCreateEPKcRK6Vectori", CSprite::SpriteCreate), -//CBeam - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D75E00, "_ZN5CBeam5SpawnEv", CBeam::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D75E20, "_ZN5CBeam8PrecacheEv", CBeam::Precache), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D788B0, "_ZN5CBeam10ObjectCapsEv", CBeam::ObjectCaps), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D78D20, "_ZN5CBeam6CenterEv", CBeam::Center), // DEFAULT - // non-virtual func - HOOK_SYMBOLDEF(0x01D76660, "_ZN5CBeam12TriggerTouchEP11CBaseEntity", CBeam::TriggerTouch), - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam7SetTypeEi", CBeam::SetType), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam8SetFlagsEi", CBeam::SetFlags), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam11SetStartPosERK6Vector", CBeam::SetStartPos), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam9SetEndPosERK6Vector", CBeam::SetEndPos), // NOXREF - //HOOK_SYMBOLDEF(0x01D75EC0, "_ZN5CBeam14SetStartEntityEi", CBeam::SetStartEntity), // NOXREF - //HOOK_SYMBOLDEF(0x01D75F10, "_ZN5CBeam12SetEndEntityEi", CBeam::SetEndEntity), // NOXREF - HOOK_SYMBOLDEF(0x01D7A860, "_ZN5CBeam18SetStartAttachmentEi", CBeam::SetStartAttachment), - HOOK_SYMBOLDEF(0x01D7A890, "_ZN5CBeam16SetEndAttachmentEi", CBeam::SetEndAttachment), - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam10SetTextureEi", CBeam::SetTexture), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam8SetWidthEi", CBeam::SetWidth), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam8SetNoiseEi", CBeam::SetNoise), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam8SetColorEiii", CBeam::SetColor), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam13SetBrightnessEi", CBeam::SetBrightness), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam8SetFrameEf", CBeam::SetFrame), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam13SetScrollRateEi", CBeam::SetScrollRate), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam7GetTypeEv", CBeam::GetType), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam8GetFlagsEv", CBeam::GetFlags), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam14GetStartEntityEv", CBeam::GetStartEntity), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam12GetEndEntityEv", CBeam::GetEndEntity), // NOXREF - //HOOK_SYMBOLDEF(0x01D75F60, "_ZN5CBeam11GetStartPosEv", CBeam::GetStartPos), // NOXREF - //HOOK_SYMBOLDEF(0x01D75FA0, "_ZN5CBeam9GetEndPosEv", CBeam::GetEndPos), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam10GetTextureEv", CBeam::GetTexture), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam8GetWidthEv", CBeam::GetWidth), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam8GetNoiseEv", CBeam::GetNoise), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam13GetBrightnessEv", CBeam::GetBrightness), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam8GetFrameEv", CBeam::GetFrame), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam13GetScrollRateEv", CBeam::GetScrollRate), // NOXREF - HOOK_SYMBOLDEF(0x01D76480, "_ZN5CBeam10RelinkBeamEv", CBeam::RelinkBeam), - //HOOK_SYMBOLDEF(0x01D76700, "_ZN5CBeam8DoSparksERK6VectorS2_", CBeam::DoSparks), // NOXREF - //HOOK_SYMBOLDEF(0x01D766B0, "_ZN5CBeam16RandomTargetnameEPKc", CBeam::RandomTargetname), // NOXREF - HOOK_SYMBOLDEF(0x01D775B0, "_ZN5CBeam10BeamDamageEP11TraceResult", CBeam::BeamDamage), - HOOK_SYMBOLDEF(0x01D76140, "_ZN5CBeam8BeamInitEPKci", CBeam::BeamInit), - //HOOK_SYMBOLDEF(0x01D76200, "_ZN5CBeam10PointsInitERK6VectorS2_", CBeam::PointsInit), // NOXREF - //HOOK_SYMBOLDEF(0x01D76300, "_ZN5CBeam12PointEntInitERK6Vectori", CBeam::PointEntInit), // NOXREF - //HOOK_SYMBOLDEF(0x01D763B0, "_ZN5CBeam8EntsInitEii", CBeam::EntsInit), // NOXREF - //HOOK_SYMBOLDEF(0x01D76280, "_ZN5CBeam8HoseInitERK6VectorS2_", CBeam::HoseInit), // NOXREF - //HOOK_SYMBOLDEF(0x01D75FF0, "_ZN5CBeam10BeamCreateEPKci", CBeam::BeamCreate), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam11LiveForTimeEf", CBeam::LiveForTime), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CBeam17BeamDamageInstantEP11TraceResultf", CBeam::BeamDamageInstant), // NOXREF -//CLaser - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D782A0, "_ZN6CLaser5SpawnEv", CLaser::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D78680, "_ZN6CLaser8PrecacheEv", CLaser::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D786D0, "_ZN6CLaser8KeyValueEP14KeyValueData_s", CLaser::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D78240, "_ZN6CLaser4SaveER5CSave", CLaser::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D78270, "_ZN6CLaser7RestoreER8CRestore", CLaser::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D789E0, "_ZN6CLaser3UseEP11CBaseEntityS1_8USE_TYPEf", CLaser::Use), - // non-virtual func - HOOK_SYMBOLDEF(0x01D78930, "_ZN6CLaser6TurnOnEv", CLaser::TurnOn), - HOOK_SYMBOLDEF(0x01D788F0, "_ZN6CLaser7TurnOffEv", CLaser::TurnOff), - //HOOK_SYMBOLDEF(0x01D788D0, "_ZN6CLaser4IsOnEv", CLaser::IsOn), // NOXREF - HOOK_SYMBOLDEF(0x01D78B00, "_ZN6CLaser11FireAtPointER11TraceResult", CLaser::FireAtPoint), - HOOK_SYMBOLDEF(0x01D78BB0, "_ZN6CLaser11StrikeThinkEv", CLaser::StrikeThink), -//CBubbling - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D75A90, "_ZN9CBubbling5SpawnEv", CBubbling::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D75BA0, "_ZN9CBubbling8PrecacheEv", CBubbling::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D75C30, "_ZN9CBubbling8KeyValueEP14KeyValueData_s", CBubbling::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D75A30, "_ZN9CBubbling4SaveER5CSave", CBubbling::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D75A60, "_ZN9CBubbling7RestoreER8CRestore", CBubbling::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D75A20, "_ZN9CBubbling10ObjectCapsEv", CBubbling::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D75BC0, "_ZN9CBubbling3UseEP11CBaseEntityS1_8USE_TYPEf", CBubbling::Use), - // non-virtual func - HOOK_SYMBOLDEF(0x01D75CF0, "_ZN9CBubbling9FizzThinkEv", CBubbling::FizzThink), -//CLightning - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D76840, "_ZN10CLightning5SpawnEv", CLightning::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D76970, "_ZN10CLightning8PrecacheEv", CLightning::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D76A60, "_ZN10CLightning8KeyValueEP14KeyValueData_s", CLightning::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D767E0, "_ZN10CLightning4SaveER5CSave", CLightning::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D76810, "_ZN10CLightning7RestoreER8CRestore", CLightning::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D76A30, "_ZN10CLightning8ActivateEv", CLightning::Activate), - // non-virtual func - HOOK_SYMBOLDEF(0x01D76EE0, "_ZN10CLightning11StrikeThinkEv", CLightning::StrikeThink), - HOOK_SYMBOLDEF(0x01D776A0, "_ZN10CLightning11DamageThinkEv", CLightning::DamageThink), - HOOK_SYMBOLDEF(0x01D778C0, "_ZN10CLightning10RandomAreaEv", CLightning::RandomArea), - HOOK_SYMBOLDEF(0x01D77CC0, "_ZN10CLightning11RandomPointER6Vector", CLightning::RandomPoint), - HOOK_SYMBOLDEF(0x01D77760, "_ZN10CLightning3ZapERK6VectorS2_", CLightning::Zap), - HOOK_SYMBOLDEF(0x01D76E00, "_ZN10CLightning9StrikeUseEP11CBaseEntityS1_8USE_TYPEf", CLightning::StrikeUse), - HOOK_SYMBOLDEF(0x01D76CB0, "_ZN10CLightning9ToggleUseEP11CBaseEntityS1_8USE_TYPEf", CLightning::ToggleUse), - //HOOK_SYMBOLDEF(0x0, "_ZN10CLightning10ServerSideEv", CLightning::ServerSide), // NOXREF - HOOK_SYMBOLDEF(0x01D77E60, "_ZN10CLightning14BeamUpdateVarsEv", CLightning::BeamUpdateVars), - //HOOK_SYMBOLDEF(0x01D76E70, "_Z13IsPointEntityP11CBaseEntity", IsPointEntity), // NOXREF -//CGlow - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D78E90, "_ZN5CGlow5SpawnEv", CGlow::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D78E30, "_ZN5CGlow4SaveER5CSave", CGlow::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D78E60, "_ZN5CGlow7RestoreER8CRestore", CGlow::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D78FA0, "_ZN5CGlow5ThinkEv", CGlow::Think), - // non-virtual func - //HOOK_SYMBOLDEF(0x01D79010, "_ZN5CGlow7AnimateEf", CGlow::Animate), // NOXREF -//CBombGlow - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D790A0, "_ZN9CBombGlow5SpawnEv", CBombGlow::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D79150, "_ZN9CBombGlow5ThinkEv", CBombGlow::Think), -//CGibShooter - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D79DA0, "_ZN11CGibShooter5SpawnEv", CGibShooter::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D79C50, "_ZN11CGibShooter8PrecacheEv", CGibShooter::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D79C90, "_ZN11CGibShooter8KeyValueEP14KeyValueData_s", CGibShooter::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D79BA0, "_ZN11CGibShooter4SaveER5CSave", CGibShooter::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D79BD0, "_ZN11CGibShooter7RestoreER8CRestore", CGibShooter::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D79D80, "_ZN11CGibShooter3UseEP11CBaseEntityS1_8USE_TYPEf", CGibShooter::Use), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D79E20, "_ZN11CGibShooter9CreateGibEv", CGibShooter::CreateGib), - // non-virtual func - HOOK_SYMBOLDEF(0x01D79EF0, "_ZN11CGibShooter10ShootThinkEv", CGibShooter::ShootThink), -//CEnvShooter - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7A370, "_ZN11CEnvShooter8PrecacheEv", CEnvShooter::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7A270, "_ZN11CEnvShooter8KeyValueEP14KeyValueData_s", CEnvShooter::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7A3B0, "_ZN11CEnvShooter9CreateGibEv", CEnvShooter::CreateGib), -//CTestEffect - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7A530, "_ZN11CTestEffect5SpawnEv", CTestEffect::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7A540, "_ZN11CTestEffect8PrecacheEv", CTestEffect::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7A8C0, "_ZN11CTestEffect3UseEP11CBaseEntityS1_8USE_TYPEf", CTestEffect::Use), - // non-virtual func - HOOK_SYMBOLDEF(0x01D7A550, "_ZN11CTestEffect9TestThinkEv", CTestEffect::TestThink), -//CBlood - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7A940, "_ZN6CBlood5SpawnEv", CBlood::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7A980, "_ZN6CBlood8KeyValueEP14KeyValueData_s", CBlood::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7AB70, "_ZN6CBlood3UseEP11CBaseEntityS1_8USE_TYPEf", CBlood::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN6CBlood5ColorEv", CBlood::Color), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN6CBlood11BloodAmountEv", CBlood::BloodAmount), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN6CBlood8SetColorEi", CBlood::SetColor), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN6CBlood14SetBloodAmountEf", CBlood::SetBloodAmount), // NOXREF - //HOOK_SYMBOLDEF(0x01D7AA30, "_ZN6CBlood9DirectionEv", CBlood::Direction), // NOXREF - HOOK_SYMBOLDEF(0x01D7AA70, "_ZN6CBlood13BloodPositionEP11CBaseEntity", CBlood::BloodPosition), -//CShake - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7ADB0, "_ZN6CShake5SpawnEv", CShake::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7ADF0, "_ZN6CShake8KeyValueEP14KeyValueData_s", CShake::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7AEE0, "_ZN6CShake3UseEP11CBaseEntityS1_8USE_TYPEf", CShake::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN6CShake9AmplitudeEv", CShake::Amplitude), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN6CShake9FrequencyEv", CShake::Frequency), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN6CShake8DurationEv", CShake::Duration), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN6CShake6RadiusEv", CShake::Radius), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN6CShake12SetAmplitudeEf", CShake::SetAmplitude), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN6CShake12SetFrequencyEf", CShake::SetFrequency), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN6CShake11SetDurationEf", CShake::SetDuration), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN6CShake9SetRadiusEf", CShake::SetRadius), // NOXREF -//CFade - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7AF70, "_ZN5CFade5SpawnEv", CFade::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7AFA0, "_ZN5CFade8KeyValueEP14KeyValueData_s", CFade::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7B030, "_ZN5CFade3UseEP11CBaseEntityS1_8USE_TYPEf", CFade::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN5CFade8DurationEv", CFade::Duration), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CFade8HoldTimeEv", CFade::HoldTime), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CFade11SetDurationEf", CFade::SetDuration), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CFade11SetHoldTimeEf", CFade::SetHoldTime), // NOXREF -//CMessage - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7B150, "_ZN8CMessage5SpawnEv", CMessage::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7B1E0, "_ZN8CMessage8PrecacheEv", CMessage::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7B210, "_ZN8CMessage8KeyValueEP14KeyValueData_s", CMessage::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7B2E0, "_ZN8CMessage3UseEP11CBaseEntityS1_8USE_TYPEf", CMessage::Use), -//CEnvFunnel - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7B4E0, "_ZN10CEnvFunnel5SpawnEv", CEnvFunnel::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7B3E0, "_ZN10CEnvFunnel8PrecacheEv", CEnvFunnel::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7B450, "_ZN10CEnvFunnel3UseEP11CBaseEntityS1_8USE_TYPEf", CEnvFunnel::Use), -//CEnvBeverage - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7B630, "_ZN12CEnvBeverage5SpawnEv", CEnvBeverage::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7B510, "_ZN12CEnvBeverage8PrecacheEv", CEnvBeverage::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7B580, "_ZN12CEnvBeverage3UseEP11CBaseEntityS1_8USE_TYPEf", CEnvBeverage::Use), -//CItemSoda - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7B6E0, "_ZN9CItemSoda5SpawnEv", CItemSoda::Spawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D7B680, "_ZN9CItemSoda8PrecacheEv", CItemSoda::Precache), // pure - // non-virtual func - HOOK_SYMBOLDEF(0x01D7B790, "_ZN9CItemSoda8CanThinkEv", CItemSoda::CanThink), - HOOK_SYMBOLDEF(0x01D7B820, "_ZN9CItemSoda8CanTouchEP11CBaseEntity", CItemSoda::CanTouch), - //linked objects - HOOK_DEF(0x01D75980, info_target), - HOOK_DEF(0x01D759D0, env_bubbles), - HOOK_DEF(0x01D75DB0, beam), - HOOK_DEF(0x01D76740, env_lightning), - HOOK_DEF(0x01D76790, env_beam), - HOOK_DEF(0x01D781F0, env_laser), - HOOK_DEF(0x01D78DE0, env_glow), - HOOK_DEF(0x01D79050, env_bombglow), - HOOK_DEF(0x01D79240, env_sprite), - HOOK_DEF(0x01D79C00, gibshooter), - HOOK_DEF(0x01D7A220, env_shooter), - HOOK_DEF(0x01D7A4E0, test_effect), - HOOK_DEF(0x01D7A8F0, env_blood), - HOOK_DEF(0x01D7AD60, env_shake), - HOOK_DEF(0x01D7AF20, env_fade), - HOOK_DEF(0x01D7B100, env_message), - HOOK_DEF(0x01D7B400, env_funnel), - HOOK_DEF(0x01D7B530, env_beverage), - HOOK_DEF(0x01D7B690, item_sodacan), - -#endif // Effects_Region - -#ifndef Plats_Region - -//CBasePlatTrain - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D95570, "_ZN14CBasePlatTrain8PrecacheEv", CBasePlatTrain::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D953E0, "_ZN14CBasePlatTrain8KeyValueEP14KeyValueData_s", CBasePlatTrain::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D95380, "_ZN14CBasePlatTrain4SaveER5CSave", CBasePlatTrain::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D953B0, "_ZN14CBasePlatTrain7RestoreER8CRestore", CBasePlatTrain::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D95890, "_ZN14CBasePlatTrain10ObjectCapsEv", CBasePlatTrain::ObjectCaps), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D958A0, "_ZN14CBasePlatTrain12IsTogglePlatEv", CBasePlatTrain::IsTogglePlat), // DEFAULT -//CFuncPlat - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D95AF0, "_ZN9CFuncPlat5SpawnEv", CFuncPlat::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D95A20, "_ZN9CFuncPlat8PrecacheEv", CFuncPlat::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D95FC0, "_ZN9CFuncPlat7BlockedEP11CBaseEntity", CFuncPlat::Blocked), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D95E90, "_ZN9CFuncPlat4GoUpEv", CFuncPlat::GoUp), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D95D80, "_ZN9CFuncPlat6GoDownEv", CFuncPlat::GoDown), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D95F10, "_ZN9CFuncPlat6HitTopEv", CFuncPlat::HitTop), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D95E00, "_ZN9CFuncPlat9HitBottomEv", CFuncPlat::HitBottom), - // non-virtual func - HOOK_SYMBOLDEF(0x01D958B0, "_ZN9CFuncPlat5SetupEv", CFuncPlat::Setup), - HOOK_SYMBOLDEF(0x01D95D10, "_ZN9CFuncPlat7PlatUseEP11CBaseEntityS1_8USE_TYPEf", CFuncPlat::PlatUse), - HOOK_SYMBOLDEF(0x01D95810, "_ZN9CFuncPlat10CallGoDownEv", CFuncPlat::CallGoDown), - HOOK_SYMBOLDEF(0x01D95820, "_ZN9CFuncPlat10CallHitTopEv", CFuncPlat::CallHitTop), - HOOK_SYMBOLDEF(0x01D95830, "_ZN9CFuncPlat13CallHitBottomEv", CFuncPlat::CallHitBottom), -//CPlatTrigger - // virtual func - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D95AE0, "_ZN12CPlatTrigger10ObjectCapsEv", CPlatTrigger::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D95C90, "_ZN12CPlatTrigger5TouchEP11CBaseEntity", CPlatTrigger::Touch), - // non-virtual func - HOOK_SYMBOLDEF(0x01D95B50, "_ZN12CPlatTrigger18SpawnInsideTriggerEP9CFuncPlat", CPlatTrigger::SpawnInsideTrigger), -//CFuncPlatRot - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D96270, "_ZN12CFuncPlatRot5SpawnEv", CFuncPlatRot::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D960C0, "_ZN12CFuncPlatRot4SaveER5CSave", CFuncPlatRot::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D96110, "_ZN12CFuncPlatRot7RestoreER8CRestore", CFuncPlatRot::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D965C0, "_ZN12CFuncPlatRot4GoUpEv", CFuncPlatRot::GoUp), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D963D0, "_ZN12CFuncPlatRot6GoDownEv", CFuncPlatRot::GoDown), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D966F0, "_ZN12CFuncPlatRot6HitTopEv", CFuncPlatRot::HitTop), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D96500, "_ZN12CFuncPlatRot9HitBottomEv", CFuncPlatRot::HitBottom), - // non-virtual func - //HOOK_SYMBOLDEF(0x01D96160, "_ZN12CFuncPlatRot13SetupRotationEv", CFuncPlatRot::SetupRotation), // NOXREF - //HOOK_SYMBOLDEF(0x01D96740, "_ZN12CFuncPlatRot7RotMoveER6Vectorf", CFuncPlatRot::RotMove), // NOXREF -//CFuncTrain - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D96FD0, "_ZN10CFuncTrain5SpawnEv", CFuncTrain::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D971A0, "_ZN10CFuncTrain8PrecacheEv", CFuncTrain::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D97100, "_ZN10CFuncTrain7RestartEv", CFuncTrain::Restart), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D968E0, "_ZN10CFuncTrain8KeyValueEP14KeyValueData_s", CFuncTrain::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D96840, "_ZN10CFuncTrain4SaveER5CSave", CFuncTrain::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D96890, "_ZN10CFuncTrain7RestoreER8CRestore", CFuncTrain::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D96EB0, "_ZN10CFuncTrain8ActivateEv", CFuncTrain::Activate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D971B0, "_ZN10CFuncTrain13OverrideResetEv", CFuncTrain::OverrideReset), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D96970, "_ZN10CFuncTrain3UseEP11CBaseEntityS1_8USE_TYPEf", CFuncTrain::Use), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D96930, "_ZN10CFuncTrain7BlockedEP11CBaseEntity", CFuncTrain::Blocked), - // non-virtual func - HOOK_SYMBOLDEF(0x01D96A20, "_ZN10CFuncTrain4WaitEv", CFuncTrain::Wait), - HOOK_SYMBOLDEF(0x01D96BE0, "_ZN10CFuncTrain4NextEv", CFuncTrain::Next), -//CFuncTrackTrain - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D98A10, "_ZN15CFuncTrackTrain5SpawnEv", CFuncTrackTrain::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D98CF0, "_ZN15CFuncTrackTrain8PrecacheEv", CFuncTrackTrain::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D98C00, "_ZN15CFuncTrackTrain7RestartEv", CFuncTrackTrain::Restart), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D97310, "_ZN15CFuncTrackTrain8KeyValueEP14KeyValueData_s", CFuncTrackTrain::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D97260, "_ZN15CFuncTrackTrain4SaveER5CSave", CFuncTrackTrain::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D97290, "_ZN15CFuncTrackTrain7RestoreER8CRestore", CFuncTrackTrain::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D97630, "_ZN15CFuncTrackTrain10ObjectCapsEv", CFuncTrackTrain::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D98980, "_ZN15CFuncTrackTrain13OverrideResetEv", CFuncTrackTrain::OverrideReset), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D98490, "_ZN15CFuncTrackTrain10OnControlsEP9entvars_s", CFuncTrackTrain::OnControls), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D97640, "_ZN15CFuncTrackTrain3UseEP11CBaseEntityS1_8USE_TYPEf", CFuncTrackTrain::Use), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D974B0, "_ZN15CFuncTrackTrain7BlockedEP11CBaseEntity", CFuncTrackTrain::Blocked), - // non-virtual func - HOOK_SYMBOLDEF(0x01D97A40, "_ZN15CFuncTrackTrain4NextEv", CFuncTrackTrain::Next), // TODO: FIX me, pev->angles.y is have difference of values 0.00001 - HOOK_SYMBOLDEF(0x01D985C0, "_ZN15CFuncTrackTrain4FindEv", CFuncTrackTrain::Find), - HOOK_SYMBOLDEF(0x01D98770, "_ZN15CFuncTrackTrain11NearestPathEv", CFuncTrackTrain::NearestPath), - HOOK_SYMBOLDEF(0x01D982B0, "_ZN15CFuncTrackTrain7DeadEndEv", CFuncTrackTrain::DeadEnd), - //HOOK_SYMBOLDEF(0x01D97470, "_ZN15CFuncTrackTrain9NextThinkEfi", CFuncTrackTrain::NextThink), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN15CFuncTrackTrain8SetTrackEP10CPathTrack", CFuncTrackTrain::SetTrack), // NOXREF - //HOOK_SYMBOLDEF(0x01D983E0, "_ZN15CFuncTrackTrain11SetControlsEP9entvars_s", CFuncTrackTrain::SetControls), // NOXREF - //HOOK_SYMBOLDEF(0x01D97860, "_ZN15CFuncTrackTrain9StopSoundEv", CFuncTrackTrain::StopSound), // NOXREF - HOOK_SYMBOLDEF(0x01D978F0, "_ZN15CFuncTrackTrain11UpdateSoundEv", CFuncTrackTrain::UpdateSound), - //HOOK_SYMBOLDEF(0x01D989C0, "_ZN15CFuncTrackTrain8InstanceEP7edict_s", CFuncTrackTrain::Instance), // NOXREF -//CFuncTrainControls - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D98FF0, "_ZN18CFuncTrainControls5SpawnEv", CFuncTrainControls::Spawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D98E60, "_ZN18CFuncTrainControls10ObjectCapsEv", CFuncTrainControls::ObjectCaps), // DEFAULT - // non-virtual func - HOOK_SYMBOLDEF(0x01D98E70, "_ZN18CFuncTrainControls4FindEv", CFuncTrainControls::Find), -//CFuncTrackChange - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D991C0, "_ZN16CFuncTrackChange5SpawnEv", CFuncTrackChange::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D99390, "_ZN16CFuncTrackChange8PrecacheEv", CFuncTrackChange::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D99480, "_ZN16CFuncTrackChange8KeyValueEP14KeyValueData_s", CFuncTrackChange::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D990E0, "_ZN16CFuncTrackChange4SaveER5CSave", CFuncTrackChange::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D99150, "_ZN16CFuncTrackChange7RestoreER8CRestore", CFuncTrackChange::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D99540, "_ZN16CFuncTrackChange13OverrideResetEv", CFuncTrackChange::OverrideReset), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D99470, "_ZN16CFuncTrackChange5TouchEP11CBaseEntity", CFuncTrackChange::Touch), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01D99EB0, "_ZN16CFuncTrackChange3UseEP11CBaseEntityS1_8USE_TYPEf", CFuncTrackChange::Use), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D990D0, "_ZN16CFuncTrackChange12IsTogglePlatEv", CFuncTrackChange::IsTogglePlat), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D99C90, "_ZN16CFuncTrackChange4GoUpEv", CFuncTrackChange::GoUp), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D99AE0, "_ZN16CFuncTrackChange6GoDownEv", CFuncTrackChange::GoDown), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D99F60, "_ZN16CFuncTrackChange9HitBottomEv", CFuncTrackChange::HitBottom), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D9A090, "_ZN16CFuncTrackChange6HitTopEv", CFuncTrackChange::HitTop), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D99E40, "_ZN16CFuncTrackChange17UpdateAutoTargetsEi", CFuncTrackChange::UpdateAutoTargets), - // non-virtual func - HOOK_SYMBOLDEF(0x01D99560, "_ZN16CFuncTrackChange4FindEv", CFuncTrackChange::Find), - HOOK_SYMBOLDEF(0x01D99840, "_ZN16CFuncTrackChange13EvaluateTrainEP10CPathTrack", CFuncTrackChange::EvaluateTrain), - HOOK_SYMBOLDEF(0x01D99910, "_ZN16CFuncTrackChange11UpdateTrainER6Vector", CFuncTrackChange::UpdateTrain), - //HOOK_SYMBOLDEF(0x0, "_ZN16CFuncTrackChange10DisableUseEv", CFuncTrackChange::DisableUse), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN16CFuncTrackChange9EnableUseEv", CFuncTrackChange::EnableUse), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN16CFuncTrackChange10UseEnabledEv", CFuncTrackChange::UseEnabled), // NOXREF -//CFuncTrackAuto - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D9A270, "_ZN14CFuncTrackAuto3UseEP11CBaseEntityS1_8USE_TYPEf", CFuncTrackAuto::Use), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D9A1B0, "_ZN14CFuncTrackAuto17UpdateAutoTargetsEi", CFuncTrackAuto::UpdateAutoTargets), -//CGunTarget - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D9A480, "_ZN10CGunTarget5SpawnEv", CGunTarget::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D9A420, "_ZN10CGunTarget4SaveER5CSave", CGunTarget::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D9A450, "_ZN10CGunTarget7RestoreER8CRestore", CGunTarget::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D9A410, "_ZN10CGunTarget10ObjectCapsEv", CGunTarget::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D9A550, "_ZN10CGunTarget8ActivateEv", CGunTarget::Activate), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D9A3E0, "_ZN10CGunTarget8ClassifyEv", CGunTarget::Classify), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D9A8D0, "_ZN10CGunTarget10TakeDamageEP9entvars_sS1_fi", CGunTarget::TakeDamage), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D9A3D0, "_ZN10CGunTarget10BloodColorEv", CGunTarget::BloodColor), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D9A990, "_ZN10CGunTarget3UseEP11CBaseEntityS1_8USE_TYPEf", CGunTarget::Use), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D9A3F0, "_ZN10CGunTarget10BodyTargetERK6Vector", CGunTarget::BodyTarget), // DEFAULT - // non-virtual func - HOOK_SYMBOLDEF(0x01D9A610, "_ZN10CGunTarget4NextEv", CGunTarget::Next), - HOOK_SYMBOLDEF(0x01D9A600, "_ZN10CGunTarget5StartEv", CGunTarget::Start), - HOOK_SYMBOLDEF(0x01D9A6E0, "_ZN10CGunTarget4WaitEv", CGunTarget::Wait), - //HOOK_SYMBOLDEF(0x01D9A890, "_ZN10CGunTarget4StopEv", CGunTarget::Stop), // NOXREF -//CPlane - //HOOK_SYMBOLDEF(0x01D952F0, "_ZN6CPlaneC2Ev", CPlane::CPlane), // NOXREF - //HOOK_SYMBOLDEF(0x01D95300, "_ZN6CPlane15InitializePlaneERK6VectorS2_", CPlane::InitializePlane), // NOXREF - //HOOK_SYMBOLDEF(0x01D95340, "_ZN6CPlane12PointInFrontERK6Vector", CPlane::PointInFront), // NOXREF -//linked objects - HOOK_DEF(0x01D95840, func_plat), - HOOK_DEF(0x01D96070, func_platrot), - HOOK_DEF(0x01D967F0, func_train), - HOOK_DEF(0x01D972C0, func_tracktrain), - HOOK_DEF(0x01D98E10, func_traincontrols), - HOOK_DEF(0x01D99070, func_trackchange), - HOOK_DEF(0x01D9A150, func_trackautochange), - HOOK_DEF(0x01D9A380, func_guntarget), - -#endif // Plats_Region - -#ifndef PathCorner_Region - -//CPathTrack - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D94980, "_ZN10CPathTrack5SpawnEv", CPathTrack::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D946A0, "_ZN10CPathTrack8KeyValueEP14KeyValueData_s", CPathTrack::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D945F0, "_ZN10CPathTrack4SaveER5CSave", CPathTrack::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D94620, "_ZN10CPathTrack7RestoreER8CRestore", CPathTrack::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D949F0, "_ZN10CPathTrack8ActivateEv", CPathTrack::Activate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D946F0, "_ZN10CPathTrack3UseEP11CBaseEntityS1_8USE_TYPEf", CPathTrack::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x01D94B90, "_ZN10CPathTrack11SetPreviousEPS_", CPathTrack::SetPrevious), // NOXREF - HOOK_SYMBOLDEF(0x01D94790, "_ZN10CPathTrack4LinkEv", CPathTrack::Link), - HOOK_SYMBOLDEF(0x01D94A10, "_ZN10CPathTrack9ValidPathEPS_i", CPathTrack::ValidPath), - //HOOK_SYMBOLDEF(0x01D94A40, "_ZN10CPathTrack7ProjectEPS_S0_P6Vectorf", CPathTrack::Project), // NOXREF - HOOK_SYMBOLDEF(0x01D952A0, "_ZN10CPathTrack8InstanceEP7edict_s", CPathTrack::Instance), - HOOK_SYMBOLDEF(0x01D94C00, "_ZN10CPathTrack9LookAheadEP6Vectorfi", CPathTrack::LookAhead), - HOOK_SYMBOLDEF(0x01D951A0, "_ZN10CPathTrack7NearestE6Vector", CPathTrack::Nearest), - HOOK_SYMBOLDEF(0x01D94B30, "_ZN10CPathTrack7GetNextEv", CPathTrack::GetNext), - HOOK_SYMBOLDEF(0x01D94B60, "_ZN10CPathTrack11GetPreviousEv", CPathTrack::GetPrevious), - //linked objects - HOOK_DEF(0x01D94650, path_track), -//CPathCorner - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D945E0, "_ZN11CPathCorner5SpawnEv", CPathCorner::Spawn), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01D94590, "_ZN11CPathCorner8KeyValueEP14KeyValueData_s", CPathCorner::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D94530, "_ZN11CPathCorner4SaveER5CSave", CPathCorner::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D94560, "_ZN11CPathCorner7RestoreER8CRestore", CPathCorner::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D94520, "_ZN11CPathCorner8GetDelayEv", CPathCorner::GetDelay), // DEFAULT - //linked objects - HOOK_DEF(0x01D944D0, path_corner), - -#endif // PathCorner_Region - -#ifndef Vehicle_Region - -//CFuncVehicle - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCBFC0, "_ZN12CFuncVehicle5SpawnEv", CFuncVehicle::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCC310, "_ZN12CFuncVehicle8PrecacheEv", CFuncVehicle::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCC1D0, "_ZN12CFuncVehicle7RestartEv", CFuncVehicle::Restart), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC9370, "_ZN12CFuncVehicle8KeyValueEP14KeyValueData_s", CFuncVehicle::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC92C0, "_ZN12CFuncVehicle4SaveER5CSave", CFuncVehicle::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC92F0, "_ZN12CFuncVehicle7RestoreER8CRestore", CFuncVehicle::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DCB970, "_ZN12CFuncVehicle10ObjectCapsEv", CFuncVehicle::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCBFB0, "_ZN12CFuncVehicle8ClassifyEv", CFuncVehicle::Classify), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCBF20, "_ZN12CFuncVehicle13OverrideResetEv", CFuncVehicle::OverrideReset), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCBA30, "_ZN12CFuncVehicle10OnControlsEP9entvars_s", CFuncVehicle::OnControls), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC9A10, "_ZN12CFuncVehicle3UseEP11CBaseEntityS1_8USE_TYPEf", CFuncVehicle::Use), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC9590, "_ZN12CFuncVehicle7BlockedEP11CBaseEntity", CFuncVehicle::Blocked), - // non-virtual func - HOOK_SYMBOLDEF(0x01DCAD10, "_ZN12CFuncVehicle4NextEv", CFuncVehicle::Next), - HOOK_SYMBOLDEF(0x01DCBB60, "_ZN12CFuncVehicle4FindEv", CFuncVehicle::Find), - HOOK_SYMBOLDEF(0x01DCBD10, "_ZN12CFuncVehicle11NearestPathEv", CFuncVehicle::NearestPath), - HOOK_SYMBOLDEF(0x01DCB840, "_ZN12CFuncVehicle7DeadEndEv", CFuncVehicle::DeadEnd), - HOOK_SYMBOLDEF(0x01DC9550, "_ZN12CFuncVehicle9NextThinkEfi", CFuncVehicle::NextThink), - HOOK_SYMBOLDEF(0x01DCA6D0, "_ZN12CFuncVehicle18CollisionDetectionEv", CFuncVehicle::CollisionDetection), - //HOOK_SYMBOLDEF(0x01DCAC50, "_ZN12CFuncVehicle16TerrainFollowingEv", CFuncVehicle::TerrainFollowing), // NOXREF - HOOK_SYMBOLDEF(0x01DCA2F0, "_ZN12CFuncVehicle12CheckTurningEv", CFuncVehicle::CheckTurning), - //HOOK_SYMBOLDEF(0x0, "_ZN12CFuncVehicle8SetTrackEP10CPathTrack", CFuncVehicle::SetTrack), // NOXREF - //HOOK_SYMBOLDEF(0x01DCB980, "_ZN12CFuncVehicle11SetControlsEP9entvars_s", CFuncVehicle::SetControls), // NOXREF - //HOOK_SYMBOLDEF(0x01DCA110, "_ZN12CFuncVehicle9StopSoundEv", CFuncVehicle::StopSound), // NOXREF - HOOK_SYMBOLDEF(0x01DCA180, "_ZN12CFuncVehicle11UpdateSoundEv", CFuncVehicle::UpdateSound), - //HOOK_SYMBOLDEF(0x01DCBF60, "_ZN12CFuncVehicle8InstanceEP7edict_s", CFuncVehicle::Instance), // NOXREF - //HOOK_DEF(0x0, FixupAngles2), // NOXREF - -#ifdef _WIN32 - //HOOK_DEF(0x01DCB7B0, Fix2), -#endif // _WIN32 - - //linked objects - HOOK_DEF(0x01DC9320, func_vehicle), -//CFuncVehicleControls - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCC5F0, "_ZN20CFuncVehicleControls5SpawnEv", CFuncVehicleControls::Spawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DCC460, "_ZN20CFuncVehicleControls10ObjectCapsEv", CFuncVehicleControls::ObjectCaps), // DEFAULT - // non-virtual func - HOOK_SYMBOLDEF(0x01DCC470, "_ZN20CFuncVehicleControls4FindEv", CFuncVehicleControls::Find), - //linked objects - HOOK_DEF(0x01DCC410, func_vehiclecontrols), - -#endif // Vehicle_Region - -#ifndef Func_Tank_Region - -//CFuncTank - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7DFB0, "_ZN9CFuncTank5SpawnEv", CFuncTank::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7E170, "_ZN9CFuncTank8PrecacheEv", CFuncTank::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7E1E0, "_ZN9CFuncTank8KeyValueEP14KeyValueData_s", CFuncTank::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7DEB0, "_ZN9CFuncTank4SaveER5CSave", CFuncTank::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7DEE0, "_ZN9CFuncTank7RestoreER8CRestore", CFuncTank::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D7FA70, "_ZN9CFuncTank10ObjectCapsEv", CFuncTank::ObjectCaps), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D7E620, "_ZN9CFuncTank10OnControlsEP9entvars_s", CFuncTank::OnControls), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7EBD0, "_ZN9CFuncTank5ThinkEv", CFuncTank::Think), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7E9A0, "_ZN9CFuncTank3UseEP11CBaseEntityS1_8USE_TYPEf", CFuncTank::Use), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7F560, "_ZN9CFuncTank4FireERK6VectorS2_P9entvars_s", CFuncTank::Fire), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D7FA40, "_ZN9CFuncTank20UpdateTargetPositionEP11CBaseEntity", CFuncTank::UpdateTargetPosition), // DEFAULT - // non-virtual func - HOOK_SYMBOLDEF(0x01D7ECD0, "_ZN9CFuncTank11TrackTargetEv", CFuncTank::TrackTarget), - HOOK_SYMBOLDEF(0x01D7F930, "_ZN9CFuncTank13StartRotSoundEv", CFuncTank::StartRotSound), - //HOOK_SYMBOLDEF(0x01D7F990, "_ZN9CFuncTank12StopRotSoundEv", CFuncTank::StopRotSound), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN9CFuncTank8IsActiveEv", CFuncTank::IsActive), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN9CFuncTank12TankActivateEv", CFuncTank::TankActivate), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN9CFuncTank14TankDeactivateEv", CFuncTank::TankDeactivate), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN9CFuncTank7CanFireEv", CFuncTank::CanFire), // NOXREF - //HOOK_SYMBOLDEF(0x01D7EB80, "_ZN9CFuncTank7InRangeEf", CFuncTank::InRange), // NOXREF - //HOOK_SYMBOLDEF(0x01D7EB70, "_ZN9CFuncTank10FindTargetEP7edict_s", CFuncTank::FindTarget), // NOXREF - //HOOK_SYMBOLDEF(0x01D7F7B0, "_ZN9CFuncTank9TankTraceERK6VectorS2_S2_R11TraceResult", CFuncTank::TankTrace), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN9CFuncTank14BarrelPositionEv", CFuncTank::BarrelPosition), // NOXREF - HOOK_SYMBOLDEF(0x01D7F4B0, "_ZN9CFuncTank21AdjustAnglesForBarrelER6Vectorf", CFuncTank::AdjustAnglesForBarrel), - HOOK_SYMBOLDEF(0x01D7E680, "_ZN9CFuncTank12StartControlEP11CBasePlayer", CFuncTank::StartControl), - //HOOK_SYMBOLDEF(0x01D7E750, "_ZN9CFuncTank11StopControlEv", CFuncTank::StopControl), // NOXREF - HOOK_SYMBOLDEF(0x01D7E7F0, "_ZN9CFuncTank19ControllerPostFrameEv", CFuncTank::ControllerPostFrame), -//CFuncTankGun - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7FA80, "_ZN12CFuncTankGun4FireERK6VectorS2_P9entvars_s", CFuncTankGun::Fire), -//CFuncTankLaser - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7FD50, "_ZN14CFuncTankLaser8KeyValueEP14KeyValueData_s", CFuncTankLaser::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7FBF0, "_ZN14CFuncTankLaser4SaveER5CSave", CFuncTankLaser::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7FC40, "_ZN14CFuncTankLaser7RestoreER8CRestore", CFuncTankLaser::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7FC90, "_ZN14CFuncTankLaser8ActivateEv", CFuncTankLaser::Activate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7FE40, "_ZN14CFuncTankLaser5ThinkEv", CFuncTankLaser::Think), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7FF60, "_ZN14CFuncTankLaser4FireERK6VectorS2_P9entvars_s", CFuncTankLaser::Fire), - // non-virtual func - //HOOK_SYMBOLDEF(0x01D7FDA0, "_ZN14CFuncTankLaser8GetLaserEv", CFuncTankLaser::GetLaser), // NOXREF -//CFuncTankRocket - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D80180, "_ZN15CFuncTankRocket8PrecacheEv", CFuncTankRocket::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D80200, "_ZN15CFuncTankRocket4FireERK6VectorS2_P9entvars_s", CFuncTankRocket::Fire), -//CFuncTankMortar - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D802E0, "_ZN15CFuncTankMortar8KeyValueEP14KeyValueData_s", CFuncTankMortar::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D80330, "_ZN15CFuncTankMortar4FireERK6VectorS2_P9entvars_s", CFuncTankMortar::Fire), -//CFuncTankControls - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D80590, "_ZN17CFuncTankControls5SpawnEv", CFuncTankControls::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D80450, "_ZN17CFuncTankControls4SaveER5CSave", CFuncTankControls::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D80480, "_ZN17CFuncTankControls7RestoreER8CRestore", CFuncTankControls::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D804B0, "_ZN17CFuncTankControls10ObjectCapsEv", CFuncTankControls::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D804E0, "_ZN17CFuncTankControls5ThinkEv", CFuncTankControls::Think), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D804C0, "_ZN17CFuncTankControls3UseEP11CBaseEntityS1_8USE_TYPEf", CFuncTankControls::Use), -//linked objects - HOOK_DEF(0x01D7F9F0, func_tank), - HOOK_DEF(0x01D7FBA0, func_tanklaser), - HOOK_DEF(0x01D80130, func_tankrocket), - HOOK_DEF(0x01D80290, func_tankmortar), - HOOK_DEF(0x01D80400, func_tankcontrols), - -#endif // Func_Tank_Region - -#ifndef Func_Break_Region - -//CBreakable - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7C410, "_ZN10CBreakable5SpawnEv", CBreakable::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7C7A0, "_ZN10CBreakable8PrecacheEv", CBreakable::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7C4F0, "_ZN10CBreakable7RestartEv", CBreakable::Restart), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7C180, "_ZN10CBreakable8KeyValueEP14KeyValueData_s", CBreakable::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7C3B0, "_ZN10CBreakable4SaveER5CSave", CBreakable::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7C3E0, "_ZN10CBreakable7RestoreER8CRestore", CBreakable::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D7DEA0, "_ZN10CBreakable10ObjectCapsEv", CBreakable::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7CDC0, "_ZN10CBreakable11TraceAttackEP9entvars_sf6VectorP11TraceResulti", CBreakable::TraceAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7CEB0, "_ZN10CBreakable10TakeDamageEP9entvars_sS1_fi", CBreakable::TakeDamage), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7D6D0, "_ZN10CBreakable11DamageDecalEi", CBreakable::DamageDecal), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7CD40, "_ZN10CBreakable3UseEP11CBaseEntityS1_8USE_TYPEf", CBreakable::Use), - // non-virtual func - HOOK_SYMBOLDEF(0x01D7CB80, "_ZN10CBreakable10BreakTouchEP11CBaseEntity", CBreakable::BreakTouch), - HOOK_SYMBOLDEF(0x01D7C9E0, "_ZN10CBreakable11DamageSoundEv", CBreakable::DamageSound), - //HOOK_SYMBOLDEF(0x01D7D6C0, "_ZN10CBreakable11IsBreakableEv", CBreakable::IsBreakable), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN10CBreakable12SparkWhenHitEv", CBreakable::SparkWhenHit), // NOXREF - HOOK_SYMBOLDEF(0x01D7D0E0, "_ZN10CBreakable3DieEv", CBreakable::Die), - //HOOK_SYMBOLDEF(0x0, "_ZN10CBreakable10ExplodableEv", CBreakable::Explodable), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN10CBreakable18ExplosionMagnitudeEv", CBreakable::ExplosionMagnitude), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN10CBreakable21ExplosionSetMagnitudeEi", CBreakable::ExplosionSetMagnitude), // NOXREF - HOOK_SYMBOLDEF(0x01D7C670, "_ZN10CBreakable21MaterialSoundPrecacheE9Materials", CBreakable::MaterialSoundPrecache), - HOOK_SYMBOLDEF(0x01D7C710, "_ZN10CBreakable19MaterialSoundRandomEP7edict_s9Materialsf", CBreakable::MaterialSoundRandom), - //HOOK_SYMBOLDEF(0x01D7C5D0, "_ZN10CBreakable17MaterialSoundListE9MaterialsRi", CBreakable::MaterialSoundList), // NOXREF -//CPushable - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7D800, "_ZN9CPushable5SpawnEv", CPushable::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7D920, "_ZN9CPushable8PrecacheEv", CPushable::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7D960, "_ZN9CPushable8KeyValueEP14KeyValueData_s", CPushable::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7D700, "_ZN9CPushable4SaveER5CSave", CPushable::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7D750, "_ZN9CPushable7RestoreER8CRestore", CPushable::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D7D7F0, "_ZN9CPushable10ObjectCapsEv", CPushable::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7DE70, "_ZN9CPushable10TakeDamageEP9entvars_sS1_fi", CPushable::TakeDamage), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7DC30, "_ZN9CPushable5TouchEP11CBaseEntity", CPushable::Touch), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7DB40, "_ZN9CPushable3UseEP11CBaseEntityS1_8USE_TYPEf", CPushable::Use), - // non-virtual func - HOOK_SYMBOLDEF(0x01D7DC70, "_ZN9CPushable4MoveEP11CBaseEntityi", CPushable::Move), - //HOOK_SYMBOLDEF(0x0, "_ZN9CPushable9StopSoundEv", CPushable::StopSound), - //HOOK_SYMBOLDEF(0x0, "_ZN9CPushable8MaxSpeedEv", CPushable::MaxSpeed), // NOXREF -//linked objects - HOOK_DEF(0x01D7C360, func_breakable), - HOOK_DEF(0x01D7D7A0, func_pushable), - -#endif // Func_Break_Region - -#ifndef Door_Region - -//CBaseDoor - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D73D70, "_ZN9CBaseDoor5SpawnEv", CBaseDoor::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D73FD0, "_ZN9CBaseDoor8PrecacheEv", CBaseDoor::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D73F50, "_ZN9CBaseDoor7RestartEv", CBaseDoor::Restart), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D73AA0, "_ZN9CBaseDoor8KeyValueEP14KeyValueData_s", CBaseDoor::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D73820, "_ZN9CBaseDoor4SaveER5CSave", CBaseDoor::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D73850, "_ZN9CBaseDoor7RestoreER8CRestore", CBaseDoor::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D73D10, "_ZN9CBaseDoor10ObjectCapsEv", CBaseDoor::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D73F90, "_ZN9CBaseDoor14SetToggleStateEi", CBaseDoor::SetToggleState), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D74540, "_ZN9CBaseDoor3UseEP11CBaseEntityS1_8USE_TYPEf", CBaseDoor::Use), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D74CB0, "_ZN9CBaseDoor7BlockedEP11CBaseEntity", CBaseDoor::Blocked), - // non-virtual func - HOOK_SYMBOLDEF(0x01D744B0, "_ZN9CBaseDoor9DoorTouchEP11CBaseEntity", CBaseDoor::DoorTouch), - HOOK_SYMBOLDEF(0x01D74580, "_ZN9CBaseDoor12DoorActivateEv", CBaseDoor::DoorActivate), - HOOK_SYMBOLDEF(0x01D74640, "_ZN9CBaseDoor8DoorGoUpEv", CBaseDoor::DoorGoUp), - HOOK_SYMBOLDEF(0x01D74AC0, "_ZN9CBaseDoor10DoorGoDownEv", CBaseDoor::DoorGoDown), - HOOK_SYMBOLDEF(0x01D74990, "_ZN9CBaseDoor10DoorHitTopEv", CBaseDoor::DoorHitTop), - HOOK_SYMBOLDEF(0x01D74BB0, "_ZN9CBaseDoor13DoorHitBottomEv", CBaseDoor::DoorHitBottom), -//CRotDoor - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D75150, "_ZN8CRotDoor5SpawnEv", CRotDoor::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D75000, "_ZN8CRotDoor7RestartEv", CRotDoor::Restart), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D75380, "_ZN8CRotDoor14SetToggleStateEi", CRotDoor::SetToggleState), -//CMomentaryDoor - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D754B0, "_ZN14CMomentaryDoor5SpawnEv", CMomentaryDoor::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D75650, "_ZN14CMomentaryDoor8PrecacheEv", CMomentaryDoor::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D75780, "_ZN14CMomentaryDoor8KeyValueEP14KeyValueData_s", CMomentaryDoor::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D75450, "_ZN14CMomentaryDoor4SaveER5CSave", CMomentaryDoor::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D75480, "_ZN14CMomentaryDoor7RestoreER8CRestore", CMomentaryDoor::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D75440, "_ZN14CMomentaryDoor10ObjectCapsEv", CMomentaryDoor::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D75820, "_ZN14CMomentaryDoor3UseEP11CBaseEntityS1_8USE_TYPEf", CMomentaryDoor::Use), - // non-class func - HOOK_SYMBOLDEF(0x01D73880, "_Z14PlayLockSoundsP9entvars_sP10locksoundsii", PlayLockSounds), -//linked objects - HOOK_DEF(0x01D73CC0, func_door), - HOOK_DEF(0x01D73D20, func_water), - HOOK_DEF(0x01D74FB0, func_door_rotating), - HOOK_DEF(0x01D753F0, momentary_door), - -#endif // Door_Region - -#ifndef BModels_Region - -//CFuncWall - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5CFE0, "_ZN9CFuncWall5SpawnEv", CFuncWall::Spawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D5CFD0, "_ZN9CFuncWall10ObjectCapsEv", CFuncWall::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5D060, "_ZN9CFuncWall3UseEP11CBaseEntityS1_8USE_TYPEf", CFuncWall::Use), -//CFuncWallToggle - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5D0F0, "_ZN15CFuncWallToggle5SpawnEv", CFuncWallToggle::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5D230, "_ZN15CFuncWallToggle3UseEP11CBaseEntityS1_8USE_TYPEf", CFuncWallToggle::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x01D5D1B0, "_ZN15CFuncWallToggle7TurnOffEv", CFuncWallToggle::TurnOff), // NOXREF - //HOOK_SYMBOLDEF(0x01D5D1E0, "_ZN15CFuncWallToggle6TurnOnEv", CFuncWallToggle::TurnOn), // NOXREF - //HOOK_SYMBOLDEF(0x01D5D210, "_ZN15CFuncWallToggle4IsOnEv", CFuncWallToggle::IsOn), // NOXREF -//CFuncConveyor - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5D320, "_ZN13CFuncConveyor5SpawnEv", CFuncConveyor::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5D4F0, "_ZN13CFuncConveyor3UseEP11CBaseEntityS1_8USE_TYPEf", CFuncConveyor::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x01D5D470, "_ZN13CFuncConveyor11UpdateSpeedEf", CFuncConveyor::UpdateSpeed), // NOXREF -//CFuncIllusionary - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5D640, "_ZN16CFuncIllusionary5SpawnEv", CFuncIllusionary::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5D5E0, "_ZN16CFuncIllusionary8KeyValueEP14KeyValueData_s", CFuncIllusionary::KeyValue), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D5D5D0, "_ZN16CFuncIllusionary10ObjectCapsEv", CFuncIllusionary::ObjectCaps), // DEFAULT -//CFuncMonsterClip - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5D700, "_ZN16CFuncMonsterClip5SpawnEv", CFuncMonsterClip::Spawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D5D6F0, "_ZN16CFuncMonsterClip3UseEP11CBaseEntityS1_8USE_TYPEf", CFuncMonsterClip::Use), // PURE -//CFuncRotating - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5D9F0, "_ZN13CFuncRotating5SpawnEv", CFuncRotating::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5DC20, "_ZN13CFuncRotating8PrecacheEv", CFuncRotating::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5D870, "_ZN13CFuncRotating8KeyValueEP14KeyValueData_s", CFuncRotating::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5D7B0, "_ZN13CFuncRotating4SaveER5CSave", CFuncRotating::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5D7E0, "_ZN13CFuncRotating7RestoreER8CRestore", CFuncRotating::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D5D860, "_ZN13CFuncRotating10ObjectCapsEv", CFuncRotating::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5E590, "_ZN13CFuncRotating7BlockedEP11CBaseEntity", CFuncRotating::Blocked), - // non-virtual func - HOOK_SYMBOLDEF(0x01D5E050, "_ZN13CFuncRotating6SpinUpEv", CFuncRotating::SpinUp), - HOOK_SYMBOLDEF(0x01D5E210, "_ZN13CFuncRotating8SpinDownEv", CFuncRotating::SpinDown), - HOOK_SYMBOLDEF(0x01D5DDB0, "_ZN13CFuncRotating9HurtTouchEP11CBaseEntity", CFuncRotating::HurtTouch), - HOOK_SYMBOLDEF(0x01D5E410, "_ZN13CFuncRotating11RotatingUseEP11CBaseEntityS1_8USE_TYPEf", CFuncRotating::RotatingUse), - HOOK_SYMBOLDEF(0x01D5E3F0, "_ZN13CFuncRotating6RotateEv", CFuncRotating::Rotate), - HOOK_SYMBOLDEF(0x01D5DF40, "_ZN13CFuncRotating12RampPitchVolEi", CFuncRotating::RampPitchVol), -//CPendulum - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5E700, "_ZN9CPendulum5SpawnEv", CPendulum::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5E670, "_ZN9CPendulum8KeyValueEP14KeyValueData_s", CPendulum::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5E610, "_ZN9CPendulum4SaveER5CSave", CPendulum::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5E640, "_ZN9CPendulum7RestoreER8CRestore", CPendulum::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D5E600, "_ZN9CPendulum10ObjectCapsEv", CPendulum::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5EC10, "_ZN9CPendulum5TouchEP11CBaseEntity", CPendulum::Touch), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5EA10, "_ZN9CPendulum7BlockedEP11CBaseEntity", CPendulum::Blocked), - // non-virtual func - HOOK_SYMBOLDEF(0x01D5EA20, "_ZN9CPendulum5SwingEv", CPendulum::Swing), - HOOK_SYMBOLDEF(0x01D5E8B0, "_ZN9CPendulum11PendulumUseEP11CBaseEntityS1_8USE_TYPEf", CPendulum::PendulumUse), - HOOK_SYMBOLDEF(0x01D5E9C0, "_ZN9CPendulum4StopEv", CPendulum::Stop), - HOOK_SYMBOLDEF(0x01D5EDA0, "_ZN9CPendulum9RopeTouchEP11CBaseEntity", CPendulum::RopeTouch), -// non-class func - HOOK_SYMBOLDEF(0x01D5CF20, "_Z15VecBModelOriginP9entvars_s", VecBModelOrigin), -//linked objects - HOOK_DEF(0x01D5CF80, func_wall), - HOOK_DEF(0x01D5D0A0, func_wall_toggle), - HOOK_DEF(0x01D5D2D0, func_conveyor), - HOOK_DEF(0x01D5D580, func_illusionary), - HOOK_DEF(0x01D5D6A0, func_monsterclip), - HOOK_DEF(0x01D5D810, func_rotating), - HOOK_DEF(0x01D5E5B0, func_pendulum), - -#endif // BModels_Region - -#ifndef Button_Region - -//CEnvGlobal - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5EF80, "_ZN10CEnvGlobal5SpawnEv", CEnvGlobal::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5EED0, "_ZN10CEnvGlobal8KeyValueEP14KeyValueData_s", CEnvGlobal::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5EE20, "_ZN10CEnvGlobal4SaveER5CSave", CEnvGlobal::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5EE50, "_ZN10CEnvGlobal7RestoreER8CRestore", CEnvGlobal::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5EFE0, "_ZN10CEnvGlobal3UseEP11CBaseEntityS1_8USE_TYPEf", CEnvGlobal::Use), -//CMultiSource - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5F1E0, "_ZN12CMultiSource5SpawnEv", CMultiSource::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5F120, "_ZN12CMultiSource8KeyValueEP14KeyValueData_s", CMultiSource::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5F230, "_ZN12CMultiSource3UseEP11CBaseEntityS1_8USE_TYPEf", CMultiSource::Use), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D60DF0, "_ZN12CMultiSource10ObjectCapsEv", CMultiSource::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5F310, "_ZN12CMultiSource11IsTriggeredEP11CBaseEntity", CMultiSource::IsTriggered), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5F070, "_ZN12CMultiSource4SaveER5CSave", CMultiSource::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5F0A0, "_ZN12CMultiSource7RestoreER8CRestore", CMultiSource::Restore), - // non-virtual func - HOOK_SYMBOLDEF(0x01D5F370, "_ZN12CMultiSource8RegisterEv", CMultiSource::Register), -//CBaseButton - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5FB30, "_ZN11CBaseButton5SpawnEv", CBaseButton::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5F510, "_ZN11CBaseButton8PrecacheEv", CBaseButton::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5F7D0, "_ZN11CBaseButton8KeyValueEP14KeyValueData_s", CBaseButton::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5F4B0, "_ZN11CBaseButton4SaveER5CSave", CBaseButton::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5F4E0, "_ZN11CBaseButton7RestoreER8CRestore", CBaseButton::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D610F0, "_ZN11CBaseButton10ObjectCapsEv", CBaseButton::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D5F930, "_ZN11CBaseButton10TakeDamageEP9entvars_sS1_fi", CBaseButton::TakeDamage), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN11CBaseButton8RotSpawnEv", CBaseButton::RotSpawn), // NOXREF - HOOK_SYMBOLDEF(0x01D603A0, "_ZN11CBaseButton14ButtonActivateEv", CBaseButton::ButtonActivate), - //HOOK_SYMBOLDEF(0x0, "_ZN11CBaseButton15SparkSoundCacheEv", CBaseButton::SparkSoundCache), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN11CBaseButton10ButtonShotEv", CBaseButton::ButtonShot), // NOXREF - HOOK_SYMBOLDEF(0x01D601F0, "_ZN11CBaseButton11ButtonTouchEP11CBaseEntity", CBaseButton::ButtonTouch), - HOOK_SYMBOLDEF(0x01D60030, "_ZN11CBaseButton11ButtonSparkEv", CBaseButton::ButtonSpark), - HOOK_SYMBOLDEF(0x01D60490, "_ZN11CBaseButton14TriggerAndWaitEv", CBaseButton::TriggerAndWait), - HOOK_SYMBOLDEF(0x01D60530, "_ZN11CBaseButton12ButtonReturnEv", CBaseButton::ButtonReturn), - HOOK_SYMBOLDEF(0x01D605C0, "_ZN11CBaseButton14ButtonBackHomeEv", CBaseButton::ButtonBackHome), - HOOK_SYMBOLDEF(0x01D60080, "_ZN11CBaseButton9ButtonUseEP11CBaseEntityS1_8USE_TYPEf", CBaseButton::ButtonUse), - //HOOK_SYMBOLDEF(0x01D60190, "_ZN11CBaseButton21ButtonResponseToTouchEv", CBaseButton::ButtonResponseToTouch), // NOXREF - // non-class func - HOOK_SYMBOLDEF(0x01D5FDA0, "_Z11ButtonSoundi", ButtonSound), - HOOK_SYMBOLDEF(0x01D5FE90, "_Z7DoSparkP9entvars_sRK6Vector", DoSpark), -//CRotButton - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D60730, "_ZN10CRotButton5SpawnEv", CRotButton::Spawn), -//CMomentaryRotButton - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D60A10, "_ZN19CMomentaryRotButton5SpawnEv", CMomentaryRotButton::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D60BF0, "_ZN19CMomentaryRotButton8KeyValueEP14KeyValueData_s", CMomentaryRotButton::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D60940, "_ZN19CMomentaryRotButton4SaveER5CSave", CMomentaryRotButton::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D60970, "_ZN19CMomentaryRotButton7RestoreER8CRestore", CMomentaryRotButton::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D609F0, "_ZN19CMomentaryRotButton10ObjectCapsEv", CMomentaryRotButton::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D60CC0, "_ZN19CMomentaryRotButton3UseEP11CBaseEntityS1_8USE_TYPEf", CMomentaryRotButton::Use), - // non-virtual func - HOOK_SYMBOLDEF(0x01D61180, "_ZN19CMomentaryRotButton3OffEv", CMomentaryRotButton::Off), - HOOK_SYMBOLDEF(0x01D61200, "_ZN19CMomentaryRotButton6ReturnEv", CMomentaryRotButton::Return), - HOOK_SYMBOLDEF(0x01D60F60, "_ZN19CMomentaryRotButton10UpdateSelfEf", CMomentaryRotButton::UpdateSelf), - //HOOK_SYMBOLDEF(0x01D613E0, "_ZN19CMomentaryRotButton16UpdateSelfReturnEf", CMomentaryRotButton::UpdateSelfReturn), // NOXREF - //HOOK_SYMBOLDEF(0x01D60E00, "_ZN19CMomentaryRotButton16UpdateAllButtonsEfi", CMomentaryRotButton::UpdateAllButtons), // NOXREF - //HOOK_SYMBOLDEF(0x01D60C70, "_ZN19CMomentaryRotButton9PlaySoundEv", CMomentaryRotButton::PlaySound), // NOXREF - //HOOK_SYMBOLDEF(0x01D61110, "_ZN19CMomentaryRotButton12UpdateTargetEf", CMomentaryRotButton::UpdateTarget), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN19CMomentaryRotButton8InstanceEP7edict_s", CMomentaryRotButton::Instance), // NOXREF -//CEnvSpark - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D615A0, "_ZN9CEnvSpark5SpawnEv", CEnvSpark::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D61620, "_ZN9CEnvSpark8PrecacheEv", CEnvSpark::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D61670, "_ZN9CEnvSpark8KeyValueEP14KeyValueData_s", CEnvSpark::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D614A0, "_ZN9CEnvSpark4SaveER5CSave", CEnvSpark::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D614D0, "_ZN9CEnvSpark7RestoreER8CRestore", CEnvSpark::Restore), - // non-virtual func - HOOK_SYMBOLDEF(0x01D61730, "_ZN9CEnvSpark10SparkThinkEv", CEnvSpark::SparkThink), - HOOK_SYMBOLDEF(0x01D61770, "_ZN9CEnvSpark10SparkStartEP11CBaseEntityS1_8USE_TYPEf", CEnvSpark::SparkStart), - HOOK_SYMBOLDEF(0x01D617B0, "_ZN9CEnvSpark9SparkStopEP11CBaseEntityS1_8USE_TYPEf", CEnvSpark::SparkStop), -//CButtonTarget - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D61820, "_ZN13CButtonTarget5SpawnEv", CButtonTarget::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D61910, "_ZN13CButtonTarget10ObjectCapsEv", CButtonTarget::ObjectCaps), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D61930, "_ZN13CButtonTarget10TakeDamageEP9entvars_sS1_fi", CButtonTarget::TakeDamage), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D61890, "_ZN13CButtonTarget3UseEP11CBaseEntityS1_8USE_TYPEf", CButtonTarget::Use), -// linked objects - HOOK_DEF(0x01D5EE80, env_global), - HOOK_DEF(0x01D5F0D0, multisource), - HOOK_DEF(0x01D5FAE0, func_button), - HOOK_DEF(0x01D606E0, func_rot_button), - HOOK_DEF(0x01D609A0, momentary_rot_button), - HOOK_DEF(0x01D61500, env_spark), - HOOK_DEF(0x01D61550, env_debris), - HOOK_DEF(0x01D617D0, button_target), - -#endif // Button_Region - -#ifndef Explode_Region - -//CShower - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7B960, "_ZN7CShower5SpawnEv", CShower::Spawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D7B950, "_ZN7CShower10ObjectCapsEv", CShower::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7BAD0, "_ZN7CShower5ThinkEv", CShower::Think), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7BB60, "_ZN7CShower5TouchEP11CBaseEntity", CShower::Touch), - //linked objects - HOOK_DEF(0x01D7B900, spark_shower), -//CEnvExplosion - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7BD10, "_ZN13CEnvExplosion5SpawnEv", CEnvExplosion::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7BCC0, "_ZN13CEnvExplosion8KeyValueEP14KeyValueData_s", CEnvExplosion::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7BC10, "_ZN13CEnvExplosion4SaveER5CSave", CEnvExplosion::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7BC40, "_ZN13CEnvExplosion7RestoreER8CRestore", CEnvExplosion::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D7BD70, "_ZN13CEnvExplosion3UseEP11CBaseEntityS1_8USE_TYPEf", CEnvExplosion::Use), - // non-virtual func - HOOK_SYMBOLDEF(0x01D7C040, "_ZN13CEnvExplosion5SmokeEv", CEnvExplosion::Smoke), - HOOK_SYMBOLDEF(0x01D7C0E0, "_Z15ExplosionCreateRK6VectorS1_P7edict_sii", ExplosionCreate), - //linked objects - HOOK_DEF(0x01D7BC70, env_explosion), - -#endif // Explode_Region - -#ifndef Mortar_Region - -//CFuncMortarField - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8A610, "_ZN16CFuncMortarField5SpawnEv", CFuncMortarField::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8A680, "_ZN16CFuncMortarField8PrecacheEv", CFuncMortarField::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8A500, "_ZN16CFuncMortarField8KeyValueEP14KeyValueData_s", CFuncMortarField::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8A4A0, "_ZN16CFuncMortarField4SaveER5CSave", CFuncMortarField::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8A4D0, "_ZN16CFuncMortarField7RestoreER8CRestore", CFuncMortarField::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D8A490, "_ZN16CFuncMortarField10ObjectCapsEv", CFuncMortarField::ObjectCaps), // DEFAULT - // non-virtual func - HOOK_SYMBOLDEF(0x01D8A6B0, "_ZN16CFuncMortarField8FieldUseEP11CBaseEntityS1_8USE_TYPEf", CFuncMortarField::FieldUse), - //linked objects - HOOK_DEF(0x01D8A440, func_mortar_field), -//CMortar - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8A990, "_ZN7CMortar5SpawnEv", CMortar::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8A9D0, "_ZN7CMortar8PrecacheEv", CMortar::Precache), - // non-virtual func - HOOK_SYMBOLDEF(0x01D8A9F0, "_ZN7CMortar13MortarExplodeEv", CMortar::MortarExplode), - //linked objects - HOOK_DEF(0x01D8A940, monster_mortar), - -#endif // Mortar_Region - -#ifndef Healkit_Region - -//CHealthKit - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D867A0, "_ZN10CHealthKit5SpawnEv", CHealthKit::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D867D0, "_ZN10CHealthKit8PrecacheEv", CHealthKit::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D867F0, "_ZN10CHealthKit7MyTouchEP11CBasePlayer", CHealthKit::MyTouch), - //linked objects - HOOK_DEF(0x01D86750, item_healthkit), -//CWallHealth - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D86A30, "_ZN11CWallHealth5SpawnEv", CWallHealth::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D86AC0, "_ZN11CWallHealth8PrecacheEv", CWallHealth::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D86980, "_ZN11CWallHealth8KeyValueEP14KeyValueData_s", CWallHealth::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D868C0, "_ZN11CWallHealth4SaveER5CSave", CWallHealth::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D868F0, "_ZN11CWallHealth7RestoreER8CRestore", CWallHealth::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D86970, "_ZN11CWallHealth10ObjectCapsEv", CWallHealth::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D86AF0, "_ZN11CWallHealth3UseEP11CBaseEntityS1_8USE_TYPEf", CWallHealth::Use), - // non-virtual func - HOOK_SYMBOLDEF(0x01D86D90, "_ZN11CWallHealth3OffEv", CWallHealth::Off), - HOOK_SYMBOLDEF(0x01D86D30, "_ZN11CWallHealth8RechargeEv", CWallHealth::Recharge), - //linked objects - HOOK_DEF(0x01D86920, func_healthcharger), - -#endif // Healkit_Region - -#ifndef Lights_Region - -//CLight - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88790, "_ZN6CLight5SpawnEv", CLight::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88830, "_ZN6CLight7RestartEv", CLight::Restart), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88670, "_ZN6CLight4SaveER5CSave", CLight::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D886A0, "_ZN6CLight7RestoreER8CRestore", CLight::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D886D0, "_ZN6CLight8KeyValueEP14KeyValueData_s", CLight::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D888C0, "_ZN6CLight3UseEP11CBaseEntityS1_8USE_TYPEf", CLight::Use), -//CEnvLight - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88BB0, "_ZN9CEnvLight5SpawnEv", CEnvLight::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88A20, "_ZN9CEnvLight8KeyValueEP14KeyValueData_s", CEnvLight::KeyValue), - //linked objects - HOOK_DEF(0x01D88620, light), - HOOK_DEF(0x01D88980, light_spot), - HOOK_DEF(0x01D889D0, light_environment), - -#endif // Lights_Region - -#ifndef MapRules_Region - -//CRuleEntity - // virtual func - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D88CC0, "_ZN11CRuleEntity5SpawnEv", CRuleEntity::Spawn), // NOXREF - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88CF0, "_ZN11CRuleEntity8KeyValueEP14KeyValueData_s", CRuleEntity::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88C60, "_ZN11CRuleEntity4SaveER5CSave", CRuleEntity::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88C90, "_ZN11CRuleEntity7RestoreER8CRestore", CRuleEntity::Restore), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN11CRuleEntity9SetMasterEi", CRuleEntity::SetMaster), // NOXREF - //HOOK_SYMBOLDEF(0x01D88D40, "_ZN11CRuleEntity19CanFireForActivatorEP11CBaseEntity", CRuleEntity::CanFireForActivator), // NOXREF -//CRulePointEntity - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88D70, "_ZN16CRulePointEntity5SpawnEv", CRulePointEntity::Spawn), -//CRuleBrushEntity - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88DB0, "_ZN16CRuleBrushEntity5SpawnEv", CRuleBrushEntity::Spawn), -//CGameScore - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88E50, "_ZN10CGameScore5SpawnEv", CGameScore::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88E90, "_ZN10CGameScore8KeyValueEP14KeyValueData_s", CGameScore::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88F20, "_ZN10CGameScore3UseEP11CBaseEntityS1_8USE_TYPEf", CGameScore::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN10CGameScore6PointsEv", CGameScore::Points), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN10CGameScore18AllowNegativeScoreEv", CGameScore::AllowNegativeScore), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN10CGameScore11AwardToTeamEv", CGameScore::AwardToTeam), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN10CGameScore9SetPointsEi", CGameScore::SetPoints), // NOXREF -//CGameEnd - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88FE0, "_ZN8CGameEnd3UseEP11CBaseEntityS1_8USE_TYPEf", CGameEnd::Use), -//CGameText - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D89100, "_ZN9CGameText8KeyValueEP14KeyValueData_s", CGameText::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D89060, "_ZN9CGameText4SaveER5CSave", CGameText::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D890B0, "_ZN9CGameText7RestoreER8CRestore", CGameText::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D893C0, "_ZN9CGameText3UseEP11CBaseEntityS1_8USE_TYPEf", CGameText::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN9CGameText12MessageToAllEv", CGameText::MessageToAll), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN9CGameText10MessageSetEPKc", CGameText::MessageSet), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN9CGameText10MessageGetEv", CGameText::MessageGet), // NOXREF -//CGameTeamMaster - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D894B0, "_ZN15CGameTeamMaster8KeyValueEP14KeyValueData_s", CGameTeamMaster::KeyValue), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D894A0, "_ZN15CGameTeamMaster10ObjectCapsEv", CGameTeamMaster::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D89690, "_ZN15CGameTeamMaster11IsTriggeredEP11CBaseEntity", CGameTeamMaster::IsTriggered), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D896E0, "_ZN15CGameTeamMaster6TeamIDEv", CGameTeamMaster::TeamID), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D895A0, "_ZN15CGameTeamMaster3UseEP11CBaseEntityS1_8USE_TYPEf", CGameTeamMaster::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN15CGameTeamMaster12RemoveOnFireEv", CGameTeamMaster::RemoveOnFire), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN15CGameTeamMaster7AnyTeamEv", CGameTeamMaster::AnyTeam), // NOXREF - //HOOK_SYMBOLDEF(0x01D89700, "_ZN15CGameTeamMaster9TeamMatchEP11CBaseEntity", CGameTeamMaster::TeamMatch), // NOXREF -//CGameTeamSet - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D897A0, "_ZN12CGameTeamSet3UseEP11CBaseEntityS1_8USE_TYPEf", CGameTeamSet::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN12CGameTeamSet12RemoveOnFireEv", CGameTeamSet::RemoveOnFire), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN12CGameTeamSet15ShouldClearTeamEv", CGameTeamSet::ShouldClearTeam), // NOXREF -//CGamePlayerZone - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D898F0, "_ZN15CGamePlayerZone8KeyValueEP14KeyValueData_s", CGamePlayerZone::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D89850, "_ZN15CGamePlayerZone4SaveER5CSave", CGamePlayerZone::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D898A0, "_ZN15CGamePlayerZone7RestoreER8CRestore", CGamePlayerZone::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D89A10, "_ZN15CGamePlayerZone3UseEP11CBaseEntityS1_8USE_TYPEf", CGamePlayerZone::Use), -//CGamePlayerHurt - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D89BE0, "_ZN15CGamePlayerHurt3UseEP11CBaseEntityS1_8USE_TYPEf", CGamePlayerHurt::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN15CGamePlayerHurt12RemoveOnFireEv", CGamePlayerHurt::RemoveOnFire), // NOXREF -//CGameCounter - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D89CD0, "_ZN12CGameCounter5SpawnEv", CGameCounter::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D89D30, "_ZN12CGameCounter3UseEP11CBaseEntityS1_8USE_TYPEf", CGameCounter::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN12CGameCounter12RemoveOnFireEv", CGameCounter::RemoveOnFire), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN12CGameCounter11ResetOnFireEv", CGameCounter::ResetOnFire), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN12CGameCounter7CountUpEv", CGameCounter::CountUp), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN12CGameCounter9CountDownEv", CGameCounter::CountDown), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN12CGameCounter10ResetCountEv", CGameCounter::ResetCount), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN12CGameCounter10CountValueEv", CGameCounter::CountValue), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN12CGameCounter10LimitValueEv", CGameCounter::LimitValue), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN12CGameCounter8HitLimitEv", CGameCounter::HitLimit), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN12CGameCounter13SetCountValueEi", CGameCounter::SetCountValue), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN12CGameCounter15SetInitialValueEi", CGameCounter::SetInitialValue), // NOXREF -//CGameCounterSet - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D89E70, "_ZN15CGameCounterSet3UseEP11CBaseEntityS1_8USE_TYPEf", CGameCounterSet::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN15CGameCounterSet12RemoveOnFireEv", CGameCounterSet::RemoveOnFire), // NOXREF -//CGamePlayerEquip - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D89F10, "_ZN16CGamePlayerEquip8KeyValueEP14KeyValueData_s", CGamePlayerEquip::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D89FE0, "_ZN16CGamePlayerEquip5TouchEP11CBaseEntity", CGamePlayerEquip::Touch), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8A0D0, "_ZN16CGamePlayerEquip3UseEP11CBaseEntityS1_8USE_TYPEf", CGamePlayerEquip::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN16CGamePlayerEquip7UseOnlyEv", CGamePlayerEquip::UseOnly), // NOXREF - //HOOK_SYMBOLDEF(0x01D8A070, "_ZN16CGamePlayerEquip11EquipPlayerEP11CBaseEntity", CGamePlayerEquip::EquipPlayer), // NOXREF -//CGamePlayerTeam - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8A1E0, "_ZN15CGamePlayerTeam3UseEP11CBaseEntityS1_8USE_TYPEf", CGamePlayerTeam::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN15CGamePlayerTeam12RemoveOnFireEv", CGamePlayerTeam::RemoveOnFire), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN15CGamePlayerTeam16ShouldKillPlayerEv", CGamePlayerTeam::ShouldKillPlayer), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN15CGamePlayerTeam15ShouldGibPlayerEv", CGamePlayerTeam::ShouldGibPlayer), // NOXREF - //HOOK_SYMBOLDEF(0x01D8A180, "_ZN15CGamePlayerTeam14TargetTeamNameEPKc", CGamePlayerTeam::TargetTeamName), // NOXREF - -#endif // MapRules_Region - -#ifndef HintMessage_Region - -//CHintMessage - //HOOK_SYMBOLDEF(0x0, "_ZNK12CHintMessage11GetDurationEv", CHintMessage::GetDuration), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN12CHintMessage4SendER11CBaseEntity", CHintMessage::Send), // NOXREF - -//CHintMessageQueue - HOOK_SYMBOLDEF(0x01D86FC0, "_ZN17CHintMessageQueue5ResetEv", CHintMessageQueue::Reset), - HOOK_SYMBOLDEF(0x01D87050, "_ZN17CHintMessageQueue6UpdateER11CBaseEntity", CHintMessageQueue::Update), - HOOK_SYMBOLDEF(0x01D87120, "_ZN17CHintMessageQueue10AddMessageEPKcfbP10CUtlVectorIS1_E", CHintMessageQueue::AddMessage), - //HOOK_SYMBOLDEF(0x0, "_ZN17CHintMessageQueue7IsEmptyEv", CHintMessageQueue::IsEmpty), // NOXREF - -#endif // HintMessage_Region - -#ifndef Items_Region - -//CItem - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D87570, "_ZN5CItem5SpawnEv", CItem::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D876C0, "_ZN5CItem7RespawnEv", CItem::Respawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZN5CItem7MyTouchEP11CBasePlayer", CItem::MyTouch), // NOXREF - // non-virtual func - HOOK_SYMBOLDEF(0x01D87610, "_ZN5CItem9ItemTouchEP11CBaseEntity", CItem::ItemTouch), - HOOK_SYMBOLDEF(0x01D87730, "_ZN5CItem11MaterializeEv", CItem::Materialize), -//CWorldItem - // virtual func - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D874A0, "_ZN10CWorldItem5SpawnEv", CWorldItem::Spawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D87450, "_ZN10CWorldItem8KeyValueEP14KeyValueData_s", CWorldItem::KeyValue), - //linked objects - //HOOK_DEF(0x01D87400, world_items), -//CItemSuit - // virtual func - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D877F0, "_ZN9CItemSuit5SpawnEv", CItemSuit::Spawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D878B0, "_ZN9CItemSuit8PrecacheEv", CItemSuit::Precache), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D878D0, "_ZN9CItemSuit7MyTouchEP11CBasePlayer", CItemSuit::MyTouch), - //linked objects - //HOOK_DEF(0x01D877A0, item_suit), -//CItemBattery - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D87990, "_ZN12CItemBattery5SpawnEv", CItemBattery::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D87A50, "_ZN12CItemBattery8PrecacheEv", CItemBattery::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D87A70, "_ZN12CItemBattery7MyTouchEP11CBasePlayer", CItemBattery::MyTouch), - //linked objects - HOOK_DEF(0x01D87940, item_battery), -//CItemAntidote - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D87C10, "_ZN13CItemAntidote5SpawnEv", CItemAntidote::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D87CD0, "_ZN13CItemAntidote8PrecacheEv", CItemAntidote::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D87CE0, "_ZN13CItemAntidote7MyTouchEP11CBasePlayer", CItemAntidote::MyTouch), - //linked objects - HOOK_DEF(0x01D87BC0, item_antidote), -//CItemSecurity - // virtual func - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D87D60, "_ZN13CItemSecurity5SpawnEv", CItemSecurity::Spawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D87E20, "_ZN13CItemSecurity8PrecacheEv", CItemSecurity::Precache), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D87E30, "_ZN13CItemSecurity7MyTouchEP11CBasePlayer", CItemSecurity::MyTouch), - //linked objects - //HOOK_DEF(0x01D87D10, item_security), -//CItemLongJump - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D87EA0, "_ZN13CItemLongJump5SpawnEv", CItemLongJump::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D87F60, "_ZN13CItemLongJump8PrecacheEv", CItemLongJump::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D87F70, "_ZN13CItemLongJump7MyTouchEP11CBasePlayer", CItemLongJump::MyTouch), - //linked objects - HOOK_DEF(0x01D87E50, item_longjump), -//CItemKevlar - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88070, "_ZN11CItemKevlar5SpawnEv", CItemKevlar::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88130, "_ZN11CItemKevlar8PrecacheEv", CItemKevlar::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88140, "_ZN11CItemKevlar7MyTouchEP11CBasePlayer", CItemKevlar::MyTouch), - //linked objects - HOOK_DEF(0x01D88020, item_kevlar), -//CItemAssaultSuit - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88270, "_ZN16CItemAssaultSuit5SpawnEv", CItemAssaultSuit::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88330, "_ZN16CItemAssaultSuit8PrecacheEv", CItemAssaultSuit::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88340, "_ZN16CItemAssaultSuit7MyTouchEP11CBasePlayer", CItemAssaultSuit::MyTouch), - //linked objects - HOOK_DEF(0x01D88220, item_assaultsuit), -//CItemThighPack - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88460, "_ZN14CItemThighPack5SpawnEv", CItemThighPack::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88520, "_ZN14CItemThighPack8PrecacheEv", CItemThighPack::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D88530, "_ZN14CItemThighPack7MyTouchEP11CBasePlayer", CItemThighPack::MyTouch), - //linked objects - HOOK_DEF(0x01D88410, item_thighpack), - -#endif // Items_Region - -#ifndef Triggers_Region - -//CFrictionModifier - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD1A0, "_ZN17CFrictionModifier5SpawnEv", CFrictionModifier::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD220, "_ZN17CFrictionModifier8KeyValueEP14KeyValueData_s", CFrictionModifier::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD140, "_ZN17CFrictionModifier4SaveER5CSave", CFrictionModifier::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD170, "_ZN17CFrictionModifier7RestoreER8CRestore", CFrictionModifier::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD130, "_ZN17CFrictionModifier10ObjectCapsEv", CFrictionModifier::ObjectCaps), // DEFAULT - // non-virtual func - HOOK_SYMBOLDEF(0x01DBD1F0, "_ZN17CFrictionModifier14ChangeFrictionEP11CBaseEntity", CFrictionModifier::ChangeFriction), -//CAutoTrigger - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD400, "_ZN12CAutoTrigger5SpawnEv", CAutoTrigger::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD410, "_ZN12CAutoTrigger8PrecacheEv", CAutoTrigger::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD340, "_ZN12CAutoTrigger8KeyValueEP14KeyValueData_s", CAutoTrigger::KeyValue), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD2D0, "_ZN12CAutoTrigger10ObjectCapsEv", CAutoTrigger::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD2E0, "_ZN12CAutoTrigger4SaveER5CSave", CAutoTrigger::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD310, "_ZN12CAutoTrigger7RestoreER8CRestore", CAutoTrigger::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD430, "_ZN12CAutoTrigger5ThinkEv", CAutoTrigger::Think), -//CTriggerRelay - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD5C0, "_ZN13CTriggerRelay5SpawnEv", CTriggerRelay::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD540, "_ZN13CTriggerRelay8KeyValueEP14KeyValueData_s", CTriggerRelay::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD4E0, "_ZN13CTriggerRelay4SaveER5CSave", CTriggerRelay::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD510, "_ZN13CTriggerRelay7RestoreER8CRestore", CTriggerRelay::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD4D0, "_ZN13CTriggerRelay10ObjectCapsEv", CTriggerRelay::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD5D0, "_ZN13CTriggerRelay3UseEP11CBaseEntityS1_8USE_TYPEf", CTriggerRelay::Use), -//CMultiManager - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD780, "_ZN13CMultiManager5SpawnEv", CMultiManager::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD7F0, "_ZN13CMultiManager7RestartEv", CMultiManager::Restart), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD6C0, "_ZN13CMultiManager8KeyValueEP14KeyValueData_s", CMultiManager::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD660, "_ZN13CMultiManager4SaveER5CSave", CMultiManager::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD690, "_ZN13CMultiManager7RestoreER8CRestore", CMultiManager::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD650, "_ZN13CMultiManager10ObjectCapsEv", CMultiManager::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBD8A0, "_ZN13CMultiManager9HasTargetEj", CMultiManager::HasTarget), - // non-virtual func - HOOK_SYMBOLDEF(0x01DBD930, "_ZN13CMultiManager12ManagerThinkEv", CMultiManager::ManagerThink), - HOOK_SYMBOLDEF(0x01DBDAD0, "_ZN13CMultiManager10ManagerUseEP11CBaseEntityS1_8USE_TYPEf", CMultiManager::ManagerUse), - //HOOK_SYMBOLDEF(0x01DBDA10, "_ZN13CMultiManager5CloneEv", CMultiManager::Clone), // NOXREF -//CRenderFxManager - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBDC40, "_ZN16CRenderFxManager5SpawnEv", CRenderFxManager::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBDC50, "_ZN16CRenderFxManager3UseEP11CBaseEntityS1_8USE_TYPEf", CRenderFxManager::Use), -//CBaseTrigger - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBDE40, "_ZN12CBaseTrigger8KeyValueEP14KeyValueData_s", CBaseTrigger::KeyValue), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DBDD80, "_ZN12CBaseTrigger10ObjectCapsEv", CBaseTrigger::ObjectCaps), // DEFAULT - // non-virtual func - //HOOK_SYMBOLDEF(0x01DBDD90, "_ZN12CBaseTrigger11InitTriggerEv", CBaseTrigger::InitTrigger), // NOXREF - HOOK_SYMBOLDEF(0x01DC06D0, "_ZN12CBaseTrigger13TeleportTouchEP11CBaseEntity", CBaseTrigger::TeleportTouch), - HOOK_SYMBOLDEF(0x01DBF070, "_ZN12CBaseTrigger10MultiTouchEP11CBaseEntity", CBaseTrigger::MultiTouch), - HOOK_SYMBOLDEF(0x01DBEC40, "_ZN12CBaseTrigger9HurtTouchEP11CBaseEntity", CBaseTrigger::HurtTouch), - //HOOK_SYMBOLDEF(0x0, "_ZN12CBaseTrigger12CDAudioTouchEP11CBaseEntity", CBaseTrigger::CDAudioTouch), // NOXREF - HOOK_SYMBOLDEF(0x01DBF0E0, "_ZN12CBaseTrigger20ActivateMultiTriggerEP11CBaseEntity", CBaseTrigger::ActivateMultiTrigger), - HOOK_SYMBOLDEF(0x01DBF290, "_ZN12CBaseTrigger13MultiWaitOverEv", CBaseTrigger::MultiWaitOver), - HOOK_SYMBOLDEF(0x01DBF2A0, "_ZN12CBaseTrigger10CounterUseEP11CBaseEntityS1_8USE_TYPEf", CBaseTrigger::CounterUse), - HOOK_SYMBOLDEF(0x01DBEBE0, "_ZN12CBaseTrigger9ToggleUseEP11CBaseEntityS1_8USE_TYPEf", CBaseTrigger::ToggleUse), -//CTriggerHurt - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBE810, "_ZN12CTriggerHurt5SpawnEv", CTriggerHurt::Spawn), - // non-virtual func - HOOK_SYMBOLDEF(0x01DBE940, "_ZN12CTriggerHurt14RadiationThinkEv", CTriggerHurt::RadiationThink), -//CTriggerMonsterJump - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBDFA0, "_ZN19CTriggerMonsterJump5SpawnEv", CTriggerMonsterJump::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBE0B0, "_ZN19CTriggerMonsterJump5ThinkEv", CTriggerMonsterJump::Think), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBE0E0, "_ZN19CTriggerMonsterJump5TouchEP11CBaseEntity", CTriggerMonsterJump::Touch), -//CTriggerCDAudio - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBE270, "_ZN15CTriggerCDAudio5SpawnEv", CTriggerCDAudio::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBE1C0, "_ZN15CTriggerCDAudio5TouchEP11CBaseEntity", CTriggerCDAudio::Touch), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBE320, "_ZN15CTriggerCDAudio3UseEP11CBaseEntityS1_8USE_TYPEf", CTriggerCDAudio::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x01DBE430, "_ZN15CTriggerCDAudio9PlayTrackEv", CTriggerCDAudio::PlayTrack), // NOXREF - //HOOK_SYMBOLDEF(0x01DBE3B0, "_Z11PlayCDTracki", PlayCDTrack), // NOXREF -//CTargetCDAudio - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBE560, "_ZN14CTargetCDAudio5SpawnEv", CTargetCDAudio::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBE510, "_ZN14CTargetCDAudio8KeyValueEP14KeyValueData_s", CTargetCDAudio::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBE640, "_ZN14CTargetCDAudio5ThinkEv", CTargetCDAudio::Think), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBE5A0, "_ZN14CTargetCDAudio3UseEP11CBaseEntityS1_8USE_TYPEf", CTargetCDAudio::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x01DBE760, "_ZN14CTargetCDAudio4PlayEv", CTargetCDAudio::Play), // NOXREF -//CTriggerMultiple - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBEE90, "_ZN16CTriggerMultiple5SpawnEv", CTriggerMultiple::Spawn), -//CTriggerOnce - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBEFB0, "_ZN12CTriggerOnce5SpawnEv", CTriggerOnce::Spawn), -//CTriggerCounter - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBF410, "_ZN15CTriggerCounter5SpawnEv", CTriggerCounter::Spawn), -//CTriggerVolume - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBF490, "_ZN14CTriggerVolume5SpawnEv", CTriggerVolume::Spawn), -//CFireAndDie - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBF550, "_ZN11CFireAndDie5SpawnEv", CFireAndDie::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBF5B0, "_ZN11CFireAndDie8PrecacheEv", CFireAndDie::Precache), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DBF540, "_ZN11CFireAndDie10ObjectCapsEv", CFireAndDie::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBF5D0, "_ZN11CFireAndDie5ThinkEv", CFireAndDie::Think), -//CChangeLevel - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBF7E0, "_ZN12CChangeLevel5SpawnEv", CChangeLevel::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBF6A0, "_ZN12CChangeLevel8KeyValueEP14KeyValueData_s", CChangeLevel::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBF640, "_ZN12CChangeLevel4SaveER5CSave", CChangeLevel::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBF670, "_ZN12CChangeLevel7RestoreER8CRestore", CChangeLevel::Restore), - // non-virtual func - HOOK_SYMBOLDEF(0x01DBFD80, "_Z15BuildChangeListP9LEVELLISTi", BuildChangeList), - //HOOK_SYMBOLDEF(0x01DC0150, "_Z9NextLevelv", NextLevel), // NOXREF - HOOK_SYMBOLDEF(0x01DBFA10, "_ZN12CChangeLevel14UseChangeLevelEP11CBaseEntityS1_8USE_TYPEf", CChangeLevel::UseChangeLevel), - //HOOK_SYMBOLDEF(0x0, "_ZN12CChangeLevel18TriggerChangeLevelEv", CChangeLevel::TriggerChangeLevel), // NOXREF - HOOK_SYMBOLDEF(0x01DBF950, "_ZN12CChangeLevel18ExecuteChangeLevelEv", CChangeLevel::ExecuteChangeLevel), - HOOK_SYMBOLDEF(0x01DBFC60, "_ZN12CChangeLevel16TouchChangeLevelEP11CBaseEntity", CChangeLevel::TouchChangeLevel), - HOOK_SYMBOLDEF(0x01DBFA20, "_ZN12CChangeLevel14ChangeLevelNowEP11CBaseEntity", CChangeLevel::ChangeLevelNow), - //HOOK_SYMBOLDEF(0x01DBF990, "_ZN12CChangeLevel12FindLandmarkEPKc", CChangeLevel::FindLandmark), // NOXREF - HOOK_SYMBOLDEF(0x01DBFE50, "_ZN12CChangeLevel10ChangeListEP9LEVELLISTi", CChangeLevel::ChangeList), - HOOK_SYMBOLDEF(0x01DBFCA0, "_ZN12CChangeLevel19AddTransitionToListEP9LEVELLISTiPKcS3_P7edict_s", CChangeLevel::AddTransitionToList), - HOOK_SYMBOLDEF(0x01DBFD90, "_ZN12CChangeLevel18InTransitionVolumeEP11CBaseEntityPc", CChangeLevel::InTransitionVolume), -//CLadder - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC0370, "_ZN7CLadder5SpawnEv", CLadder::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC0300, "_ZN7CLadder8PrecacheEv", CLadder::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC02F0, "_ZN7CLadder8KeyValueEP14KeyValueData_s", CLadder::KeyValue), -//CTriggerPush - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC0420, "_ZN12CTriggerPush5SpawnEv", CTriggerPush::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC0410, "_ZN12CTriggerPush8KeyValueEP14KeyValueData_s", CTriggerPush::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC0560, "_ZN12CTriggerPush5TouchEP11CBaseEntity", CTriggerPush::Touch), -//CTriggerTeleport - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC08B0, "_ZN16CTriggerTeleport5SpawnEv", CTriggerTeleport::Spawn), -//CBuyZone - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC0A10, "_ZN8CBuyZone5SpawnEv", CBuyZone::Spawn), - // non-virtual func - HOOK_SYMBOLDEF(0x01DC0B00, "_ZN8CBuyZone8BuyTouchEP11CBaseEntity", CBuyZone::BuyTouch), -//CBombTarget - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC0B90, "_ZN11CBombTarget5SpawnEv", CBombTarget::Spawn), - // non-virtual func - HOOK_SYMBOLDEF(0x01DC0C50, "_ZN11CBombTarget15BombTargetTouchEP11CBaseEntity", CBombTarget::BombTargetTouch), - HOOK_SYMBOLDEF(0x01DC0CA0, "_ZN11CBombTarget13BombTargetUseEP11CBaseEntityS1_8USE_TYPEf", CBombTarget::BombTargetUse), -//CHostageRescue - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC0D00, "_ZN14CHostageRescue5SpawnEv", CHostageRescue::Spawn), - // non-virtual func - HOOK_SYMBOLDEF(0x01DC0DC0, "_ZN14CHostageRescue18HostageRescueTouchEP11CBaseEntity", CHostageRescue::HostageRescueTouch), -//CEscapeZone - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC0E70, "_ZN11CEscapeZone5SpawnEv", CEscapeZone::Spawn), - // non-virtual func - HOOK_SYMBOLDEF(0x01DC0F30, "_ZN11CEscapeZone11EscapeTouchEP11CBaseEntity", CEscapeZone::EscapeTouch), -//CVIP_SafetyZone - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC10A0, "_ZN15CVIP_SafetyZone5SpawnEv", CVIP_SafetyZone::Spawn), - // non-virtual func - HOOK_SYMBOLDEF(0x01DC1160, "_ZN15CVIP_SafetyZone15VIP_SafetyTouchEP11CBaseEntity", CVIP_SafetyZone::VIP_SafetyTouch), -//CTriggerSave - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC1240, "_ZN12CTriggerSave5SpawnEv", CTriggerSave::Spawn), - // non-virtual func - HOOK_SYMBOLDEF(0x01DC1320, "_ZN12CTriggerSave9SaveTouchEP11CBaseEntity", CTriggerSave::SaveTouch), -//CTriggerEndSection - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC1410, "_ZN18CTriggerEndSection5SpawnEv", CTriggerEndSection::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC1550, "_ZN18CTriggerEndSection8KeyValueEP14KeyValueData_s", CTriggerEndSection::KeyValue), - // non-virtual func - HOOK_SYMBOLDEF(0x01DC13C0, "_ZN18CTriggerEndSection15EndSectionTouchEP11CBaseEntity", CTriggerEndSection::EndSectionTouch), - HOOK_SYMBOLDEF(0x01DC1500, "_ZN18CTriggerEndSection13EndSectionUseEP11CBaseEntityS1_8USE_TYPEf", CTriggerEndSection::EndSectionUse), -//CTriggerGravity - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC15F0, "_ZN15CTriggerGravity5SpawnEv", CTriggerGravity::Spawn), - // non-virtual func - HOOK_SYMBOLDEF(0x01DC16B0, "_ZN15CTriggerGravity12GravityTouchEP11CBaseEntity", CTriggerGravity::GravityTouch), -//CTriggerChangeTarget - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC17F0, "_ZN20CTriggerChangeTarget5SpawnEv", CTriggerChangeTarget::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC17A0, "_ZN20CTriggerChangeTarget8KeyValueEP14KeyValueData_s", CTriggerChangeTarget::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC1740, "_ZN20CTriggerChangeTarget4SaveER5CSave", CTriggerChangeTarget::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC1770, "_ZN20CTriggerChangeTarget7RestoreER8CRestore", CTriggerChangeTarget::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DC1730, "_ZN20CTriggerChangeTarget10ObjectCapsEv", CTriggerChangeTarget::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC1800, "_ZN20CTriggerChangeTarget3UseEP11CBaseEntityS1_8USE_TYPEf", CTriggerChangeTarget::Use), -//CTriggerCamera - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC1920, "_ZN14CTriggerCamera5SpawnEv", CTriggerCamera::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC19A0, "_ZN14CTriggerCamera8KeyValueEP14KeyValueData_s", CTriggerCamera::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC18C0, "_ZN14CTriggerCamera4SaveER5CSave", CTriggerCamera::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC18F0, "_ZN14CTriggerCamera7RestoreER8CRestore", CTriggerCamera::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DC18B0, "_ZN14CTriggerCamera10ObjectCapsEv", CTriggerCamera::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC1A90, "_ZN14CTriggerCamera3UseEP11CBaseEntityS1_8USE_TYPEf", CTriggerCamera::Use), - // non-virtual func - HOOK_SYMBOLDEF(0x01DC1DC0, "_ZN14CTriggerCamera12FollowTargetEv", CTriggerCamera::FollowTarget), - HOOK_SYMBOLDEF(0x01DC20A0, "_ZN14CTriggerCamera4MoveEv", CTriggerCamera::Move), -//CWeather - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC2490, "_ZN8CWeather5SpawnEv", CWeather::Spawn), -//CClientFog - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC25E0, "_ZN10CClientFog5SpawnEv", CClientFog::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DC2560, "_ZN10CClientFog8KeyValueEP14KeyValueData_s", CClientFog::KeyValue), - -//linked objects - HOOK_DEF(0x01DBD0E0, func_friction), - HOOK_DEF(0x01DBD280, trigger_auto), - HOOK_DEF(0x01DBD480, trigger_relay), - HOOK_DEF(0x01DBD600, multi_manager), - HOOK_DEF(0x01DBDBF0, env_render), - HOOK_DEF(0x01DBDD30, trigger), - HOOK_DEF(0x01DBDF00, trigger_hurt), - HOOK_DEF(0x01DBDF50, trigger_monsterjump), - HOOK_DEF(0x01DBE170, trigger_cdaudio), - HOOK_DEF(0x01DBE4C0, target_cdaudio), - HOOK_DEF(0x01DBEE40, trigger_multiple), - HOOK_DEF(0x01DBEF60, trigger_once), - HOOK_DEF(0x01DBF3C0, trigger_counter), - HOOK_DEF(0x01DBF440, trigger_transition), - HOOK_DEF(0x01DBF4F0, fireanddie), - HOOK_DEF(0x01DBF5F0, trigger_changelevel), - HOOK_DEF(0x01DC02A0, func_ladder), - HOOK_DEF(0x01DC03C0, trigger_push), - HOOK_DEF(0x01DC0860, trigger_teleport), - HOOK_DEF(0x01DC0970, info_teleport_destination), - HOOK_DEF(0x01DC09C0, func_buyzone), - HOOK_DEF(0x01DC0B40, func_bomb_target), - HOOK_DEF(0x01DC0CB0, func_hostage_rescue), - HOOK_DEF(0x01DC0E20, func_escapezone), - HOOK_DEF(0x01DC1050, func_vip_safetyzone), - HOOK_DEF(0x01DC11F0, trigger_autosave), - HOOK_DEF(0x01DC1370, trigger_endsection), - HOOK_DEF(0x01DC15A0, trigger_gravity), - HOOK_DEF(0x01DC16E0, trigger_changetarget), - HOOK_DEF(0x01DC1860, trigger_camera), - HOOK_DEF(0x01DC2350, env_snow), - HOOK_DEF(0x01DC23A0, func_snow), - HOOK_DEF(0x01DC23F0, env_rain), - HOOK_DEF(0x01DC2440, func_rain), - HOOK_DEF(0x01DC2610, env_fog), - -#endif // Triggers_Region - -#ifndef SharedUtil_Region - -#ifdef _WIN32 - HOOK_DEF(0x01D50CA0, CloneString), -#endif // _WIN32 - - //HOOK_SYMBOLDEF(0x01D58EE0, "_Z14SharedWVarArgsPwz", SharedWVarArgs), // NOXREF - HOOK_SYMBOLDEF(0x01D58F30, "_Z13SharedVarArgsPcz", SharedVarArgs), - HOOK_SYMBOLDEF(0x01D58F80, "_Z9BufPrintfPcRiPKcz", BufPrintf), - //HOOK_SYMBOLDEF(0x01D58FD0, "_Z10BufWPrintfPwRiPKwz", BufWPrintf), // NOXREF - //HOOK_SYMBOLDEF(0x01D59010, "_Z12NumAsWStringi", NumAsWString), // NOXREF - HOOK_SYMBOLDEF(0x01D59060, "_Z11NumAsStringi", NumAsString), - HOOK_SYMBOLDEF(0x01D590B0, "_Z14SharedGetTokenv", SharedGetToken), - //HOOK_SYMBOLDEF(0x01D590C0, "_Z18SharedSetQuoteCharc", SharedSetQuoteChar), // NOXREF - HOOK_SYMBOLDEF(0x01D590D0, "_Z11SharedParsePKc", SharedParse), - //HOOK_SYMBOLDEF(0x01D591B0, "_Z18SharedTokenWaitingPKc", SharedTokenWaiting), // NOXREF - -#endif // SharedUtil_Region - -#ifndef World_Region - - // virtual func - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DD1750, "_ZN7CCorpse10ObjectCapsEv", CCorpse::ObjectCaps), // DEFAULT - // non-virtual func - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DD1420, "_ZN6CDecal5SpawnEv", CDecal::Spawn), // DEFAULT - //HOOK_SYMBOLDEF(0x01DD15C0, "_ZN6CDecal11StaticDecalEv", CDecal::StaticDecal), // DEFAULT - //HOOK_SYMBOLDEF(0x01DD1490, "_ZN6CDecal12TriggerDecalEP11CBaseEntityS1_8USE_TYPEf", CDecal::TriggerDecal), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DD1690, "_ZN6CDecal8KeyValueEP14KeyValueData_s", CDecal::KeyValue), // DEFAULT - //HOOK_SYMBOLDEF(0x01DD1760, "_Z13CopyToBodyQueP9entvars_s", CopyToBodyQue), // PURE - //HOOK_SYMBOLDEF(0x01DD1770, "_Z12ClearBodyQuev", ClearBodyQue), // NOXREF - //HOOK_SYMBOLDEF(0x01DD1780, "_ZN12CGlobalStateC2Ev", CGlobalState__CGlobalState), - //HOOK_SYMBOLDEF(0x01DD1790, "_ZN12CGlobalState5ResetEv", CGlobalState::Reset), // NOXREF - //HOOK_SYMBOLDEF(0x01DD17A0, "_ZN12CGlobalState4FindEj", CGlobalState::Find), - HOOK_SYMBOLDEF(0x01DD1810, "_ZN12CGlobalState11DumpGlobalsEv", CGlobalState::DumpGlobals), - HOOK_SYMBOLDEF(0x01DD1860, "_ZN12CGlobalState9EntityAddEjj12GLOBALESTATE", CGlobalState::EntityAdd), - HOOK_SYMBOLDEF(0x01DD18D0, "_ZN12CGlobalState14EntitySetStateEj12GLOBALESTATE", CGlobalState::EntitySetState), - HOOK_SYMBOLDEF(0x01DD1950, "_ZN12CGlobalState15EntityFromTableEj", CGlobalState::EntityFromTable), - HOOK_SYMBOLDEF(0x01DD19C0, "_ZN12CGlobalState14EntityGetStateEj", CGlobalState::EntityGetState), - //HOOK_SYMBOLDEF(0x01DD1A40, "_ZN12CGlobalState4SaveER5CSave", CGlobalState::Save), // NOXREF - //HOOK_SYMBOLDEF(0x01DD1AB0, "_ZN12CGlobalState7RestoreER8CRestore", CGlobalState::Restore), // NOXREF - HOOK_SYMBOLDEF(0x01DD1BD0, "_ZN12CGlobalState12EntityUpdateEjj", CGlobalState::EntityUpdate), - //HOOK_SYMBOLDEF(0x01DD1C50, "_ZN12CGlobalState11ClearStatesEv", CGlobalState::ClearStates), // NOXREF - HOOK_SYMBOLDEF(0x01DD1C80, "_Z15SaveGlobalStateP13saverestore_s", SaveGlobalState), - HOOK_SYMBOLDEF(0x01DD1D00, "_Z18RestoreGlobalStateP13saverestore_s", RestoreGlobalState), - HOOK_SYMBOLDEF(0x01DD1E50, "_Z16ResetGlobalStatev", ResetGlobalState), -//linked objects - HOOK_DEF(0x01DD13D0, infodecal), - HOOK_DEF(0x01DD1700, bodyque), - HOOK_DEF(0x01DD1E90, worldspawn), - -#endif // World_Region - -#ifndef Graph_Region - - //HOOK_SYMBOLDEF(0x01D8AB70, "_ZN6CGraph9InitGraphEv", CGraph::InitGraph), // pure - //HOOK_SYMBOLDEF(0x01D8AB90, "_ZN6CGraph10AllocNodesEv", CGraph::AllocNodes), // pure - //HOOK_SYMBOLDEF(0x01D8ABA0, "_ZN6CGraph12CheckNODFileEPc", CGraph::CheckNODFile), // pure - //HOOK_SYMBOLDEF(0x01D8AB80, "_ZN6CGraph10FLoadGraphEPc", CGraph::FLoadGraph), // pure - //HOOK_SYMBOLDEF(0x01D8ABB0, "_ZN6CGraph17FSetGraphPointersEv", CGraph::FSetGraphPointers), // pure - //HOOK_SYMBOLDEF(0x01D8ABC0, "_ZN6CGraph19ShowNodeConnectionsEi", CGraph::ShowNodeConnections), // pure - //HOOK_SYMBOLDEF(0x0, "_ZN6CGraph15FindNearestNodeERK6VectorP11CBaseEntity", CGraph::FindNearestNode, int(const Vector &, CBaseEntity *)), // NOXREF - //HOOK_SYMBOLDEF(0x01D8ABD0, "_ZN6CGraph15FindNearestNodeERK6Vectori", CGraph::FindNearestNode, int(const Vector &, int)), - -#endif // Graph_Region - -#ifndef SoundEnt_Region - -//CSound - // non-virtual func - //HOOK_SYMBOLDEF(0x01DBA520, "_ZN6CSound5ClearEv", CSound::Clear), // NOXREF - HOOK_SYMBOLDEF(0x01DBA560, "_ZN6CSound5ResetEv", CSound::Reset), - //HOOK_SYMBOLDEF(0x01DBA590, "_ZN6CSound8FIsSoundEv", CSound::FIsSound), // NOXREF - //HOOK_SYMBOLDEF(0x01DBA5A0, "_ZN6CSound8FIsScentEv", CSound::FIsScent), // NOXREF - //linked objects - HOOK_DEF(0x01DBA4D0, soundent), -//CSoundEnt - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBA5B0, "_ZN9CSoundEnt5SpawnEv", CSoundEnt::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBA760, "_ZN9CSoundEnt8PrecacheEv", CSoundEnt::Precache), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DBAB10, "_ZN9CSoundEnt10ObjectCapsEv", CSoundEnt::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBA5E0, "_ZN9CSoundEnt5ThinkEv", CSoundEnt::Think), - // non-virtual func - HOOK_SYMBOLDEF(0x01DBA8F0, "_ZN9CSoundEnt10InitializeEv", CSoundEnt::Initialize), - HOOK_SYMBOLDEF(0x01DBA820, "_ZN9CSoundEnt11InsertSoundEiRK6Vectorif", CSoundEnt::InsertSound), - //HOOK_SYMBOLDEF(0x01DBA770, "_ZN9CSoundEnt9FreeSoundEii", CSoundEnt::FreeSound), // NOXREF - //HOOK_SYMBOLDEF(0x01DBAA70, "_ZN9CSoundEnt10ActiveListEv", CSoundEnt::ActiveList), // NOXREF - //HOOK_SYMBOLDEF(0x01DBAA90, "_ZN9CSoundEnt8FreeListEv", CSoundEnt::FreeList), // NOXREF - HOOK_SYMBOLDEF(0x01DBAAB0, "_ZN9CSoundEnt20SoundPointerForIndexEi", CSoundEnt::SoundPointerForIndex), - HOOK_SYMBOLDEF(0x01DBAB00, "_ZN9CSoundEnt16ClientSoundIndexEP7edict_s", CSoundEnt::ClientSoundIndex), - //HOOK_SYMBOLDEF(0x0, "_ZN9CSoundEnt7IsEmptyEv", CSoundEnt::IsEmpty), // NOXREF - //HOOK_SYMBOLDEF(0x01DBAA20, "_ZN9CSoundEnt13ISoundsInListEi", CSoundEnt::ISoundsInList), // NOXREF - //HOOK_SYMBOLDEF(0x01DBA7D0, "_ZN9CSoundEnt11IAllocSoundEv", CSoundEnt::IAllocSound), // NOXREF - -#endif // SoundEnt_Region - -#ifndef Sound_Region - -//CAmbientGeneric - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6CF0, "_ZN15CAmbientGeneric5SpawnEv", CAmbientGeneric::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6F90, "_ZN15CAmbientGeneric8PrecacheEv", CAmbientGeneric::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6E00, "_ZN15CAmbientGeneric7RestartEv", CAmbientGeneric::Restart), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB7900, "_ZN15CAmbientGeneric8KeyValueEP14KeyValueData_s", CAmbientGeneric::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6C90, "_ZN15CAmbientGeneric4SaveER5CSave", CAmbientGeneric::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6CC0, "_ZN15CAmbientGeneric7RestoreER8CRestore", CAmbientGeneric::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6C80, "_ZN15CAmbientGeneric10ObjectCapsEv", CAmbientGeneric::ObjectCaps), // DEFAULT - // non-virtual func - HOOK_SYMBOLDEF(0x01DB7060, "_ZN15CAmbientGeneric9RampThinkEv", CAmbientGeneric::RampThink), - HOOK_SYMBOLDEF(0x01DB7440, "_ZN15CAmbientGeneric19InitModulationParmsEv", CAmbientGeneric::InitModulationParms), - HOOK_SYMBOLDEF(0x01DB76A0, "_ZN15CAmbientGeneric9ToggleUseEP11CBaseEntityS1_8USE_TYPEf", CAmbientGeneric::ToggleUse), -//CEnvSound - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB8270, "_ZN9CEnvSound5SpawnEv", CEnvSound::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB7EC0, "_ZN9CEnvSound8KeyValueEP14KeyValueData_s", CEnvSound::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB7E60, "_ZN9CEnvSound4SaveER5CSave", CEnvSound::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB7E90, "_ZN9CEnvSound7RestoreER8CRestore", CEnvSound::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB8090, "_ZN9CEnvSound5ThinkEv", CEnvSound::Think), -//CSpeaker - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB9FD0, "_ZN8CSpeaker5SpawnEv", CSpeaker::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBA090, "_ZN8CSpeaker8PrecacheEv", CSpeaker::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBA480, "_ZN8CSpeaker8KeyValueEP14KeyValueData_s", CSpeaker::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB9F70, "_ZN8CSpeaker4SaveER5CSave", CSpeaker::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB9FA0, "_ZN8CSpeaker7RestoreER8CRestore", CSpeaker::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DB9F60, "_ZN8CSpeaker10ObjectCapsEv", CSpeaker::ObjectCaps), // DEFAULT - // non-virtual func - HOOK_SYMBOLDEF(0x01DBA3F0, "_ZN8CSpeaker9ToggleUseEP11CBaseEntityS1_8USE_TYPEf", CSpeaker::ToggleUse), - HOOK_SYMBOLDEF(0x01DBA0D0, "_ZN8CSpeaker12SpeakerThinkEv", CSpeaker::SpeakerThink), - // non-class func - HOOK_SYMBOLDEF(0x01DB7F30, "_Z16FEnvSoundInRangeP9entvars_sS0_Pf", FEnvSoundInRange), - //HOOK_SYMBOLDEF(0x01DB82A0, "_Z18USENTENCEG_InitLRUPhi", USENTENCEG_InitLRU), // NOXREF - HOOK_SYMBOLDEF(0x01DB8310, "_Z25USENTENCEG_PickSequentialiPcii", USENTENCEG_PickSequential), - HOOK_SYMBOLDEF(0x01DB8420, "_Z15USENTENCEG_PickiPc", USENTENCEG_Pick), - //HOOK_SYMBOLDEF(0x01DB85C0, "_Z18SENTENCEG_GetIndexPKc", SENTENCEG_GetIndex), // NOXREF - //HOOK_SYMBOLDEF(0x01DB8640, "_Z18SENTENCEG_PlayRndIP7edict_siffii", SENTENCEG_PlayRndI), // NOXREF - //HOOK_SYMBOLDEF(0x01DB87B0, "_Z19SENTENCEG_PlayRndSzP7edict_sPKcffii", SENTENCEG_PlayRndSz), // NOXREF - HOOK_SYMBOLDEF(0x01DB89A0, "_Z26SENTENCEG_PlaySequentialSzP7edict_sPKcffiiii", SENTENCEG_PlaySequentialSz), - //HOOK_SYMBOLDEF(0x01DB8BA0, "_Z14SENTENCEG_StopP7edict_sii", SENTENCEG_Stop), // NOXREF - HOOK_SYMBOLDEF(0x01DB8D30, "_Z14SENTENCEG_Initv", SENTENCEG_Init), - HOOK_SYMBOLDEF(0x01DB9050, "_Z16SENTENCEG_LookupPKcPc", SENTENCEG_Lookup), - HOOK_SYMBOLDEF(0x01DB9100, "_Z14EMIT_SOUND_DYNP7edict_siPKcffii", EMIT_SOUND_DYN), - HOOK_SYMBOLDEF(0x01DB9210, "_Z15EMIT_SOUND_SUITP7edict_sPKc", EMIT_SOUND_SUIT), - HOOK_SYMBOLDEF(0x01DB9380, "_Z17EMIT_GROUPID_SUITP7edict_si", EMIT_GROUPID_SUIT), - //HOOK_SYMBOLDEF(0x01DB9510, "_Z19EMIT_GROUPNAME_SUITP7edict_sPKc", EMIT_GROUPNAME_SUIT), // NOXREF - HOOK_SYMBOLDEF(0x01DB9720, "_ZL8memfgetsPhiRiPci_constprop_21", memfgets), - HOOK_SYMBOLDEF(0x01DB97C0, "_Z16TEXTURETYPE_Initv", TEXTURETYPE_Init), - HOOK_SYMBOLDEF(0x01DB99A0, "_Z16TEXTURETYPE_FindPc", TEXTURETYPE_Find), - HOOK_SYMBOLDEF(0x01DB99F0, "_Z21TEXTURETYPE_PlaySoundP11TraceResult6VectorS1_i", TEXTURETYPE_PlaySound), - - //linked objects - HOOK_DEF(0x01DB6C30, ambient_generic), - HOOK_DEF(0x01DB7E10, env_sound), - HOOK_DEF(0x01DB9F10, speaker), - -#endif // Sound_Region - -#ifndef Util_Region - -#ifdef _WIN32 - HOOK_DEF(0x01D67920, VARS, entvars_t *(edict_t *)), - HOOK_DEF(0x01D78600, MAKE_STRING_CLASS), -#endif // _WIN32 - - //HOOK_SYMBOLDEF(0x01DC2670, "_Z8U_Randomv", U_Random), // NOXREF - //HOOK_SYMBOLDEF(0x01DC26B0, "_Z7U_Srandj", U_Srand), // NOXREF - HOOK_SYMBOLDEF(0x01DC26D0, "_Z21UTIL_SharedRandomLongjii", UTIL_SharedRandomLong), - HOOK_SYMBOLDEF(0x01DC2740, "_Z22UTIL_SharedRandomFloatjff", UTIL_SharedRandomFloat), - //HOOK_SYMBOLDEF(0x01DC2820, "_Z21UTIL_ParametricRocketP9entvars_s6VectorS1_P7edict_s", UTIL_ParametricRocket), // NOXREF - HOOK_SYMBOLDEF(0x01DC2980, "_Z18UTIL_SetGroupTraceii", UTIL_SetGroupTrace), - HOOK_SYMBOLDEF(0x01DC29B0, "_Z20UTIL_UnsetGroupTracev", UTIL_UnsetGroupTrace), - //HOOK_SYMBOLDEF(0x01DC29D0, "_ZN15UTIL_GroupTraceC2Eii", UTIL_GroupTrace::UTIL_GroupTrace), // NOXREF - //HOOK_SYMBOLDEF(0x01DC2A10, "_ZN15UTIL_GroupTraceD2Ev", UTIL_GroupTrace::~UTIL_GroupTrace), // NOXREF - //HOOK_SYMBOLDEF(0x01DC2A30, "_Z22UTIL_GetNextBestWeaponP11CBasePlayerP15CBasePlayerItem", UTIL_GetNextBestWeapon), // NOXREF - //HOOK_SYMBOLDEF(0x01DC2A50, "_Z13UTIL_AngleModf", UTIL_AngleMod), // NOXREF - //HOOK_SYMBOLDEF(0x01DC2AD0, "_Z14UTIL_AngleDiffff", UTIL_AngleDiff), // NOXREF - HOOK_SYMBOLDEF(0x01DC2B20, "_Z16UTIL_VecToAnglesRK6Vector", UTIL_VecToAngles), - //HOOK_SYMBOLDEF(0x01DC2B50, "_Z17UTIL_MoveToOriginP7edict_sRK6Vectorfi", UTIL_MoveToOrigin), // NOXREF - HOOK_SYMBOLDEF(0x01DC2B90, "_Z18UTIL_EntitiesInBoxPP11CBaseEntityiRK6VectorS4_i", UTIL_EntitiesInBox), - //HOOK_SYMBOLDEF(0x01DC2C90, "_Z21UTIL_MonstersInSpherePP11CBaseEntityiRK6Vectorf", UTIL_MonstersInSphere), // NOXREF - HOOK_SYMBOLDEF(0x01DC2D90, "_Z23UTIL_FindEntityInSphereP11CBaseEntityRK6Vectorf", UTIL_FindEntityInSphere), - HOOK_SYMBOLDEF(0x01DC2DE0, "_Z27UTIL_FindEntityByString_OldP11CBaseEntityPKcS2_", UTIL_FindEntityByString_Old), - HOOK_SYMBOLDEF(0x01DC2E30, "_Z23UTIL_FindEntityByStringP11CBaseEntityPKcS2_", UTIL_FindEntityByString), - //HOOK_SYMBOLDEF(0x01DC2FB0, "_Z26UTIL_FindEntityByClassnameP11CBaseEntityPKc", UTIL_FindEntityByClassname), - //HOOK_SYMBOLDEF(0x01DC2FD0, "_Z27UTIL_FindEntityByTargetnameP11CBaseEntityPKc", UTIL_FindEntityByTargetname), - //HOOK_SYMBOLDEF(0x01DC2FF0, "_Z22UTIL_FindEntityGenericPKcR6Vectorf", UTIL_FindEntityGeneric), // NOXREF - //HOOK_SYMBOLDEF(0x01DC30A0, "_Z18UTIL_PlayerByIndexi", UTIL_PlayerByIndex), - HOOK_SYMBOLDEF(0x01DC30E0, "_Z16UTIL_MakeVectorsRK6Vector", UTIL_MakeVectors), - HOOK_SYMBOLDEF(0x01DC30F0, "_Z19UTIL_MakeAimVectorsRK6Vector", UTIL_MakeAimVectors), - HOOK_SYMBOLDEF(0x01DC3120, "_Z19UTIL_MakeInvVectorsRK6VectorP12globalvars_t", UTIL_MakeInvVectors), - HOOK_SYMBOLDEF(0x01DC31A0, "_Z21UTIL_EmitAmbientSoundP7edict_sRK6VectorPKcffii", UTIL_EmitAmbientSound), - HOOK_SYMBOLDEF(0x01DC3240, "_Z16UTIL_ScreenShakeRK6Vectorffff", UTIL_ScreenShake), - //HOOK_SYMBOLDEF(0x01DC33F0, "_Z19UTIL_ScreenShakeAllRK6Vectorfff", UTIL_ScreenShakeAll), // NOXREF - //HOOK_SYMBOLDEF(0x01DC3410, "_Z20UTIL_ScreenFadeBuildR10ScreenFadeRK6Vectorffii", UTIL_ScreenFadeBuild), // NOXREF - //HOOK_SYMBOLDEF(0x01DC34A0, "_Z20UTIL_ScreenFadeWriteRK10ScreenFadeP11CBaseEntity", UTIL_ScreenFadeWrite), // NOXREF - HOOK_SYMBOLDEF(0x01DC3540, "_Z18UTIL_ScreenFadeAllRK6Vectorffii", UTIL_ScreenFadeAll), - HOOK_SYMBOLDEF(0x01DC36E0, "_Z15UTIL_ScreenFadeP11CBaseEntityRK6Vectorffii", UTIL_ScreenFade), - HOOK_SYMBOLDEF(0x01DC3810, "_Z15UTIL_HudMessageP11CBaseEntityRK14hudtextparms_sPKc", UTIL_HudMessage), - HOOK_SYMBOLDEF(0x01DC3A80, "_Z18UTIL_HudMessageAllRK14hudtextparms_sPKc", UTIL_HudMessageAll), - HOOK_SYMBOLDEF(0x01DC3AF0, "_Z19UTIL_ClientPrintAlliPKcS0_S0_S0_S0_", UTIL_ClientPrintAll), - HOOK_SYMBOLDEF(0x01DC3B70, "_Z11ClientPrintP9entvars_siPKcS2_S2_S2_S2_", ClientPrint), - //HOOK_SYMBOLDEF(0x01DC3C00, "_Z12UTIL_SayTextPKcP11CBaseEntity", UTIL_SayText), // NOXREF // NOXREF - HOOK_SYMBOLDEF(0x01DC3C60, "_Z15UTIL_SayTextAllPKcP11CBaseEntity", UTIL_SayTextAll), - HOOK_SYMBOLDEF(0x01DC3CB0, "_Z10UTIL_dtos1i", UTIL_dtos1), - HOOK_SYMBOLDEF(0x01DC3CD0, "_Z10UTIL_dtos2i", UTIL_dtos2), - //HOOK_SYMBOLDEF(0x01DC3CF0, "_Z10UTIL_dtos3i", UTIL_dtos3), // NOXREF // NOXREF - //HOOK_SYMBOLDEF(0x01DC3D10, "_Z10UTIL_dtos4i", UTIL_dtos4), // NOXREF - HOOK_SYMBOLDEF(0x01DC3D30, "_Z20UTIL_ShowMessageArgsPKcP11CBaseEntityP10CUtlVectorIPcEb", UTIL_ShowMessageArgs), - HOOK_SYMBOLDEF(0x01DC3E20, "_Z16UTIL_ShowMessagePKcP11CBaseEntityb", UTIL_ShowMessage), - HOOK_SYMBOLDEF(0x01DC3E80, "_Z19UTIL_ShowMessageAllPKcb", UTIL_ShowMessageAll), - HOOK_SYMBOLDEF(0x01DC3F30, "_Z14UTIL_TraceLineRK6VectorS1_15IGNORE_MONSTERS12IGNORE_GLASSP7edict_sP11TraceResult", UTIL_TraceLine, void (const Vector &, const Vector &, IGNORE_MONSTERS, IGNORE_GLASS, edict_t *, TraceResult *)), - HOOK_SYMBOLDEF(0x01DC3F70, "_Z14UTIL_TraceLineRK6VectorS1_15IGNORE_MONSTERSP7edict_sP11TraceResult", UTIL_TraceLine, void (const Vector &, const Vector &, IGNORE_MONSTERS, edict_t *, TraceResult *)), - HOOK_SYMBOLDEF(0x01DC3F90, "_Z14UTIL_TraceHullRK6VectorS1_15IGNORE_MONSTERSiP7edict_sP11TraceResult", UTIL_TraceHull), - HOOK_SYMBOLDEF(0x01DC3FB0, "_Z15UTIL_TraceModelRK6VectorS1_iP7edict_sP11TraceResult", UTIL_TraceModel), - //HOOK_SYMBOLDEF(0x01DC3FC0, "_Z19UTIL_GetGlobalTracev", UTIL_GetGlobalTrace), // NOXREF - HOOK_SYMBOLDEF(0x01DC4090, "_Z12UTIL_SetSizeP9entvars_sRK6VectorS3_", UTIL_SetSize), - HOOK_SYMBOLDEF(0x01DC40B0, "_Z13UTIL_VecToYawRK6Vector", UTIL_VecToYaw), - HOOK_SYMBOLDEF(0x01DC40C0, "_Z14UTIL_SetOriginP9entvars_sRK6Vector", UTIL_SetOrigin), - //HOOK_SYMBOLDEF(0x01DC40E0, "_Z19UTIL_ParticleEffectRK6VectorS1_jj", UTIL_ParticleEffect), // NOXREF - HOOK_SYMBOLDEF(0x01DC4130, "_Z13UTIL_Approachfff", UTIL_Approach), - HOOK_SYMBOLDEF(0x01DC4170, "_Z18UTIL_ApproachAnglefff", UTIL_ApproachAngle), - HOOK_SYMBOLDEF(0x01DC42F0, "_Z18UTIL_AngleDistanceff", UTIL_AngleDistance), - HOOK_SYMBOLDEF(0x01DC4330, "_Z19UTIL_SplineFractionff", UTIL_SplineFraction), - HOOK_SYMBOLDEF(0x01DC4350, "_Z12UTIL_VarArgsPcz", UTIL_VarArgs), - //HOOK_SYMBOLDEF(0x01DC4370, "_Z17UTIL_GetAimVectorP7edict_sf", UTIL_GetAimVector), // NOXREF - //HOOK_SYMBOLDEF(0x01DC43B0, "_Z22UTIL_IsMasterTriggeredjP11CBaseEntity", UTIL_IsMasterTriggered), - //HOOK_SYMBOLDEF(0x01DC4430, "_Z20UTIL_ShouldShowBloodi", UTIL_ShouldShowBlood), // NOXREF - HOOK_SYMBOLDEF(0x01DC4490, "_Z18UTIL_PointContentsRK6Vector", UTIL_PointContents), - HOOK_SYMBOLDEF(0x01DC44A0, "_Z16UTIL_BloodStreamRK6VectorS1_ii", UTIL_BloodStream), - HOOK_SYMBOLDEF(0x01DC4590, "_Z15UTIL_BloodDripsRK6VectorS1_ii", UTIL_BloodDrips), - HOOK_SYMBOLDEF(0x01DC46D0, "_Z22UTIL_RandomBloodVectorv", UTIL_RandomBloodVector), - HOOK_SYMBOLDEF(0x01DC4720, "_Z20UTIL_BloodDecalTraceP11TraceResulti", UTIL_BloodDecalTrace), - HOOK_SYMBOLDEF(0x01DC47A0, "_Z15UTIL_DecalTraceP11TraceResulti", UTIL_DecalTrace), - HOOK_SYMBOLDEF(0x01DC48A0, "_Z21UTIL_PlayerDecalTraceP11TraceResultiii", UTIL_PlayerDecalTrace), - //HOOK_SYMBOLDEF(0x01DC4940, "_Z22UTIL_GunshotDecalTraceP11TraceResultibP9entvars_s", UTIL_GunshotDecalTrace), // NOXREF - HOOK_SYMBOLDEF(0x01DC4A40, "_Z11UTIL_SparksRK6Vector", UTIL_Sparks), - HOOK_SYMBOLDEF(0x01DC4A90, "_Z13UTIL_RicochetRK6Vectorf", UTIL_Ricochet), - //HOOK_SYMBOLDEF(0x01DC4AF0, "_Z15UTIL_TeamsMatchPKcS0_", UTIL_TeamsMatch), - //HOOK_SYMBOLDEF(0x01DC4B30, "_Z19UTIL_StringToVectorPfPKc", UTIL_StringToVector), - HOOK_SYMBOLDEF(0x01DC4BB0, "_Z21UTIL_StringToIntArrayPiiPKc", UTIL_StringToIntArray), - //HOOK_SYMBOLDEF(0x01DC4C40, "_Z21UTIL_ClampVectorToBoxRK6VectorS1_", UTIL_ClampVectorToBox), // NOXREF - //HOOK_SYMBOLDEF(0x01DC4D80, "_Z15UTIL_WaterLevelRK6Vectorff", UTIL_WaterLevel), // NOXREF - HOOK_SYMBOLDEF(0x01DC4E50, "_Z12UTIL_Bubbles6VectorS_i", UTIL_Bubbles), - HOOK_SYMBOLDEF(0x01DC5010, "_Z16UTIL_BubbleTrail6VectorS_i", UTIL_BubbleTrail), - HOOK_SYMBOLDEF(0x01DC5290, "_Z11UTIL_RemoveP11CBaseEntity", UTIL_Remove), - //HOOK_SYMBOLDEF(0x01DC52D0, "_Z18UTIL_IsValidEntityP7edict_s", UTIL_IsValidEntity), // NOXREF - HOOK_SYMBOLDEF(0x01DC5300, "_Z18UTIL_PrecacheOtherPKc", UTIL_PrecacheOther), - HOOK_SYMBOLDEF(0x01DC5380, "_Z14UTIL_LogPrintfPcz", UTIL_LogPrintf), - //HOOK_SYMBOLDEF(0x01DC53B0, "_Z14UTIL_DotPointsRK6VectorS1_S1_", UTIL_DotPoints), // NOXREF - //HOOK_SYMBOLDEF(0x01DC5430, "_Z15UTIL_StripTokenPKcPc", UTIL_StripToken), - //HOOK_SYMBOLDEF(0x01DC5470, "_ZN18CSaveRestoreBufferC2Ev", (MethodThunk::Constructor), void()), // NOXREF - //HOOK_SYMBOLDEF(0x01DC5480, "_ZN18CSaveRestoreBufferC2EP13saverestore_s", (MethodThunk::Constructor), void(SAVERESTOREDATA *)), // NOXREF - //HOOK_SYMBOLDEF(0x01DC5490, "_ZN18CSaveRestoreBufferD2Ev", CSaveRestoreBuffer::~CSaveRestoreBuffer), // NOXREF - HOOK_SYMBOLDEF(0x01DC54A0, "_ZN18CSaveRestoreBuffer11EntityIndexEP11CBaseEntity", CSaveRestoreBuffer::EntityIndex, int (CBaseEntity *)), - //HOOK_SYMBOLDEF(0x01DC54F0, "_ZN18CSaveRestoreBuffer11EntityIndexEP7edict_s", CSaveRestoreBuffer::EntityIndex, int (entvars_t *)), // NOXREF - //HOOK_SYMBOLDEF(0x01DC5540, "_ZN18CSaveRestoreBuffer11EntityIndexEi", CSaveRestoreBuffer::EntityIndex, int (EOFFSET)), // NOXREF - HOOK_SYMBOLDEF(0x01DC5590, "_ZN18CSaveRestoreBuffer11EntityIndexEP9entvars_s", CSaveRestoreBuffer::EntityIndex, int (edict_t *)), - //HOOK_SYMBOLDEF(0x01DC55D0, "_ZN18CSaveRestoreBuffer15EntityFromIndexEi", CSaveRestoreBuffer::EntityFromIndex), // NOXREF - HOOK_SYMBOLDEF(0x01DC5610, "_ZN18CSaveRestoreBuffer14EntityFlagsSetEii", CSaveRestoreBuffer::EntityFlagsSet), - //HOOK_SYMBOLDEF(0x01DC5660, "_ZN18CSaveRestoreBuffer12BufferRewindEi", CSaveRestoreBuffer::BufferRewind), // NOXREF - //HOOK_SYMBOLDEF(0x01DC5690, "_ZN18CSaveRestoreBuffer10HashStringEPKc", CSaveRestoreBuffer::HashString), // NOXREF - HOOK_SYMBOLDEF(0x01DC56B0, "_ZN18CSaveRestoreBuffer9TokenHashEPKc", CSaveRestoreBuffer::TokenHash), - //HOOK_SYMBOLDEF(0x01DC57C0, "_ZN5CSave9WriteDataEPKciS1_", CSave::WriteData), // NOXREF - //HOOK_SYMBOLDEF(0x01DC58F0, "_ZN5CSave10WriteShortEPKcPKsi", CSave::WriteShort), // NOXREF - //HOOK_SYMBOLDEF(0x01DC5A30, "_ZN5CSave8WriteIntEPKcPKii", CSave::WriteInt), // NOXREF - //HOOK_SYMBOLDEF(0x01DC5B70, "_ZN5CSave10WriteFloatEPKcPKfi", CSave::WriteFloat), // NOXREF - //HOOK_SYMBOLDEF(0x01DC5CB0, "_ZN5CSave9WriteTimeEPKcPKfi", CSave::WriteTime), // NOXREF - //HOOK_SYMBOLDEF(0x01DC5DF0, "_ZN5CSave11WriteStringEPKcS1_", CSave::WriteString, void(const char *, const char *)), // NOXREF - //HOOK_SYMBOLDEF(0x01DC5F30, "_ZN5CSave11WriteStringEPKcPKii", CSave::WriteString, void(const char *, const int *, int)), // NOXREF - //HOOK_SYMBOLDEF(0x01DC60C0, "_ZN5CSave11WriteVectorEPKcRK6Vector", CSave::WriteVector, void(const char *, const Vector &)), // NOXREF - //HOOK_SYMBOLDEF(0x01DC61E0, "_ZN5CSave11WriteVectorEPKcPKfi", CSave::WriteVector, void(const char *, const float *, int)), // NOXREF - //HOOK_SYMBOLDEF(0x01DC6310, "_ZN5CSave19WritePositionVectorEPKcRK6Vector", CSave::WritePositionVector, void(const char *, const Vector &)), // NOXREF - //HOOK_SYMBOLDEF(0x01DC64F0, "_ZN5CSave19WritePositionVectorEPKcPKfi", CSave::WritePositionVector, void(const char *, const float *, int)), // NOXREF - //HOOK_SYMBOLDEF(0x01DC6670, "_ZN5CSave13WriteFunctionEPKcPPvi", CSave::WriteFunction), // NOXREF - HOOK_SYMBOLDEF(0x01DC67E0, "_Z15EntvarsKeyvalueP9entvars_sP14KeyValueData_s", EntvarsKeyvalue), - HOOK_SYMBOLDEF(0x01DC6990, "_ZN5CSave12WriteEntVarsEPKcP9entvars_s", CSave::WriteEntVars), - HOOK_SYMBOLDEF(0x01DC69B0, "_ZN5CSave11WriteFieldsEPKcPvP15TYPEDESCRIPTIONi", CSave::WriteFields), - //HOOK_SYMBOLDEF(0x01DC6E60, "_ZN5CSave12BufferStringEPci", CSave::BufferString), // NOXREF - //HOOK_SYMBOLDEF(0x01DC6F20, "_ZN5CSave9DataEmptyEPKci", CSave::DataEmpty), // NOXREF - HOOK_SYMBOLDEF(0x01DC6F50, "_ZN5CSave11BufferFieldEPKciS1_", CSave::BufferField), - HOOK_SYMBOLDEF(0x01DC7080, "_ZN5CSave12BufferHeaderEPKci", CSave::BufferHeader), - HOOK_SYMBOLDEF(0x01DC7150, "_ZN5CSave10BufferDataEPKci", CSave::BufferData), - HOOK_SYMBOLDEF(0x01DC71C0, "_ZN8CRestore9ReadFieldEPvP15TYPEDESCRIPTIONiiiPcS0_", CRestore::ReadField), - HOOK_SYMBOLDEF(0x01DC7610, "_ZN8CRestore11ReadEntVarsEPKcP9entvars_s", CRestore::ReadEntVars), - HOOK_SYMBOLDEF(0x01DC7630, "_ZN8CRestore10ReadFieldsEPKcPvP15TYPEDESCRIPTIONi", CRestore::ReadFields), - HOOK_SYMBOLDEF(0x01DC78D0, "_ZN8CRestore10ReadFieldsEPKcPvP15TYPEDESCRIPTIONi", CRestore::Empty), - //HOOK_SYMBOLDEF(0x01DC78F0, "_ZN8CRestore16BufferReadHeaderEP6HEADER", CRestore::BufferReadHeader), // NOXREF - //HOOK_SYMBOLDEF(0x01DC7A20, "_ZN8CRestore9ReadShortEv", CRestore::ReadShort), // NOXREF - //HOOK_SYMBOLDEF(0x01DC7A90, "_ZN8CRestore7ReadIntEv", CRestore::ReadInt), // NOXREF - //HOOK_SYMBOLDEF(0x01DC7AF0, "_ZN8CRestore12ReadNamedIntEPKc", CRestore::ReadNamedInt), // NOXREF - //HOOK_SYMBOLDEF(0x01DC7C10, "_ZN8CRestore15ReadNamedStringEPKc", CRestore::ReadNamedString), // NOXREF - //HOOK_SYMBOLDEF(0x01DC7D30, "_ZN8CRestore13BufferPointerEv", CRestore::BufferPointer), // NOXREF - //HOOK_SYMBOLDEF(0x01DC7D40, "_ZN8CRestore15BufferReadBytesEPci", CRestore::BufferReadBytes), - //HOOK_SYMBOLDEF(0x01DC7DC0, "_ZN8CRestore15BufferSkipBytesEi", CRestore::BufferSkipBytes), // NOXREF - //HOOK_SYMBOLDEF(0x01DC7E20, "_ZN8CRestore17BufferSkipZStringEv", CRestore::BufferSkipZString), // NOXREF - //HOOK_SYMBOLDEF(0x01DC7EA0, "_ZN8CRestore18BufferCheckZStringEPKc", CRestore::BufferCheckZString), // NOXREF - HOOK_SYMBOLDEF(0x01DC7EF0, "_Z15UTIL_TextureHitP11TraceResult6VectorS1_", UTIL_TextureHit), - //HOOK_DEF(0x01DC8000, GetPlayerTeam), // NOXREF - HOOK_SYMBOLDEF(0x01DC8040, "_Z11UTIL_IsGamePKc", UTIL_IsGame), - HOOK_SYMBOLDEF(0x01DC8090, "_Z21UTIL_GetPlayerGaitYawi", UTIL_GetPlayerGaitYaw), - HOOK_SYMBOLDEF(0x01D630B0, "_ZN7EHANDLE3GetEv", EHANDLE::Get), - //HOOK_SYMBOLDEF(0x01D630D0, "_ZN7EHANDLE3SetEP7edict_s", EHANDLE::Set), // NOXREF - //HOOK_SYMBOLDEF(0x01D630F0, "_ZN7EHANDLEcvP11CBaseEntityEv", EHANDLE::operator CBaseEntity*), // don't take the address - //HOOK_SYMBOLDEF(0x01D63110, "_ZN7EHANDLEaSEP11CBaseEntity", EHANDLE::CBaseEntity *operator=), // don't take the address - //HOOK_SYMBOLDEF(0x01D63140, "_ZN7EHANDLEcviEv", EHANDLE::operator int), // don't take the address - //HOOK_SYMBOLDEF(0x01D63170, "_ZN7EHANDLEptEv", EHANDLE::CBaseEntity *operator->), // don't take the address - -#endif // Util_Region - -#ifndef WeaponType_Region - - HOOK_SYMBOLDEF(0x01D01000, "_Z15AliasToWeaponIDPKc", AliasToWeaponID), - HOOK_SYMBOLDEF(0x01D01050, "_Z18BuyAliasToWeaponIDPKcR12WeaponIdType", BuyAliasToWeaponID), - HOOK_SYMBOLDEF(0x01D010C0, "_Z15WeaponIDToAliasi", WeaponIDToAlias), - HOOK_SYMBOLDEF(0x01D010F0, "_Z18AliasToWeaponClassPKc", AliasToWeaponClass), - HOOK_SYMBOLDEF(0x01D01140, "_Z21WeaponIDToWeaponClassi", WeaponIDToWeaponClass), - HOOK_SYMBOLDEF(0x01D011C0, "_Z15IsPrimaryWeaponi", IsPrimaryWeapon), - //HOOK_SYMBOLDEF(0x01D01250, "_Z17IsSecondaryWeaponi", IsSecondaryWeapon), // NOXREF - HOOK_SYMBOLDEF(0x01D012A0, "_Z13GetWeaponInfoi", GetWeaponInfo, WeaponInfoStruct *(int)), - HOOK_SYMBOLDEF(0x01D012E0, "_Z21CanBuyWeaponByMaptypei12WeaponIdTypeb", CanBuyWeaponByMaptype), - -#endif // WeaponType_Region - -#ifndef GameRules_Region - - HOOK_SYMBOLDEF(0x01D80C90, "_Z16InstallGameRulesv", InstallGameRules), // HOOK: FIX ME - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D80C00, CHalfLifeMultiplay, "_ZN10CGameRules16RefreshSkillDataEv", CGameRules::RefreshSkillData), - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8EBB0, CHalfLifeMultiplay, "_ZN10CGameRules10IsTeamplayEv", CGameRules::IsTeamplay), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8EBC0, CHalfLifeMultiplay, "_ZN10CGameRules18GetGameDescriptionEv", CGameRules::GetGameDescription), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8EBD0, CHalfLifeMultiplay, "_ZN10CGameRules14UpdateGameModeEP11CBasePlayer", CGameRules::UpdateGameMode), // PURE - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8EBE0, CHalfLifeMultiplay, "_ZN10CGameRules20FPlayerCanTakeDamageEP11CBasePlayerP11CBaseEntity", CGameRules::FPlayerCanTakeDamage), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8EBF0, CHalfLifeMultiplay, "_ZN10CGameRules13ShouldAutoAimEP11CBasePlayerP7edict_s", CGameRules::ShouldAutoAim), // DEFAULT - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D80A60, CHalfLifeMultiplay, "_ZN10CGameRules18GetPlayerSpawnSpotEP11CBasePlayer", CGameRules::GetPlayerSpawnSpot), - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8EC00, CHalfLifeMultiplay, "_ZN10CGameRules24AllowAutoTargetCrosshairEv", CGameRules::AllowAutoTargetCrosshair), // DEFAULT - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8EC10, CHalfLifeMultiplay, "_ZN10CGameRules25ClientCommand_DeadOrAliveEP11CBasePlayerPKc", CGameRules::ClientCommand_DeadOrAlive), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8EC60, CHalfLifeMultiplay, "_ZN10CGameRules13ClientCommandEP11CBasePlayerPKc", CGameRules::ClientCommand), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8EC70, CHalfLifeMultiplay, "_ZN10CGameRules21ClientUserInfoChangedEP11CBasePlayerPc", CGameRules::ClientUserInfoChanged), // PURE - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D80B60, CHalfLifeMultiplay, "_ZN10CGameRules17CanHavePlayerItemEP11CBasePlayerP15CBasePlayerItem", CGameRules::CanHavePlayerItem), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D80A20, CHalfLifeMultiplay, "_ZN10CGameRules11CanHaveAmmoEP11CBasePlayerPKci", CGameRules::CanHaveAmmo), - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8EC80, CHalfLifeMultiplay, "_ZN10CGameRules24FlHEVChargerRechargeTimeEv", CGameRules::FlHEVChargerRechargeTime), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8EC90, CHalfLifeMultiplay, "_ZN10CGameRules12GetTeamIndexEPKc", CGameRules::GetTeamIndex), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8ED40, CHalfLifeMultiplay, "_ZN10CGameRules18GetIndexedTeamNameEi", CGameRules::GetIndexedTeamName), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8ED50, CHalfLifeMultiplay, "_ZN10CGameRules11IsValidTeamEPKc", CGameRules::IsValidTeam), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8ED60, CHalfLifeMultiplay, "_ZN10CGameRules16ChangePlayerTeamEP11CBasePlayerPKcii", CGameRules::ChangePlayerTeam), // PURE - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8ED70, CHalfLifeMultiplay, "_ZN10CGameRules20SetDefaultPlayerTeamEP11CBasePlayer", CGameRules::SetDefaultPlayerTeam), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8ED80, CHalfLifeMultiplay, "_ZN10CGameRules17PlayTextureSoundsEv", CGameRules::PlayTextureSounds), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8ED90, CHalfLifeMultiplay, "_ZN10CGameRules18EndMultiplayerGameEv", CGameRules::EndMultiplayerGame), // PURE - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8EDA0, CHalfLifeMultiplay, "_ZN10CGameRules14IsFreezePeriodEv", CGameRules::IsFreezePeriod), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8EDB0, CHalfLifeMultiplay, "_ZN10CGameRules16ServerDeactivateEv", CGameRules::ServerDeactivate), // PURE - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D8EDC0, CHalfLifeMultiplay, "_ZN10CGameRules18CheckMapConditionsEv", CGameRules::CheckMapConditions), // PURE - -#endif // GameRules_Region - -#ifndef Singleplay_GameRules_Region - - //HOOK_DEF(0x01DB6730, MethodThunk::Constructor), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6750, "_ZN14CHalfLifeRules5ThinkEv", CHalfLifeRules::Think), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6AF0, "_ZN14CHalfLifeRules16IsAllowedToSpawnEP11CBaseEntity", CHalfLifeRules::IsAllowedToSpawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6BB0, "_ZN14CHalfLifeRules16FAllowFlashlightEv", CHalfLifeRules::FAllowFlashlight), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6790, "_ZN14CHalfLifeRules19FShouldSwitchWeaponEP11CBasePlayerP15CBasePlayerItem", CHalfLifeRules::FShouldSwitchWeapon), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB67C0, "_ZN14CHalfLifeRules17GetNextBestWeaponEP11CBasePlayerP15CBasePlayerItem", CHalfLifeRules::GetNextBestWeapon), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6760, "_ZN14CHalfLifeRules13IsMultiplayerEv", CHalfLifeRules::IsMultiplayer), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6770, "_ZN14CHalfLifeRules12IsDeathmatchEv", CHalfLifeRules::IsDeathmatch), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6780, "_ZN14CHalfLifeRules6IsCoOpEv", CHalfLifeRules::IsCoOp), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB67D0, "_ZN14CHalfLifeRules15ClientConnectedEP7edict_sPKcS3_Pc", CHalfLifeRules::ClientConnected), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB67E0, "_ZN14CHalfLifeRules7InitHUDEP11CBasePlayer", CHalfLifeRules::InitHUD), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB67F0, "_ZN14CHalfLifeRules18ClientDisconnectedEP7edict_s", CHalfLifeRules::ClientDisconnected), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6800, "_ZN14CHalfLifeRules18FlPlayerFallDamageEP11CBasePlayer", CHalfLifeRules::FlPlayerFallDamage), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6820, "_ZN14CHalfLifeRules11PlayerSpawnEP11CBasePlayer", CHalfLifeRules::PlayerSpawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB68A0, "_ZN14CHalfLifeRules11PlayerThinkEP11CBasePlayer", CHalfLifeRules::PlayerThink), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB68B0, "_ZN14CHalfLifeRules17FPlayerCanRespawnEP11CBasePlayer", CHalfLifeRules::FPlayerCanRespawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB68C0, "_ZN14CHalfLifeRules17FlPlayerSpawnTimeEP11CBasePlayer", CHalfLifeRules::FlPlayerSpawnTime), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6960, "_ZN14CHalfLifeRules18GetPlayerSpawnSpotEP11CBasePlayer", CHalfLifeRules::GetPlayerSpawnSpot), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6890, "_ZN14CHalfLifeRules24AllowAutoTargetCrosshairEv", CHalfLifeRules::AllowAutoTargetCrosshair), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB68D0, "_ZN14CHalfLifeRules14IPointsForKillEP11CBasePlayerS1_", CHalfLifeRules::IPointsForKill), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB68E0, "_ZN14CHalfLifeRules12PlayerKilledEP11CBasePlayerP9entvars_sS3_", CHalfLifeRules::PlayerKilled), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB68F0, "_ZN14CHalfLifeRules11DeathNoticeEP11CBasePlayerP9entvars_sS3_", CHalfLifeRules::DeathNotice), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6900, "_ZN14CHalfLifeRules15PlayerGotWeaponEP11CBasePlayerP15CBasePlayerItem", CHalfLifeRules::PlayerGotWeapon), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6A70, "_ZN14CHalfLifeRules19WeaponShouldRespawnEP15CBasePlayerItem", CHalfLifeRules::WeaponShouldRespawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6910, "_ZN14CHalfLifeRules19FlWeaponRespawnTimeEP15CBasePlayerItem", CHalfLifeRules::FlWeaponRespawnTime), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6920, "_ZN14CHalfLifeRules18FlWeaponTryRespawnEP15CBasePlayerItem", CHalfLifeRules::FlWeaponTryRespawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6930, "_ZN14CHalfLifeRules20VecWeaponRespawnSpotEP15CBasePlayerItem", CHalfLifeRules::VecWeaponRespawnSpot), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6A80, "_ZN14CHalfLifeRules11CanHaveItemEP11CBasePlayerP5CItem", CHalfLifeRules::CanHaveItem), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6A90, "_ZN14CHalfLifeRules13PlayerGotItemEP11CBasePlayerP5CItem", CHalfLifeRules::PlayerGotItem), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6AA0, "_ZN14CHalfLifeRules17ItemShouldRespawnEP5CItem", CHalfLifeRules::ItemShouldRespawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6AB0, "_ZN14CHalfLifeRules17FlItemRespawnTimeEP5CItem", CHalfLifeRules::FlItemRespawnTime), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6AC0, "_ZN14CHalfLifeRules18VecItemRespawnSpotEP5CItem", CHalfLifeRules::VecItemRespawnSpot), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6B00, "_ZN14CHalfLifeRules13PlayerGotAmmoEP11CBasePlayerPci", CHalfLifeRules::PlayerGotAmmo), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6B10, "_ZN14CHalfLifeRules17AmmoShouldRespawnEP15CBasePlayerAmmo", CHalfLifeRules::AmmoShouldRespawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6B20, "_ZN14CHalfLifeRules17FlAmmoRespawnTimeEP15CBasePlayerAmmo", CHalfLifeRules::FlAmmoRespawnTime), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6B30, "_ZN14CHalfLifeRules18VecAmmoRespawnSpotEP15CBasePlayerAmmo", CHalfLifeRules::VecAmmoRespawnSpot), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6B60, "_ZN14CHalfLifeRules27FlHealthChargerRechargeTimeEv", CHalfLifeRules::FlHealthChargerRechargeTime), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6B70, "_ZN14CHalfLifeRules17DeadPlayerWeaponsEP11CBasePlayer", CHalfLifeRules::DeadPlayerWeapons), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6B80, "_ZN14CHalfLifeRules14DeadPlayerAmmoEP11CBasePlayer", CHalfLifeRules::DeadPlayerAmmo), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6BC0, "_ZN14CHalfLifeRules9GetTeamIDEP11CBaseEntity", CHalfLifeRules::GetTeamID), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6B90, "_ZN14CHalfLifeRules18PlayerRelationshipEP11CBasePlayerP11CBaseEntity", CHalfLifeRules::PlayerRelationship), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DB6BA0, "_ZN14CHalfLifeRules14FAllowMonstersEv", CHalfLifeRules::FAllowMonsters), - -#endif // Singleplay_GameRules_Region - -#ifndef Multiplay_GameRules_Region - -//CHalfLifeMultiplay - // virtual func - //HOOK_SYMBOLDEF(0x01D8B8A0, "_ZN18CHalfLifeMultiplayC2Ev", CHalfLifeMultiplay::CHalfLifeMultiplay), // constuctor - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8BF00, "_ZN18CHalfLifeMultiplay16RefreshSkillDataEv", CHalfLifeMultiplay::RefreshSkillData), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8F420, "_ZN18CHalfLifeMultiplay5ThinkEv", CHalfLifeMultiplay::Think), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D921D0, "_ZN18CHalfLifeMultiplay16IsAllowedToSpawnEP11CBaseEntity", CHalfLifeMultiplay::IsAllowedToSpawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92410, "_ZN18CHalfLifeMultiplay16FAllowFlashlightEv", CHalfLifeMultiplay::FAllowFlashlight), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D909E0, "_ZN18CHalfLifeMultiplay19FShouldSwitchWeaponEP11CBasePlayerP15CBasePlayerItem", CHalfLifeMultiplay::FShouldSwitchWeapon), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D90A70, "_ZN18CHalfLifeMultiplay17GetNextBestWeaponEP11CBasePlayerP15CBasePlayerItem", CHalfLifeMultiplay::GetNextBestWeapon), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D909B0, "_ZN18CHalfLifeMultiplay13IsMultiplayerEv", CHalfLifeMultiplay::IsMultiplayer), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D909C0, "_ZN18CHalfLifeMultiplay12IsDeathmatchEv", CHalfLifeMultiplay::IsDeathmatch), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D909D0, "_ZN18CHalfLifeMultiplay6IsCoOpEv", CHalfLifeMultiplay::IsCoOp), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D90B60, "_ZN18CHalfLifeMultiplay15ClientConnectedEP7edict_sPKcS3_Pc", CHalfLifeMultiplay::ClientConnected), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D90BC0, "_ZN18CHalfLifeMultiplay7InitHUDEP11CBasePlayer", CHalfLifeMultiplay::InitHUD), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D910E0, "_ZN18CHalfLifeMultiplay18ClientDisconnectedEP7edict_s", CHalfLifeMultiplay::ClientDisconnected), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D90B80, "_ZN18CHalfLifeMultiplay14UpdateGameModeEP11CBasePlayer", CHalfLifeMultiplay::UpdateGameMode), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D91360, "_ZN18CHalfLifeMultiplay18FlPlayerFallDamageEP11CBasePlayer", CHalfLifeMultiplay::FlPlayerFallDamage), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D91390, "_ZN18CHalfLifeMultiplay20FPlayerCanTakeDamageEP11CBasePlayerP11CBaseEntity", CHalfLifeMultiplay::FPlayerCanTakeDamage), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D91560, "_ZN18CHalfLifeMultiplay11PlayerSpawnEP11CBasePlayer", CHalfLifeMultiplay::PlayerSpawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D913E0, "_ZN18CHalfLifeMultiplay11PlayerThinkEP11CBasePlayer", CHalfLifeMultiplay::PlayerThink), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D915F0, "_ZN18CHalfLifeMultiplay17FPlayerCanRespawnEP11CBasePlayer", CHalfLifeMultiplay::FPlayerCanRespawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D916C0, "_ZN18CHalfLifeMultiplay17FlPlayerSpawnTimeEP11CBasePlayer", CHalfLifeMultiplay::FlPlayerSpawnTime), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92280, "_ZN18CHalfLifeMultiplay18GetPlayerSpawnSpotEP11CBasePlayer", CHalfLifeMultiplay::GetPlayerSpawnSpot), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D916D0, "_ZN18CHalfLifeMultiplay24AllowAutoTargetCrosshairEv", CHalfLifeMultiplay::AllowAutoTargetCrosshair), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D90B30, "_ZN18CHalfLifeMultiplay25ClientCommand_DeadOrAliveEP11CBasePlayerPKc", CHalfLifeMultiplay::ClientCommand_DeadOrAlive), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D90B50, "_ZN18CHalfLifeMultiplay13ClientCommandEP11CBasePlayerPKc", CHalfLifeMultiplay::ClientCommand), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D93660, "_ZN18CHalfLifeMultiplay21ClientUserInfoChangedEP11CBasePlayerPc", CHalfLifeMultiplay::ClientUserInfoChanged), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D916E0, "_ZN18CHalfLifeMultiplay14IPointsForKillEP11CBasePlayerS1_", CHalfLifeMultiplay::IPointsForKill), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D916F0, "_ZN18CHalfLifeMultiplay12PlayerKilledEP11CBasePlayerP9entvars_sS3_", CHalfLifeMultiplay::PlayerKilled), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D91BE0, "_ZN18CHalfLifeMultiplay11DeathNoticeEP11CBasePlayerP9entvars_sS3_", CHalfLifeMultiplay::DeathNotice), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92130, "_ZN18CHalfLifeMultiplay17CanHavePlayerItemEP11CBasePlayerP15CBasePlayerItem", CHalfLifeMultiplay::CanHavePlayerItem), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D92060, "_ZN18CHalfLifeMultiplay15PlayerGotWeaponEP11CBasePlayerP15CBasePlayerItem", CHalfLifeMultiplay::PlayerGotWeapon), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92110, "_ZN18CHalfLifeMultiplay19WeaponShouldRespawnEP15CBasePlayerItem", CHalfLifeMultiplay::WeaponShouldRespawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92070, "_ZN18CHalfLifeMultiplay19FlWeaponRespawnTimeEP15CBasePlayerItem", CHalfLifeMultiplay::FlWeaponRespawnTime), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92080, "_ZN18CHalfLifeMultiplay18FlWeaponTryRespawnEP15CBasePlayerItem", CHalfLifeMultiplay::FlWeaponTryRespawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D920E0, "_ZN18CHalfLifeMultiplay20VecWeaponRespawnSpotEP15CBasePlayerItem", CHalfLifeMultiplay::VecWeaponRespawnSpot), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92140, "_ZN18CHalfLifeMultiplay11CanHaveItemEP11CBasePlayerP5CItem", CHalfLifeMultiplay::CanHaveItem), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92150, "_ZN18CHalfLifeMultiplay13PlayerGotItemEP11CBasePlayerP5CItem", CHalfLifeMultiplay::PlayerGotItem), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92160, "_ZN18CHalfLifeMultiplay17ItemShouldRespawnEP5CItem", CHalfLifeMultiplay::ItemShouldRespawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92180, "_ZN18CHalfLifeMultiplay17FlItemRespawnTimeEP5CItem", CHalfLifeMultiplay::FlItemRespawnTime), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92190, "_ZN18CHalfLifeMultiplay18VecItemRespawnSpotEP5CItem", CHalfLifeMultiplay::VecItemRespawnSpot), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D921C0, "_ZN18CHalfLifeMultiplay13PlayerGotAmmoEP11CBasePlayerPci", CHalfLifeMultiplay::PlayerGotAmmo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D921E0, "_ZN18CHalfLifeMultiplay17AmmoShouldRespawnEP15CBasePlayerAmmo", CHalfLifeMultiplay::AmmoShouldRespawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92200, "_ZN18CHalfLifeMultiplay17FlAmmoRespawnTimeEP15CBasePlayerAmmo", CHalfLifeMultiplay::FlAmmoRespawnTime), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92210, "_ZN18CHalfLifeMultiplay18VecAmmoRespawnSpotEP15CBasePlayerAmmo", CHalfLifeMultiplay::VecAmmoRespawnSpot), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92240, "_ZN18CHalfLifeMultiplay27FlHealthChargerRechargeTimeEv", CHalfLifeMultiplay::FlHealthChargerRechargeTime), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92250, "_ZN18CHalfLifeMultiplay24FlHEVChargerRechargeTimeEv", CHalfLifeMultiplay::FlHEVChargerRechargeTime), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92260, "_ZN18CHalfLifeMultiplay17DeadPlayerWeaponsEP11CBasePlayer", CHalfLifeMultiplay::DeadPlayerWeapons), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92270, "_ZN18CHalfLifeMultiplay14DeadPlayerAmmoEP11CBasePlayer", CHalfLifeMultiplay::DeadPlayerAmmo), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D8EDD0, "_ZN18CHalfLifeMultiplay9GetTeamIDEP11CBaseEntity", CHalfLifeMultiplay::GetTeamID), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D922D0, "_ZN18CHalfLifeMultiplay18PlayerRelationshipEP11CBasePlayerP11CBaseEntity", CHalfLifeMultiplay::PlayerRelationship), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D8EDE0, "_ZN18CHalfLifeMultiplay17PlayTextureSoundsEv", CHalfLifeMultiplay::PlayTextureSounds), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92450, "_ZN18CHalfLifeMultiplay14FAllowMonstersEv", CHalfLifeMultiplay::FAllowMonsters), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D8EE20, "_ZN18CHalfLifeMultiplay18EndMultiplayerGameEv", CHalfLifeMultiplay::EndMultiplayerGame), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8B4B0, "_ZN18CHalfLifeMultiplay16ServerDeactivateEv", CHalfLifeMultiplay::ServerDeactivate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8DFD0, "_ZN18CHalfLifeMultiplay18CheckMapConditionsEv", CHalfLifeMultiplay::CheckMapConditions), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8C050, "_ZN18CHalfLifeMultiplay10CleanUpMapEv", CHalfLifeMultiplay::CleanUpMap), - // HOOK_SYMBOL_VIRTUAL_DEF(0x01D8E0A0, "_ZN18CHalfLifeMultiplay12RestartRoundEv", CHalfLifeMultiplay::RestartRound), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8CAF0, "_ZN18CHalfLifeMultiplay18CheckWinConditionsEv", CHalfLifeMultiplay::CheckWinConditions), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8BF60, "_ZN18CHalfLifeMultiplay10RemoveGunsEv", CHalfLifeMultiplay::RemoveGuns), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8C340, "_ZN18CHalfLifeMultiplay6GiveC4Ev", CHalfLifeMultiplay::GiveC4), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D93270, "_ZN18CHalfLifeMultiplay11ChangeLevelEv", CHalfLifeMultiplay::ChangeLevel), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D92480, "_ZN18CHalfLifeMultiplay16GoToIntermissionEv", CHalfLifeMultiplay::GoToIntermission), - // non-virtual func - HOOK_SYMBOLDEF(0x01D8B4A0, "_ZN18CHalfLifeMultiplay8IsCareerEv", CHalfLifeMultiplay::IsCareer), - HOOK_SYMBOLDEF(0x01D8C800, "_ZN18CHalfLifeMultiplay23QueueCareerRoundEndMenuEfi", CHalfLifeMultiplay::QueueCareerRoundEndMenu), - //HOOK_SYMBOLDEF(0x01D8B470, "_ZN18CHalfLifeMultiplay19SetCareerMatchLimitEii", CHalfLifeMultiplay::SetCareerMatchLimit), // NOXREF - //HOOK_SYMBOLDEF(0x01D8B310, "_ZN18CHalfLifeMultiplay15IsInCareerRoundEv", CHalfLifeMultiplay::IsInCareerRound), // NOXREF - //HOOK_SYMBOLDEF(0x01D908F0, "_ZN18CHalfLifeMultiplay13CareerRestartEv", CHalfLifeMultiplay::CareerRestart), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN18CHalfLifeMultiplay16PlayerJoinedTeamEP11CBasePlayer", CHalfLifeMultiplay::PlayerJoinedTeam), // NOXREF - HOOK_SYMBOLDEF(0x01D8EC20, "_ZN18CHalfLifeMultiplay8TeamFullEi", CHalfLifeMultiplay::TeamFull), - HOOK_SYMBOLDEF(0x01D8ECA0, "_ZN18CHalfLifeMultiplay11TeamStackedEii", CHalfLifeMultiplay::TeamStacked), - HOOK_SYMBOLDEF(0x01D8EE30, "_ZN18CHalfLifeMultiplay15IsVIPQueueEmptyEv", CHalfLifeMultiplay::IsVIPQueueEmpty), - HOOK_SYMBOLDEF(0x01D8EEA0, "_ZN18CHalfLifeMultiplay13AddToVIPQueueEP11CBasePlayer", CHalfLifeMultiplay::AddToVIPQueue), - HOOK_SYMBOLDEF(0x01D8F0D0, "_ZN18CHalfLifeMultiplay11PickNextVIPEv", CHalfLifeMultiplay::PickNextVIP), - //HOOK_SYMBOLDEF(0x01D90790, "_ZN18CHalfLifeMultiplay19HasRoundTimeExpiredEv", CHalfLifeMultiplay::HasRoundTimeExpired), // NOXREF - //HOOK_SYMBOLDEF(0x01D90820, "_ZN18CHalfLifeMultiplay13IsBombPlantedEv", CHalfLifeMultiplay::IsBombPlanted), // NOXREF - //HOOK_SYMBOLDEF(0x01D90860, "_ZN18CHalfLifeMultiplay51MarkLivingPlayersOnTeamAsNotReceivingMoneyNextRoundEi", CHalfLifeMultiplay::MarkLivingPlayersOnTeamAsNotReceivingMoneyNextRound), // NOXREF - HOOK_SYMBOLDEF(0x01D8EDF0, "_ZN18CHalfLifeMultiplay13StackVIPQueueEv", CHalfLifeMultiplay::StackVIPQueue), - HOOK_SYMBOLDEF(0x01D8EFA0, "_ZN18CHalfLifeMultiplay15ResetCurrentVIPEv", CHalfLifeMultiplay::ResetCurrentVIP), - HOOK_SYMBOLDEF(0x01D8DDB0, "_ZN18CHalfLifeMultiplay12BalanceTeamsEv", CHalfLifeMultiplay::BalanceTeams), - //HOOK_SYMBOLDEF(0x01D8DC40, "_ZN18CHalfLifeMultiplay14SwapAllPlayersEv", CHalfLifeMultiplay::SwapAllPlayers), // NOXREF - //HOOK_SYMBOLDEF(0x01D8BFE0, "_ZN18CHalfLifeMultiplay16UpdateTeamScoresEv", CHalfLifeMultiplay::UpdateTeamScores), // NOXREF - HOOK_SYMBOLDEF(0x01D92DB0, "_ZN18CHalfLifeMultiplay11DisplayMapsEP11CBasePlayeri", CHalfLifeMultiplay::DisplayMaps), - //HOOK_SYMBOLDEF(0x01D92BF0, "_ZN18CHalfLifeMultiplay16ResetAllMapVotesEv", CHalfLifeMultiplay::ResetAllMapVotes), // NOXREF - HOOK_SYMBOLDEF(0x01D93080, "_ZN18CHalfLifeMultiplay14ProcessMapVoteEP11CBasePlayeri", CHalfLifeMultiplay::ProcessMapVote), - HOOK_SYMBOLDEF(0x01D8EAC0, "_ZN18CHalfLifeMultiplay14IsThereABomberEv", CHalfLifeMultiplay::IsThereABomber), - HOOK_SYMBOLDEF(0x01D8EB50, "_ZN18CHalfLifeMultiplay12IsThereABombEv", CHalfLifeMultiplay::IsThereABomb), - //HOOK_SYMBOLDEF(0x0, "_ZN18CHalfLifeMultiplay14IsMatchStartedEv", CHalfLifeMultiplay::IsMatchStarted), // NOXREF - HOOK_SYMBOLDEF(0x01D93530, "_ZN18CHalfLifeMultiplay16SendMOTDToClientEP7edict_s", CHalfLifeMultiplay::SendMOTDToClient), - // non-class func - //HOOK_DEF(0x0, IsBotSpeaking), // NOXREF - HOOK_SYMBOLDEF(0x01D8B010, "_Z13SV_Continue_fv", SV_Continue_f), - HOOK_SYMBOLDEF(0x01D8B0C0, "_Z17SV_Tutor_Toggle_fv", SV_Tutor_Toggle_f), - HOOK_SYMBOLDEF(0x01D8B110, "_Z19SV_Career_Restart_fv", SV_Career_Restart_f), - HOOK_SYMBOLDEF(0x01D8B1F0, "_Z20SV_Career_EndRound_fv", SV_Career_EndRound_f), - HOOK_SYMBOLDEF(0x01D8B350, "_Z18SV_CareerAddTask_fv", SV_CareerAddTask_f), - HOOK_SYMBOLDEF(0x01D8B400, "_Z21SV_CareerMatchLimit_fv", SV_CareerMatchLimit_f), - HOOK_SYMBOLDEF(0x01D8B6E0, "_Z9BroadcastPKc", Broadcast), - HOOK_SYMBOLDEF(0x01D8B780, "_Z7GetTeami", GetTeam), - //HOOK_SYMBOLDEF(0x01D8B7B0, "_Z15EndRoundMessagePKci", EndRoundMessage), - //HOOK_SYMBOLDEF(0x01D8BD80, "_ZL18ReadMultiplayCvarsP18CHalfLifeMultiplay", ReadMultiplayCvars), - //HOOK_SYMBOLDEF(0x01D92670, "_Z15DestroyMapCycleP10mapcycle_s", DestroyMapCycle), // NOXREF - //HOOK_SYMBOLDEF(0x01D926B0, "_Z15MP_COM_GetTokenv", MP_COM_GetToken), - //HOOK_SYMBOLDEF(0x01D926C0, "_Z12MP_COM_ParsePc", MP_COM_Parse), - //HOOK_SYMBOLDEF(0x01D927A0, "_Z19MP_COM_TokenWaitingPc", MP_COM_TokenWaiting), // NOXREF - HOOK_SYMBOLDEF(0x01D927F0, "_Z18ReloadMapCycleFilePcP10mapcycle_s", ReloadMapCycleFile), - //HOOK_SYMBOLDEF(0x01D92AB0, "_Z12CountPlayersv", CountPlayers), // NOXREF - HOOK_SYMBOLDEF(0x01D92AF0, "_Z20ExtractCommandStringPcS_", ExtractCommandString), - HOOK_SYMBOLDEF(0x01D92D10, "_Z11GetMapCountv", GetMapCount), -//CCStrikeGameMgrHelper - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8B630, "_ZN21CCStrikeGameMgrHelper19CanPlayerHearPlayerEP11CBasePlayerS1_", CCStrikeGameMgrHelper::CanPlayerHearPlayer), -//CMapInfo - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8B5E0, "_ZN21CCStrikeGameMgrHelper19CanPlayerHearPlayerEP11CBasePlayerS1_", CMapInfo::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D8B540, "_ZN21CCStrikeGameMgrHelper19CanPlayerHearPlayerEP11CBasePlayerS1_", CMapInfo::KeyValue), -// linked objects - HOOK_DEF(0x01D8B4F0, info_map_parameters), - -#endif // Multiplay_GameRules_Region - -#ifndef Training_Gamerules_Region - -//CHalfLifeTraining - // virtual func - //HOOK_SYMBOLDEF(0x01DBBE50, "_ZN17CHalfLifeTrainingC2Ev", CHalfLifeTraining::CHalfLifeTraining) - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DBBE70, "_ZN17CHalfLifeTraining13IsMultiplayerEv", CHalfLifeTraining::IsMultiplayer), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBBE90, "_ZN17CHalfLifeTraining12IsDeathmatchEv", CHalfLifeTraining::IsDeathmatch), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBBEA0, "_ZN17CHalfLifeTraining7InitHUDEP11CBasePlayer", CHalfLifeTraining::InitHUD), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBC3E0, "_ZN17CHalfLifeTraining11PlayerSpawnEP11CBasePlayer", CHalfLifeTraining::PlayerSpawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBC010, "_ZN17CHalfLifeTraining11PlayerThinkEP11CBasePlayer", CHalfLifeTraining::PlayerThink), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBC4C0, "_ZN17CHalfLifeTraining17FPlayerCanRespawnEP11CBasePlayer", CHalfLifeTraining::FPlayerCanRespawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBBEE0, "_ZN17CHalfLifeTraining18GetPlayerSpawnSpotEP11CBasePlayer", CHalfLifeTraining::GetPlayerSpawnSpot), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBC4E0, "_ZN17CHalfLifeTraining12PlayerKilledEP11CBasePlayerP9entvars_sS3_", CHalfLifeTraining::PlayerKilled), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBC4B0, "_ZN17CHalfLifeTraining17ItemShouldRespawnEP5CItem", CHalfLifeTraining::ItemShouldRespawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DBBE80, "_ZN17CHalfLifeTraining18CheckMapConditionsEv", CHalfLifeTraining::CheckMapConditions), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBC510, "_ZN17CHalfLifeTraining18CheckWinConditionsEv", CHalfLifeTraining::CheckWinConditions), - // non-virtual func - HOOK_SYMBOLDEF(0x01DBBEB0, "_ZN17CHalfLifeTraining11HostageDiedEv", CHalfLifeTraining::HostageDied), - HOOK_SYMBOLDEF(0x01DBC4D0, "_ZN17CHalfLifeTraining12PlayerCanBuyEP11CBasePlayer", CHalfLifeTraining::PlayerCanBuy), -//CBaseGrenCatch - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBC8B0, "_ZN14CBaseGrenCatch5SpawnEv", CBaseGrenCatch::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBCC00, "_ZN14CBaseGrenCatch8KeyValueEP14KeyValueData_s", CBaseGrenCatch::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBC7F0, "_ZN14CBaseGrenCatch4SaveER5CSave", CBaseGrenCatch::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBC820, "_ZN14CBaseGrenCatch7RestoreER8CRestore", CBaseGrenCatch::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DBC8A0, "_ZN14CBaseGrenCatch10ObjectCapsEv", CBaseGrenCatch::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBC970, "_ZN14CBaseGrenCatch5ThinkEv", CBaseGrenCatch::Think), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBC930, "_ZN14CBaseGrenCatch5TouchEP11CBaseEntity", CBaseGrenCatch::Touch), -//CFuncWeaponCheck - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBCCE0, "_ZN16CFuncWeaponCheck5SpawnEv", CFuncWeaponCheck::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBCF70, "_ZN16CFuncWeaponCheck8KeyValueEP14KeyValueData_s", CFuncWeaponCheck::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBCD50, "_ZN16CFuncWeaponCheck4SaveER5CSave", CFuncWeaponCheck::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBCD80, "_ZN16CFuncWeaponCheck7RestoreER8CRestore", CFuncWeaponCheck::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DBCE00, "_ZN16CFuncWeaponCheck5TouchEP11CBaseEntity", CFuncWeaponCheck::Touch), -// linked objects - HOOK_DEF(0x01DBC850, func_grencatch), - HOOK_DEF(0x01DBCDB0, func_weaponcheck), - -#endif // Training_Gamerules_Region - -#ifndef CareerTasks_Region - -//CCareerTask - //HOOK_SYMBOLDEF(0x01DDCBD0, "_ZN11CCareerTaskC2EPKc13GameEventTypeS1_ibbib", CCareerTask::CCareerTask), - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DDD150, "_ZN11CCareerTask7OnEventE13GameEventTypeP11CBasePlayerS2_", CCareerTask::OnEvent), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DDCCD0, "_ZN11CCareerTask5ResetEv", CCareerTask::Reset), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DDDDE0, "_ZNK11CCareerTask26IsTaskCompletableThisRoundEv", CCareerTask::IsTaskCompletableThisRound), // DEFAULT - // non-virtual func - HOOK_SYMBOLDEF(0x01DDCB80, "_ZN11CCareerTask7NewTaskEPKc13GameEventTypeS1_ibbib", CCareerTask::NewTask), - HOOK_SYMBOLDEF(0x01DDCDB0, "_ZN11CCareerTask12OnWeaponKillEiibbP11CBasePlayerS1_", CCareerTask::OnWeaponKill), - HOOK_SYMBOLDEF(0x01DDD000, "_ZN11CCareerTask14OnWeaponInjuryEiibP11CBasePlayer", CCareerTask::OnWeaponInjury), - //HOOK_SYMBOLDEF(0x0, "_ZN11CCareerTask10IsCompleteEv", CCareerTask::IsComplete), - //HOOK_SYMBOLDEF(0x0, "_ZN11CCareerTask11GetTaskNameEv", CCareerTask::GetTaskName), - //HOOK_SYMBOLDEF(0x0, "_ZN11CCareerTask11GetWeaponIdEv", CCareerTask::GetWeaponId), - //HOOK_SYMBOLDEF(0x0, "_ZN11CCareerTask16GetWeaponClassIdEv", CCareerTask::GetWeaponClassId), - //HOOK_SYMBOLDEF(0x0, "_ZNK11CCareerTask10IsValidForEP11CBasePlayer ", CCareerTask::IsValidFor), - //HOOK_SYMBOLDEF(0x01DDCD50, "_ZN11CCareerTask23SendPartialNotificationEv", CCareerTask::SendPartialNotification), // NOXREF -//CCareerTaskManager - //HOOK_SYMBOLDEF(0x01DDD7C0, "_ZN18CCareerTaskManagerC2Ev", CCareerTaskManager::CCareerTaskManager), - //HOOK_SYMBOLDEF(0x01DDD750, "_ZN18CCareerTaskManager6CreateEv", CCareerTaskManager::Create), - HOOK_SYMBOLDEF(0x01DDD800, "_ZN18CCareerTaskManager5ResetEb", CCareerTaskManager::Reset), - HOOK_SYMBOLDEF(0x01DDD8D0, "_ZN18CCareerTaskManager7AddTaskEPKcS1_ibbb", CCareerTaskManager::AddTask), - HOOK_SYMBOLDEF(0x01DDDA00, "_ZN18CCareerTaskManager11HandleEventE13GameEventTypeP11CBasePlayerS2_", CCareerTaskManager::HandleEvent), - HOOK_SYMBOLDEF(0x01DDDAB0, "_ZN18CCareerTaskManager15HandleEnemyKillEbPKcbbP11CBasePlayerS3_", CCareerTaskManager::HandleEnemyKill), - //HOOK_SYMBOLDEF(0x01DDDA60, "_ZN18CCareerTaskManager16HandleWeaponKillEiibbP11CBasePlayerS1_", CCareerTaskManager::HandleWeaponKill), // NOXREF - HOOK_SYMBOLDEF(0x01DDDC30, "_ZN18CCareerTaskManager11HandleDeathEiP11CBasePlayer", CCareerTaskManager::HandleDeath), - //HOOK_SYMBOLDEF(0x01DDDB80, "_ZN18CCareerTaskManager18HandleWeaponInjuryEiibP11CBasePlayer", CCareerTaskManager::HandleWeaponInjury), // NOXREF - HOOK_SYMBOLDEF(0x01DDDBC0, "_ZN18CCareerTaskManager17HandleEnemyInjuryEPKcbP11CBasePlayer", CCareerTaskManager::HandleEnemyInjury), - HOOK_SYMBOLDEF(0x01DDDCD0, "_ZN18CCareerTaskManager19AreAllTasksCompleteEv", CCareerTaskManager::AreAllTasksComplete), - HOOK_SYMBOLDEF(0x01DDDD00, "_ZN18CCareerTaskManager20GetNumRemainingTasksEv", CCareerTaskManager::GetNumRemainingTasks), - HOOK_SYMBOLDEF(0x01DDDD30, "_ZN18CCareerTaskManager19GetRoundElapsedTimeEv", CCareerTaskManager::GetRoundElapsedTime), - //HOOK_SYMBOLDEF(0x0, "_ZN18CCareerTaskManager11GetTaskTimeEv", CCareerTaskManager::GetTaskTime), - //HOOK_SYMBOLDEF(0x01DDD8B0, "_ZN18CCareerTaskManager19SetFinishedTaskTimeEi", CCareerTaskManager::SetFinishedTaskTime), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN18CCareerTaskManager19GetFinishedTaskTimeEv", CCareerTaskManager::GetFinishedTaskTime), - //HOOK_SYMBOLDEF(0x0, "_ZN18CCareerTaskManager20GetFinishedTaskRoundEv", CCareerTaskManager::GetFinishedTaskRound), - //HOOK_SYMBOLDEF(0x0, "_ZN18CCareerTaskManager8GetTasksEv", CCareerTaskManager::GetTasks), - HOOK_SYMBOLDEF(0x01DDDD40, "_ZN18CCareerTaskManager20LatchRoundEndMessageEv", CCareerTaskManager::LatchRoundEndMessage), - HOOK_SYMBOLDEF(0x01DDDD50, "_ZN18CCareerTaskManager22UnlatchRoundEndMessageEv", CCareerTaskManager::UnlatchRoundEndMessage), -//CPreventDefuseTask - // virtual func - //HOOK_SYMBOLDEF(0x01DDCA60, "_ZN18CPreventDefuseTaskC2EPKc13GameEventTypeS1_ibbib", CPreventDefuseTask::CPreventDefuseTask), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DDCB30, "_ZN18CPreventDefuseTask7OnEventE13GameEventTypeP11CBasePlayerS2_", CPreventDefuseTask::OnEvent), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DDCAB0, "_ZN18CPreventDefuseTask5ResetEv", CPreventDefuseTask::Reset), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DDDDF0, "_ZNK18CPreventDefuseTask26IsTaskCompletableThisRoundEv", CPreventDefuseTask::IsTaskCompletableThisRound), // DEFAULT - // non-virtual func - //HOOK_SYMBOLDEF(0x01DDCA00, "_ZN18CPreventDefuseTask7NewTaskEPKc13GameEventTypeS1_ibbib", CPreventDefuseTask::NewTask), - -#endif // CareerTasks_Region - -#ifndef Weapons_Region - -//Weapons base - //HOOK_SYMBOLDEF(0x01DCCD60, "_Z12MaxAmmoCarryi", MaxAmmoCarry), // NOXREF - HOOK_SYMBOLDEF(0x01DCCE60, "_Z16ClearMultiDamagev", ClearMultiDamage), - HOOK_SYMBOLDEF(0x01DCCE80, "_Z16ApplyMultiDamageP9entvars_sS0_", ApplyMultiDamage), - HOOK_SYMBOLDEF(0x01DCCEB0, "_Z14AddMultiDamageP9entvars_sP11CBaseEntityfi", AddMultiDamage), - HOOK_SYMBOLDEF(0x01DCCF20, "_Z10SpawnBlood6Vectorif", SpawnBlood), - //HOOK_SYMBOLDEF(0x01DCCF50, "_Z11DamageDecalP11CBaseEntityi", DamageDecal), // NOXREF - //HOOK_SYMBOLDEF(0x01DCCF80, "_Z12DecalGunshotP11TraceResultibP9entvars_sb", DecalGunshot), // NOXREF - HOOK_SYMBOLDEF(0x01DCCF90, "_Z10EjectBrassRK6VectorS1_S1_fiii", EjectBrass), - //HOOK_SYMBOLDEF(0x01DCD080, "_Z11EjectBrass2RK6VectorS1_fiiP9entvars_s", EjectBrass2), // NOXREF - //HOOK_SYMBOLDEF(0x01DCD120, "_Z25AddAmmoNameToAmmoRegistryPKc", AddAmmoNameToAmmoRegistry), // NOXREF - HOOK_SYMBOLDEF(0x01DCD180, "_Z24UTIL_PrecacheOtherWeaponPKc", UTIL_PrecacheOtherWeapon), - //HOOK_SYMBOLDEF(0x01DCD310, "_Z25UTIL_PrecacheOtherWeapon2PKc", UTIL_PrecacheOtherWeapon2), // NOXREF - HOOK_SYMBOLDEF(0x01DCD4A0, "_Z10W_Precachev", W_Precache), - //HOOK_SYMBOLDEF(0x01DCE600, "_Z9CanAttackffi", CanAttack), // NOXREF -//CBasePlayerItem - // virtual func - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DCD860, "_ZN15CBasePlayerItem4SaveER5CSave", CBasePlayerItem::Save), // NOXREF - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DCD890, "_ZN15CBasePlayerItem7RestoreER8CRestore", CBasePlayerItem::Restore), // NOXREF - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCD960, "_ZN15CBasePlayerItem21SetObjectCollisionBoxEv", CBasePlayerItem::SetObjectCollisionBox), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCDC80, "_ZN15CBasePlayerItem7RespawnEv", CBasePlayerItem::Respawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DCEC60, "_ZN15CBasePlayerItem11AddToPlayerEP11CBasePlayer", CBasePlayerItem::AddToPlayer), // NOXREF - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZN15CBasePlayerItem12AddDuplicateEPS_", CBasePlayerItem::AddDuplicate), // NOXREF - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZN15CBasePlayerItem11GetItemInfoEP8ItemInfo", CBasePlayerItem::GetItemInfo), - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZN15CBasePlayerItem9CanDeployEv", CBasePlayerItem::CanDeploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D01FF0, "_ZN15CBasePlayerItem7CanDropEv", CBasePlayerItem::CanDrop), - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem6DeployEv", CBasePlayerItem::Deploy), - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem8IsWeaponEv", CBasePlayerItem::IsWeapon), - //HOOK_SYMBOLDEF(0x01D02000, "_ZN15CBasePlayerItem10CanHolsterEv", CBasePlayerItem::CanHolster), - //HOOK_SYMBOLDEF(0x01DCED10, "_ZN15CBasePlayerItem7HolsterEi", CBasePlayerItem::Holster), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem14UpdateItemInfoEv", CBasePlayerItem::UpdateItemInfo), // NOXREF - //HOOK_SYMBOLDEF(0x01D02010, "_ZN15CBasePlayerItem12ItemPreFrameEv", CBasePlayerItem::ItemPreFrame), // NOXREF PURE - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem13ItemPostFrameEv", CBasePlayerItem::ItemPostFrame), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCECB0, "_ZN15CBasePlayerItem4DropEv", CBasePlayerItem::Drop), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCECE0, "_ZN15CBasePlayerItem4KillEv", CBasePlayerItem::Kill), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCED40, "_ZN15CBasePlayerItem14AttachToPlayerEP11CBasePlayer", CBasePlayerItem::AttachToPlayer), - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem16PrimaryAmmoIndexEv", CBasePlayerItem::PrimaryAmmoIndex), - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem18SecondaryAmmoIndexEv", CBasePlayerItem::SecondaryAmmoIndex), - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem16UpdateClientDataEP11CBasePlayer", CBasePlayerItem::UpdateClientData), - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem12GetWeaponPtrEv", CBasePlayerItem::GetWeaponPtr), - //HOOK_SYMBOLDEF(0x01D861A0, "_ZN15CBasePlayerItem11GetMaxSpeedEv", CBasePlayerItem::GetMaxSpeed), - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem9iItemSlotEv", CBasePlayerItem::iItemSlot), - // non-virtual func - HOOK_SYMBOLDEF(0x01DCEC40, "_ZN15CBasePlayerItem11DestroyItemEv", CBasePlayerItem::DestroyItem), - HOOK_SYMBOLDEF(0x01DCDD50, "_ZN15CBasePlayerItem12DefaultTouchEP11CBaseEntity", CBasePlayerItem::DefaultTouch), - HOOK_SYMBOLDEF(0x01DCDAA0, "_ZN15CBasePlayerItem9FallThinkEv", CBasePlayerItem::FallThink), - HOOK_SYMBOLDEF(0x01DCDB30, "_ZN15CBasePlayerItem11MaterializeEv", CBasePlayerItem::Materialize), - HOOK_SYMBOLDEF(0x01DCDC10, "_ZN15CBasePlayerItem20AttemptToMaterializeEv", CBasePlayerItem::AttemptToMaterialize), - HOOK_SYMBOLDEF(0x01DCDA00, "_ZN15CBasePlayerItem8FallInitEv", CBasePlayerItem::FallInit), - HOOK_SYMBOLDEF(0x01DCDC50, "_ZN15CBasePlayerItem12CheckRespawnEv", CBasePlayerItem::CheckRespawn), - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem8pszAmmo1Ev", CBasePlayerItem::pszAmmo1), - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem9iMaxAmmo1Ev", CBasePlayerItem::iMaxAmmo1), - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem8pszAmmo2Ev", CBasePlayerItem::pszAmmo2), - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem9iMaxAmmo2Ev", CBasePlayerItem::iMaxAmmo2), - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem7pszNameEv", CBasePlayerItem::pszName), - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem8iMaxClipEv", CBasePlayerItem::iMaxClip), - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem7iWeightEv", CBasePlayerItem::iWeight), - //HOOK_SYMBOLDEF(0x0, "_ZN15CBasePlayerItem6iFlagsEv", CBasePlayerItem::iFlags), -//CBasePlayerWeapon - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCD8C0, "_ZN17CBasePlayerWeapon4SaveER5CSave", CBasePlayerWeapon::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCD910, "_ZN17CBasePlayerWeapon7RestoreER8CRestore", CBasePlayerWeapon::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCEDE0, "_ZN17CBasePlayerWeapon11AddToPlayerEP11CBasePlayer", CBasePlayerWeapon::AddToPlayer), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCEDC0, "_ZN17CBasePlayerWeapon12AddDuplicateEP15CBasePlayerItem", CBasePlayerWeapon::AddDuplicate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCF1A0, "_ZN17CBasePlayerWeapon9CanDeployEv", CBasePlayerWeapon::CanDeploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D02050, "_ZN17CBasePlayerWeapon8IsWeaponEv", CBasePlayerWeapon::IsWeapon), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCF570, "_ZN17CBasePlayerWeapon7HolsterEi", CBasePlayerWeapon::Holster), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D02030, "_ZN17CBasePlayerWeapon14UpdateItemInfoEv", CBasePlayerWeapon::UpdateItemInfo), // NOXREF PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCE6A0, "_ZN17CBasePlayerWeapon13ItemPostFrameEv", CBasePlayerWeapon::ItemPostFrame), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCF550, "_ZN17CBasePlayerWeapon16PrimaryAmmoIndexEv", CBasePlayerWeapon::PrimaryAmmoIndex), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCF560, "_ZN17CBasePlayerWeapon18SecondaryAmmoIndexEv", CBasePlayerWeapon::SecondaryAmmoIndex), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCEEB0, "_ZN17CBasePlayerWeapon16UpdateClientDataEP11CBasePlayer", CBasePlayerWeapon::UpdateClientData), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D02060, "_ZN17CBasePlayerWeapon12GetWeaponPtrEv", CBasePlayerWeapon::GetWeaponPtr), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCF7E0, "_ZN17CBasePlayerWeapon11ExtractAmmoEPS_", CBasePlayerWeapon::ExtractAmmo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCF8A0, "_ZN17CBasePlayerWeapon15ExtractClipAmmoEPS_", CBasePlayerWeapon::ExtractClipAmmo), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D02020, "_ZN17CBasePlayerWeapon9AddWeaponEv", CBasePlayerWeapon::AddWeapon), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCF4C0, "_ZN17CBasePlayerWeapon14PlayEmptySoundEv", CBasePlayerWeapon::PlayEmptySound), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCF540, "_ZN17CBasePlayerWeapon15ResetEmptySoundEv", CBasePlayerWeapon::ResetEmptySound), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCEFB0, "_ZN17CBasePlayerWeapon14SendWeaponAnimEii", CBasePlayerWeapon::SendWeaponAnim), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCF150, "_ZN17CBasePlayerWeapon9IsUseableEv", CBasePlayerWeapon::IsUseable), - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZN17CBasePlayerWeapon13PrimaryAttackEv", CBasePlayerWeapon::PrimaryAttack), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D03A50, "_ZN17CBasePlayerWeapon15SecondaryAttackEv", CBasePlayerWeapon::SecondaryAttack), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D03A60, "_ZN17CBasePlayerWeapon6ReloadEv", CBasePlayerWeapon::Reload), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D861B0, "_ZN17CBasePlayerWeapon10WeaponIdleEv", CBasePlayerWeapon::WeaponIdle), // PURE - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCF8F0, "_ZN17CBasePlayerWeapon12RetireWeaponEv", CBasePlayerWeapon::RetireWeapon), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D02040, "_ZN17CBasePlayerWeapon16ShouldWeaponIdleEv", CBasePlayerWeapon::ShouldWeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D861C0, "_ZN17CBasePlayerWeapon12UseDecrementEv", CBasePlayerWeapon::UseDecrement), - // non-virtual func - HOOK_SYMBOLDEF(0x01DCF030, "_ZN17CBasePlayerWeapon14AddPrimaryAmmoEiPcii", CBasePlayerWeapon::AddPrimaryAmmo), - //HOOK_SYMBOLDEF(0x01DCF0F0, "_ZN17CBasePlayerWeapon16AddSecondaryAmmoEiPci", CBasePlayerWeapon::AddSecondaryAmmo), // NOXREF - HOOK_SYMBOLDEF(0x01DCF1B0, "_ZN17CBasePlayerWeapon13DefaultDeployEPcS0_iS0_i", CBasePlayerWeapon::DefaultDeploy), - HOOK_SYMBOLDEF(0x01DCF430, "_ZN17CBasePlayerWeapon13DefaultReloadEiif", CBasePlayerWeapon::DefaultReload), - HOOK_SYMBOLDEF(0x01DCE380, "_ZN17CBasePlayerWeapon13FireRemainingERiRfi", CBasePlayerWeapon::FireRemaining), - //HOOK_SYMBOLDEF(0x01DCE260, "_ZN17CBasePlayerWeapon8KickBackEffffffi", CBasePlayerWeapon::KickBack), - HOOK_SYMBOLDEF(0x01DCDEA0, "_ZN17CBasePlayerWeapon14EjectBrassLateEv", CBasePlayerWeapon::EjectBrassLate), - //HOOK_SYMBOLDEF(0x0, "_ZN17CBasePlayerWeapon8MakeBeamEv", CBasePlayerWeapon::MakeBeam), - //HOOK_SYMBOLDEF(0x0, "_ZN17CBasePlayerWeapon10BeamUpdateEv", CBasePlayerWeapon::BeamUpdate), - HOOK_SYMBOLDEF(0x01DCF2D0, "_ZN17CBasePlayerWeapon11ReloadSoundEv", CBasePlayerWeapon::ReloadSound), - HOOK_SYMBOLDEF(0x01DCF930, "_ZN17CBasePlayerWeapon18GetNextAttackDelayEf", CBasePlayerWeapon::GetNextAttackDelay), - //HOOK_SYMBOLDEF(0x01DCE630, "_ZN17CBasePlayerWeapon18HasSecondaryAttackEv", CBasePlayerWeapon::HasSecondaryAttack), // NOXREF - HOOK_SYMBOLDEF(0x01D32670, "_ZN17CBasePlayerWeapon8IsPistolEv", CBasePlayerWeapon::IsPistol), - HOOK_SYMBOLDEF(0x01DCDE10, "_ZN17CBasePlayerWeapon19SetPlayerShieldAnimEv", CBasePlayerWeapon::SetPlayerShieldAnim), - HOOK_SYMBOLDEF(0x01DCDE60, "_ZN17CBasePlayerWeapon21ResetPlayerShieldAnimEv", CBasePlayerWeapon::ResetPlayerShieldAnim), - HOOK_SYMBOLDEF(0x01DCE140, "_ZN17CBasePlayerWeapon19ShieldSecondaryFireEii", CBasePlayerWeapon::ShieldSecondaryFire), -//CBasePlayerAmmo - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCF5A0, "_ZN15CBasePlayerAmmo5SpawnEv", CBasePlayerAmmo::Spawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZN15CBasePlayerAmmo7AddAmmoEP11CBaseEntity", CBasePlayerAmmo::AddAmmo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCF650, "_ZN15CBasePlayerAmmo7RespawnEv", CBasePlayerAmmo::Respawn), - // non-virtual func -//CBasePlayerAmmo - HOOK_SYMBOLDEF(0x01DCF6C0, "_ZN15CBasePlayerAmmo11MaterializeEv", CBasePlayerAmmo::Materialize), - HOOK_SYMBOLDEF(0x01DCF730, "_ZN15CBasePlayerAmmo12DefaultTouchEP11CBaseEntity", CBasePlayerAmmo::DefaultTouch), -//C9MMAmmo - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59550, "_ZN8C9MMAmmo5SpawnEv", C9MMAmmo::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59580, "_ZN8C9MMAmmo8PrecacheEv", C9MMAmmo::Precache), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D595A0, "_ZN8C9MMAmmo7AddAmmoEP11CBaseEntity", C9MMAmmo::AddAmmo), - // non-virtual func - HOOK_DEF(0x01D59500, ammo_9mm), -//CBuckShotAmmo - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59640, "_ZN13CBuckShotAmmo5SpawnEv", CBuckShotAmmo::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59670, "_ZN13CBuckShotAmmo8PrecacheEv", CBuckShotAmmo::Precache), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D59690, "_ZN13CBuckShotAmmo7AddAmmoEP11CBaseEntity", CBuckShotAmmo::AddAmmo), - // non-virtual func - HOOK_DEF(0x01D595F0, ammo_buckshot), -//C556NatoAmmo - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59730, "_ZN12C556NatoAmmo5SpawnEv", C556NatoAmmo::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59760, "_ZN12C556NatoAmmo8PrecacheEv", C556NatoAmmo::Precache), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D59780, "_ZN12C556NatoAmmo7AddAmmoEP11CBaseEntity", C556NatoAmmo::AddAmmo), - // non-virtual func - HOOK_DEF(0x01D596E0, ammo_556nato), -//C556NatoBoxAmmo - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59820, "_ZN15C556NatoBoxAmmo5SpawnEv", C556NatoBoxAmmo::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59850, "_ZN15C556NatoBoxAmmo8PrecacheEv", C556NatoBoxAmmo::Precache), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D59870, "_ZN15C556NatoBoxAmmo7AddAmmoEP11CBaseEntity", C556NatoBoxAmmo::AddAmmo), - // non-virtual func - HOOK_DEF(0x01D597D0, ammo_556natobox), -//C762NatoAmmo - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59920, "_ZN12C762NatoAmmo5SpawnEv", C762NatoAmmo::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59950, "_ZN12C762NatoAmmo8PrecacheEv", C762NatoAmmo::Precache), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D59970, "_ZN12C762NatoAmmo7AddAmmoEP11CBaseEntity", C762NatoAmmo::AddAmmo), - // non-virtual func - HOOK_DEF(0x01D598D0, ammo_762nato), -//C45ACPAmmo - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59A10, "_ZN10C45ACPAmmo5SpawnEv", C45ACPAmmo::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59A40, "_ZN10C45ACPAmmo8PrecacheEv", C45ACPAmmo::Precache), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D59A60, "_ZN10C45ACPAmmo7AddAmmoEP11CBaseEntity", C45ACPAmmo::AddAmmo), - // non-virtual func - HOOK_DEF(0x01D599C0, ammo_45acp), -//C50AEAmmo - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59B00, "_ZN9C50AEAmmo5SpawnEv", C50AEAmmo::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59B30, "_ZN9C50AEAmmo8PrecacheEv", C50AEAmmo::Precache), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D59B50, "_ZN9C50AEAmmo7AddAmmoEP11CBaseEntity", C50AEAmmo::AddAmmo), - // non-virtual func - HOOK_DEF(0x01D59AB0, ammo_50ae), -//C338MagnumAmmo - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59BF0, "_ZN14C338MagnumAmmo5SpawnEv", C338MagnumAmmo::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59C20, "_ZN14C338MagnumAmmo8PrecacheEv", C338MagnumAmmo::Precache), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D59C40, "_ZN14C338MagnumAmmo7AddAmmoEP11CBaseEntity", C338MagnumAmmo::AddAmmo), - // non-virtual func - HOOK_DEF(0x01D59BA0, ammo_338magnum), -//C57MMAmmo - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59CE0, "_ZN9C57MMAmmo5SpawnEv", C57MMAmmo::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59D10, "_ZN9C57MMAmmo8PrecacheEv", C57MMAmmo::Precache), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D59D30, "_ZN9C57MMAmmo7AddAmmoEP11CBaseEntity", C57MMAmmo::AddAmmo), - // non-virtual func - HOOK_DEF(0x01D59C90, ammo_57mm), -//C357SIGAmmo - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59DD0, "_ZN11C357SIGAmmo5SpawnEv", C357SIGAmmo::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D59E00, "_ZN11C357SIGAmmo8PrecacheEv", C357SIGAmmo::Precache), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D59E20, "_ZN11C357SIGAmmo7AddAmmoEP11CBaseEntity", C357SIGAmmo::AddAmmo), - // non-virtual func - HOOK_DEF(0x01D59D80, ammo_357sig), -//CWeaponBox - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCFD80, "_ZN10CWeaponBox5SpawnEv", CWeaponBox::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCFA40, "_ZN10CWeaponBox8PrecacheEv", CWeaponBox::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCFA50, "_ZN10CWeaponBox8KeyValueEP14KeyValueData_s", CWeaponBox::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCF9E0, "_ZN10CWeaponBox4SaveER5CSave", CWeaponBox::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCFA10, "_ZN10CWeaponBox7RestoreER8CRestore", CWeaponBox::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD0970, "_ZN10CWeaponBox21SetObjectCollisionBoxEv", CWeaponBox::SetObjectCollisionBox), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DCFE30, "_ZN10CWeaponBox5TouchEP11CBaseEntity", CWeaponBox::Touch), - // non-virtual func - HOOK_DEF(0x01DCF990, weaponbox), - //HOOK_SYMBOLDEF(0x01DD0930, "_ZN10CWeaponBox7IsEmptyEv", CWeaponBox::IsEmpty), // NOXREF - HOOK_SYMBOLDEF(0x01DD07C0, "_ZN10CWeaponBox8GiveAmmoEiPciPi", CWeaponBox::GiveAmmo), - HOOK_SYMBOLDEF(0x01DCFDE0, "_ZN10CWeaponBox4KillEv", CWeaponBox::Kill), - HOOK_SYMBOLDEF(0x01DCFBF0, "_ZN10CWeaponBox9BombThinkEv", CWeaponBox::BombThink), //export func - //HOOK_SYMBOLDEF(0x01DD08A0, "_ZN10CWeaponBox9HasWeaponEP15CBasePlayerItem", CWeaponBox::HasWeapon), // NOXREF - HOOK_SYMBOLDEF(0x01DD0500, "_ZN10CWeaponBox10PackWeaponEP15CBasePlayerItem", CWeaponBox::PackWeapon), - HOOK_SYMBOLDEF(0x01DD0670, "_ZN10CWeaponBox8PackAmmoEii", CWeaponBox::PackAmmo), -//CUSP - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F8B0, "_ZN4CUSP5SpawnEv", CUSP::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F910, "_ZN4CUSP8PrecacheEv", CUSP::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F9D0, "_ZN4CUSP11GetItemInfoEP8ItemInfo", CUSP::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0FA40, "_ZN4CUSP6DeployEv", CUSP::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D101A0, "_ZN4CUSP11GetMaxSpeedEv", CUSP::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D10190, "_ZN4CUSP9iItemSlotEv", CUSP::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0FB20, "_ZN4CUSP15SecondaryAttackEv", CUSP::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0FBE0, "_ZN4CUSP13PrimaryAttackEv", CUSP::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D10060, "_ZN4CUSP6ReloadEv", CUSP::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D100C0, "_ZN4CUSP10WeaponIdleEv", CUSP::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D101B0, "_ZN4CUSP12UseDecrementEv", CUSP::UseDecrement), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D101C0, "_ZN4CUSP8IsPistolEv", CUSP::IsPistol), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D0F860, weapon_usp), - HOOK_SYMBOLDEF(0x01D0FD50, "_ZN4CUSP7USPFireEffi", CUSP::USPFire), - //HOOK_SYMBOLDEF(0x0, "_ZN4CUSP8MakeBeamEv", CUSP::MakeBeam), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN4CUSP10BeamUpdateEv", CUSP::BeamUpdate), // NOXREF -//CMP5N - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B750, "_ZN5CMP5N5SpawnEv", CMP5N::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B7A0, "_ZN5CMP5N8PrecacheEv", CMP5N::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B820, "_ZN5CMP5N11GetItemInfoEP8ItemInfo", CMP5N::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B890, "_ZN5CMP5N6DeployEv", CMP5N::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0BD50, "_ZN5CMP5N11GetMaxSpeedEv", CMP5N::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0BD40, "_ZN5CMP5N9iItemSlotEv", CMP5N::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B8E0, "_ZN5CMP5N13PrimaryAttackEv", CMP5N::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0BC80, "_ZN5CMP5N6ReloadEv", CMP5N::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0BCD0, "_ZN5CMP5N10WeaponIdleEv", CMP5N::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0BD60, "_ZN5CMP5N12UseDecrementEv", CMP5N::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D0B700, weapon_mp5navy), - HOOK_SYMBOLDEF(0x01D0B920, "_ZN5CMP5N8MP5NFireEffi", CMP5N::MP5NFire), -//CSG552 - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0DAA0, "_ZN6CSG5525SpawnEv", CSG552::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0DAF0, "_ZN6CSG5528PrecacheEv", CSG552::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0DB70, "_ZN6CSG55211GetItemInfoEP8ItemInfo", CSG552::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0DBE0, "_ZN6CSG5526DeployEv", CSG552::Deploy), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0E1C0, "_ZN6CSG55211GetMaxSpeedEv", CSG552::GetMaxSpeed), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0E1E0, "_ZN6CSG5529iItemSlotEv", CSG552::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0DC30, "_ZN6CSG55215SecondaryAttackEv", CSG552::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0DCA0, "_ZN6CSG55213PrimaryAttackEv", CSG552::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0E0D0, "_ZN6CSG5526ReloadEv", CSG552::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0E150, "_ZN6CSG55210WeaponIdleEv", CSG552::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0E1F0, "_ZN6CSG55212UseDecrementEv", CSG552::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D0DA50, weapon_sg552), - HOOK_SYMBOLDEF(0x01D0DD50, "_ZN6CSG5529SG552FireEffi", CSG552::SG552Fire), -//CAK47 - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D014F0, "_ZN5CAK475SpawnEv", CAK47::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D01540, "_ZN5CAK478PrecacheEv", CAK47::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D015C0, "_ZN5CAK4711GetItemInfoEP8ItemInfo", CAK47::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D01630, "_ZN5CAK476DeployEv", CAK47::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D02080, "_ZN5CAK4711GetMaxSpeedEv", CAK47::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D02070, "_ZN5CAK479iItemSlotEv", CAK47::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D01680, "_ZN5CAK4715SecondaryAttackEv", CAK47::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D01690, "_ZN5CAK4713PrimaryAttackEv", CAK47::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D01AB0, "_ZN5CAK476ReloadEv", CAK47::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D01B00, "_ZN5CAK4710WeaponIdleEv", CAK47::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D02090, "_ZN5CAK4712UseDecrementEv", CAK47::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D014A0, weapon_ak47), - HOOK_SYMBOLDEF(0x01D01730, "_ZN5CAK478AK47FireEffi", CAK47::AK47Fire), -//CAUG - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D020F0, "_ZN4CAUG5SpawnEv", CAUG::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D02140, "_ZN4CAUG8PrecacheEv", CAUG::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D021D0, "_ZN4CAUG11GetItemInfoEP8ItemInfo", CAUG::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D02240, "_ZN4CAUG6DeployEv", CAUG::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D02820, "_ZN4CAUG11GetMaxSpeedEv", CAUG::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D02810, "_ZN4CAUG9iItemSlotEv", CAUG::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D02290, "_ZN4CAUG15SecondaryAttackEv", CAUG::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D02300, "_ZN4CAUG13PrimaryAttackEv", CAUG::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D02730, "_ZN4CAUG6ReloadEv", CAUG::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D027A0, "_ZN4CAUG10WeaponIdleEv", CAUG::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D02830, "_ZN4CAUG12UseDecrementEv", CAUG::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D020A0, weapon_aug), - HOOK_SYMBOLDEF(0x01D023B0, "_ZN4CAUG7AUGFireEffi", CAUG::AUGFire), -//CAWP - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D02890, "_ZN4CAWP5SpawnEv", CAWP::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D028D0, "_ZN4CAWP8PrecacheEv", CAWP::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D02980, "_ZN4CAWP11GetItemInfoEP8ItemInfo", CAWP::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D029F0, "_ZN4CAWP6DeployEv", CAWP::Deploy), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D02FA0, "_ZN4CAWP11GetMaxSpeedEv", CAWP::GetMaxSpeed), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D02FC0, "_ZN4CAWP9iItemSlotEv", CAWP::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D02A60, "_ZN4CAWP15SecondaryAttackEv", CAWP::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D02B40, "_ZN4CAWP13PrimaryAttackEv", CAWP::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D02EA0, "_ZN4CAWP6ReloadEv", CAWP::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D02F20, "_ZN4CAWP10WeaponIdleEv", CAWP::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D02FD0, "_ZN4CAWP12UseDecrementEv", CAWP::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D02840, weapon_awp), - HOOK_SYMBOLDEF(0x01D02BF0, "_ZN4CAWP7AWPFireEffi", CAWP::AWPFire), -//CC4 - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D03030, "_ZN3CC45SpawnEv", CC4::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D030F0, "_ZN3CC48PrecacheEv", CC4::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D03840, "_ZN3CC48KeyValueEP14KeyValueData_s", CC4::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D03900, "_ZN3CC43UseEP11CBaseEntityS1_8USE_TYPEf", CC4::Use), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D03120, "_ZN3CC411GetItemInfoEP8ItemInfo", CC4::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D03190, "_ZN3CC46DeployEv", CC4::Deploy), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D03200, "_ZN3CC47HolsterEi", CC4::Holster), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D03A80, "_ZN3CC411GetMaxSpeedEv", CC4::GetMaxSpeed), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D03A70, "_ZN3CC49iItemSlotEv", CC4::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D03280, "_ZN3CC413PrimaryAttackEv", CC4::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D03750, "_ZN3CC410WeaponIdleEv", CC4::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D03A90, "_ZN3CC412UseDecrementEv", CC4::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D02FE0, weapon_c4), -//CDEAGLE - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D03AF0, "_ZN7CDEAGLE5SpawnEv", CDEAGLE::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D03B50, "_ZN7CDEAGLE8PrecacheEv", CDEAGLE::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D03BE0, "_ZN7CDEAGLE11GetItemInfoEP8ItemInfo", CDEAGLE::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D03C50, "_ZN7CDEAGLE6DeployEv", CDEAGLE::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D04180, "_ZN7CDEAGLE11GetMaxSpeedEv", CDEAGLE::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D04170, "_ZN7CDEAGLE9iItemSlotEv", CDEAGLE::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D03DB0, "_ZN7CDEAGLE15SecondaryAttackEv", CDEAGLE::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D03CF0, "_ZN7CDEAGLE13PrimaryAttackEv", CDEAGLE::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D040B0, "_ZN7CDEAGLE6ReloadEv", CDEAGLE::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D040F0, "_ZN7CDEAGLE10WeaponIdleEv", CDEAGLE::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D04190, "_ZN7CDEAGLE12UseDecrementEv", CDEAGLE::UseDecrement), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D041A0, "_ZN7CDEAGLE8IsPistolEv", CDEAGLE::IsPistol), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D03AA0, weapon_deagle), - HOOK_SYMBOLDEF(0x01D03DC0, "_ZN7CDEAGLE10DEAGLEFireEffi", CDEAGLE::DEAGLEFire), -//CFlashbang - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D059D0, "_ZN10CFlashbang5SpawnEv", CFlashbang::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D05A40, "_ZN10CFlashbang8PrecacheEv", CFlashbang::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D05A80, "_ZN10CFlashbang11GetItemInfoEP8ItemInfo", CFlashbang::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D06260, "_ZN10CFlashbang9CanDeployEv", CFlashbang::CanDeploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D062A0, "_ZN10CFlashbang7CanDropEv", CFlashbang::CanDrop), // DEFUALT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D05AF0, "_ZN10CFlashbang6DeployEv", CFlashbang::Deploy), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D05B90, "_ZN10CFlashbang7HolsterEi", CFlashbang::Holster), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D06290, "_ZN10CFlashbang11GetMaxSpeedEv", CFlashbang::GetMaxSpeed), // DEFUALT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D06280, "_ZN10CFlashbang9iItemSlotEv", CFlashbang::iItemSlot), // DEFUALT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D05DA0, "_ZN10CFlashbang15SecondaryAttackEv", CFlashbang::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D05BF0, "_ZN10CFlashbang13PrimaryAttackEv", CFlashbang::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D05E40, "_ZN10CFlashbang10WeaponIdleEv", CFlashbang::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D062B0, "_ZN10CFlashbang12UseDecrementEv", CFlashbang::UseDecrement), // DEFUALT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D062C0, "_ZN10CFlashbang8IsPistolEv", CFlashbang::IsPistol), // DEFUALT - // non-virtual func - HOOK_DEF(0x01D05980, weapon_flashbang), - HOOK_SYMBOLDEF(0x01D05C60, "_ZN10CFlashbang19ShieldSecondaryFireEii", CFlashbang::ShieldSecondaryFire), - //HOOK_SYMBOLDEF(0x01D05DB0, "_ZN10CFlashbang19SetPlayerShieldAnimEv", CFlashbang::SetPlayerShieldAnim), // NOXREF - //HOOK_SYMBOLDEF(0x01D05E00, "_ZN10CFlashbang21ResetPlayerShieldAnimEv", CFlashbang::ResetPlayerShieldAnim), // NOXREF -//CG3SG1 - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D06320, "_ZN6CG3SG15SpawnEv", CG3SG1::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D06370, "_ZN6CG3SG18PrecacheEv", CG3SG1::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D063F0, "_ZN6CG3SG111GetItemInfoEP8ItemInfo", CG3SG1::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D06460, "_ZN6CG3SG16DeployEv", CG3SG1::Deploy), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D06A30, "_ZN6CG3SG111GetMaxSpeedEv", CG3SG1::GetMaxSpeed), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D06A50, "_ZN6CG3SG19iItemSlotEv", CG3SG1::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D064A0, "_ZN6CG3SG115SecondaryAttackEv", CG3SG1::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D06580, "_ZN6CG3SG113PrimaryAttackEv", CG3SG1::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D06930, "_ZN6CG3SG16ReloadEv", CG3SG1::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D069B0, "_ZN6CG3SG110WeaponIdleEv", CG3SG1::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D06A60, "_ZN6CG3SG112UseDecrementEv", CG3SG1::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D062D0, weapon_g3sg1), - HOOK_SYMBOLDEF(0x01D06600, "_ZN6CG3SG19G3SG1FireEffi", CG3SG1::G3SG1Fire), -//CGLOCK18 - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D071E0, "_ZN8CGLOCK185SpawnEv", CGLOCK18::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D07250, "_ZN8CGLOCK188PrecacheEv", CGLOCK18::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D07310, "_ZN8CGLOCK1811GetItemInfoEP8ItemInfo", CGLOCK18::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D07380, "_ZN8CGLOCK186DeployEv", CGLOCK18::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D07B10, "_ZN8CGLOCK1811GetMaxSpeedEv", CGLOCK18::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D07B00, "_ZN8CGLOCK189iItemSlotEv", CGLOCK18::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D07480, "_ZN8CGLOCK1815SecondaryAttackEv", CGLOCK18::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D07510, "_ZN8CGLOCK1813PrimaryAttackEv", CGLOCK18::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D07980, "_ZN8CGLOCK186ReloadEv", CGLOCK18::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D079F0, "_ZN8CGLOCK1810WeaponIdleEv", CGLOCK18::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D07B20, "_ZN8CGLOCK1812UseDecrementEv", CGLOCK18::UseDecrement), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D07B30, "_ZN8CGLOCK188IsPistolEv", CGLOCK18::IsPistol), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D07190, weapon_glock18), - HOOK_SYMBOLDEF(0x01D07670, "_ZN8CGLOCK1811GLOCK18FireEffi", CGLOCK18::GLOCK18Fire), -//CHEGrenade - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D07B90, "_ZN10CHEGrenade5SpawnEv", CHEGrenade::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D07C00, "_ZN10CHEGrenade8PrecacheEv", CHEGrenade::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D07C60, "_ZN10CHEGrenade11GetItemInfoEP8ItemInfo", CHEGrenade::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D08450, "_ZN10CHEGrenade9CanDeployEv", CHEGrenade::CanDeploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D08490, "_ZN10CHEGrenade7CanDropEv", CHEGrenade::CanDrop), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D07CD0, "_ZN10CHEGrenade6DeployEv", CHEGrenade::Deploy), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D07D70, "_ZN10CHEGrenade7HolsterEi", CHEGrenade::Holster), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D08480, "_ZN10CHEGrenade11GetMaxSpeedEv", CHEGrenade::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D08470, "_ZN10CHEGrenade9iItemSlotEv", CHEGrenade::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D07F80, "_ZN10CHEGrenade15SecondaryAttackEv", CHEGrenade::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D07DD0, "_ZN10CHEGrenade13PrimaryAttackEv", CHEGrenade::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D08020, "_ZN10CHEGrenade10WeaponIdleEv", CHEGrenade::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D084A0, "_ZN10CHEGrenade12UseDecrementEv", CHEGrenade::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D07B40, weapon_hegrenade), - HOOK_SYMBOLDEF(0x01D07E40, "_ZN10CHEGrenade19ShieldSecondaryFireEii", CHEGrenade::ShieldSecondaryFire), - //HOOK_SYMBOLDEF(0x01D07F90, "_ZN10CHEGrenade19SetPlayerShieldAnimEv", CHEGrenade::SetPlayerShieldAnim), // NOXREF - //HOOK_SYMBOLDEF(0x01D07FE0, "_ZN10CHEGrenade21ResetPlayerShieldAnimEv", CHEGrenade::ResetPlayerShieldAnim), // NOXREF -//CKnife - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D08500, "_ZN6CKnife5SpawnEv", CKnife::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D08550, "_ZN6CKnife8PrecacheEv", CKnife::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D085F0, "_ZN6CKnife11GetItemInfoEP8ItemInfo", CKnife::GetItemInfo), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D09910, "_ZN6CKnife7CanDropEv", CKnife::CanDrop), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D08640, "_ZN6CKnife6DeployEv", CKnife::Deploy), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D08710, "_ZN6CKnife7HolsterEi", CKnife::Holster), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D09900, "_ZN6CKnife11GetMaxSpeedEv", CKnife::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D098F0, "_ZN6CKnife9iItemSlotEv", CKnife::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D08B50, "_ZN6CKnife15SecondaryAttackEv", CKnife::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D08980, "_ZN6CKnife13PrimaryAttackEv", CKnife::PrimaryAttack), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D09920, "_ZN6CKnife12UseDecrementEv", CKnife::UseDecrement), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D08BB0, "_ZN6CKnife10WeaponIdleEv", CKnife::WeaponIdle), - // non-virtual func - HOOK_DEF(0x01D084B0, weapon_knife), - HOOK_DEF(0x01D08780, FindHullIntersection), - HOOK_SYMBOLDEF(0x01D08BA0, "_ZN6CKnife10SwingAgainEv", CKnife::SwingAgain), - HOOK_SYMBOLDEF(0x01D08B80, "_ZN6CKnife5SmackEv", CKnife::Smack), - //HOOK_SYMBOLDEF(0x01D08730, "_ZN6CKnife15WeaponAnimationEi", CKnife::WeaponAnimation), // NOXREF - HOOK_SYMBOLDEF(0x01D09390, "_ZN6CKnife4StabEi", CKnife::Stab), - HOOK_SYMBOLDEF(0x01D08C30, "_ZN6CKnife5SwingEi", CKnife::Swing), - HOOK_SYMBOLDEF(0x01D08A20, "_ZN6CKnife19ShieldSecondaryFireEii", CKnife::ShieldSecondaryFire), - //HOOK_SYMBOLDEF(0x01D08990, "_ZN6CKnife19SetPlayerShieldAnimEv", CKnife::SetPlayerShieldAnim), // NOXREF - //HOOK_SYMBOLDEF(0x01D089E0, "_ZN6CKnife21ResetPlayerShieldAnimEv", CKnife::ResetPlayerShieldAnim), // NOXREF -//CM249 - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D09980, "_ZN5CM2495SpawnEv", CM249::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D099D0, "_ZN5CM2498PrecacheEv", CM249::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D09A60, "_ZN5CM24911GetItemInfoEP8ItemInfo", CM249::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D09AD0, "_ZN5CM2496DeployEv", CM249::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A010, "_ZN5CM24911GetMaxSpeedEv", CM249::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A000, "_ZN5CM2499iItemSlotEv", CM249::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D09B20, "_ZN5CM24913PrimaryAttackEv", CM249::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D09F40, "_ZN5CM2496ReloadEv", CM249::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D09F90, "_ZN5CM24910WeaponIdleEv", CM249::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A020, "_ZN5CM24912UseDecrementEv", CM249::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D09930, weapon_m249), - HOOK_SYMBOLDEF(0x01D09BC0, "_ZN5CM2498M249FireEffi", CM249::M249Fire), -//CM3 - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A080, "_ZN3CM35SpawnEv", CM3::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A0C0, "_ZN3CM38PrecacheEv", CM3::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A140, "_ZN3CM311GetItemInfoEP8ItemInfo", CM3::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A1B0, "_ZN3CM36DeployEv", CM3::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A740, "_ZN3CM311GetMaxSpeedEv", CM3::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A730, "_ZN3CM39iItemSlotEv", CM3::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A1E0, "_ZN3CM313PrimaryAttackEv", CM3::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A4A0, "_ZN3CM36ReloadEv", CM3::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A5D0, "_ZN3CM310WeaponIdleEv", CM3::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A750, "_ZN3CM312UseDecrementEv", CM3::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D0A030, weapon_m3), -//CM4A1 - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A7B0, "_ZN5CM4A15SpawnEv", CM4A1::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A810, "_ZN5CM4A18PrecacheEv", CM4A1::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A8C0, "_ZN5CM4A111GetItemInfoEP8ItemInfo", CM4A1::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A930, "_ZN5CM4A16DeployEv", CM4A1::Deploy), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B050, "_ZN5CM4A111GetMaxSpeedEv", CM4A1::GetMaxSpeed), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B060, "_ZN5CM4A19iItemSlotEv", CM4A1::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0A9C0, "_ZN5CM4A115SecondaryAttackEv", CM4A1::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0AA70, "_ZN5CM4A113PrimaryAttackEv", CM4A1::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0AF60, "_ZN5CM4A16ReloadEv", CM4A1::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0AFC0, "_ZN5CM4A110WeaponIdleEv", CM4A1::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B070, "_ZN5CM4A112UseDecrementEv", CM4A1::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D0A760, weapon_m4a1), - HOOK_SYMBOLDEF(0x01D0AB80, "_ZN5CM4A18M4A1FireEffi", CM4A1::M4A1Fire), -//CMAC10 - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B0D0, "_ZN6CMAC105SpawnEv", CMAC10::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B120, "_ZN6CMAC108PrecacheEv", CMAC10::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B190, "_ZN6CMAC1011GetItemInfoEP8ItemInfo", CMAC10::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B200, "_ZN6CMAC106DeployEv", CMAC10::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B6E0, "_ZN6CMAC1011GetMaxSpeedEv", CMAC10::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B6D0, "_ZN6CMAC109iItemSlotEv", CMAC10::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B250, "_ZN6CMAC1013PrimaryAttackEv", CMAC10::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B610, "_ZN6CMAC106ReloadEv", CMAC10::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B660, "_ZN6CMAC1010WeaponIdleEv", CMAC10::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0B6F0, "_ZN6CMAC1012UseDecrementEv", CMAC10::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D0B080, weapon_mac10), - HOOK_SYMBOLDEF(0x01D0B290, "_ZN6CMAC109MAC10FireEffi", CMAC10::MAC10Fire), -//CP228 - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0BDC0, "_ZN5CP2285SpawnEv", CP228::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0BE20, "_ZN5CP2288PrecacheEv", CP228::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0BEB0, "_ZN5CP22811GetItemInfoEP8ItemInfo", CP228::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0BF20, "_ZN5CP2286DeployEv", CP228::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0C4A0, "_ZN5CP22811GetMaxSpeedEv", CP228::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0C490, "_ZN5CP2289iItemSlotEv", CP228::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0C080, "_ZN5CP22815SecondaryAttackEv", CP228::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0BFC0, "_ZN5CP22813PrimaryAttackEv", CP228::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0C380, "_ZN5CP2286ReloadEv", CP228::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0C3D0, "_ZN5CP22810WeaponIdleEv", CP228::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0C4B0, "_ZN5CP22812UseDecrementEv", CP228::UseDecrement), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0C4C0, "_ZN5CP2288IsPistolEv", CP228::IsPistol), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D0BD70, weapon_p228), - HOOK_SYMBOLDEF(0x01D0C090, "_ZN5CP2288P228FireEffi", CP228::P228Fire), - //HOOK_SYMBOLDEF(0x0, "_ZN5CP2288MakeBeamEv", CP228::MakeBeam), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN5CP22810BeamUpdateEv", CP228::BeamUpdate), // NOXREF -//CP90 - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0C520, "_ZN4CP905SpawnEv", CP90::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0C580, "_ZN4CP908PrecacheEv", CP90::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0C600, "_ZN4CP9011GetItemInfoEP8ItemInfo", CP90::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0C670, "_ZN4CP906DeployEv", CP90::Deploy), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0CB90, "_ZN4CP9011GetMaxSpeedEv", CP90::GetMaxSpeed), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0CB80, "_ZN4CP909iItemSlotEv", CP90::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0C6C0, "_ZN4CP9013PrimaryAttackEv", CP90::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0CAC0, "_ZN4CP906ReloadEv", CP90::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0CB10, "_ZN4CP9010WeaponIdleEv", CP90::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0CBA0, "_ZN4CP9012UseDecrementEv", CP90::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D0C4D0, weapon_p90), - HOOK_SYMBOLDEF(0x01D0C750, "_ZN4CP907P90FireEffi", CP90::P90Fire), -//CSCOUT - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0CC00, "_ZN6CSCOUT5SpawnEv", CSCOUT::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0CC40, "_ZN6CSCOUT8PrecacheEv", CSCOUT::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0CCC0, "_ZN6CSCOUT11GetItemInfoEP8ItemInfo", CSCOUT::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0CD30, "_ZN6CSCOUT6DeployEv", CSCOUT::Deploy), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0D280, "_ZN6CSCOUT11GetMaxSpeedEv", CSCOUT::GetMaxSpeed), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0D2A0, "_ZN6CSCOUT9iItemSlotEv", CSCOUT::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0CDA0, "_ZN6CSCOUT15SecondaryAttackEv", CSCOUT::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0CE80, "_ZN6CSCOUT13PrimaryAttackEv", CSCOUT::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0D1A0, "_ZN6CSCOUT6ReloadEv", CSCOUT::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0D200, "_ZN6CSCOUT10WeaponIdleEv", CSCOUT::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0D2B0, "_ZN6CSCOUT12UseDecrementEv", CSCOUT::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D0CBB0, weapon_scout), - HOOK_SYMBOLDEF(0x01D0CEF0, "_ZN6CSCOUT9SCOUTFireEffi", CSCOUT::SCOUTFire), -//CSmokeGrenade - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0E250, "_ZN13CSmokeGrenade5SpawnEv", CSmokeGrenade::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0E2C0, "_ZN13CSmokeGrenade8PrecacheEv", CSmokeGrenade::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0E310, "_ZN13CSmokeGrenade11GetItemInfoEP8ItemInfo", CSmokeGrenade::GetItemInfo), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0EB80, "_ZN13CSmokeGrenade7CanDropEv", CSmokeGrenade::CanDrop), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0E380, "_ZN13CSmokeGrenade6DeployEv", CSmokeGrenade::Deploy), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0E420, "_ZN13CSmokeGrenade7HolsterEi", CSmokeGrenade::Holster), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0EB70, "_ZN13CSmokeGrenade11GetMaxSpeedEv", CSmokeGrenade::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0EB60, "_ZN13CSmokeGrenade9iItemSlotEv", CSmokeGrenade::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0E630, "_ZN13CSmokeGrenade15SecondaryAttackEv", CSmokeGrenade::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0E480, "_ZN13CSmokeGrenade13PrimaryAttackEv", CSmokeGrenade::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0E6D0, "_ZN13CSmokeGrenade10WeaponIdleEv", CSmokeGrenade::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0EB90, "_ZN13CSmokeGrenade12UseDecrementEv", CSmokeGrenade::UseDecrement), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0EB40, "_ZN13CSmokeGrenade9CanDeployEv", CSmokeGrenade::CanDeploy), - // non-virtual func - HOOK_DEF(0x01D0E200, weapon_smokegrenade), - HOOK_SYMBOLDEF(0x01D0E4F0, "_ZN13CSmokeGrenade19ShieldSecondaryFireEii", CSmokeGrenade::ShieldSecondaryFire), - //HOOK_SYMBOLDEF(0x01D0E640, "_ZN13CSmokeGrenade19SetPlayerShieldAnimEv", CSmokeGrenade::SetPlayerShieldAnim), // NOXREF - //HOOK_SYMBOLDEF(0x01D0E690, "_ZN13CSmokeGrenade21ResetPlayerShieldAnimEv", CSmokeGrenade::ResetPlayerShieldAnim), // NOXREF -//CTMP - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0EBF0, "_ZN4CTMP5SpawnEv", CTMP::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0EC50, "_ZN4CTMP8PrecacheEv", CTMP::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0ECB0, "_ZN4CTMP11GetItemInfoEP8ItemInfo", CTMP::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0ED20, "_ZN4CTMP6DeployEv", CTMP::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F1D0, "_ZN4CTMP11GetMaxSpeedEv", CTMP::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F1C0, "_ZN4CTMP9iItemSlotEv", CTMP::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0ED70, "_ZN4CTMP13PrimaryAttackEv", CTMP::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F100, "_ZN4CTMP6ReloadEv", CTMP::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F150, "_ZN4CTMP10WeaponIdleEv", CTMP::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F1E0, "_ZN4CTMP12UseDecrementEv", CTMP::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D0EBA0, weapon_tmp), - HOOK_SYMBOLDEF(0x01D0EDB0, "_ZN4CTMP7TMPFireEffi", CTMP::TMPFire), -//CXM1014 - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D10220, "_ZN7CXM10145SpawnEv", CXM1014::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D10260, "_ZN7CXM10148PrecacheEv", CXM1014::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D102D0, "_ZN7CXM101411GetItemInfoEP8ItemInfo", CXM1014::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D10340, "_ZN7CXM10146DeployEv", CXM1014::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D10940, "_ZN7CXM101411GetMaxSpeedEv", CXM1014::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D10930, "_ZN7CXM10149iItemSlotEv", CXM1014::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D10370, "_ZN7CXM101413PrimaryAttackEv", CXM1014::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D10640, "_ZN7CXM10146ReloadEv", CXM1014::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D107F0, "_ZN7CXM101410WeaponIdleEv", CXM1014::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D10950, "_ZN7CXM101412UseDecrementEv", CXM1014::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D101D0, weapon_xm1014), -//CELITE - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D04200, "_ZN6CELITE5SpawnEv", CELITE::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D04250, "_ZN6CELITE8PrecacheEv", CELITE::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D04300, "_ZN6CELITE11GetItemInfoEP8ItemInfo", CELITE::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D04370, "_ZN6CELITE6DeployEv", CELITE::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D049D0, "_ZN6CELITE11GetMaxSpeedEv", CELITE::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D049C0, "_ZN6CELITE9iItemSlotEv", CELITE::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D043D0, "_ZN6CELITE13PrimaryAttackEv", CELITE::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D04900, "_ZN6CELITE6ReloadEv", CELITE::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D04940, "_ZN6CELITE10WeaponIdleEv", CELITE::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D049E0, "_ZN6CELITE12UseDecrementEv", CELITE::UseDecrement), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D049F0, "_ZN6CELITE8IsPistolEv", CELITE::IsPistol), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D041B0, weapon_elite), - HOOK_SYMBOLDEF(0x01D04490, "_ZN6CELITE9ELITEFireEffi", CELITE::ELITEFire), -//CFiveSeven - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D05280, "_ZN10CFiveSeven5SpawnEv", CFiveSeven::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D052E0, "_ZN10CFiveSeven8PrecacheEv", CFiveSeven::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D05370, "_ZN10CFiveSeven11GetItemInfoEP8ItemInfo", CFiveSeven::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D053E0, "_ZN10CFiveSeven6DeployEv", CFiveSeven::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D05950, "_ZN10CFiveSeven11GetMaxSpeedEv", CFiveSeven::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D05940, "_ZN10CFiveSeven9iItemSlotEv", CFiveSeven::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D05540, "_ZN10CFiveSeven15SecondaryAttackEv", CFiveSeven::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D05480, "_ZN10CFiveSeven13PrimaryAttackEv", CFiveSeven::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D05840, "_ZN10CFiveSeven6ReloadEv", CFiveSeven::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D05880, "_ZN10CFiveSeven10WeaponIdleEv", CFiveSeven::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D05960, "_ZN10CFiveSeven12UseDecrementEv", CFiveSeven::UseDecrement), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D05970, "_ZN10CFiveSeven8IsPistolEv", CFiveSeven::IsPistol), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D05230, weapon_fiveseven), - HOOK_SYMBOLDEF(0x01D05550, "_ZN10CFiveSeven13FiveSevenFireEffi", CFiveSeven::FiveSevenFire), - //HOOK_SYMBOLDEF(0x0, "_ZN10CFiveSeven8MakeBeamEv", CFiveSeven::MakeBeam), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN10CFiveSeven10BeamUpdateEv", CFiveSeven::BeamUpdate), // NOXREF -//CUMP45 - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F240, "_ZN6CUMP455SpawnEv", CUMP45::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F290, "_ZN6CUMP458PrecacheEv", CUMP45::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F300, "_ZN6CUMP4511GetItemInfoEP8ItemInfo", CUMP45::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F370, "_ZN6CUMP456DeployEv", CUMP45::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F840, "_ZN6CUMP4511GetMaxSpeedEv", CUMP45::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F830, "_ZN6CUMP459iItemSlotEv", CUMP45::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F3C0, "_ZN6CUMP4513PrimaryAttackEv", CUMP45::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F770, "_ZN6CUMP456ReloadEv", CUMP45::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F7C0, "_ZN6CUMP4510WeaponIdleEv", CUMP45::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0F850, "_ZN6CUMP4512UseDecrementEv", CUMP45::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D0F1F0, weapon_ump45), - HOOK_SYMBOLDEF(0x01D0F400, "_ZN6CUMP459UMP45FireEffi", CUMP45::UMP45Fire), -//CSG550 - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0D310, "_ZN6CSG5505SpawnEv", CSG550::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0D360, "_ZN6CSG5508PrecacheEv", CSG550::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0D3E0, "_ZN6CSG55011GetItemInfoEP8ItemInfo", CSG550::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0D450, "_ZN6CSG5506DeployEv", CSG550::Deploy), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0DA10, "_ZN6CSG55011GetMaxSpeedEv", CSG550::GetMaxSpeed), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0DA30, "_ZN6CSG5509iItemSlotEv", CSG550::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0D480, "_ZN6CSG55015SecondaryAttackEv", CSG550::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0D560, "_ZN6CSG55013PrimaryAttackEv", CSG550::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0D920, "_ZN6CSG5506ReloadEv", CSG550::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D0D990, "_ZN6CSG55010WeaponIdleEv", CSG550::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D0DA40, "_ZN6CSG55012UseDecrementEv", CSG550::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D0D2C0, weapon_sg550), - HOOK_SYMBOLDEF(0x01D0D610, "_ZN6CSG5509SG550FireEffi", CSG550::SG550Fire), -//CGalil - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D06AC0, "_ZN6CGalil5SpawnEv", CGalil::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D06B00, "_ZN6CGalil8PrecacheEv", CGalil::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D06B80, "_ZN6CGalil11GetItemInfoEP8ItemInfo", CGalil::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D06BF0, "_ZN6CGalil6DeployEv", CGalil::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D07170, "_ZN6CGalil11GetMaxSpeedEv", CGalil::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D07160, "_ZN6CGalil9iItemSlotEv", CGalil::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D06C40, "_ZN6CGalil15SecondaryAttackEv", CGalil::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D06C50, "_ZN6CGalil13PrimaryAttackEv", CGalil::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D070A0, "_ZN6CGalil6ReloadEv", CGalil::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D070F0, "_ZN6CGalil10WeaponIdleEv", CGalil::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D07180, "_ZN6CGalil12UseDecrementEv", CGalil::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D06A70, weapon_galil), - HOOK_SYMBOLDEF(0x01D06D20, "_ZN6CGalil9GalilFireEffi", CGalil::GalilFire), -//CFamas - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D04A50, "_ZN6CFamas5SpawnEv", CFamas::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D04AA0, "_ZN6CFamas8PrecacheEv", CFamas::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D04B40, "_ZN6CFamas11GetItemInfoEP8ItemInfo", CFamas::GetItemInfo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D04BB0, "_ZN6CFamas6DeployEv", CFamas::Deploy), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D05210, "_ZN6CFamas11GetMaxSpeedEv", CFamas::GetMaxSpeed), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D05200, "_ZN6CFamas9iItemSlotEv", CFamas::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D04C10, "_ZN6CFamas15SecondaryAttackEv", CFamas::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D04C90, "_ZN6CFamas13PrimaryAttackEv", CFamas::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D05120, "_ZN6CFamas6ReloadEv", CFamas::Reload), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D05190, "_ZN6CFamas10WeaponIdleEv", CFamas::WeaponIdle), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D05220, "_ZN6CFamas12UseDecrementEv", CFamas::UseDecrement), // DEFAULT - // non-virtual func - HOOK_DEF(0x01D04A00, weapon_famas), - HOOK_SYMBOLDEF(0x01D04D70, "_ZN6CFamas9FamasFireEffii", CFamas::FamasFire), -//CArmoury - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD0E50, "_ZN8CArmoury5SpawnEv", CArmoury::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD1230, "_ZN8CArmoury8PrecacheEv", CArmoury::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD10A0, "_ZN8CArmoury7RestartEv", CArmoury::Restart), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD0D80, "_ZN8CArmoury8KeyValueEP14KeyValueData_s", CArmoury::KeyValue), - // non-virtual func - HOOK_DEF(0x01DD0E00, armoury_entity), - HOOK_SYMBOLDEF(0x01DD0A10, "_ZN8CArmoury12ArmouryTouchEP11CBaseEntity", CArmoury::ArmouryTouch), - -#endif // Weapons_Region - -#ifndef GGrenade_Region - - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D831C0, "_ZN8CGrenade5SpawnEv", CGrenade::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D84820, "_ZN8CGrenade4SaveER5CSave", CGrenade::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D84850, "_ZN8CGrenade7RestoreER8CRestore", CGrenade::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D594F0, "_ZN8CGrenade10ObjectCapsEv", CGrenade::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D82320, "_ZN8CGrenade6KilledEP9entvars_si", CGrenade::Killed), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D83560, "_ZN8CGrenade10BloodColorEv", CGrenade::BloodColor), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D83720, "_ZN8CGrenade3UseEP11CBaseEntityS1_8USE_TYPEf", CGrenade::Use), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D82E00, "_ZN8CGrenade11BounceSoundEv", CGrenade::BounceSound), - // non-virtual func - //HOOK_DEF(0x0, AnnounceFlashInterval), // NOXREF - HOOK_SYMBOLDEF(0x01D83570, "_ZN8CGrenade10ShootTimedEP9entvars_s6VectorS2_f", CGrenade::ShootTimed), - HOOK_SYMBOLDEF(0x01D833D0, "_ZN8CGrenade11ShootTimed2EP9entvars_s6VectorS2_fit", CGrenade::ShootTimed2), - //HOOK_SYMBOLDEF(0x01D832C0, "_ZN8CGrenade12ShootContactEP9entvars_s6VectorS2_", CGrenade::ShootContact), // NOXREF - HOOK_SYMBOLDEF(0x01D83C90, "_ZN8CGrenade17ShootSmokeGrenadeEP9entvars_s6VectorS2_ft", CGrenade::ShootSmokeGrenade), - HOOK_SYMBOLDEF(0x01D839C0, "_ZN8CGrenade18ShootSatchelChargeEP9entvars_s6VectorS2_", CGrenade::ShootSatchelCharge), - //HOOK_SYMBOLDEF(0x01D84760, "_ZN8CGrenade17UseSatchelChargesEP9entvars_sNS_11SATCHELCODEE", CGrenade::UseSatchelCharges), // NOXREF - HOOK_SYMBOLDEF(0x01D80D40, "_ZN8CGrenade7ExplodeE6VectorS0_", CGrenade::Explode, void (Vector, Vector)), - HOOK_SYMBOLDEF(0x01D80DA0, "_ZN8CGrenade7ExplodeEP11TraceResulti", CGrenade::Explode, void (TraceResult *, int)), - HOOK_SYMBOLDEF(0x01D81010, "_ZN8CGrenade8Explode2EP11TraceResulti", CGrenade::Explode2), - HOOK_SYMBOLDEF(0x01D81620, "_ZN8CGrenade8Explode3EP11TraceResulti", CGrenade::Explode3), - //HOOK_SYMBOLDEF(0x01D819B0, "_ZN8CGrenade10SG_ExplodeEP11TraceResulti", CGrenade::SG_Explode), // NOXREF - HOOK_SYMBOLDEF(0x01D82050, "_ZN8CGrenade5SmokeEv", CGrenade::Smoke), - HOOK_SYMBOLDEF(0x01D81F50, "_ZN8CGrenade6Smoke2Ev", CGrenade::Smoke2), - HOOK_SYMBOLDEF(0x01D81DF0, "_ZN8CGrenade8Smoke3_AEv", CGrenade::Smoke3_A), - HOOK_SYMBOLDEF(0x01D81C90, "_ZN8CGrenade8Smoke3_BEv", CGrenade::Smoke3_B), - HOOK_SYMBOLDEF(0x01D81B70, "_ZN8CGrenade8Smoke3_CEv", CGrenade::Smoke3_C), - HOOK_SYMBOLDEF(0x01D82150, "_ZN8CGrenade8SG_SmokeEv", CGrenade::SG_Smoke), - HOOK_SYMBOLDEF(0x01D82B10, "_ZN8CGrenade11BounceTouchEP11CBaseEntity", CGrenade::BounceTouch), - HOOK_SYMBOLDEF(0x01D82D80, "_ZN8CGrenade10SlideTouchEP11CBaseEntity", CGrenade::SlideTouch), - HOOK_SYMBOLDEF(0x01D83E60, "_ZN8CGrenade7C4ThinkEv", CGrenade::C4Think), - HOOK_SYMBOLDEF(0x01D84750, "_ZN8CGrenade7C4TouchEP11CBaseEntity", CGrenade::C4Touch), - HOOK_SYMBOLDEF(0x01D82820, "_ZN8CGrenade12ExplodeTouchEP11CBaseEntity", CGrenade::ExplodeTouch), - HOOK_SYMBOLDEF(0x01D82A00, "_ZN8CGrenade16DangerSoundThinkEv", CGrenade::DangerSoundThink), - HOOK_SYMBOLDEF(0x01D823D0, "_ZN8CGrenade11PreDetonateEv", CGrenade::PreDetonate), - HOOK_SYMBOLDEF(0x01D82410, "_ZN8CGrenade8DetonateEv", CGrenade::Detonate), - HOOK_SYMBOLDEF(0x01D824A0, "_ZN8CGrenade11SG_DetonateEv", CGrenade::SG_Detonate), - HOOK_SYMBOLDEF(0x01D82700, "_ZN8CGrenade9Detonate2Ev", CGrenade::Detonate2), - HOOK_SYMBOLDEF(0x01D82790, "_ZN8CGrenade9Detonate3Ev", CGrenade::Detonate3), - HOOK_SYMBOLDEF(0x01D823B0, "_ZN8CGrenade11DetonateUseEP11CBaseEntityS1_8USE_TYPEf", CGrenade::DetonateUse), - HOOK_SYMBOLDEF(0x01D82EE0, "_ZN8CGrenade11TumbleThinkEv", CGrenade::TumbleThink), - HOOK_SYMBOLDEF(0x01D83030, "_ZN8CGrenade14SG_TumbleThinkEv", CGrenade::SG_TumbleThink), - //linked objects - HOOK_DEF(0x01D80CF0, grenade), - -#endif // GGrenade_Region - -#ifndef Animation_Region - - HOOK_SYMBOLDEF(0x01D5A650, "_Z11ExtractBboxPviPfS0_", ExtractBbox), - HOOK_SYMBOLDEF(0x01D5A6B0, "_Z14LookupActivityPvP9entvars_si", LookupActivity), - HOOK_SYMBOLDEF(0x01D5A780, "_Z22LookupActivityHeaviestPvP9entvars_si", LookupActivityHeaviest), - //HOOK_SYMBOLDEF(0x01D5A7D0, "_Z14GetEyePositionPvPf", GetEyePosition), // NOXREF - HOOK_SYMBOLDEF(0x01D5A810, "_Z14LookupSequencePvPKc", LookupSequence), - //HOOK_SYMBOLDEF(0x01D5A870, "_Z12IsSoundEventi", IsSoundEvent), // NOXREF - //HOOK_SYMBOLDEF(0x01D5A890, "_Z16SequencePrecachePvPKc", SequencePrecache), // NOXREF - HOOK_SYMBOLDEF(0x01D5A9A0, "_Z15GetSequenceInfoPvP9entvars_sPfS2_", GetSequenceInfo), - HOOK_SYMBOLDEF(0x01D5AA60, "_Z16GetSequenceFlagsPvP9entvars_s", GetSequenceFlags), - HOOK_SYMBOLDEF(0x01D5AAA0, "_Z17GetAnimationEventPvP9entvars_sP14MonsterEvent_tffi", GetAnimationEvent), - HOOK_SYMBOLDEF(0x01D5ABF0, "_Z13SetControllerPvP9entvars_sif", SetController), - HOOK_SYMBOLDEF(0x01D5AD60, "_Z11SetBlendingPvP9entvars_sif", SetBlending), - HOOK_SYMBOLDEF(0x01D5AEB0, "_Z14FindTransitionPviiPi", FindTransition), - HOOK_SYMBOLDEF(0x01D5AFC0, "_Z12SetBodygroupPvP9entvars_sii", SetBodygroup), - HOOK_SYMBOLDEF(0x01D5B020, "_Z12GetBodygroupPvP9entvars_si", GetBodygroup), - HOOK_DEF(0x01D5B080, Server_GetBlendingInterface), - HOOK_SYMBOLDEF(0x01D5B0E0, "_Z15AngleQuaternionPfS_", AngleQuaternion), - HOOK_SYMBOLDEF(0x01D5B190, "_Z15QuaternionSlerpPfS_fS_", QuaternionSlerp), - HOOK_SYMBOLDEF(0x01D5B430, "_Z13StudioGetAnimP7model_sP16mstudioseqdesc_t", StudioGetAnim), - //HOOK_SYMBOLDEF(0x01D5B4C0, "_Z15LookupAnimationP11studiohdr_tP7model_sP16mstudioseqdesc_ti", LookupAnimation), // NOXREF - HOOK_SYMBOLDEF(0x01D5B500, "_Z17StudioCalcBoneAdjfPfPKhS1_h", StudioCalcBoneAdj), - HOOK_SYMBOLDEF(0x01D5B720, "_Z23StudioCalcBoneQuaterionifP13mstudiobone_tP13mstudioanim_tPfS3_", StudioCalcBoneQuaterion), - HOOK_SYMBOLDEF(0x01D5B8E0, "_Z22StudioCalcBonePositionifP13mstudiobone_tP13mstudioanim_tPfS3_", StudioCalcBonePosition), - HOOK_SYMBOLDEF(0x01D5BA20, "_Z16StudioSlerpBonesPA4_fPA3_fS0_S2_f", StudioSlerpBones), - //HOOK_SYMBOLDEF(0x01D5BB50, "_Z19StudioCalcRotationsP13mstudiobone_tPiiPfPA3_fPA4_fP16mstudioseqdesc_tP13mstudioanim_tff", StudioCalcRotations), // NOXREF - HOOK_SYMBOLDEF(0x01D5BBE0, "_Z16ConcatTransformsPA4_fS0_S0_", ConcatTransforms), - -#if 1 - // NOTE: both functions must be involved in the hooks or also both disable their. - HOOK_SYMBOLDEF(0x01D5B350, "_Z16QuaternionMatrixPfPA4_f", QuaternionMatrix), - HOOK_SYMBOLDEF(0x01D5BD20, "_Z19SV_StudioSetupBonesP7model_sfiPKfS2_PKhS4_iPK7edict_s", SV_StudioSetupBones), -#endif - -#endif // Animation_Region - -#ifndef MemoryPool_Region - - //HOOK_SYMBOLDEF(0x01D8A2D0, "_ZN11CMemoryPoolC2Eii", CMemoryPool::CMemoryPool), // NOXREF - HOOK_SYMBOLDEF(0x01D8A330, "_ZN11CMemoryPool10AddNewBlobEv", CMemoryPool::AddNewBlob), - HOOK_SYMBOLDEF(0x01D8A3D0, "_ZN11CMemoryPool5AllocEj", CMemoryPool::Alloc), - HOOK_SYMBOLDEF(0x01D8A420, "_ZN11CMemoryPool4FreeEPv", CMemoryPool::Free), - -#endif // MemoryPool_Region - -#ifndef Unicode_StrTools_Region - - //HOOK_SYMBOLDEF(0x0, "_Z16Q_IsValidUChar32w", Q_IsValidUChar32), - -#ifdef _WIN32 - HOOK_DEF(0x01DDE010, Q_UTF32ToUChar32), -#endif // _WIN32 - - //HOOK_DEF(0x0, Q_UChar32ToUTF32Len), - //HOOK_DEF(0x0, Q_UChar32ToUTF32), - //HOOK_DEF(0x01DDDEE0, Q_UChar32ToUTF8Len), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_Z19Q_UChar32ToUTF16Lenw", Q_UChar32ToUTF16Len), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_Z16Q_UChar32ToUTF16wPt", Q_UChar32ToUTF16), // NOXREF - //HOOK_SYMBOLDEF(0x01DDDF70, "_Z15Q_UChar32ToUTF8wPc", Q_UChar32ToUTF8), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_Z16Q_UTF16ToUChar32PKtRwRb", Q_UTF16ToUChar32), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_Z13Q_UTF8ToUTF16PKcPti25EStringConvertErrorPolicy", Q_UTF8ToUTF16), // NOXREF - //HOOK_SYMBOLDEF(0x01DDFA30, "_Z13Q_UTF8ToUTF32PKcPwi25EStringConvertErrorPolicy", Q_UTF8ToUTF32), - //HOOK_SYMBOLDEF(0x0, "_Z13Q_UTF16ToUTF8PKtPci25EStringConvertErrorPolicy", Q_UTF16ToUTF8), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_Z14Q_UTF16ToUTF32PKtPwi25EStringConvertErrorPolicy", Q_UTF16ToUTF32), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_Z13Q_UTF32ToUTF8PKwPci25EStringConvertErrorPolicy", Q_UTF32ToUTF8), // NOXREF - //HOOK_SYMBOLDEF(0x01DDEB00, "_Z14Q_UTF32ToUTF16PKwPti25EStringConvertErrorPolicy", Q_UTF32ToUTF16), // NOXREF - //HOOK_SYMBOLDEF(0x01DDECA0, "_Z15Q_UTF8ToUChar32PKcRwRb", Q_UTF8ToUChar32), - HOOK_DEF(0x01DDEE00, Q_UnicodeValidate), - //HOOK_DEF(0x01DDEE50, Q_UnicodeLength), // NOXREF - //HOOK_DEF(0x01DDEE80, Q_UnicodeAdvance), - //HOOK_SYMBOLDEF(0x01DDEEC0, "_Z14Q_IsMeanSpaceWw", Q_IsMeanSpaceW), // NOXREF - //HOOK_SYMBOLDEF(0x01DDF150, "_Z15Q_IsDeprecatedWw", Q_IsDeprecatedW), // NOXREF - //HOOK_DEF(0x0, StripWhitespaceWorker), // NOXREF - //HOOK_DEF(0x0, StripUnprintableWorker), // NOXREF - HOOK_DEF(0x01DDF1D0, Q_StripUnprintableAndSpace), - //HOOK_DEF(0x01DDF8A0, V_UTF8ToUChar32), // NOXREF - //HOOK_DEF(0x01DDF8D0, Q_UnicodeRepair), // NOXREF - -#endif // Unicode_StrTools_Region - -#ifndef CUtlSymbol_Region - - //HOOK_SYMBOLDEF(0x01DC81F0, "_ZN10CUtlSymbolC2EPKc", CUtlSymbol::CUtlSymbol), - //HOOK_SYMBOLDEF(0x01DC80D0, "_ZN10CUtlSymbol10InitializeEv", CUtlSymbol::Initialize), - //HOOK_SYMBOLDEF(0x01DC8160, "_ZN10CUtlSymbol9CurrTableEv", CUtlSymbol::CurrTable), - //HOOK_SYMBOLDEF(0x01DC82A0, "_ZNK10CUtlSymbol6StringEv", CUtlSymbol::String), - //HOOK_SYMBOLDEF(0x01DC82E0, "_ZNK10CUtlSymboleqEPKc", CUtlSymbol::operator==), - //HOOK_SYMBOLDEF(0x01DC8390, "_ZN15CUtlSymbolTable7SymLessERKjS1_", CUtlSymbolTable::SymLess), - //HOOK_SYMBOLDEF(0x01DC8410, "_ZN15CUtlSymbolTable8SymLessiERKjS1_", CUtlSymbolTable::SymLessi), - //HOOK_SYMBOLDEF(0x01DC8460, "_ZN15CUtlSymbolTableC2Eiib", CUtlSymbolTable::CUtlSymbolTable), // NOXREF - //HOOK_SYMBOLDEF(0x01DC84D0, "_ZN15CUtlSymbolTableD2Ev", CUtlSymbolTable::~CUtlSymbolTable), // NOXREF - //HOOK_SYMBOLDEF(0x01DC8540, "_ZN15CUtlSymbolTable4FindEPKc", CUtlSymbolTable::Find), // NOXREF - //HOOK_SYMBOLDEF(0x01DC87D0, "_ZNK15CUtlSymbolTable6StringE10CUtlSymbol", CUtlSymbolTable::String), - //HOOK_SYMBOLDEF(0x01DC8800, "_ZN15CUtlSymbolTable9RemoveAllEv", CUtlSymbolTable::RemoveAll), - //HOOK_SYMBOLDEF(0x01DC8680, "_ZN15CUtlSymbolTable9AddStringEPKc", CUtlSymbolTable::AddString), - -#endif // CUtlSymbol_Region - -#ifndef Debug_Region - - //HOOK_DEF(0x0, IsDeveloper), // NOXREF - //HOOK_SYMBOLDEF(0x01D732D0, "_Z12UTIL_DPrintf15DebugOutputTypePcz", UTIL_DPrintf, void(DebugOutputType outputType, char *pszMsg, ...)), // NOXREF - HOOK_SYMBOLDEF(0x01D73320, "_Z12UTIL_DPrintfPcz", UTIL_DPrintf, void(char *pszMsg, ...)), - - //HOOK_SYMBOLDEF(0x01D73360, "_Z20UTIL_SetDprintfFlagsPKc", PrintDebugFlags), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZL12SetDebugFlagPKcb", SetDebugFlag), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_Z14PrintDebugFlagPKc", PrintDebugFlag), // NOXREF - HOOK_SYMBOLDEF(0x01D73410, "_Z20UTIL_SetDprintfFlagsPKc", UTIL_SetDprintfFlags), - //HOOK_SYMBOLDEF(0x01D73690, "_Z15UTIL_BotDPrintfPcz", UTIL_BotDPrintf), // NOXREF - HOOK_SYMBOLDEF(0x01D736E0, "_Z18UTIL_CareerDPrintfPcz", UTIL_CareerDPrintf), - //HOOK_SYMBOLDEF(0x01D73730, "_Z17UTIL_TutorDPrintfPcz", UTIL_TutorDPrintf), // NOXREF - //HOOK_SYMBOLDEF(0x01D73780, "_Z17UTIL_StatsDPrintfPcz", UTIL_StatsDPrintf), // NOXREF - //HOOK_SYMBOLDEF(0x01D737D0, "_Z19UTIL_HostageDPrintfPcz", UTIL_HostageDPrintf), // NOXREF - -#endif // Debug_Region - -#ifndef CS_Bot_Region -//Bot Manager - // virtual func - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D341B0, CCSBotManager, "_ZN11CBotManager12RestartRoundEv", CBotManager::RestartRound), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D34210, CCSBotManager, "_ZN11CBotManager10StartFrameEv", CBotManager::StartFrame), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D34540, CCSBotManager, "_ZN11CBotManager7OnEventE13GameEventTypeP11CBaseEntityS2_", CBotManager::OnEvent), - // non-virtual func - //HOOK_DEF(0x01D34170, MethodThunk::Constructor), - HOOK_SYMBOLDEF(0x01D34510, "_ZNK11CBotManager17GetNavMapFilenameEv", CBotManager::GetNavMapFilename), - HOOK_SYMBOLDEF(0x01D34650, "_ZN11CBotManager10AddGrenadeEiP8CGrenade", CBotManager::AddGrenade), - HOOK_SYMBOLDEF(0x01D346C0, "_ZN11CBotManager13RemoveGrenadeEP8CGrenade", CBotManager::RemoveGrenade), - //HOOK_SYMBOLDEF(0x01D346F0, "_ZN11CBotManager22ValidateActiveGrenadesEv", CBotManager::ValidateActiveGrenades), // NOXREF - //HOOK_SYMBOLDEF(0x01D34740, "_ZN11CBotManager18DestroyAllGrenadesEv", CBotManager::DestroyAllGrenades), // NOXREF - HOOK_SYMBOLDEF(0x01D347A0, "_ZN11CBotManager18IsInsideSmokeCloudEPK6Vector", CBotManager::IsInsideSmokeCloud), - HOOK_SYMBOLDEF(0x01D34850, "_ZN11CBotManager20IsLineBlockedBySmokeEPK6VectorS2_", CBotManager::IsLineBlockedBySmoke), - // non-class func - HOOK_SYMBOLDEF(0x01D34120, "_Z15NameToGameEventPKc", NameToGameEvent), -//CCSBotManager - // virtual func - //HOOK_DEF(0x01D22D60, MethodThunk::Constructor), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D23770, "_ZN13CCSBotManager16ClientDisconnectEP11CBasePlayer", CCSBotManager::ClientDisconnect), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D24880, "_ZN13CCSBotManager13ClientCommandEP11CBasePlayerPKc", CCSBotManager::ClientCommand), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D234D0, "_ZN13CCSBotManager14ServerActivateEv", CCSBotManager::ServerActivate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D23760, "_ZN13CCSBotManager16ServerDeactivateEv", CCSBotManager::ServerDeactivate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D23900, "_ZN13CCSBotManager13ServerCommandEPKc", CCSBotManager::ServerCommand), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D23520, "_ZN13CCSBotManager16AddServerCommandEPKc", CCSBotManager::AddServerCommand), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D23540, "_ZN13CCSBotManager17AddServerCommandsEv", CCSBotManager::AddServerCommands), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D22F40, "_ZN13CCSBotManager12RestartRoundEv", CCSBotManager::RestartRound), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D23200, "_ZN13CCSBotManager10StartFrameEv", CCSBotManager::StartFrame), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D25780, "_ZN13CCSBotManager7OnEventE13GameEventTypeP11CBaseEntityS2_", CCSBotManager::OnEvent), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D25970, "_ZNK13CCSBotManager17GetPlayerPriorityEP11CBasePlayer", CCSBotManager::GetPlayerPriority), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D25920, "_ZNK13CCSBotManager17IsImportantPlayerEP11CBasePlayer", CCSBotManager::IsImportantPlayer), - // non-virtual func - HOOK_SYMBOLDEF(0x01D24D90, "_ZN13CCSBotManager15ValidateMapDataEv", CCSBotManager::ValidateMapData), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager13IsLearningMapEv", CCSBotManager::IsLearningMap), - //HOOK_SYMBOLDEF(0x0, "_ZN13CCSBotManager18SetLearningMapFlagEv", CCSBotManager::SetLearningMapFlag), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager19IsAnalysisRequestedEv", CCSBotManager::IsAnalysisRequested), - //HOOK_SYMBOLDEF(0x0, "_ZN13CCSBotManager15RequestAnalysisEv", CCSBotManager::RequestAnalysis), - //HOOK_SYMBOLDEF(0x0, "_ZN13CCSBotManager18AckAnalysisRequestEv", CCSBotManager::AckAnalysisRequest), - //HOOK_SYMBOLDEF(0x0, "_ZN13CCSBotManager18GetDifficultyLevelEv", CCSBotManager::BotDifficultyType GetDifficultyLevel), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager11GetScenarioEv", CCSBotManager::GameScenarioType GetScenario), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager7GetZoneEi", CCSBotManager::GetZone, const CCSBotManager::Zone *(int) const), // NOXREF - HOOK_SYMBOLDEF(0x01D25530, "_ZNK13CCSBotManager7GetZoneEPK6Vector", CCSBotManager::GetZone, const CCSBotManager::Zone *(const Vector *) const), - //HOOK_SYMBOLDEF(0x01D255C0, "_ZNK13CCSBotManager14GetClosestZoneEPK6Vector", CCSBotManager::GetClosestZone, const CCSBotManager::Zone *(const Vector *) const), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager14GetClosestZoneEPK11CBaseEntity", CCSBotManager::GetClosestZone, const CCSBotManager::Zone *(const CBaseEntity *) const), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager12GetZoneCountEv", CCSBotManager::GetZoneCount), - HOOK_SYMBOLDEF(0x01D25630, "_ZNK13CCSBotManager23GetRandomPositionInZoneEPKNS_4ZoneE", CCSBotManager::GetRandomPositionInZone), - HOOK_SYMBOLDEF(0x01D25750, "_ZNK13CCSBotManager19GetRandomAreaInZoneEPKNS_4ZoneE", CCSBotManager::GetRandomAreaInZone), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager13GetRandomZoneEv", CCSBotManager::GetRandomZone), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager13IsBombPlantedEv", CCSBotManager::IsBombPlanted), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager21GetBombPlantTimestampEv", CCSBotManager::GetBombPlantTimestamp), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager17IsTimeToPlantBombEv", CCSBotManager::IsTimeToPlantBomb), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager14GetBombDefuserEv", CCSBotManager::GetBombDefuser), - HOOK_SYMBOLDEF(0x01D258B0, "_ZNK13CCSBotManager15GetBombTimeLeftEv", CCSBotManager::GetBombTimeLeft), - //HOOK_SYMBOLDEF(0x0, "_ZN13CCSBotManager12GetLooseBombEv", CCSBotManager::GetLooseBomb), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager16GetLooseBombAreaEv", CCSBotManager::GetLooseBombArea), - HOOK_SYMBOLDEF(0x01D258D0, "_ZN13CCSBotManager12SetLooseBombEP11CBaseEntity", CCSBotManager::SetLooseBomb), - HOOK_SYMBOLDEF(0x01D25A10, "_ZNK13CCSBotManager24GetRadioMessageTimestampE13GameEventTypei", CCSBotManager::GetRadioMessageTimestamp), - HOOK_SYMBOLDEF(0x01D25A40, "_ZNK13CCSBotManager23GetRadioMessageIntervalE13GameEventTypei", CCSBotManager::GetRadioMessageInterval), - HOOK_SYMBOLDEF(0x01D25A70, "_ZN13CCSBotManager24SetRadioMessageTimestampE13GameEventTypei", CCSBotManager::SetRadioMessageTimestamp), - //HOOK_SYMBOLDEF(0x01D25AA0, "_ZN13CCSBotManager27ResetRadioMessageTimestampsEv", CCSBotManager::ResetRadioMessageTimestamps), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager25GetLastSeenEnemyTimestampEv", CCSBotManager::GetLastSeenEnemyTimestamp), - //HOOK_SYMBOLDEF(0x0, "_ZN13CCSBotManager25SetLastSeenEnemyTimestampEv", CCSBotManager::SetLastSeenEnemyTimestamp), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager17GetRoundStartTimeEv", CCSBotManager::GetRoundStartTime), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager19GetElapsedRoundTimeEv", CCSBotManager::GetElapsedRoundTime), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager11AllowRoguesEv", CCSBotManager::AllowRogues), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager12AllowPistolsEv", CCSBotManager::AllowPistols), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager13AllowShotgunsEv", CCSBotManager::AllowShotguns), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager19AllowSubMachineGunsEv", CCSBotManager::AllowSubMachineGuns), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager11AllowRiflesEv", CCSBotManager::AllowRifles), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager16AllowMachineGunsEv", CCSBotManager::AllowMachineGuns), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager13AllowGrenadesEv", CCSBotManager::AllowGrenades), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager12AllowSnipersEv", CCSBotManager::AllowSnipers), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager19AllowTacticalShieldEv", CCSBotManager::AllowTacticalShield), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager23AllowFriendlyFireDamageEv", CCSBotManager::AllowFriendlyFireDamage), - HOOK_SYMBOLDEF(0x01D232D0, "_ZN13CCSBotManager15IsWeaponUseableEP15CBasePlayerItem", CCSBotManager::IsWeaponUseable), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager16IsDefenseRushingEv", CCSBotManager::IsDefenseRushing), - //HOOK_SYMBOLDEF(0x01D23410, "_ZNK13CCSBotManager11IsOnDefenseEPK11CBasePlayer", CCSBotManager::IsOnDefense), // NOXREF - HOOK_SYMBOLDEF(0x01D23460, "_ZNK13CCSBotManager11IsOnOffenseEPK11CBasePlayer", CCSBotManager::IsOnOffense), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager11IsRoundOverEv", CCSBotManager::IsRoundOver), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CCSBotManager11GetNavPlaceEv", CCSBotManager::GetNavPlace), - //HOOK_SYMBOLDEF(0x0, "_ZN13CCSBotManager11SetNavPlaceEj", CCSBotManager::SetNavPlace), - //HOOK_SYMBOLDEF(0x01D24D10, "_ZN13CCSBotManager15MonitorBotCVarsEv", CCSBotManager::MonitorBotCVars), // NOXREF - HOOK_SYMBOLDEF(0x01D24AE0, "_ZN13CCSBotManager16MaintainBotQuotaEv", CCSBotManager::MaintainBotQuota), - //HOOK_SYMBOLDEF(0x0, "_ZN13CCSBotManager16GetRandomBotNameENS_9SkillTypeE", CCSBotManager::GetRandomBotName), - HOOK_SYMBOLDEF(0x01D25270, "_ZN13CCSBotManager6AddBotEPK10BotProfile18BotProfileTeamType", CCSBotManager::AddBot), - HOOK_SYMBOLDEF(0x01D248B0, "_ZN13CCSBotManager13BotAddCommandE18BotProfileTeamTypeb", CCSBotManager::BotAddCommand), - //HOOK_SYMBOLDEF(0x01D238A0, "_Z16PrintAllEntitiesv", PrintAllEntities), // NOXREF - HOOK_SYMBOLDEF(0x01D23020, "_Z12UTIL_DrawBoxP6Extentiiii", UTIL_DrawBox), -//CCSBot - //HOOK_SYMBOLDEF(0x01D208C0, "_ZN6CCSBotC2Ev", CCSBot::CCSBot), - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D173D0, "_ZN6CCSBot10TakeDamageEP9entvars_sS1_fi", CCSBot::TakeDamage), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D175A0, "_ZN6CCSBot6KilledEP9entvars_si", CCSBot::Killed), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D20EC0, "_ZN6CCSBot12RoundRespawnEv", CCSBot::RoundRespawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D30A80, "_ZN6CCSBot5BlindEfffi", CCSBot::Blind), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D32370, "_ZN6CCSBot16OnTouchingWeaponEP10CWeaponBox", CCSBot::OnTouchingWeapon), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D20A60, "_ZN6CCSBot10InitializeEPK10BotProfile", CCSBot::Initialize), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D20E40, "_ZN6CCSBot8SpawnBotEv", CCSBot::SpawnBot), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D2D370, "_ZN6CCSBot6UpkeepEv", CCSBot::Upkeep), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D2D9B0, "_ZN6CCSBot6UpdateEv", CCSBot::Update), // using refs HOOK: FIX ME - HOOK_SYMBOL_VIRTUAL_DEF(0x01D17370, "_ZN6CCSBot4WalkEv", CCSBot::Walk), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D173A0, "_ZN6CCSBot4JumpEb", CCSBot::Jump), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D1F990, "_ZN6CCSBot7OnEventE13GameEventTypeP11CBaseEntityS2_", CCSBot::OnEvent), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D2F490, "_ZNK6CCSBot9IsVisibleEPK6Vectorb", CCSBot::IsVisible, bool (const Vector *, bool) const), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D2F5C0, "_ZNK6CCSBot9IsVisibleEP11CBasePlayerbPh", CCSBot::IsVisible, bool (CBasePlayer *, bool, unsigned char *) const), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D21390, "_ZNK6CCSBot18IsEnemyPartVisibleEN4CBot15VisiblePartTypeE", CCSBot::IsEnemyPartVisible), - // non-virtual func - HOOK_SYMBOLDEF(0x01D20EE0, "_ZN6CCSBot10DisconnectEv", CCSBot::Disconnect), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot14GetCombatRangeEv", CCSBot::GetCombatRange), - HOOK_SYMBOLDEF(0x01D184D0, "_ZNK6CCSBot7IsRogueEv", CCSBot::IsRogue), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot8SetRogueEb", CCSBot::SetRogue), - HOOK_SYMBOLDEF(0x01D185C0, "_ZNK6CCSBot10IsHurryingEv", CCSBot::IsHurrying), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot5HurryEf", CCSBot::Hurry), - HOOK_SYMBOLDEF(0x01D18620, "_ZNK6CCSBot6IsSafeEv", CCSBot::IsSafe), - HOOK_SYMBOLDEF(0x01D18650, "_ZNK6CCSBot14IsWellPastSafeEv", CCSBot::IsWellPastSafe), - HOOK_SYMBOLDEF(0x01D18680, "_ZNK6CCSBot15IsEndOfSafeTimeEv", CCSBot::IsEndOfSafeTime), - HOOK_SYMBOLDEF(0x01D186C0, "_ZNK6CCSBot20GetSafeTimeRemainingEv", CCSBot::GetSafeTimeRemaining), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot11GetSafeTimeEv", CCSBot::GetSafeTime), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot11IsUnhealthyEv", CCSBot::IsUnhealthy), // NOXREF - HOOK_SYMBOLDEF(0x01D2BE50, "_ZN6CCSBot4IdleEv", CCSBot::Idle), - HOOK_SYMBOLDEF(0x01D2C360, "_ZN6CCSBot4HideEP8CNavAreaffb", CCSBot::Hide, void (CNavArea *, float, float, bool)), - HOOK_SYMBOLDEF(0x01D2C620, "_ZN6CCSBot4HideEPK6Vectorfb", CCSBot::Hide, void (const Vector *, float, bool)), - HOOK_SYMBOLDEF(0x01D2C830, "_ZN6CCSBot9TryToHideEP8CNavAreaffbb", CCSBot::TryToHide), - HOOK_SYMBOLDEF(0x01D2CA10, "_ZN6CCSBot12TryToRetreatEv", CCSBot::TryToRetreat), - HOOK_SYMBOLDEF(0x01D2CEA0, "_ZNK6CCSBot8IsHidingEv", CCSBot::IsHiding), - HOOK_SYMBOLDEF(0x01D2CEC0, "_ZNK6CCSBot14IsAtHidingSpotEv", CCSBot::IsAtHidingSpot), - HOOK_SYMBOLDEF(0x01D2CA90, "_ZN6CCSBot4HuntEv", CCSBot::Hunt), - HOOK_SYMBOLDEF(0x01D2CEE0, "_ZNK6CCSBot9IsHuntingEv", CCSBot::IsHunting), - HOOK_SYMBOLDEF(0x01D2CB60, "_ZN6CCSBot6AttackEP11CBasePlayer", CCSBot::Attack), - HOOK_SYMBOLDEF(0x01D30B70, "_ZN6CCSBot17FireWeaponAtEnemyEv", CCSBot::FireWeaponAtEnemy), - HOOK_SYMBOLDEF(0x01D2CD80, "_ZN6CCSBot13StopAttackingEv", CCSBot::StopAttacking), - HOOK_SYMBOLDEF(0x01D2CE50, "_ZNK6CCSBot11IsAttackingEv", CCSBot::IsAttacking), - HOOK_SYMBOLDEF(0x01D2CF40, "_ZN6CCSBot6MoveToEPK6Vector9RouteType", CCSBot::MoveTo), - //HOOK_SYMBOLDEF(0x01D2CF00, "_ZNK6CCSBot10IsMovingToEv", CCSBot::IsMovingTo), // NOXREF - HOOK_SYMBOLDEF(0x01D2D030, "_ZN6CCSBot9PlantBombEv", CCSBot::PlantBomb), - HOOK_SYMBOLDEF(0x01D2D100, "_ZN6CCSBot9FetchBombEv", CCSBot::FetchBomb), - HOOK_SYMBOLDEF(0x01D17EA0, "_ZNK6CCSBot15NoticeLooseBombEv", CCSBot::NoticeLooseBomb), - HOOK_SYMBOLDEF(0x01D17EC0, "_ZNK6CCSBot15CanSeeLooseBombEv", CCSBot::CanSeeLooseBomb), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot14IsCarryingBombEv", CCSBot::IsCarryingBomb), - HOOK_SYMBOLDEF(0x01D2D1D0, "_ZN6CCSBot10DefuseBombEv", CCSBot::DefuseBomb), - HOOK_SYMBOLDEF(0x01D2CE80, "_ZNK6CCSBot14IsDefusingBombEv", CCSBot::IsDefusingBomb), - HOOK_SYMBOLDEF(0x01D17F00, "_ZNK6CCSBot17CanSeePlantedBombEv", CCSBot::CanSeePlantedBomb), - HOOK_SYMBOLDEF(0x01D2BF10, "_ZN6CCSBot14EscapeFromBombEv", CCSBot::EscapeFromBomb), - HOOK_SYMBOLDEF(0x01D2CE60, "_ZNK6CCSBot18IsEscapingFromBombEv", CCSBot::IsEscapingFromBomb), - //HOOK_SYMBOLDEF(0x01D2C260, "_ZN6CCSBot14RescueHostagesEv", CCSBot::RescueHostages), // NOXREF - HOOK_SYMBOLDEF(0x01D2C280, "_ZN6CCSBot9UseEntityEP11CBaseEntity", CCSBot::UseEntity), - HOOK_SYMBOLDEF(0x01D2CF20, "_ZNK6CCSBot8IsBuyingEv", CCSBot::IsBuying), - HOOK_SYMBOLDEF(0x01D17B80, "_ZN6CCSBot5PanicEP11CBasePlayer", CCSBot::Panic), - HOOK_SYMBOLDEF(0x01D2BFF0, "_ZN6CCSBot6FollowEP11CBasePlayer", CCSBot::Follow), - HOOK_SYMBOLDEF(0x01D2C130, "_ZN6CCSBot17ContinueFollowingEv", CCSBot::ContinueFollowing), - HOOK_SYMBOLDEF(0x01D2C230, "_ZN6CCSBot13StopFollowingEv", CCSBot::StopFollowing), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot11IsFollowingEv", CCSBot::IsFollowing), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot15GetFollowLeaderEv", CCSBot::GetFollowLeader), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot17GetFollowDurationEv", CCSBot::GetFollowDuration), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot13CanAutoFollowEv", CCSBot::CanAutoFollow), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot11IsNotMovingEv", CCSBot::IsNotMoving), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot10AimAtEnemyEv", CCSBot::AimAtEnemy), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot10StopAimingEv", CCSBot::StopAiming), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot15IsAimingAtEnemyEv", CCSBot::IsAimingAtEnemy), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot11IsSurprisedEv", CCSBot::IsSurprised), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot16GetSurpriseDelayEv", CCSBot::GetSurpriseDelay), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot18ClearSurpriseDelayEv", CCSBot::ClearSurpriseDelay), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot17GetStateTimestampEv", CCSBot::GetStateTimestamp), - HOOK_SYMBOLDEF(0x01D17E70, "_ZNK6CCSBot15IsDoingScenarioEv", CCSBot::IsDoingScenario), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot12GetGameStateEv", CCSBot::GetGameState, const CSGameState *() const), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot12GetGameStateEv", CCSBot::GetGameState, CSGameState *()), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot12IsAtBombsiteEv", CCSBot::IsAtBombsite), - HOOK_SYMBOLDEF(0x01D18740, "_ZN6CCSBot15GuardRandomZoneEf", CCSBot::GuardRandomZone), - HOOK_SYMBOLDEF(0x01D17900, "_ZNK6CCSBot6IsBusyEv", CCSBot::IsBusy), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot7SetTaskENS_8TaskTypeEP11CBaseEntity", CCSBot::SetTask), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot7GetTaskEv", CCSBot::GetTask), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot13GetTaskEntityEv", CCSBot::GetTaskEntity), - HOOK_SYMBOLDEF(0x01D18420, "_ZN6CCSBot14SetDispositionENS_15DispositionTypeE", CCSBot::SetDisposition), - HOOK_SYMBOLDEF(0x01D18440, "_ZNK6CCSBot14GetDispositionEv", CCSBot::GetDisposition), - HOOK_SYMBOLDEF(0x01D18470, "_ZN6CCSBot13IgnoreEnemiesEf", CCSBot::IgnoreEnemies), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot9GetMoraleEv", CCSBot::GetMorale), - HOOK_SYMBOLDEF(0x01D18490, "_ZN6CCSBot14IncreaseMoraleEv", CCSBot::IncreaseMorale), - HOOK_SYMBOLDEF(0x01D184B0, "_ZN6CCSBot14DecreaseMoraleEv", CCSBot::DecreaseMorale), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot12IsNoiseHeardEv", CCSBot::IsNoiseHeard), - HOOK_SYMBOLDEF(0x01D22510, "_ZN6CCSBot22ShouldInvestigateNoiseEPf", CCSBot::ShouldInvestigateNoise), - HOOK_SYMBOLDEF(0x01D2D2A0, "_ZN6CCSBot16InvestigateNoiseEv", CCSBot::InvestigateNoise), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot16GetNoisePositionEv", CCSBot::GetNoisePosition), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot12GetNoiseAreaEv", CCSBot::GetNoiseArea), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot11ForgetNoiseEv", CCSBot::ForgetNoise), - //HOOK_SYMBOLDEF(0x01D229C0, "_ZNK6CCSBot19CanSeeNoisePositionEv", CCSBot::CanSeeNoisePosition), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot13GetNoiseRangeEv", CCSBot::GetNoiseRange), // NOXREF - HOOK_SYMBOLDEF(0x01D227C0, "_ZNK6CCSBot25CanHearNearbyEnemyGunfireEf", CCSBot::CanHearNearbyEnemyGunfire), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot16GetNoisePriorityEv", CCSBot::GetNoisePriority), - HOOK_SYMBOLDEF(0x01D2BC80, "_ZN6CCSBot16SendRadioMessageE13GameEventType", CCSBot::SendRadioMessage), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot10GetChatterEv", CCSBot::GetChatter), - HOOK_SYMBOLDEF(0x01D2BA70, "_ZN6CCSBot20RespondToHelpRequestEP11CBasePlayerjf", CCSBot::RespondToHelpRequest), - HOOK_SYMBOLDEF(0x01D2B970, "_ZN6CCSBot18StartVoiceFeedbackEf", CCSBot::StartVoiceFeedback), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot12IsUsingVoiceEv", CCSBot::IsUsingVoice), - HOOK_SYMBOLDEF(0x01D179D0, "_ZN6CCSBot8SetEnemyEP11CBasePlayer", CCSBot::SetEnemy), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot8GetEnemyEv", CCSBot::GetEnemy), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot19GetNearbyEnemyCountEv", CCSBot::GetNearbyEnemyCount), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot13GetEnemyPlaceEv", CCSBot::GetEnemyPlace), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot12CanSeeBomberEv", CCSBot::CanSeeBomber), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot9GetBomberEv", CCSBot::GetBomber), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot20GetNearbyFriendCountEv", CCSBot::GetNearbyFriendCount), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot23GetClosestVisibleFriendEv", CCSBot::GetClosestVisibleFriend), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot28GetClosestVisibleHumanFriendEv", CCSBot::GetClosestVisibleHumanFriend), - HOOK_SYMBOLDEF(0x01D181A0, "_ZNK6CCSBot13IsOutnumberedEv", CCSBot::IsOutnumbered), - HOOK_SYMBOLDEF(0x01D181F0, "_ZNK6CCSBot16OutnumberedCountEv", CCSBot::OutnumberedCount), - HOOK_SYMBOLDEF(0x01D18290, "_ZNK6CCSBot17GetImportantEnemyEb", CCSBot::GetImportantEnemy), - HOOK_SYMBOLDEF(0x01D30830, "_ZN6CCSBot19UpdateReactionQueueEv", CCSBot::UpdateReactionQueue), - HOOK_SYMBOLDEF(0x01D30980, "_ZN6CCSBot18GetRecognizedEnemyEv", CCSBot::GetRecognizedEnemy), - HOOK_SYMBOLDEF(0x01D309B0, "_ZN6CCSBot26IsRecognizedEnemyReloadingEv", CCSBot::IsRecognizedEnemyReloading), - HOOK_SYMBOLDEF(0x01D309E0, "_ZN6CCSBot34IsRecognizedEnemyProtectedByShieldEv", CCSBot::IsRecognizedEnemyProtectedByShield), - //HOOK_SYMBOLDEF(0x01D30A10, "_ZN6CCSBot32GetRangeToNearestRecognizedEnemyEv", CCSBot::GetRangeToNearestRecognizedEnemy), // NOXREF - HOOK_SYMBOLDEF(0x01D17F40, "_ZNK6CCSBot11GetAttackerEv", CCSBot::GetAttacker), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot20GetTimeSinceAttackedEv", CCSBot::GetTimeSinceAttacked), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot25GetFirstSawEnemyTimestampEv", CCSBot::GetFirstSawEnemyTimestamp), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot24GetLastSawEnemyTimestampEv", CCSBot::GetLastSawEnemyTimestamp), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot24GetTimeSinceLastSawEnemyEv", CCSBot::GetTimeSinceLastSawEnemy), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot32GetTimeSinceAcquiredCurrentEnemyEv", CCSBot::GetTimeSinceAcquiredCurrentEnemy), - HOOK_SYMBOLDEF(0x01D18710, "_ZNK6CCSBot26HasNotSeenEnemyForLongTimeEv", CCSBot::HasNotSeenEnemyForLongTime), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot25GetLastKnownEnemyPositionEv", CCSBot::GetLastKnownEnemyPosition), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot14IsEnemyVisibleEv", CCSBot::IsEnemyVisible), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot22GetEnemyDeathTimestampEv", CCSBot::GetEnemyDeathTimestamp), - HOOK_SYMBOLDEF(0x01D32440, "_ZN6CCSBot20IsFriendInLineOfFireEv", CCSBot::IsFriendInLineOfFire), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot19IsAwareOfEnemyDeathEv", CCSBot::IsAwareOfEnemyDeath), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot15GetLastVictimIDEv", CCSBot::GetLastVictimID), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot7HasPathEv", CCSBot::HasPath), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot11DestroyPathEv", CCSBot::DestroyPath), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot8GetFeetZEv", CCSBot::GetFeetZ), - HOOK_SYMBOLDEF(0x01D29C80, "_ZN6CCSBot18UpdatePathMovementEb", CCSBot::UpdatePathMovement), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot11AStarSearchEP8CNavAreaS1_", CCSBot::AStarSearch), // NOXREF - HOOK_SYMBOLDEF(0x01D2A7D0, "_ZN6CCSBot11ComputePathEP8CNavAreaPK6Vector9RouteType", CCSBot::ComputePath), - HOOK_SYMBOLDEF(0x01D17A10, "_ZN6CCSBot13StayOnNavMeshEv", CCSBot::StayOnNavMesh), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot16GetLastKnownAreaEv", CCSBot::GetLastKnownArea), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot15GetPathEndpointEv", CCSBot::GetPathEndpoint), - HOOK_SYMBOLDEF(0x01D2ADE0, "_ZNK6CCSBot24GetPathDistanceRemainingEv", CCSBot::GetPathDistanceRemaining), - HOOK_SYMBOLDEF(0x01D25BC0, "_ZN6CCSBot17ResetStuckMonitorEv", CCSBot::ResetStuckMonitor), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot13IsAreaVisibleEPK8CNavArea", CCSBot::IsAreaVisible), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot15GetPathPositionEi", CCSBot::GetPathPosition), // NOXREF - HOOK_SYMBOLDEF(0x01D25FE0, "_ZN6CCSBot30GetSimpleGroundHeightWithFloorEPK6VectorPfPS0_", CCSBot::GetSimpleGroundHeightWithFloor), - HOOK_SYMBOLDEF(0x01D26060, "_ZNK6CCSBot8GetPlaceEv", CCSBot::GetPlace), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot13IsUsingLadderEv", CCSBot::IsUsingLadder), - HOOK_SYMBOLDEF(0x01D17F70, "_ZN6CCSBot12GetOffLadderEv", CCSBot::GetOffLadder), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot13SetGoalEntityEP11CBaseEntity", CCSBot::SetGoalEntity), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot13GetGoalEntityEv", CCSBot::GetGoalEntity), - HOOK_SYMBOLDEF(0x01D291D0, "_ZNK6CCSBot10IsNearJumpEv", CCSBot::IsNearJump), - HOOK_SYMBOLDEF(0x01D29230, "_ZNK6CCSBot24GetApproximateFallDamageEf", CCSBot::GetApproximateFallDamage), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot8ForceRunEf", CCSBot::ForceRun), - HOOK_SYMBOLDEF(0x01D26720, "_ZN6CCSBot6WiggleEv", CCSBot::Wiggle), - HOOK_SYMBOLDEF(0x01D29260, "_ZNK6CCSBot16IsFriendInTheWayEPK6Vector", CCSBot::IsFriendInTheWay), - HOOK_SYMBOLDEF(0x01D29500, "_ZN6CCSBot22FeelerReflexAdjustmentEP6Vector", CCSBot::FeelerReflexAdjustment), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot13SetLookAnglesEff", CCSBot::SetLookAngles), - //HOOK_SYMBOLDEF(0x01D2EDD0, "_ZN6CCSBot16UpdateLookAnglesEv", CCSBot::UpdateLookAngles), // Using REFS FIXME - HOOK_SYMBOLDEF(0x01D2F9C0, "_ZN6CCSBot16UpdateLookAroundEb", CCSBot::UpdateLookAround), - HOOK_SYMBOLDEF(0x01D2F910, "_ZN6CCSBot17InhibitLookAroundEf", CCSBot::InhibitLookAround), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot15SetForwardAngleEf", CCSBot::SetForwardAngle), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot17SetLookAheadAngleEf", CCSBot::SetLookAheadAngle), // NOXREF - HOOK_SYMBOLDEF(0x01D2F7F0, "_ZN6CCSBot9SetLookAtEPKcPK6Vector12PriorityTypefbf", CCSBot::SetLookAt), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot11ClearLookAtEv", CCSBot::ClearLookAt), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot15IsLookingAtSpotE12PriorityType", CCSBot::IsLookingAtSpot), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot12IsViewMovingEf", CCSBot::IsViewMoving), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot14GetEyePositionEv", CCSBot::GetEyePosition), - HOOK_SYMBOLDEF(0x01D32560, "_ZN6CCSBot23ComputeWeaponSightRangeEv", CCSBot::ComputeWeaponSightRange), - HOOK_SYMBOLDEF(0x01D26890, "_ZN6CCSBot21ComputeApproachPointsEv", CCSBot::ComputeApproachPoints), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot20UpdateApproachPointsEv", CCSBot::UpdateApproachPoints), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot19ClearApproachPointsEv", CCSBot::ClearApproachPoints), - HOOK_SYMBOLDEF(0x01D269D0, "_ZN6CCSBot18DrawApproachPointsEv", CCSBot::DrawApproachPoints), - HOOK_SYMBOLDEF(0x01D17FA0, "_ZNK6CCSBot27GetHidingSpotCheckTimestampEP10HidingSpot", CCSBot::GetHidingSpotCheckTimestamp), - HOOK_SYMBOLDEF(0x01D17FF0, "_ZN6CCSBot27SetHidingSpotCheckTimestampEP10HidingSpot", CCSBot::SetHidingSpotCheckTimestamp), - HOOK_SYMBOLDEF(0x01D315F0, "_ZN6CCSBot15EquipBestWeaponEb", CCSBot::EquipBestWeapon), - HOOK_SYMBOLDEF(0x01D31810, "_ZN6CCSBot11EquipPistolEv", CCSBot::EquipPistol), - HOOK_SYMBOLDEF(0x01D318E0, "_ZN6CCSBot10EquipKnifeEv", CCSBot::EquipKnife), - HOOK_SYMBOLDEF(0x01D31930, "_ZN6CCSBot12EquipGrenadeEb", CCSBot::EquipGrenade), - HOOK_SYMBOLDEF(0x01D31A00, "_ZNK6CCSBot12IsUsingKnifeEv", CCSBot::IsUsingKnife), - HOOK_SYMBOLDEF(0x01D31A20, "_ZNK6CCSBot13IsUsingPistolEv", CCSBot::IsUsingPistol), - HOOK_SYMBOLDEF(0x01D31A60, "_ZNK6CCSBot14IsUsingGrenadeEv", CCSBot::IsUsingGrenade), - HOOK_SYMBOLDEF(0x01D313F0, "_ZNK6CCSBot18IsUsingSniperRifleEv", CCSBot::IsUsingSniperRifle), - HOOK_SYMBOLDEF(0x01D313A0, "_ZNK6CCSBot10IsUsingAWPEv", CCSBot::IsUsingAWP), - HOOK_SYMBOLDEF(0x01D31440, "_ZNK6CCSBot8IsSniperEv", CCSBot::IsSniper), - HOOK_SYMBOLDEF(0x01D314B0, "_ZNK6CCSBot9IsSnipingEv", CCSBot::IsSniping), - HOOK_SYMBOLDEF(0x01D314D0, "_ZNK6CCSBot14IsUsingShotgunEv", CCSBot::IsUsingShotgun), - HOOK_SYMBOLDEF(0x01D31500, "_ZNK6CCSBot17IsUsingMachinegunEv", CCSBot::IsUsingMachinegun), - HOOK_SYMBOLDEF(0x01D31AB0, "_ZN6CCSBot12ThrowGrenadeEPK6Vector", CCSBot::ThrowGrenade), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot17IsThrowingGrenadeEv", CCSBot::IsThrowingGrenade), - HOOK_SYMBOLDEF(0x01D31920, "_ZNK6CCSBot10HasGrenadeEv", CCSBot::HasGrenade), - //HOOK_SYMBOLDEF(0x01D313C0, "_ZNK6CCSBot28DoesActiveWeaponHaveSilencerEv", CCSBot::DoesActiveWeaponHaveSilencer), // NOXREF - HOOK_SYMBOLDEF(0x01D31A90, "_ZNK6CCSBot16IsUsingHEGrenadeEv", CCSBot::IsUsingHEGrenade), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot14StartRapidFireEv", CCSBot::StartRapidFire), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot13StopRapidFireEv", CCSBot::StopRapidFire), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot13IsRapidFiringEv", CCSBot::IsRapidFiring), - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot12GetZoomLevelEv", CCSBot::GetZoomLevel), - HOOK_SYMBOLDEF(0x01D31280, "_ZN6CCSBot10AdjustZoomEf", CCSBot::AdjustZoom), - HOOK_SYMBOLDEF(0x01D31520, "_ZNK6CCSBot20IsPrimaryWeaponEmptyEv", CCSBot::IsPrimaryWeaponEmpty), - //HOOK_SYMBOLDEF(0x01D31550, "_ZNK6CCSBot13IsPistolEmptyEv", CCSBot::IsPistolEmpty), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK6CCSBot21GetHostageEscortCountEv", CCSBot::GetHostageEscortCount), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot26IncreaseHostageEscortCountEv", CCSBot::IncreaseHostageEscortCount), // NOXREF - HOOK_SYMBOLDEF(0x01D18B10, "_ZNK6CCSBot33GetRangeToFarthestEscortedHostageEv", CCSBot::GetRangeToFarthestEscortedHostage), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot27ResetWaitForHostagePatienceEv", CCSBot::ResetWaitForHostagePatience), - HOOK_SYMBOLDEF(0x01D20AE0, "_ZN6CCSBot11ResetValuesEv", CCSBot::ResetValues), - //HOOK_SYMBOLDEF(0x01D17950, "_ZN6CCSBot13BotDeathThinkEv", CCSBot::BotDeathThink), // PURE - //HOOK_SYMBOLDEF(0x01D17960, "_ZN6CCSBot16FindNearbyPlayerEv", CCSBot::FindNearbyPlayer), // NOXREF - HOOK_SYMBOLDEF(0x01D186E0, "_ZN6CCSBot14AdjustSafeTimeEv", CCSBot::AdjustSafeTime), - HOOK_SYMBOLDEF(0x01D2BD80, "_ZN6CCSBot8SetStateEP8BotState", CCSBot::SetState), - HOOK_SYMBOLDEF(0x01D26080, "_ZN6CCSBot19MoveTowardsPositionEPK6Vector", CCSBot::MoveTowardsPosition), - //HOOK_SYMBOLDEF(0x01D26510, "_ZN6CCSBot20MoveAwayFromPositionEPK6Vector", CCSBot::MoveAwayFromPosition), // NOXREF - HOOK_SYMBOLDEF(0x01D26650, "_ZN6CCSBot22StrafeAwayFromPositionEPK6Vector", CCSBot::StrafeAwayFromPosition), - HOOK_SYMBOLDEF(0x01D25C50, "_ZN6CCSBot10StuckCheckEv", CCSBot::StuckCheck), - HOOK_SYMBOLDEF(0x01D2A6F0, "_ZN6CCSBot16BuildTrivialPathEPK6Vector", CCSBot::BuildTrivialPath), - HOOK_SYMBOLDEF(0x01D26BA0, "_ZN6CCSBot20ComputePathPositionsEv", CCSBot::ComputePathPositions), - HOOK_SYMBOLDEF(0x01D27040, "_ZN6CCSBot19SetupLadderMovementEv", CCSBot::SetupLadderMovement), - HOOK_SYMBOLDEF(0x01D29130, "_ZN6CCSBot12SetPathIndexEi", CCSBot::SetPathIndex), - HOOK_SYMBOLDEF(0x01D2AE70, "_ZN6CCSBot8DrawPathEv", CCSBot::DrawPath), - HOOK_SYMBOLDEF(0x01D282C0, "_ZNK6CCSBot21FindOurPositionOnPathEP6Vectorb", CCSBot::FindOurPositionOnPath), - HOOK_SYMBOLDEF(0x01D28620, "_ZN6CCSBot13FindPathPointEfP6VectorPi", CCSBot::FindPathPoint), - //HOOK_SYMBOLDEF(0x01D280B0, "_ZNK6CCSBot22FindClosestPointOnPathEPK6VectoriiPS0_", CCSBot::FindClosestPointOnPath), // NOXREF - HOOK_SYMBOLDEF(0x01D28610, "_ZNK6CCSBot26IsStraightLinePathWalkableEPK6Vector", CCSBot::IsStraightLinePathWalkable), - HOOK_SYMBOLDEF(0x01D25EE0, "_ZN6CCSBot17DiscontinuityJumpEfbb", CCSBot::DiscontinuityJump), - HOOK_SYMBOLDEF(0x01D27560, "_ZN6CCSBot20UpdateLadderMovementEv", CCSBot::UpdateLadderMovement), - HOOK_SYMBOLDEF(0x01D27450, "_ZN6CCSBot21ComputeLadderEndpointEb", CCSBot::ComputeLadderEndpoint), - HOOK_SYMBOLDEF(0x01D180B0, "_ZN6CCSBot24UpdateHostageEscortCountEv", CCSBot::UpdateHostageEscortCount), - HOOK_SYMBOLDEF(0x01D22A70, "_ZN6CCSBot17UpdateLookAtNoiseEv", CCSBot::UpdateLookAtNoise), - HOOK_SYMBOLDEF(0x01D2F760, "_ZN6CCSBot12UpdateLookAtEv", CCSBot::UpdateLookAt), - HOOK_SYMBOLDEF(0x01D2F930, "_ZN6CCSBot22UpdatePeripheralVisionEv", CCSBot::UpdatePeripheralVision), - HOOK_SYMBOLDEF(0x01D2FF40, "_ZNK6CCSBot15BendLineOfSightEPK6VectorS2_PS0_", CCSBot::BendLineOfSight), - //HOOK_SYMBOLDEF(0x01D26A50, "_ZN6CCSBot28FindApproachPointNearestPathEP6Vector", CCSBot::FindApproachPointNearestPath), // NOXREF - HOOK_SYMBOLDEF(0x01D31B30, "_ZN6CCSBot25FindGrenadeTossPathTargetEP6Vector", CCSBot::FindGrenadeTossPathTarget), - HOOK_SYMBOLDEF(0x01D31030, "_ZN6CCSBot12SetAimOffsetEf", CCSBot::SetAimOffset), - HOOK_SYMBOLDEF(0x01D311E0, "_ZN6CCSBot15UpdateAimOffsetEv", CCSBot::UpdateAimOffset), - HOOK_SYMBOLDEF(0x01D31580, "_ZN6CCSBot7DoEquipEP17CBasePlayerWeapon", CCSBot::DoEquip), - HOOK_SYMBOLDEF(0x01D31FC0, "_ZN6CCSBot11ReloadCheckEv", CCSBot::ReloadCheck), - HOOK_SYMBOLDEF(0x01D32290, "_ZN6CCSBot13SilencerCheckEv", CCSBot::SilencerCheck), - HOOK_SYMBOLDEF(0x01D302D0, "_ZN6CCSBot23FindMostDangerousThreatEv", CCSBot::FindMostDangerousThreat), - HOOK_SYMBOLDEF(0x01D2B5B0, "_ZN6CCSBot22RespondToRadioCommandsEv", CCSBot::RespondToRadioCommands), - //HOOK_SYMBOLDEF(0x01D2B570, "_ZNK6CCSBot14IsRadioCommandE13GameEventType", CCSBot::IsRadioCommand), // NOXREF - HOOK_SYMBOLDEF(0x01D2BA00, "_ZN6CCSBot16EndVoiceFeedbackEb", CCSBot::EndVoiceFeedback), - HOOK_SYMBOLDEF(0x01D213C0, "_ZN6CCSBot7AddNodeEPK6VectorS2_10NavDirTypeP8CNavNode", CCSBot::AddNode), - HOOK_SYMBOLDEF(0x01D21610, "_ZN6CCSBot17StartLearnProcessEv", CCSBot::StartLearnProcess), - HOOK_SYMBOLDEF(0x01D21EF0, "_ZN6CCSBot18UpdateLearnProcessEv", CCSBot::UpdateLearnProcess), - HOOK_SYMBOLDEF(0x01D21770, "_ZN6CCSBot9LearnStepEv", CCSBot::LearnStep), - HOOK_SYMBOLDEF(0x01D21FE0, "_ZN6CCSBot24StartAnalyzeAlphaProcessEv", CCSBot::StartAnalyzeAlphaProcess), - HOOK_SYMBOLDEF(0x01D22080, "_ZN6CCSBot25UpdateAnalyzeAlphaProcessEv", CCSBot::UpdateAnalyzeAlphaProcess), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot16AnalyzeAlphaStepEv", CCSBot::AnalyzeAlphaStep), - //HOOK_SYMBOLDEF(0x01D221D0, "_ZN6CCSBot23StartAnalyzeBetaProcessEv", CCSBot::StartAnalyzeBetaProcess), // NOXREF - HOOK_SYMBOLDEF(0x01D22200, "_ZN6CCSBot24UpdateAnalyzeBetaProcessEv", CCSBot::UpdateAnalyzeBetaProcess), - //HOOK_SYMBOLDEF(0x0, "_ZN6CCSBot15AnalyzeBetaStepEv", CCSBot::AnalyzeBetaStep), - //HOOK_SYMBOLDEF(0x01D22330, "_ZN6CCSBot16StartSaveProcessEv", CCSBot::StartSaveProcess), // NOXREF - HOOK_SYMBOLDEF(0x01D22340, "_ZN6CCSBot17UpdateSaveProcessEv", CCSBot::UpdateSaveProcess), - HOOK_SYMBOLDEF(0x01D22450, "_ZN6CCSBot18StartNormalProcessEv", CCSBot::StartNormalProcess), - HOOK_SYMBOLDEF(0x01D17620, "_ZN6CCSBot8BotTouchEP11CBaseEntity", CCSBot::BotTouch), -//CSGameState - //HOOK_SYMBOLDEF(0x01D326A0, "_ZN11CSGameStateC2EP6CCSBot", CSGameState::CSGameState), - HOOK_SYMBOLDEF(0x01D32730, "_ZN11CSGameState5ResetEv", CSGameState::Reset), - HOOK_SYMBOLDEF(0x01D327C0, "_ZN11CSGameState7OnEventE13GameEventTypeP11CBaseEntityS2_", CSGameState::OnEvent), - HOOK_SYMBOLDEF(0x01D328D0, "_ZNK11CSGameState11IsRoundOverEv", CSGameState::IsRoundOver), - //HOOK_SYMBOLDEF(0x0, "_ZNK11CSGameState12IsBombMovingEv", CSGameState::IsBombMoving), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK11CSGameState11IsBombLooseEv", CSGameState::IsBombLoose), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK11CSGameState13IsBombPlantedEv", CSGameState::IsBombPlanted), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK11CSGameState13IsBombDefusedEv", CSGameState::IsBombDefused), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK11CSGameState14IsBombExplodedEv", CSGameState::IsBombExploded), // NOXREF - HOOK_SYMBOLDEF(0x01D32900, "_ZN11CSGameState15UpdateLooseBombEPK6Vector", CSGameState::UpdateLooseBomb), // NOXREF - //HOOK_SYMBOLDEF(0x01D32940, "_ZNK11CSGameState25TimeSinceLastSawLooseBombEv", CSGameState::TimeSinceLastSawLooseBomb), // NOXREF - HOOK_SYMBOLDEF(0x01D32970, "_ZNK11CSGameState24IsLooseBombLocationKnownEv", CSGameState::IsLooseBombLocationKnown), - HOOK_SYMBOLDEF(0x01D329A0, "_ZN11CSGameState12UpdateBomberEPK6Vector", CSGameState::UpdateBomber), - //HOOK_SYMBOLDEF(0x01D329E0, "_ZNK11CSGameState22TimeSinceLastSawBomberEv", CSGameState::TimeSinceLastSawBomber), // NOXREF - HOOK_SYMBOLDEF(0x01D32B20, "_ZN11CSGameState17UpdatePlantedBombEPK6Vector", CSGameState::UpdatePlantedBomb), - HOOK_SYMBOLDEF(0x01D32A10, "_ZNK11CSGameState26IsPlantedBombLocationKnownEv", CSGameState::IsPlantedBombLocationKnown), - HOOK_SYMBOLDEF(0x01D32B80, "_ZN11CSGameState21MarkBombsiteAsPlantedEi", CSGameState::MarkBombsiteAsPlanted), - HOOK_SYMBOLDEF(0x01D32A20, "_ZNK11CSGameState18GetPlantedBombsiteEv", CSGameState::GetPlantedBombsite), - HOOK_SYMBOLDEF(0x01D32A30, "_ZNK11CSGameState19IsAtPlantedBombsiteEv", CSGameState::IsAtPlantedBombsite), - HOOK_SYMBOLDEF(0x01D32A70, "_ZN11CSGameState23GetNextBombsiteToSearchEv", CSGameState::GetNextBombsiteToSearch), - HOOK_SYMBOLDEF(0x01D32BC0, "_ZNK11CSGameState15IsBombsiteClearEi", CSGameState::IsBombsiteClear), - HOOK_SYMBOLDEF(0x01D32BA0, "_ZN11CSGameState13ClearBombsiteEi", CSGameState::ClearBombsite), - HOOK_SYMBOLDEF(0x01D32AC0, "_ZNK11CSGameState15GetBombPositionEv", CSGameState::GetBombPosition), - HOOK_SYMBOLDEF(0x01D32CC0, "_ZNK11CSGameState21GetNearestFreeHostageEP6Vector", CSGameState::GetNearestFreeHostage), - HOOK_SYMBOLDEF(0x01D32EB0, "_ZNK11CSGameState28GetRandomFreeHostagePositionEv", CSGameState::GetRandomFreeHostagePosition), - HOOK_SYMBOLDEF(0x01D33370, "_ZNK11CSGameState26AreAllHostagesBeingRescuedEv", CSGameState::AreAllHostagesBeingRescued), - HOOK_SYMBOLDEF(0x01D33440, "_ZNK11CSGameState18AreAllHostagesGoneEv", CSGameState::AreAllHostagesGone), - //HOOK_SYMBOLDEF(0x01D334A0, "_ZN11CSGameState15AllHostagesGoneEv", CSGameState::AllHostagesGone), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK11CSGameState25HaveSomeHostagesBeenTakenEv", CSGameState::HaveSomeHostagesBeenTaken), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN11CSGameState15HostageWasTakenEv", CSGameState::HostageWasTaken), // NOXREF - HOOK_SYMBOLDEF(0x01D33210, "_ZNK11CSGameState28GetNearestVisibleFreeHostageEv", CSGameState::GetNearestVisibleFreeHostage), - HOOK_SYMBOLDEF(0x01D32FA0, "_ZN11CSGameState24ValidateHostagePositionsEv", CSGameState::ValidateHostagePositions), - //HOOK_SYMBOLDEF(0x01D328E0, "_ZN11CSGameState12SetBombStateENS_9BombStateE", CSGameState::SetBombState), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK11CSGameState12GetBombStateEv", CSGameState::GetBombState), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK11CSGameState17GetNearestHostageEv", CSGameState::GetNearestHostage), // NOXREF - HOOK_SYMBOLDEF(0x01D32BE0, "_ZN11CSGameState21InitializeHostageInfoEv", CSGameState::InitializeHostageInfo), - //@HOOK_SYMBOLDEF(0x01D15EA0, "_Z16NavAreaBuildPathI8PathCostEbP8CNavAreaS2_PK6VectorRT_PS2_", NavAreaBuildPath__PathCost__wrapper), - HOOK_SYMBOLDEF(0x01D15EA0, "_Z16NavAreaBuildPathI8PathCostEbP8CNavAreaS2_PK6VectorRT_PS2_", NavAreaBuildPath), - -#ifdef _WIN32 - //@HOOK_DEF(0x01D15A30, NavAreaTravelDistance__PathCost__wrapper), - HOOK_DEF(0x01D15A30, NavAreaTravelDistance, float_precision (CNavArea *startArea, CNavArea *endArea, PathCost &costFunc)), -#endif // _WIN32 - - HOOK_SYMBOLDEF(0x01D2B2E0, "_ZN8PathCostclEP8CNavAreaS1_PK10CNavLadder", PathCost::operator()), - HOOK_SYMBOLDEF(0x01D172A0, "_Z17GetBotFollowCountP11CBasePlayer", GetBotFollowCount), - HOOK_SYMBOLDEF(0x01D187B0, "_Z21FindNearbyRetreatSpotP6CCSBotf", FindNearbyRetreatSpot, const Vector *(CCSBot *, float)), - //HOOK_DEF(0x0, drawProgressMeter), // NOXREF - //HOOK_DEF(0x0, startProgressMeter), // NOXREF - //HOOK_DEF(0x0, hideProgressMeter), // NOXREF - -#endif // CS_Bot_Region - -#ifndef CS_BotState_Region - -//BotState - // virtual func - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZN8BotState7OnEnterEP6CCSBot", BotState::OnEnter), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZN8BotState8OnUpdateEP6CCSBot", BotState::OnUpdate), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D212B0, "_ZN8BotState6OnExitEP6CCSBot", BotState::OnExit), // PURE - //HOOK_SYMBOLDEF(0x0, "_ZNK8BotState7GetNameEv", BotState::GetName), // NOXREF -//IdleState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D142A0, "_ZN9IdleState7OnEnterEP6CCSBot", IdleState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D14320, "_ZN9IdleState8OnUpdateEP6CCSBot", IdleState::OnUpdate), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D212C0, "_ZNK9IdleState7GetNameEv", IdleState::GetName), // DEFAULT -//HuntState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D13E20, "_ZN9HuntState7OnEnterEP6CCSBot", HuntState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D13EA0, "_ZN9HuntState8OnUpdateEP6CCSBot", HuntState::OnUpdate), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D14290, "_ZN9HuntState6OnExitEP6CCSBot", HuntState::OnExit), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D212D0, "_ZNK9HuntState7GetNameEv", HuntState::GetName), // DEFAULT - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN9HuntState13ClearHuntAreaEv", HuntState::ClearHuntArea), // NOXREF -//AttackState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D10960, "_ZN11AttackState7OnEnterEP6CCSBot", AttackState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D10CF0, "_ZN11AttackState8OnUpdateEP6CCSBot", AttackState::OnUpdate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D11860, "_ZN11AttackState6OnExitEP6CCSBot", AttackState::OnExit), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D212E0, "_ZNK11AttackState7GetNameEv", AttackState::GetName), // DEFAULT - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN11AttackState16SetCrouchAndHoldEb", AttackState::SetCrouchAndHold), // NOXREF - //HOOK_SYMBOLDEF(0x01D10CC0, "_ZN11AttackState13StopAttackingEP6CCSBot", AttackState::StopAttacking), // NOXREF -//InvestigateNoiseState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D165C0, "_ZN21InvestigateNoiseState7OnEnterEP6CCSBot", InvestigateNoiseState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D166B0, "_ZN21InvestigateNoiseState8OnUpdateEP6CCSBot", InvestigateNoiseState::OnUpdate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D16920, "_ZN21InvestigateNoiseState6OnExitEP6CCSBot", InvestigateNoiseState::OnExit), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D212F0, "_ZNK21InvestigateNoiseState7GetNameEv", InvestigateNoiseState::GetName), // DEFAULT - // non-virtual func - //HOOK_SYMBOLDEF(0x01D164D0, "_ZN21InvestigateNoiseState18AttendCurrentNoiseEP6CCSBot", InvestigateNoiseState::AttendCurrentNoise), // NOXREF -//BuyState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D11910, "_ZN8BuyState7OnEnterEP6CCSBot", BuyState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D11B60, "_ZN8BuyState8OnUpdateEP6CCSBot", BuyState::OnUpdate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D121E0, "_ZN8BuyState6OnExitEP6CCSBot", BuyState::OnExit), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D21300, "_ZNK8BuyState7GetNameEv", BuyState::GetName), // DEFAULT -//MoveToState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D16930, "_ZN11MoveToState7OnEnterEP6CCSBot", MoveToState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D169C0, "_ZN11MoveToState8OnUpdateEP6CCSBot", MoveToState::OnUpdate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D16FE0, "_ZN11MoveToState6OnExitEP6CCSBot", MoveToState::OnExit), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D21310, "_ZNK11MoveToState7GetNameEv", MoveToState::GetName), // DEFAULT - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN11MoveToState15SetGoalPositionEPK6Vector", MoveToState::SetGoalPosition), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN11MoveToState12SetRouteTypeE9RouteType", MoveToState::SetRouteType), // NOXREF -//FetchBombState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D125A0, "_ZN14FetchBombState7OnEnterEP6CCSBot", FetchBombState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D125C0, "_ZN14FetchBombState8OnUpdateEP6CCSBot", FetchBombState::OnUpdate), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D21320, "_ZNK14FetchBombState7GetNameEv", FetchBombState::GetName), // DEFAULT -//PlantBombState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D17000, "_ZN14PlantBombState7OnEnterEP6CCSBot", PlantBombState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D170B0, "_ZN14PlantBombState8OnUpdateEP6CCSBot", PlantBombState::OnUpdate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D17160, "_ZN14PlantBombState6OnExitEP6CCSBot", PlantBombState::OnExit), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D21330, "_ZNK14PlantBombState7GetNameEv", PlantBombState::GetName), // DEFAULT -//DefuseBombState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D12200, "_ZN15DefuseBombState7OnEnterEP6CCSBot", DefuseBombState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D12270, "_ZN15DefuseBombState8OnUpdateEP6CCSBot", DefuseBombState::OnUpdate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D12340, "_ZN15DefuseBombState6OnExitEP6CCSBot", DefuseBombState::OnExit), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D21340, "_ZNK15DefuseBombState7GetNameEv", DefuseBombState::GetName), // DEFAULT -//HideState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D13250, "_ZN9HideState7OnEnterEP6CCSBot", HideState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D13300, "_ZN9HideState8OnUpdateEP6CCSBot", HideState::OnUpdate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D13D90, "_ZN9HideState6OnExitEP6CCSBot", HideState::OnExit), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D21350, "_ZNK9HideState7GetNameEv", HideState::GetName), // DEFAULT - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN9HideState13SetHidingSpotEPK6Vector", HideState::SetHidingSpot), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK9HideState13GetHidingSpotEv", HideState::GetHidingSpot), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN9HideState13SetSearchAreaEP8CNavArea", HideState::SetSearchArea), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN9HideState14SetSearchRangeEf", HideState::SetSearchRange), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN9HideState11SetDurationEf", HideState::SetDuration), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN9HideState15SetHoldPositionEb", HideState::SetHoldPosition), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK9HideState8IsAtSpotEv", HideState::IsAtSpot), // NOXREF -//EscapeFromBombState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D12390, "_ZN19EscapeFromBombState7OnEnterEP6CCSBot", EscapeFromBombState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D123D0, "_ZN19EscapeFromBombState8OnUpdateEP6CCSBot", EscapeFromBombState::OnUpdate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D12560, "_ZN19EscapeFromBombState6OnExitEP6CCSBot", EscapeFromBombState::OnExit), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D21360, "_ZNK19EscapeFromBombState7GetNameEv", EscapeFromBombState::GetName), // DEFAULT -//FollowState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D12660, "_ZN11FollowState7OnEnterEP6CCSBot", FollowState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D127A0, "_ZN11FollowState8OnUpdateEP6CCSBot", FollowState::OnUpdate), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D130C0, "_ZN11FollowState6OnExitEP6CCSBot", FollowState::OnExit), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D21370, "_ZNK11FollowState7GetNameEv", FollowState::GetName), // DEFAULT - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN11FollowState9SetLeaderEP11CBasePlayer", FollowState::SetLeader), // NOXREF - HOOK_SYMBOLDEF(0x01D126E0, "_ZN11FollowState24ComputeLeaderMotionStateEf", FollowState::ComputeLeaderMotionState), -//UseEntityState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D171A0, "_ZN14UseEntityState7OnEnterEP6CCSBot", UseEntityState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D171B0, "_ZN14UseEntityState8OnUpdateEP6CCSBot", UseEntityState::OnUpdate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D17280, "_ZN14UseEntityState6OnExitEP6CCSBot", UseEntityState::OnExit), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D21380, "_ZNK14UseEntityState7GetNameEv", UseEntityState::GetName), // DEFAULT - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN14UseEntityState9SetEntityEP11CBaseEntity", UseEntityState::SetEntity), // NOXREF - -#ifdef _WIN32 - HOOK_SYMBOLDEF(0x01D12F90, "_ZN21FollowTargetCollectorclEP8CNavArea", FollowTargetCollector::operator()), -#endif // _WIN32 - -#endif // CS_BotState_Region - -#ifndef Bot_Region - -//ActiveGrenade - // virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN13ActiveGrenadeC2EiP8CGrenade", ActiveGrenade::ActiveGrenade), - HOOK_SYMBOLDEF(0x01D34080, "_ZN13ActiveGrenade12OnEntityGoneEv", ActiveGrenade::OnEntityGone), - HOOK_SYMBOLDEF(0x01D340A0, "_ZNK13ActiveGrenade7IsValidEv", ActiveGrenade::IsValid), - //HOOK_SYMBOLDEF(0x0, "_ZNK13ActiveGrenade8IsEntityEP8CGrenade", ActiveGrenade::IsEntity), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK13ActiveGrenade5GetIDEv", ActiveGrenade::GetID), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK13ActiveGrenade21GetDetonationPositionEv", ActiveGrenade::GetDetonationPosition), // NOXREF - //HOOK_SYMBOLDEF(0x01D340C0, "_ZNK13ActiveGrenade11GetPositionEv", ActiveGrenade::GetPosition), // NOXREF -//CBot - //HOOK_DEF(0x01D334D0, MethodThunk::Constructor), - // virtual func - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D33550, CCSBot, "_ZN4CBot5SpawnEv", CBot::Spawn), - //HOOK_SYMBOLDEF(0x01D340D0, "_ZN4CBot10TakeDamageEP9entvars_sS1_fi", CBot::TakeDamage), // DEFAULT - //HOOK_SYMBOLDEF(0x01D340E0, "_ZN4CBot6KilledEP9entvars_si", CBot::Killed), // DEFAULT - //HOOK_SYMBOLDEF(0x01D210C0, "_ZN4CBot5ThinkEv", CBot::Think), // PURE - //HOOK_SYMBOLDEF(0x01D210B0, "_ZN4CBot5IsBotEv", CBot::IsBot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D33600, CCSBot, "_ZN4CBot16GetAutoaimVectorEf", CBot::GetAutoaimVector), - //HOOK_SYMBOLDEF(0x0, "_ZN4CBot16OnTouchingWeaponEP10CWeaponBox", CBot::OnTouchingWeapon), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D33540, CCSBot, "_ZN4CBot10InitializeEPK10BotProfile", CBot::Initialize), - //HOOK_SYMBOLDEF(0x0, "_ZN4CBot8SpawnBotEv", CBot::SpawnBot), - //HOOK_SYMBOLDEF(0x0, "_ZN4CBot6UpkeepEv", CBot::Upkeep), - //HOOK_SYMBOLDEF(0x0, "_ZN4CBot6UpdateEv", CBot::Update), - //HOOK_SYMBOLDEF(0x01D21110, "_ZN4CBot3RunEv", CBot::Run), // DEFAULT - //HOOK_SYMBOLDEF(0x01D34110, "_ZN4CBot4WalkEv", CBot::Walk), // DEFAULT - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D33940, CCSBot, "_ZN4CBot6CrouchEv", CBot::Crouch), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D33950, CCSBot, "_ZN4CBot7StandUpEv", CBot::StandUp), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D336F0, CCSBot, "_ZN4CBot11MoveForwardEv", CBot::MoveForward), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D33740, CCSBot, "_ZN4CBot12MoveBackwardEv", CBot::MoveBackward), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D33790, CCSBot, "_ZN4CBot10StrafeLeftEv", CBot::StrafeLeft), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D337E0, CCSBot, "_ZN4CBot11StrafeRightEv", CBot::StrafeRight), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D33830, CCSBot, "_ZN4CBot4JumpEb", CBot::Jump), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D338D0, CCSBot, "_ZN4CBot13ClearMovementEv", CBot::ClearMovement), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D33960, CCSBot, "_ZN4CBot14UseEnvironmentEv", CBot::UseEnvironment), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D33970, CCSBot, "_ZN4CBot13PrimaryAttackEv", CBot::PrimaryAttack), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D33980, CCSBot, "_ZN4CBot18ClearPrimaryAttackEv", CBot::ClearPrimaryAttack), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D33990, CCSBot, "_ZN4CBot19TogglePrimaryAttackEv", CBot::TogglePrimaryAttack), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D339C0, CCSBot, "_ZN4CBot15SecondaryAttackEv", CBot::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D339D0, CCSBot, "_ZN4CBot6ReloadEv", CBot::Reload), - //HOOK_SYMBOLDEF(0x01D34100, "_ZN4CBot7OnEventE13GameEventTypeP11CBaseEntityS2_", CBot::OnEvent), // PURE - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x0, CCSBot, "_ZNK4CBot9IsVisibleEPK6Vectorb", CBot::IsVisible, bool(const Vector *, bool) const), - //HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x0, CCSBot, "_ZNK4CBot9IsVisibleEP11CBasePlayerbPh", CBot::IsVisible, bool(CBasePlayer *, bool, unsigned char *) const), - //HOOK_SYMBOLDEF(0x0, "_ZNK4CBot18IsEnemyPartVisibleENS_15VisiblePartTypeE", CBot::IsEnemyPartVisible), // NOXREF PURE - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D21120, CCSBot, "_ZNK4CBot16IsPlayerFacingMeEP11CBasePlayer", CBot::IsPlayerFacingMe), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D211B0, CCSBot, "_ZNK4CBot19IsPlayerLookingAtMeEP11CBasePlayer", CBot::IsPlayerLookingAtMe), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D33AA0, CCSBot, "_ZN4CBot14ExecuteCommandEv", CBot::ExecuteCommand), - HOOK_SYMBOL_VIRTUAL_HIERARC_DEF(0x01D210D0, CCSBot, "_ZN4CBot8SetModelEPKc", CBot::SetModel), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZNK4CBot5GetIDEv", CBot::GetID), - //HOOK_SYMBOLDEF(0x0, "_ZNK4CBot9IsRunningEv", CBot::IsRunning), - //HOOK_SYMBOLDEF(0x0, "_ZNK4CBot11IsCrouchingEv", CBot::IsCrouching), - //HOOK_SYMBOLDEF(0x0, "_ZN4CBot18PushPostureContextEv", CBot::PushPostureContext), - //HOOK_SYMBOLDEF(0x0, "_ZN4CBot17PopPostureContextEv", CBot::PopPostureContext), - HOOK_SYMBOLDEF(0x01D338F0, "_ZN4CBot9IsJumpingEv", CBot::IsJumping), - //HOOK_SYMBOLDEF(0x0, "_ZNK4CBot16GetJumpTimestampEv", CBot::GetJumpTimestamp), - HOOK_SYMBOLDEF(0x01D339E0, "_ZNK4CBot24GetActiveWeaponAmmoRatioEv", CBot::GetActiveWeaponAmmoRatio), - HOOK_SYMBOLDEF(0x01D33A30, "_ZNK4CBot23IsActiveWeaponClipEmptyEv", CBot::IsActiveWeaponClipEmpty), - HOOK_SYMBOLDEF(0x01D33A50, "_ZNK4CBot23IsActiveWeaponOutOfAmmoEv", CBot::IsActiveWeaponOutOfAmmo), - //HOOK_SYMBOLDEF(0x0, "_ZNK4CBot23IsActiveWeaponReloadingEv", CBot::IsActiveWeaponReloading), - //HOOK_SYMBOLDEF(0x0, "_ZNK4CBot24IsActiveWeaponRecoilHighEv", CBot::IsActiveWeaponRecoilHigh), - //HOOK_SYMBOLDEF(0x0, "_ZNK4CBot15GetActiveWeaponEv", CBot::GetActiveWeapon), - HOOK_SYMBOLDEF(0x01D33A80, "_ZNK4CBot12IsUsingScopeEv", CBot::IsUsingScope), - HOOK_SYMBOLDEF(0x01D33BF0, "_ZNK4CBot7IsEnemyEP11CBaseEntity", CBot::IsEnemy), - HOOK_SYMBOLDEF(0x01D33C40, "_ZNK4CBot19GetEnemiesRemainingEv", CBot::GetEnemiesRemaining), - HOOK_SYMBOLDEF(0x01D33D20, "_ZNK4CBot19GetFriendsRemainingEv", CBot::GetFriendsRemaining), - HOOK_SYMBOLDEF(0x01D33E30, "_ZNK4CBot23IsLocalPlayerWatchingMeEv", CBot::IsLocalPlayerWatchingMe), - //HOOK_SYMBOLDEF(0x01D33E90, "_ZNK4CBot5PrintEPcz", CBot::Print), // NOXREF - HOOK_SYMBOLDEF(0x01D33F00, "_ZNK4CBot14PrintIfWatchedEPcz", CBot::PrintIfWatched), - HOOK_SYMBOLDEF(0x01D33660, "_ZN4CBot8BotThinkEv", CBot::BotThink), - //HOOK_SYMBOLDEF(0x0, "_ZNK4CBot11IsNetClientEv", CBot::IsNetClient), - //HOOK_SYMBOLDEF(0x0, "_ZNK4CBot4SaveER5CSave", CBot::Save), - //HOOK_SYMBOLDEF(0x0, "_ZNK4CBot7RestoreER8CRestore", CBot::Restore), - //HOOK_SYMBOLDEF(0x0, "_ZNK4CBot10GetProfileEv", CBot::GetProfile), - HOOK_SYMBOLDEF(0x01D33BA0, "_ZN4CBot13ClientCommandEPKcS1_S1_S1_", CBot::ClientCommand), - //HOOK_SYMBOLDEF(0x01D33B50, "_ZN4CBot12ResetCommandEv", CBot::ResetCommand), // NOXREF - //HOOK_SYMBOLDEF(0x01D33B70, "_ZNK4CBot13ThrottledMsecEv", CBot::ThrottledMsec), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN4CBot12GetMoveSpeedEv", CBot::GetMoveSpeed), -//BotMeme - HOOK_SYMBOLDEF(0x01D18C90, "_ZNK7BotMeme8TransmitEP6CCSBot", BotMeme::Transmit), - //HOOK_SYMBOLDEF(0x0, "_ZNK7BotMeme9InterpretEP6CCSBotS1_", BotMeme::Interpret), // NOXREF -//BotAllHostagesGoneMeme - HOOK_SYMBOL_VIRTUAL_DEF(0x01D19470, "_ZNK22BotAllHostagesGoneMeme9InterpretEP6CCSBotS1_", BotAllHostagesGoneMeme::Interpret), // NOXREF -//BotHostageBeingTakenMeme - HOOK_SYMBOL_VIRTUAL_DEF(0x01D19570, "_ZNK24BotHostageBeingTakenMeme9InterpretEP6CCSBotS1_", BotHostageBeingTakenMeme::Interpret), -//BotHelpMeme - HOOK_SYMBOL_VIRTUAL_DEF(0x01D18D90, "_ZNK11BotHelpMeme9InterpretEP6CCSBotS1_", BotHelpMeme::Interpret), -//BotBombsiteStatusMeme - HOOK_SYMBOL_VIRTUAL_DEF(0x01D18DB0, "_ZNK21BotBombsiteStatusMeme9InterpretEP6CCSBotS1_", BotBombsiteStatusMeme::Interpret), -//BotBombStatusMeme - HOOK_SYMBOL_VIRTUAL_DEF(0x01D18EE0, "_ZNK17BotBombStatusMeme9InterpretEP6CCSBotS1_", BotBombStatusMeme::Interpret), -//BotFollowMeme - HOOK_SYMBOL_VIRTUAL_DEF(0x01D19080, "_ZNK13BotFollowMeme9InterpretEP6CCSBotS1_", BotFollowMeme::Interpret), -//BotDefendHereMeme - HOOK_SYMBOL_VIRTUAL_DEF(0x01D19280, "_ZNK17BotDefendHereMeme9InterpretEP6CCSBotS1_", BotDefendHereMeme::Interpret), -//BotWhereBombMeme - HOOK_SYMBOL_VIRTUAL_DEF(0x01D19420, "_ZNK16BotWhereBombMeme9InterpretEP6CCSBotS1_", BotWhereBombMeme::Interpret), -//BotRequestReportMeme - HOOK_SYMBOL_VIRTUAL_DEF(0x01D19450, "_ZNK20BotRequestReportMeme9InterpretEP6CCSBotS1_", BotRequestReportMeme::Interpret), -//BotSpeakable - //HOOK_DEF(0x01D19680, MethodThunk::Constructor), // NOXREF - //HOOK_DEF(0x01D19690, MethodThunk::Destructor), // NOXREF -//BotPhrase - //HOOK_DEF(0x01D196B0, MethodThunk::Constructor), // NOXREF - //HOOK_DEF(0x01D198E0, MethodThunk::Destructor), // NOXREF - HOOK_SYMBOLDEF(0x01D199C0, "_ZN9BotPhrase13InitVoiceBankEi", BotPhrase::InitVoiceBank), - HOOK_SYMBOLDEF(0x01D19BB0, "_ZNK9BotPhrase12GetSpeakableEiPf", BotPhrase::GetSpeakable), - //HOOK_SYMBOLDEF(0x0, "_ZNK9BotPhrase13ClearCriteriaEv", BotPhrase::ClearCriteria), - //HOOK_SYMBOLDEF(0x0, "_ZNK9BotPhrase16SetPlaceCriteriaEj", BotPhrase::SetPlaceCriteria), - //HOOK_SYMBOLDEF(0x0, "_ZNK9BotPhrase16SetCountCriteriaEj", BotPhrase::SetCountCriteria), - //HOOK_SYMBOLDEF(0x0, "_ZNK9BotPhrase7GetNameEv", BotPhrase::GetName), - //HOOK_SYMBOLDEF(0x0, "_ZNK9BotPhrase5GetIDEv", BotPhrase::GetID), - //HOOK_SYMBOLDEF(0x0, "_ZNK9BotPhrase18GetRadioEquivalentEv", BotPhrase::GetRadioEquivalent), - //HOOK_SYMBOLDEF(0x0, "_ZNK9BotPhrase11IsImportantEv", BotPhrase::IsImportant), - //HOOK_SYMBOLDEF(0x0, "_ZNK9BotPhrase7IsPlaceEv", BotPhrase::IsPlace), - //HOOK_SYMBOLDEF(0x01D19C70, "_ZN9BotPhrase9RandomizeEv", BotPhrase::Randomize), // NOXREF -//BotPhraseManager - //HOOK_DEF(0x01D19D20, MethodThunk::Constructor), - //HOOK_DEF(0x01D1A720, MethodThunk::Destructor), - HOOK_SYMBOLDEF(0x01D19ED0, "_ZN16BotPhraseManager10InitializeEPKci", BotPhraseManager::Initialize), - HOOK_SYMBOLDEF(0x01D19DA0, "_ZN16BotPhraseManager14OnRoundRestartEv", BotPhraseManager::OnRoundRestart), - //HOOK_SYMBOLDEF(0x01D19D90, "_ZN16BotPhraseManager11OnMapChangeEv", BotPhraseManager::OnMapChange), // NOXREF - HOOK_SYMBOLDEF(0x01D1A830, "_ZNK16BotPhraseManager8NameToIDEPKc", BotPhraseManager::NameToID), - HOOK_SYMBOLDEF(0x01D1A8A0, "_ZNK16BotPhraseManager8IDToNameEj", BotPhraseManager::IDToName), - HOOK_SYMBOLDEF(0x01D1A8F0, "_ZNK16BotPhraseManager9GetPhraseEPKc", BotPhraseManager::GetPhrase), - //HOOK_SYMBOLDEF(0x01D1A940, "_ZNK16BotPhraseManager8GetPlaceEPKc", BotPhraseManager::GetPlace, const BotPhrase *(const char *name) const), // NOXREF - HOOK_SYMBOLDEF(0x01D1A990, "_ZNK16BotPhraseManager8GetPlaceEj", BotPhraseManager::GetPlace, const BotPhrase *(PlaceCriteria place) const), - //HOOK_SYMBOLDEF(0x0, "_ZNK16BotPhraseManager12GetPlaceListEv", BotPhraseManager::GetPlaceList), - //HOOK_SYMBOLDEF(0x0, "_ZNK16BotPhraseManager25GetPlaceStatementIntervalEj", BotPhraseManager::GetPlaceStatementInterval), - //HOOK_SYMBOLDEF(0x0, "_ZN16BotPhraseManager27ResetPlaceStatementIntervalEj", BotPhraseManager::ResetPlaceStatementInterval), -#ifdef _WIN32 - HOOK_SYMBOLDEF(0x01D1F830, "_ZNK16BotPhraseManager14FindPlaceIndexEj", BotPhraseManager::FindPlaceIndex), -#endif // _WIN32 - -//BotStatement - //HOOK_DEF(0x01D1A9C0, MethodThunk::Constructor), // NOXREF - //HOOK_DEF(0x01D1AA20, MethodThunk::Destructor), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK12BotStatement10GetChatterEv", BotStatement::GetChatter), // NOXREF - //HOOK_SYMBOLDEF(0x01D1AA30, "_ZNK12BotStatement8GetOwnerEv", BotStatement::GetOwner), // NOXREF - //HOOK_SYMBOLDEF(0x01D1AA40, "_ZN12BotStatement10AttachMemeEP7BotMeme", BotStatement::AttachMeme), // NOXREF - HOOK_SYMBOLDEF(0x01D1AA50, "_ZN12BotStatement12AddConditionENS_13ConditionTypeE", BotStatement::AddCondition), - //HOOK_SYMBOLDEF(0x01D1AA70, "_ZNK12BotStatement11IsImportantEv", BotStatement::IsImportant), // NOXREF - //HOOK_SYMBOLDEF(0x01D1AAB0, "_ZNK12BotStatement7IsValidEv", BotStatement::IsValid), // NOXREF - HOOK_SYMBOLDEF(0x01D1AB00, "_ZNK12BotStatement11IsRedundantEPKS_", BotStatement::IsRedundant), - //HOOK_SYMBOLDEF(0x0, "_ZNK12BotStatement7GetTypeEv", BotStatement::GetType), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK12BotStatement10HasSubjectEv", BotStatement::HasSubject), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN12BotStatement10SetSubjectEi", BotStatement::SetSubject), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK12BotStatement10GetSubjectEv", BotStatement::GetSubject), // NOXREF - //HOOK_SYMBOLDEF(0x01D1AC90, "_ZNK12BotStatement10IsObsoleteEv", BotStatement::IsObsolete), // NOXREF - HOOK_SYMBOLDEF(0x01D1ACD0, "_ZN12BotStatement7ConvertEPKS_", BotStatement::Convert), - HOOK_SYMBOLDEF(0x01D1ADC0, "_ZN12BotStatement12AppendPhraseEPK9BotPhrase", BotStatement::AppendPhrase, void (const BotPhrase *)), - //HOOK_SYMBOLDEF(0x01D1ADF0, "_ZN12BotStatement12AppendPhraseENS_11ContextTypeE", BotStatement::AppendPhrase, void (BotStatement::ContextType)), // NOXREF - HOOK_SYMBOLDEF(0x01D1AE20, "_ZN12BotStatement6UpdateEv", BotStatement::Update), - HOOK_SYMBOLDEF(0x01D1B2A0, "_ZNK12BotStatement8GetPlaceEv", BotStatement::GetPlace), // NOXREF - //HOOK_SYMBOLDEF(0x01D1B2E0, "_ZNK12BotStatement8HasCountEv", BotStatement::HasCount), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK12BotStatement8HasPlaceEv", BotStatement::HasPlace), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN12BotStatement8SetPlaceEj", BotStatement::SetPlace), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN12BotStatement12SetStartTimeEf ", BotStatement::SetStartTime), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK12BotStatement12GetStartTimeEv", BotStatement::GetStartTime), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK12BotStatement10IsSpeakingEv", BotStatement::IsSpeaking), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK12BotStatement12GetTimestampEv", BotStatement::GetTimestamp), // NOXREF -//BotChatterInterface - HOOK_SYMBOLDEF(0x01D1B340, "_ZN19BotChatterInterfaceC2EP6CCSBot", MethodThunk::Constructor), - //HOOK_DEF(0x01D1B3C0, MethodThunk::Destructor), - - HOOK_SYMBOLDEF(0x01D1B3F0, "_ZN19BotChatterInterface5ResetEv", BotChatterInterface::Reset), - HOOK_SYMBOLDEF(0x01D1B8E0, "_ZN19BotChatterInterface6UpdateEv", BotChatterInterface::Update), - //HOOK_SYMBOLDEF(0x01D1B7D0, "_ZN19BotChatterInterface7OnEventE13GameEventTypeP11CBaseEntityS2_", BotChatterInterface::OnEvent), // PURE - HOOK_SYMBOLDEF(0x01D1B7E0, "_ZN19BotChatterInterface7OnDeathEv", BotChatterInterface::OnDeath), - //HOOK_SYMBOLDEF(0x0, "_ZNK19BotChatterInterface12GetVerbosityEv", BotChatterInterface::VerbosityType GetVerbosity), - //HOOK_SYMBOLDEF(0x0, "_ZNK19BotChatterInterface8GetOwnerEv", BotChatterInterface::GetOwner), - //HOOK_SYMBOLDEF(0x0, "_ZNK19BotChatterInterface9IsTalkingEv", BotChatterInterface::IsTalking), - //HOOK_SYMBOLDEF(0x01D1BDC0, "_ZN19BotChatterInterface23GetRadioSilenceDurationEv", BotChatterInterface::GetRadioSilenceDuration), // NOXREF - HOOK_SYMBOLDEF(0x01D1BE00, "_ZN19BotChatterInterface25ResetRadioSilenceDurationEv", BotChatterInterface::ResetRadioSilenceDuration), - HOOK_SYMBOLDEF(0x01D1B490, "_ZN19BotChatterInterface12AddStatementEP12BotStatementb", BotChatterInterface::AddStatement), - HOOK_SYMBOLDEF(0x01D1B5E0, "_ZN19BotChatterInterface15RemoveStatementEP12BotStatement", BotChatterInterface::RemoveStatement), - HOOK_SYMBOLDEF(0x01D1BC00, "_ZN19BotChatterInterface18GetActiveStatementEv", BotChatterInterface::GetActiveStatement), - //HOOK_SYMBOLDEF(0x0, "_ZNK19BotChatterInterface12GetStatementEv", BotChatterInterface::GetStatement), - //HOOK_SYMBOLDEF(0x0, "_ZNK19BotChatterInterface8GetPitchEv", BotChatterInterface::GetPitch), - HOOK_SYMBOLDEF(0x01D1F890, "_ZN19BotChatterInterface3SayEPKcff", BotChatterInterface::Say), - HOOK_SYMBOLDEF(0x01D1E100, "_ZN19BotChatterInterface12AnnouncePlanEPKcj", BotChatterInterface::AnnouncePlan), - HOOK_SYMBOLDEF(0x01D1CDE0, "_ZN19BotChatterInterface11AffirmativeEv", BotChatterInterface::Affirmative), - HOOK_SYMBOLDEF(0x01D1CED0, "_ZN19BotChatterInterface8NegativeEv", BotChatterInterface::Negative), - //HOOK_SYMBOLDEF(0x01D1BE20, "_ZN19BotChatterInterface12EnemySpottedEv", BotChatterInterface::EnemySpotted), // NOXREF - HOOK_SYMBOLDEF(0x01D1CBE0, "_ZN19BotChatterInterface13KilledMyEnemyEi", BotChatterInterface::KilledMyEnemy), - HOOK_SYMBOLDEF(0x01D1CCF0, "_ZN19BotChatterInterface16EnemiesRemainingEv", BotChatterInterface::EnemiesRemaining), - //HOOK_SYMBOLDEF(0x01D1BF30, "_ZN19BotChatterInterface5ClearEj", BotChatterInterface::Clear), // NOXREF - //HOOK_SYMBOLDEF(0x01D1C050, "_ZN19BotChatterInterface8ReportInEv", BotChatterInterface::ReportIn), // NOXREF - HOOK_SYMBOLDEF(0x01D1C170, "_ZN19BotChatterInterface11ReportingInEv", BotChatterInterface::ReportingIn), - HOOK_SYMBOLDEF(0x01D1C6D0, "_ZN19BotChatterInterface10NeedBackupEv", BotChatterInterface::NeedBackup), - HOOK_SYMBOLDEF(0x01D1C910, "_ZN19BotChatterInterface10PinnedDownEv", BotChatterInterface::PinnedDown), - HOOK_SYMBOLDEF(0x01D1DD00, "_ZN19BotChatterInterface6ScaredEv", BotChatterInterface::Scared), - HOOK_SYMBOLDEF(0x01D1CA90, "_ZN19BotChatterInterface10HeardNoiseEPK6Vector", BotChatterInterface::HeardNoise), - HOOK_SYMBOLDEF(0x01D1D240, "_ZN19BotChatterInterface19TheyPickedUpTheBombEv", BotChatterInterface::TheyPickedUpTheBomb), - HOOK_SYMBOLDEF(0x01D1CFC0, "_ZN19BotChatterInterface19GoingToPlantTheBombEj", BotChatterInterface::GoingToPlantTheBomb), - HOOK_SYMBOLDEF(0x01D1DA40, "_ZN19BotChatterInterface13BombsiteClearEi", BotChatterInterface::BombsiteClear), - HOOK_SYMBOLDEF(0x01D1DBB0, "_ZN19BotChatterInterface16FoundPlantedBombEi", BotChatterInterface::FoundPlantedBomb), - HOOK_SYMBOLDEF(0x01D1D100, "_ZN19BotChatterInterface15PlantingTheBombEj", BotChatterInterface::PlantingTheBomb), - HOOK_SYMBOLDEF(0x01D1D3A0, "_ZN19BotChatterInterface13SpottedBomberEP11CBasePlayer", BotChatterInterface::SpottedBomber), - HOOK_SYMBOLDEF(0x01D1D580, "_ZN19BotChatterInterface16SpottedLooseBombEP11CBaseEntity", BotChatterInterface::SpottedLooseBomb), - //HOOK_SYMBOLDEF(0x01D1D770, "_ZN19BotChatterInterface17GuardingLooseBombEP11CBaseEntity", BotChatterInterface::GuardingLooseBomb), // NOXREF - HOOK_SYMBOLDEF(0x01D1D920, "_ZN19BotChatterInterface19RequestBombLocationEv", BotChatterInterface::RequestBombLocation), - HOOK_SYMBOLDEF(0x01D1E230, "_ZN19BotChatterInterface16GuardingHostagesEjb", BotChatterInterface::GuardingHostages), - HOOK_SYMBOLDEF(0x01D1E470, "_ZN19BotChatterInterface25GuardingHostageEscapeZoneEb", BotChatterInterface::GuardingHostageEscapeZone), - HOOK_SYMBOLDEF(0x01D1E6B0, "_ZN19BotChatterInterface18HostagesBeingTakenEv", BotChatterInterface::HostagesBeingTaken), - HOOK_SYMBOLDEF(0x01D1E7C0, "_ZN19BotChatterInterface13HostagesTakenEv", BotChatterInterface::HostagesTaken), - //HOOK_SYMBOLDEF(0x01D1E8C0, "_ZN19BotChatterInterface17TalkingToHostagesEv", BotChatterInterface::TalkingToHostages), // NOXREF - HOOK_SYMBOLDEF(0x01D1E8D0, "_ZN19BotChatterInterface17EscortingHostagesEv", BotChatterInterface::EscortingHostages), - //HOOK_SYMBOLDEF(0x01D1E9F0, "_ZN19BotChatterInterface11HostageDownEv", BotChatterInterface::HostageDown), // NOXREF - HOOK_SYMBOLDEF(0x01D1DE20, "_ZN19BotChatterInterface12CelebrateWinEv", BotChatterInterface::CelebrateWin), - HOOK_SYMBOLDEF(0x01D1EAF0, "_ZN19BotChatterInterface9EncourageEPKcff", BotChatterInterface::Encourage), - HOOK_SYMBOLDEF(0x01D1EC00, "_ZN19BotChatterInterface12KilledFriendEv", BotChatterInterface::KilledFriend), - HOOK_SYMBOLDEF(0x01D1ED00, "_ZN19BotChatterInterface12FriendlyFireEv", BotChatterInterface::FriendlyFire), - HOOK_SYMBOLDEF(0x01D1B630, "_ZN19BotChatterInterface13ReportEnemiesEv", BotChatterInterface::ReportEnemies), - //HOOK_SYMBOLDEF(0x01D1BD70, "_ZNK19BotChatterInterface11ShouldSpeakEv", BotChatterInterface::ShouldSpeak), // NOXREF - HOOK_SYMBOLDEF(0x01D18C30, "_Z20GetRandomSpotAtPlacej", GetRandomSpotAtPlace), - -#endif // Bot_Region - -#ifndef CS_Util_Region - - HOOK_SYMBOLDEF(0x01D36490, "_Z16UTIL_IsNameTakenPKcb", UTIL_IsNameTaken), - HOOK_SYMBOLDEF(0x01D365E0, "_Z18UTIL_ClientsInGamev", UTIL_ClientsInGame), - HOOK_SYMBOLDEF(0x01D36690, "_Z24UTIL_ActivePlayersInGamev", UTIL_ActivePlayersInGame), - HOOK_SYMBOLDEF(0x01D36760, "_Z17UTIL_HumansInGameb", UTIL_HumansInGame), - HOOK_SYMBOLDEF(0x01D36850, "_Z17UTIL_HumansOnTeamib", UTIL_HumansOnTeam), - HOOK_SYMBOLDEF(0x01D36940, "_Z15UTIL_BotsInGamev", UTIL_BotsInGame), - HOOK_SYMBOLDEF(0x01D36A00, "_Z20UTIL_KickBotFromTeam8TeamName", UTIL_KickBotFromTeam), - HOOK_SYMBOLDEF(0x01D36C10, "_Z18UTIL_IsTeamAllBotsi", UTIL_IsTeamAllBots), - HOOK_SYMBOLDEF(0x01D36CE0, "_Z21UTIL_GetClosestPlayerPK6VectorPf", UTIL_GetClosestPlayer, CBasePlayer *(const Vector *pos, float *distance)), - HOOK_SYMBOLDEF(0x01D36E30, "_Z21UTIL_GetClosestPlayerPK6VectoriPf", UTIL_GetClosestPlayer, CBasePlayer *(const Vector *pos, int team, float *distance)), - //HOOK_SYMBOLDEF(0x01D36F90, "_Z17UTIL_GetBotPrefixv", UTIL_GetBotPrefix), // NOXREF - HOOK_SYMBOLDEF(0x01D36FA0, "_Z24UTIL_ConstructBotNetNamePciPK10BotProfile", UTIL_ConstructBotNetName), - HOOK_SYMBOLDEF(0x01D37000, "_Z20UTIL_IsVisibleToTeamRK6Vectorif", UTIL_IsVisibleToTeam), - HOOK_SYMBOLDEF(0x01D37190, "_Z19UTIL_GetLocalPlayerv", UTIL_GetLocalPlayer), - //HOOK_SYMBOLDEF(0x01D371B0, "_Z18UTIL_ComputeOriginP9entvars_s", UTIL_ComputeOrigin, Vector(entvars_t *)), // NOXREF - //HOOK_SYMBOLDEF(0x01D37250, "_Z18UTIL_ComputeOriginP11CBaseEntity", UTIL_ComputeOrigin, Vector(CBaseEntity *)), // NOXREF - //HOOK_SYMBOLDEF(0x01D37300, "_Z18UTIL_ComputeOriginP7edict_s", UTIL_ComputeOrigin, Vector(edict_t *)), // NOXREF - //HOOK_SYMBOLDEF(0x01D373B0, "_Z20UTIL_DrawBeamFromEnti6Vectorihhh", UTIL_DrawBeamFromEnt), // NOXREF - HOOK_SYMBOLDEF(0x01D37480, "_Z19UTIL_DrawBeamPoints6VectorS_ihhh", UTIL_DrawBeamPoints), - HOOK_SYMBOLDEF(0x01D375D0, "_Z11BotPrecachev", BotPrecache), - HOOK_SYMBOLDEF(0x01D37570, "_Z12CONSOLE_ECHOPcz", CONSOLE_ECHO), - //HOOK_SYMBOLDEF(0x01D375A0, "_Z19CONSOLE_ECHO_LOGGEDPcz", CONSOLE_ECHO_LOGGED), // NOXREF - HOOK_SYMBOLDEF(0x01D37660, "_Z11InitBotTrigv", InitBotTrig), - - HOOK_SYMBOLDEF(0x01D37690, "_Z6BotCOSf", BotCOS), - HOOK_SYMBOLDEF(0x01D37700, "_Z6BotSINf", BotSIN), - - HOOK_SYMBOLDEF(0x01D37770, "_Z18IsGameEventAudible13GameEventTypeP11CBaseEntityS1_PfP12PriorityTypePb", IsGameEventAudible), - HOOK_SYMBOLDEF(0x01D37A00, "_Z23HintMessageToAllPlayersPKc", HintMessageToAllPlayers), - -#endif // CS_Util_Region - -#ifndef CS_Init_Region - - HOOK_SYMBOLDEF(0x01D206A0, "_Z17InstallBotControlv", InstallBotControl), - HOOK_SYMBOLDEF(0x01D20730, "_Z17Bot_ServerCommandv", Bot_ServerCommand), - HOOK_SYMBOLDEF(0x01D20760, "_Z17Bot_RegisterCvarsv", Bot_RegisterCVars), - -#endif // CS_Init_Region - -#ifndef H_Region - -//AI - //HOOK_SYMBOLDEF(0x01D848B0, "_Z11FBoxVisibleP9entvars_sS0_R6Vectorf", FBoxVisible), // NOXREF - //HOOK_SYMBOLDEF(0x01D84A10, "_Z12VecCheckTossP9entvars_sRK6VectorS1_f", VecCheckToss), // NOXREF - //HOOK_SYMBOLDEF(0x01D84EB0, "_Z13VecCheckThrowP9entvars_sRK6VectorS1_ff", VecCheckThrow), // NOXREF -//CRecharge - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D851E0, "_ZN9CRecharge5SpawnEv", CRecharge::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D85270, "_ZN9CRecharge8PrecacheEv", CRecharge::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D85130, "_ZN9CRecharge8KeyValueEP14KeyValueData_s", CRecharge::KeyValue), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D85070, "_ZN9CRecharge4SaveER5CSave", CRecharge::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D850A0, "_ZN9CRecharge7RestoreER8CRestore", CRecharge::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D85120, "_ZN9CRecharge10ObjectCapsEv", CRecharge::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D852A0, "_ZN9CRecharge3UseEP11CBaseEntityS1_8USE_TYPEf", CRecharge::Use), - // non-virtual func - HOOK_DEF(0x01D850D0, func_recharge), - HOOK_SYMBOLDEF(0x01D855A0, "_ZN9CRecharge3OffEv", CRecharge::Off), - HOOK_SYMBOLDEF(0x01D85570, "_ZN9CRecharge8RechargeEv", CRecharge::Recharge), -//CCycler - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D85AA0, "_ZN7CCycler5SpawnEv", CCycler::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D85630, "_ZN7CCycler4SaveER5CSave", CCycler::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D85660, "_ZN7CCycler7RestoreER8CRestore", CCycler::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D856E0, "_ZN7CCycler10ObjectCapsEv", CCycler::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D85C60, "_ZN7CCycler10TakeDamageEP9entvars_sS1_fi", CCycler::TakeDamage), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D856F0, "_ZN7CCycler7IsAliveEv", CCycler::IsAlive), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D85B80, "_ZN7CCycler5ThinkEv", CCycler::Think), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D85C20, "_ZN7CCycler3UseEP11CBaseEntityS1_8USE_TYPEf", CCycler::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x01D859B0, "_ZN7CCycler18GenericCyclerSpawnEPc6VectorS1__part_11_constprop_16", CCycler::GenericCyclerSpawn), // NOXREF -//CCyclerProbe - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D85860, "_ZN12CCyclerProbe5SpawnEv", CCyclerProbe::Spawn), -//CGenericCycler - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D85700, "_ZN14CGenericCycler5SpawnEv", CGenericCycler::Spawn), -//CCyclerSprite - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D85DE0, "_ZN13CCyclerSprite5SpawnEv", CCyclerSprite::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D85F00, "_ZN13CCyclerSprite7RestartEv", CCyclerSprite::Restart), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D85D80, "_ZN13CCyclerSprite4SaveER5CSave", CCyclerSprite::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D85DB0, "_ZN13CCyclerSprite7RestoreER8CRestore", CCyclerSprite::Restore), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D85D70, "_ZN13CCyclerSprite10ObjectCapsEv", CCyclerSprite::ObjectCaps), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D86090, "_ZN13CCyclerSprite10TakeDamageEP9entvars_sS1_fi", CCyclerSprite::TakeDamage), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D85FB0, "_ZN13CCyclerSprite5ThinkEv", CCyclerSprite::Think), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D86050, "_ZN13CCyclerSprite3UseEP11CBaseEntityS1_8USE_TYPEf", CCyclerSprite::Use), - // non-virtual func - //HOOK_SYMBOLDEF(0x01D86100, "_ZN13CCyclerSprite7AnimateEf", CCyclerSprite::Animate), // NOXREF -//CWeaponCycler - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D861F0, "_ZN13CWeaponCycler5SpawnEv", CWeaponCycler::Spawn), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D861E0, "_ZN13CWeaponCycler11GetItemInfoEP8ItemInfo", CWeaponCycler::GetItemInfo), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D862D0, "_ZN13CWeaponCycler6DeployEv", CWeaponCycler::Deploy), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D86320, "_ZN13CWeaponCycler7HolsterEi", CWeaponCycler::Holster), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D861D0, "_ZN13CWeaponCycler9iItemSlotEv", CWeaponCycler::iItemSlot), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D86370, "_ZN13CWeaponCycler15SecondaryAttackEv", CWeaponCycler::SecondaryAttack), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D86340, "_ZN13CWeaponCycler13PrimaryAttackEv", CWeaponCycler::PrimaryAttack), -//CWreckage - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D864D0, "_ZN9CWreckage5SpawnEv", CWreckage::Spawn), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D86580, "_ZN9CWreckage8PrecacheEv", CWreckage::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D86420, "_ZN9CWreckage4SaveER5CSave", CWreckage::Save), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D86450, "_ZN9CWreckage7RestoreER8CRestore", CWreckage::Restore), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D865B0, "_ZN9CWreckage5ThinkEv", CWreckage::Think), -//linked objects - HOOK_DEF(0x01D85690, cycler), - HOOK_DEF(0x01D85810, cycler_prdroid), - HOOK_DEF(0x01D85D20, cycler_sprite), - HOOK_DEF(0x01D86150, cycler_weapon), - HOOK_DEF(0x01D86480, cycler_wreckage), - -#endif // H_Region - -#ifndef Tutor_CS_Region - - HOOK_SYMBOLDEF(0x01DD26D0, "_Z12InstallTutorb", InstallTutor), - HOOK_SYMBOLDEF(0x01DD2740, "_Z19Tutor_RegisterCVarsv", Tutor_RegisterCVars), - HOOK_SYMBOLDEF(0x01DD27C0, "_Z18MonitorTutorStatusv", MonitorTutorStatus), -//CBaseTutor - //HOOK_SYMBOLDEF(0x01DD2BF0, "_ZN10CBaseTutorC2Ev", CBaseTutor::CBaseTutor), - //HOOK_SYMBOLDEF(0x01DD2C10, "_ZN10CBaseTutorD0Ev", CBaseTutor::~CBaseTutor), - // virtual func - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZN10CBaseTutor10TutorThinkEf", CBaseTutor::TutorThink), // PURE virt - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZN10CBaseTutor13PurgeMessagesEv", CBaseTutor::PurgeMessages), // PURE virt - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZN10CBaseTutor16CallEventHandlerE13GameEventTypeP11CBaseEntityS2_", CBaseTutor::CallEventHandler), // PURE virt - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZN10CBaseTutor16ShowTutorMessageEP17TutorMessageEvent", CBaseTutor::ShowTutorMessage), // PURE virt - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DD3070, "_ZN10CBaseTutor22IsEntityInViewOfPlayerEP11CBaseEntityP11CBasePlayer", CBaseTutor::IsEntityInViewOfPlayer), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DD3350, "_ZN10CBaseTutor24IsBombsiteInViewOfPlayerEP11CBaseEntityP11CBasePlayer", CBaseTutor::IsBombsiteInViewOfPlayer), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DD3480, "_ZN10CBaseTutor18IsEntityInBombsiteEP11CBaseEntityS1_", CBaseTutor::IsEntityInBombsite), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DD3160, "_ZN10CBaseTutor25IsPlayerLookingAtPositionEP6VectorP11CBasePlayer", CBaseTutor::IsPlayerLookingAtPosition), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DD3240, "_ZN10CBaseTutor23IsPlayerLookingAtEntityEP11CBaseEntityP11CBasePlayer", CBaseTutor::IsPlayerLookingAtEntity), - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZN10CBaseTutor15HandleShotFiredE6VectorS0_", CBaseTutor::HandleShotFired), // PURE virt - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZN10CBaseTutor25GetTutorMessageDefinitionEi", CBaseTutor::GetTutorMessageDefinition), // PURE virt - // non-virtual func - HOOK_SYMBOLDEF(0x01DD2DA0, "_ZN10CBaseTutor10StartFrameEf", CBaseTutor::StartFrame), - HOOK_SYMBOLDEF(0x01DD2C70, "_ZN10CBaseTutor7OnEventE13GameEventTypeP11CBaseEntityS2_", CBaseTutor::OnEvent), - //HOOK_SYMBOLDEF(0x01DD2CF0, "_ZN10CBaseTutor9ShotFiredE6VectorS0_", CBaseTutor::ShotFired), // NOXREF - HOOK_SYMBOLDEF(0x01DD2DB0, "_ZN10CBaseTutor22DisplayMessageToPlayerEP11CBasePlayeriPKcP17TutorMessageEvent", CBaseTutor::DisplayMessageToPlayer), - //HOOK_SYMBOLDEF(0x01DD2F80, "_ZN10CBaseTutor16DrawLineToEntityEP11CBasePlayerii", CBaseTutor::DrawLineToEntity), // NOXREF - //HOOK_SYMBOLDEF(0x01DD2FD0, "_ZN10CBaseTutor34DisplayNewStateDescriptionToPlayerEv", CBaseTutor::DisplayNewStateDescriptionToPlayer), // NOXREF - HOOK_SYMBOLDEF(0x01DD3020, "_ZN10CBaseTutor18CloseCurrentWindowEv", CBaseTutor::CloseCurrentWindow), - //HOOK_SYMBOLDEF(0x01DD2D30, "_ZN10CBaseTutor23CheckForStateTransitionE13GameEventTypeP11CBaseEntityS2_", CBaseTutor::CheckForStateTransition), // NOXREF - //HOOK_SYMBOLDEF(0x01DD3060, "_ZN10CBaseTutor25CalculatePathForObjectiveEP11CBaseEntity", CBaseTutor::CalculatePathForObjective), // PURE - HOOK_SYMBOLDEF(0x01DD3510, "_ZN10CBaseTutor20DoMessagesHaveSameIDEii", CBaseTutor::DoMessagesHaveSameID), -//CCSTutor - //HOOK_SYMBOLDEF(0x01DD3A30, "_ZN8CCSTutorC2Ev", CCSTutor::CCSTutor), - //HOOK_SYMBOLDEF(0x01DD3B90, "_ZN8CCSTutorC2Ev", CCSTutor::~CCSTutor), - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD46C0, "_ZN8CCSTutor10TutorThinkEf", CCSTutor::TutorThink), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD56C0, "_ZN8CCSTutor13PurgeMessagesEv", CCSTutor::PurgeMessages), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD5960, "_ZN8CCSTutor16ShowTutorMessageEP17TutorMessageEvent", CCSTutor::ShowTutorMessage), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD5A20, "_ZN8CCSTutor16CallEventHandlerE13GameEventTypeP11CBaseEntityS2_", CCSTutor::CallEventHandler), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD9830, "_ZN8CCSTutor15HandleShotFiredE6VectorS0_", CCSTutor::HandleShotFired), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DDA8B0, "_ZN8CCSTutor25GetTutorMessageDefinitionEi", CCSTutor::GetTutorMessageDefinition), - // non-virtual func - HOOK_SYMBOLDEF(0x01DD5510, "_ZN8CCSTutor14AddToEventListEP17TutorMessageEvent", CCSTutor::AddToEventList), - HOOK_SYMBOLDEF(0x01DD5530, "_ZN8CCSTutor23CreateAndAddEventToListE14TutorMessageIDP11CBaseEntityS2_", CCSTutor::CreateAndAddEventToList), - HOOK_SYMBOLDEF(0x01DD51B0, "_ZN8CCSTutor23CreateTutorMessageEventE14TutorMessageIDP11CBaseEntityS2_", CCSTutor::CreateTutorMessageEvent), - HOOK_SYMBOLDEF(0x01DD55C0, "_ZN8CCSTutor24DeleteEventFromEventListEP17TutorMessageEvent", CCSTutor::DeleteEventFromEventList), - HOOK_SYMBOLDEF(0x01DD5640, "_ZN8CCSTutor14ClearEventListEv", CCSTutor::ClearEventList), - HOOK_SYMBOLDEF(0x01DD4BE0, "_ZN8CCSTutor17ClearCurrentEventEbb", CCSTutor::ClearCurrentEvent), - HOOK_SYMBOLDEF(0x01DD5690, "_ZN8CCSTutor11DeleteEventEP17TutorMessageEvent", CCSTutor::DeleteEvent), - HOOK_SYMBOLDEF(0x01DD4410, "_ZN8CCSTutor22ShouldShowMessageEventEP17TutorMessageEventf", CCSTutor::ShouldShowMessageEvent), - //HOOK_SYMBOLDEF(0x01DD5870, "_ZN8CCSTutor26ShouldUpdateCurrentMessageE14TutorMessageID", CCSTutor::ShouldUpdateCurrentMessage), // NOXREF - HOOK_SYMBOLDEF(0x01DD57B0, "_ZN8CCSTutor29ComputeDisplayTimesForMessageEv", CCSTutor::ComputeDisplayTimesForMessage), - HOOK_SYMBOLDEF(0x01DD58A0, "_ZN8CCSTutor20UpdateCurrentMessageEP17TutorMessageEvent", CCSTutor::UpdateCurrentMessage), - //HOOK_SYMBOLDEF(0x01DD59B0, "_ZN8CCSTutor26ConstructMessageAndDisplayEv", CCSTutor::ConstructMessageAndDisplay), // NOXREF - //HOOK_SYMBOLDEF(0x01DD5190, "_ZN8CCSTutor12LookupHotKeyE14TutorMessageIDiPwi", CCSTutor::LookupHotKey), // NOXREF - //HOOK_SYMBOLDEF(0x01DD4970, "_ZN8CCSTutor19CheckForWindowCloseEf", CCSTutor::CheckForWindowClose), // NOXREF - //HOOK_SYMBOLDEF(0x01DD4AF0, "_ZN8CCSTutor21CheckForContentUpdateEv", CCSTutor::CheckForContentUpdate), // NOXREF - //HOOK_SYMBOLDEF(0x01DD43E0, "_ZN8CCSTutor36HasCurrentWindowBeenActiveLongEnoughEf", CCSTutor::HasCurrentWindowBeenActiveLongEnough), // NOXREF - HOOK_SYMBOLDEF(0x01DD4540, "_ZN8CCSTutor32CheckForInterruptingMessageEventEf", CCSTutor::CheckForInterruptingMessageEvent), - HOOK_SYMBOLDEF(0x01DD4D80, "_ZN8CCSTutor22CheckForInactiveEventsEf", CCSTutor::CheckForInactiveEvents), - HOOK_SYMBOLDEF(0x01DD5020, "_ZN8CCSTutor11CancelEventE14TutorMessageID", CCSTutor::CancelEvent), - //HOOK_SYMBOLDEF(0x01DD4C90, "_ZN8CCSTutor26ProcessShownDeathsForEventEP17TutorMessageEvent", CCSTutor::ProcessShownDeathsForEvent), // NOXREF - //HOOK_SYMBOLDEF(0x01DDB520, "_ZN8CCSTutor19TransferDeathEventsEP17TutorMessageEventS1_", CCSTutor::TransferDeathEvents), // NOXREF - HOOK_SYMBOLDEF(0x01DD4CC0, "_ZN8CCSTutor26GetTutorMessageUpdateEventEv", CCSTutor::GetTutorMessageUpdateEvent), - HOOK_SYMBOLDEF(0x01DD4D10, "_ZN8CCSTutor33GetDuplicateMessagesFromEventListERP17TutorMessageEventS2_", CCSTutor::GetDuplicateMessagesFromEventList), - //HOOK_SYMBOLDEF(0x01DDB390, "_ZN8CCSTutor9IsBombMapEv", CCSTutor::IsBombMap), // NOXREF - //HOOK_SYMBOLDEF(0x01DDB370, "_ZN8CCSTutor12IsHostageMapEv", CCSTutor::IsHostageMap), // NOXREF - //HOOK_SYMBOLDEF(0x01DD6460, "_ZN8CCSTutor17HandleWeaponFiredEP11CBaseEntityS1_", CCSTutor::HandleWeaponFired), // NOXREF - HOOK_SYMBOLDEF(0x01DD64A0, "_ZN8CCSTutor24HandleWeaponFiredOnEmptyEP11CBaseEntityS1_", CCSTutor::HandleWeaponFiredOnEmpty), - //HOOK_SYMBOLDEF(0x01DD65A0, "_ZN8CCSTutor20HandleWeaponReloadedEP11CBaseEntityS1_", CCSTutor::HandleWeaponReloaded), // NOXREF - HOOK_SYMBOLDEF(0x01DD65E0, "_ZN8CCSTutor16HandlePlayerDiedEP11CBaseEntityS1_", CCSTutor::HandlePlayerDied), - //HOOK_SYMBOLDEF(0x01DD6F90, "_ZN8CCSTutor19HandlePlayerSpawnedEP11CBaseEntityS1_", CCSTutor::HandlePlayerSpawned), // NOXREF - //HOOK_SYMBOLDEF(0x01DD7040, "_ZN8CCSTutor25HandleClientCorpseSpawnedEP11CBaseEntityS1_", CCSTutor::HandleClientCorpseSpawned), // NOXREF - HOOK_SYMBOLDEF(0x01DD6D60, "_ZN8CCSTutor22HandlePlayerTookDamageEP11CBaseEntityS1_", CCSTutor::HandlePlayerTookDamage), - //HOOK_SYMBOLDEF(0x01DD6EE0, "_ZN8CCSTutor30HandlePlayerBlindedByFlashbangEP11CBaseEntityS1_", CCSTutor::HandlePlayerBlindedByFlashbang), // NOXREF - //HOOK_SYMBOLDEF(0x01DD7380, "_ZN8CCSTutor18HandleBuyTimeStartEP11CBaseEntityS1_", CCSTutor::HandleBuyTimeStart), // NOXREF - //HOOK_SYMBOLDEF(0x01DD7390, "_ZN8CCSTutor23HandlePlayerLeftBuyZoneEP11CBaseEntityS1_", CCSTutor::HandlePlayerLeftBuyZone), // NOXREF - //HOOK_SYMBOLDEF(0x01DD7490, "_ZN8CCSTutor17HandleBombPlantedEP11CBaseEntityS1_", CCSTutor::HandleBombPlanted), // NOXREF - HOOK_SYMBOLDEF(0x01DD75B0, "_ZN8CCSTutor17HandleBombDefusedEP11CBaseEntityS1_", CCSTutor::HandleBombDefused), - //HOOK_SYMBOLDEF(0x01DD7740, "_ZN8CCSTutor18HandleBombDefusingEP11CBaseEntityS1_", CCSTutor::HandleBombDefusing), // NOXREF - //HOOK_SYMBOLDEF(0x01DD7800, "_ZN8CCSTutor18HandleBombExplodedEP11CBaseEntityS1_", CCSTutor::HandleBombExploded), // NOXREF - HOOK_SYMBOLDEF(0x01DD7920, "_ZN8CCSTutor16HandleRoundStartEP11CBaseEntityS1_", CCSTutor::HandleRoundStart), - //HOOK_SYMBOLDEF(0x01DD7B30, "_ZN8CCSTutor17HandleBeingShotAtEP11CBaseEntityS1_", CCSTutor::HandleBeingShotAt), // NOXREF - HOOK_SYMBOLDEF(0x01DD7C00, "_ZN8CCSTutor17HandleHostageUsedEP11CBaseEntityS1_", CCSTutor::HandleHostageUsed), - //HOOK_SYMBOLDEF(0x01DD7E30, "_ZN8CCSTutor20HandleHostageRescuedEP11CBaseEntityS1_", CCSTutor::HandleHostageRescued), // NOXREF - //HOOK_SYMBOLDEF(0x01DD7FD0, "_ZN8CCSTutor24HandleAllHostagesRescuedEP11CBaseEntityS1_", CCSTutor::HandleAllHostagesRescued), // NOXREF - //HOOK_SYMBOLDEF(0x01DD80F0, "_ZN8CCSTutor20HandleHostageDamagedEP11CBaseEntityS1_", CCSTutor::HandleHostageDamaged), // NOXREF - HOOK_SYMBOLDEF(0x01DD81B0, "_ZN8CCSTutor19HandleHostageKilledEP11CBaseEntityS1_", CCSTutor::HandleHostageKilled), - //HOOK_SYMBOLDEF(0x01DD8430, "_ZN8CCSTutor15HandleRoundDrawEP11CBaseEntityS1_", CCSTutor::HandleRoundDraw), // NOXREF - //HOOK_SYMBOLDEF(0x01DD84E0, "_ZN8CCSTutor11HandleCTWinEP11CBaseEntityS1_", CCSTutor::HandleCTWin), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8580, "_ZN8CCSTutor10HandleTWinEP11CBaseEntityS1_", CCSTutor::HandleTWin), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8620, "_ZN8CCSTutor22HandleDeathCameraStartEP11CBaseEntityS1_", CCSTutor::HandleDeathCameraStart), // NOXREF - //HOOK_SYMBOLDEF(0x01DD86E0, "_ZN8CCSTutor18HandleRadioCoverMeEP11CBaseEntityS1_", CCSTutor::HandleRadioCoverMe), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8770, "_ZN8CCSTutor26HandleRadioYouTakeThePointEP11CBaseEntityS1_", CCSTutor::HandleRadioYouTakeThePoint), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8800, "_ZN8CCSTutor27HandleRadioHoldThisPositionEP11CBaseEntityS1_", CCSTutor::HandleRadioHoldThisPosition), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8890, "_ZN8CCSTutor22HandleRadioRegroupTeamEP11CBaseEntityS1_", CCSTutor::HandleRadioRegroupTeam), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8920, "_ZN8CCSTutor19HandleRadioFollowMeEP11CBaseEntityS1_", CCSTutor::HandleRadioFollowMe), // NOXREF - //HOOK_SYMBOLDEF(0x01DD89B0, "_ZN8CCSTutor21HandleRadioTakingFireEP11CBaseEntityS1_", CCSTutor::HandleRadioTakingFire), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8A40, "_ZN8CCSTutor17HandleRadioGoGoGoEP11CBaseEntityS1_", CCSTutor::HandleRadioGoGoGo), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8AD0, "_ZN8CCSTutor23HandleRadioTeamFallBackEP11CBaseEntityS1_", CCSTutor::HandleRadioTeamFallBack), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8B60, "_ZN8CCSTutor28HandleRadioStickTogetherTeamEP11CBaseEntityS1_", CCSTutor::HandleRadioStickTogetherTeam), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8BF0, "_ZN8CCSTutor31HandleRadioGetInPositionAndWaitEP11CBaseEntityS1_", CCSTutor::HandleRadioGetInPositionAndWait), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8C80, "_ZN8CCSTutor24HandleRadioStormTheFrontEP11CBaseEntityS1_", CCSTutor::HandleRadioStormTheFront), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8D10, "_ZN8CCSTutor23HandleRadioReportInTeamEP11CBaseEntityS1_", CCSTutor::HandleRadioReportInTeam), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8DA0, "_ZN8CCSTutor22HandleRadioAffirmativeEP11CBaseEntityS1_", CCSTutor::HandleRadioAffirmative), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8E30, "_ZN8CCSTutor23HandleRadioEnemySpottedEP11CBaseEntityS1_", CCSTutor::HandleRadioEnemySpotted), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8EC0, "_ZN8CCSTutor21HandleRadioNeedBackupEP11CBaseEntityS1_", CCSTutor::HandleRadioNeedBackup), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8F50, "_ZN8CCSTutor22HandleRadioSectorClearEP11CBaseEntityS1_", CCSTutor::HandleRadioSectorClear), // NOXREF - //HOOK_SYMBOLDEF(0x01DD8FE0, "_ZN8CCSTutor21HandleRadioInPositionEP11CBaseEntityS1_", CCSTutor::HandleRadioInPosition), // NOXREF - //HOOK_SYMBOLDEF(0x01DD9070, "_ZN8CCSTutor22HandleRadioReportingInEP11CBaseEntityS1_", CCSTutor::HandleRadioReportingIn), // NOXREF - //HOOK_SYMBOLDEF(0x01DD9100, "_ZN8CCSTutor24HandleRadioGetOutOfThereEP11CBaseEntityS1_", CCSTutor::HandleRadioGetOutOfThere), // NOXREF - //HOOK_SYMBOLDEF(0x01DD9190, "_ZN8CCSTutor19HandleRadioNegativeEP11CBaseEntityS1_", CCSTutor::HandleRadioNegative), // NOXREF - //HOOK_SYMBOLDEF(0x01DD9220, "_ZN8CCSTutor20HandleRadioEnemyDownEP11CBaseEntityS1_", CCSTutor::HandleRadioEnemyDown), // NOXREF - //HOOK_SYMBOLDEF(0x01DD7240, "_ZN8CCSTutor20HandleBuyMenuOpennedEP11CBaseEntityS1_", CCSTutor::HandleBuyMenuOpenned), // NOXREF - //HOOK_SYMBOLDEF(0x01DD72E0, "_ZN8CCSTutor13HandleAutoBuyEP11CBaseEntityS1_", CCSTutor::HandleAutoBuy), // NOXREF - //HOOK_SYMBOLDEF(0x01DD92B0, "_ZN8CCSTutor23HandleNotBuyingAnythingEP11CBaseEntityS1_", CCSTutor::HandleNotBuyingAnything), // NOXREF - //HOOK_SYMBOLDEF(0x01DD9340, "_ZN8CCSTutor28HandleNeedToBuyPrimaryWeaponEP11CBaseEntityS1_", CCSTutor::HandleNeedToBuyPrimaryWeapon), // NOXREF - //HOOK_SYMBOLDEF(0x01DD93D0, "_ZN8CCSTutor26HandleNeedToBuyPrimaryAmmoEP11CBaseEntityS1_", CCSTutor::HandleNeedToBuyPrimaryAmmo), // NOXREF - //HOOK_SYMBOLDEF(0x01DD9460, "_ZN8CCSTutor28HandleNeedToBuySecondaryAmmoEP11CBaseEntityS1_", CCSTutor::HandleNeedToBuySecondaryAmmo), // NOXREF - //HOOK_SYMBOLDEF(0x01DD94F0, "_ZN8CCSTutor20HandleNeedToBuyArmorEP11CBaseEntityS1_", CCSTutor::HandleNeedToBuyArmor), // NOXREF - //HOOK_SYMBOLDEF(0x01DD9580, "_ZN8CCSTutor24HandleNeedToBuyDefuseKitEP11CBaseEntityS1_", CCSTutor::HandleNeedToBuyDefuseKit), // NOXREF - //HOOK_SYMBOLDEF(0x01DD9610, "_ZN8CCSTutor22HandleNeedToBuyGrenadeEP11CBaseEntityS1_", CCSTutor::HandleNeedToBuyGrenade), // NOXREF - //HOOK_SYMBOLDEF(0x01DD96A0, "_ZN8CCSTutor20HandleCareerTaskDoneEP11CBaseEntityS1_", CCSTutor::HandleCareerTaskDone), // NOXREF - //HOOK_SYMBOLDEF(0x01DD98F0, "_ZN8CCSTutor25GetNumPlayersAliveOnTeamsERiS0_", CCSTutor::GetNumPlayersAliveOnTeams), // NOXREF - HOOK_SYMBOLDEF(0x01DD9BA0, "_ZN8CCSTutor20CheckForBombViewableEv", CCSTutor::CheckForBombViewable), - //HOOK_SYMBOLDEF(0x01DD9970, "_ZN8CCSTutor27CheckForLooseWeaponViewableEv", CCSTutor::CheckForLooseWeaponViewable), // NOXREF - HOOK_SYMBOLDEF(0x01DD9A80, "_ZN8CCSTutor28CheckForLooseDefuserViewableEv", CCSTutor::CheckForLooseDefuserViewable), - HOOK_SYMBOLDEF(0x01DD9F30, "_ZN8CCSTutor24CheckForBombsiteViewableEv", CCSTutor::CheckForBombsiteViewable), - HOOK_SYMBOLDEF(0x01DDA1D0, "_ZN8CCSTutor18CheckForInBombZoneEv", CCSTutor::CheckForInBombZone), - HOOK_SYMBOLDEF(0x01DDA340, "_ZN8CCSTutor23CheckForHostageViewableEv", CCSTutor::CheckForHostageViewable), - HOOK_SYMBOLDEF(0x01DDA550, "_ZN8CCSTutor22CheckForTimeRunningOutEv", CCSTutor::CheckForTimeRunningOut), - //HOOK_SYMBOLDEF(0x01DDA740, "_ZN8CCSTutor23CheckForAllHostagesDeadEv", CCSTutor::CheckForAllHostagesDead), // NOXREF - //HOOK_SYMBOLDEF(0x01DDA810, "_ZN8CCSTutor35CheckForAllHostagesFollowingSomeoneEv", CCSTutor::CheckForAllHostagesFollowingSomeone), // NOXREF - HOOK_SYMBOLDEF(0x01DDAB10, "_ZN8CCSTutor17CheckHintMessagesEf", CCSTutor::CheckHintMessages), - //HOOK_SYMBOLDEF(0x01DDAC40, "_ZN8CCSTutor23CheckInGameHintMessagesEf", CCSTutor::CheckInGameHintMessages), // NOXREF - HOOK_SYMBOLDEF(0x01DDAF80, "_ZN8CCSTutor20CheckExamineMessagesEf", CCSTutor::CheckExamineMessages), - HOOK_SYMBOLDEF(0x01DDAD20, "_ZN8CCSTutor20CheckForNeedToReloadEb", CCSTutor::CheckForNeedToReload), - //HOOK_SYMBOLDEF(0x01DDB210, "_ZN8CCSTutor22CanLocalPlayerBuyStuffEv", CCSTutor::CanLocalPlayerBuyStuff), // NOXREF - HOOK_SYMBOLDEF(0x01DDB230, "_ZN8CCSTutor20CheckBuyZoneMessagesEv", CCSTutor::CheckBuyZoneMessages), - //HOOK_SYMBOLDEF(0x01DDA2F0, "_ZN8CCSTutor23IsBombPlantedInBombsiteEP11CBaseEntity", CCSTutor::IsBombPlantedInBombsite), // NOXREF - HOOK_SYMBOLDEF(0x01DD3D30, "_ZN8CCSTutor20ReadTutorMessageFileEv", CCSTutor::ReadTutorMessageFile), - //HOOK_SYMBOLDEF(0x01DD43A0, "_ZN8CCSTutor20ApplyPersistentDecayEv", CCSTutor::ApplyPersistentDecay), // NOXREF - HOOK_SYMBOLDEF(0x01DDA9A0, "_ZN8CCSTutor21GetEntityForMessageIDEiP11CBaseEntity", CCSTutor::GetEntityForMessageID), - HOOK_SYMBOLDEF(0x01DDB3A0, "_ZN8CCSTutor20ResetPlayerDeathInfoEv", CCSTutor::ResetPlayerDeathInfo), - HOOK_SYMBOLDEF(0x01DDB3C0, "_ZN8CCSTutor25ConstructRecentDeathsListE8TeamNamePciP17TutorMessageEvent", CCSTutor::ConstructRecentDeathsList), -//TutorMessageEvent - // virtual func - //HOOK_SYMBOLDEF(0x01DD2A10, "_ZN17TutorMessageEventC2Eiiffi", TutorMessageEvent::TutorMessageEvent), - //HOOK_SYMBOLDEF(0x01DD2A50, "_ZN17TutorMessageEventD0Ev", TutorMessageEvent::~TutorMessageEvent), - // non-virtual func - HOOK_SYMBOLDEF(0x01DD2A80, "_ZN17TutorMessageEvent8IsActiveEf", TutorMessageEvent::IsActive), - //HOOK_SYMBOLDEF(0x01DD2AA0, "_ZN17TutorMessageEvent11GetPriorityEv", TutorMessageEvent::GetPriority), // NOXREF - HOOK_SYMBOLDEF(0x01DD2AB0, "_ZN17TutorMessageEvent13GetTimeActiveEf", TutorMessageEvent::GetTimeActive), - HOOK_SYMBOLDEF(0x01DD2AC0, "_ZN17TutorMessageEvent17SetActivationTimeEf", TutorMessageEvent::SetActivationTime), - HOOK_SYMBOLDEF(0x01DD2AD0, "_ZN17TutorMessageEvent5GetIDEv", TutorMessageEvent::GetID), - //HOOK_SYMBOLDEF(0x01DD2AE0, "_ZN17TutorMessageEvent14GetDuplicateIDEv", TutorMessageEvent::GetDuplicateID), // NOXREF - HOOK_SYMBOLDEF(0x01DD2AF0, "_ZN17TutorMessageEvent7SetNextEPS_", TutorMessageEvent::SetNext), - HOOK_SYMBOLDEF(0x01DD2B00, "_ZN17TutorMessageEvent7GetNextEv", TutorMessageEvent::GetNext), - HOOK_SYMBOLDEF(0x01DD2B10, "_ZN17TutorMessageEvent12AddParameterEPc", TutorMessageEvent::AddParameter), - //HOOK_SYMBOLDEF(0x01DD2BA0, "_ZN17TutorMessageEvent16GetNextParameterEPci", TutorMessageEvent::GetNextParameter), // NOXREF - //HOOK_SYMBOLDEF(0x01DD2BE0, "_ZN17TutorMessageEvent16GetNumParametersEv", TutorMessageEvent::GetNumParameters), // NOXREF -//CBaseTutorStateSystem - // virtual func - //HOOK_SYMBOLDEF(0x01DD2970, "_ZN21CBaseTutorStateSystemC2Ev", CBaseTutorStateSystem::CBaseTutorStateSystem), - //HOOK_SYMBOLDEF(0x01DD2980, "_ZN21CBaseTutorStateSystemD0Ev", CBaseTutorStateSystem::~CBaseTutorStateSystem), - //HOOK_SYMBOLDEF(0x0, "_ZN21CBaseTutorStateSystem11UpdateStateE13GameEventTypeP11CBaseEntityS2_", CBaseTutorStateSystem::UpdateState), // NOXREF PURE - //HOOK_SYMBOLDEF(0x0, "_ZN21CBaseTutorStateSystem21GetCurrentStateStringEv", CBaseTutorStateSystem::GetCurrentStateString), // NOXREF PURE - //HOOK_SYMBOLDEF(0x0, "_ZN21CBaseTutorStateSystem17ConstructNewStateEi", CBaseTutorStateSystem::ConstructNewState), // NOXREF PURE - // non-virtual func - //HOOK_SYMBOLDEF(0x01DD29B0, "_ZN21CBaseTutorStateSystem19GetCurrentStateTypeEv", CBaseTutorStateSystem::GetCurrentStateType), // NOXREF -//CBaseTutorState - // virtual func - //HOOK_SYMBOLDEF(0x01DD29C0, "_ZN15CBaseTutorStateC2Ev", CBaseTutorState::CBaseTutorState), - //HOOK_SYMBOLDEF(0x01DD29D0, "_ZN15CBaseTutorStateD0Ev", CBaseTutorState::~CBaseTutorState), - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZN15CBaseTutorState23CheckForStateTransitionE13GameEventTypeP11CBaseEntityS2_", CBaseTutorState::CheckForStateTransition), // PURE virt - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZN15CBaseTutorState14GetStateStringEv", CBaseTutorState::GetStateString), // PURE virt - // non-virtual func - //HOOK_SYMBOLDEF(0x01DD2A00, "_ZN15CBaseTutorState7GetTypeEv", CBaseTutorState::GetType), // NOXREF -//CCSTutorStateSystem - //HOOK_SYMBOLDEF(0x01DD3560, "_ZN19CCSTutorStateSystemC2Ev", CCSTutorStateSystem::CCSTutorStateSystem), - // virtual func - //HOOK_SYMBOLDEF(0x01DD35B0, "_ZN19CCSTutorStateSystemD0Ev", CCSTutorStateSystem::~CCSTutorStateSystem), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD3620, "_ZN19CCSTutorStateSystem11UpdateStateE13GameEventTypeP11CBaseEntityS2_", CCSTutorStateSystem::UpdateState), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD36B0, "_ZN19CCSTutorStateSystem21GetCurrentStateStringEv", CCSTutorStateSystem::GetCurrentStateString), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01DD36C0, "_ZN19CCSTutorStateSystem17ConstructNewStateEi", CCSTutorStateSystem::ConstructNewState), // PROTECTED -//CCSTutorUndefinedState - //HOOK_SYMBOLDEF(0x01DD3760, "_ZN22CCSTutorUndefinedStateC2Ev", CCSTutorUndefinedState::CCSTutorUndefinedState), - //HOOK_SYMBOLDEF(0x01DD3780, "_ZN22CCSTutorUndefinedStateD0Ev", CCSTutorUndefinedState::~CCSTutorUndefinedState), - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD37C0, "_ZN22CCSTutorUndefinedState23CheckForStateTransitionE13GameEventTypeP11CBaseEntityS2_", CCSTutorUndefinedState::CheckForStateTransition), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD3850, "_ZN22CCSTutorUndefinedState14GetStateStringEv", CCSTutorUndefinedState::GetStateString), - // non-virtual func - //HOOK_SYMBOLDEF(0x01DD3810, "_ZN22CCSTutorUndefinedState19HandlePlayerSpawnedEP11CBaseEntityS1_", CCSTutorUndefinedState::HandlePlayerSpawned), // NOXREF -//CCSTutorWaitingForStartState - //HOOK_SYMBOLDEF(0x01DD3860, "_ZN28CCSTutorWaitingForStartStateC2Ev", CCSTutorWaitingForStartState::CCSTutorWaitingForStartState), - // virtual func - //HOOK_SYMBOLDEF(0x01DD3880, "_ZN28CCSTutorWaitingForStartStateD0Ev", CCSTutorWaitingForStartState::~CCSTutorWaitingForStartState), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD38C0, "_ZN28CCSTutorWaitingForStartState23CheckForStateTransitionE13GameEventTypeP11CBaseEntityS2_", CCSTutorWaitingForStartState::CheckForStateTransition), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD3910, "_ZN28CCSTutorWaitingForStartState14GetStateStringEv", CCSTutorWaitingForStartState::GetStateString), - // non-virtual func - //HOOK_SYMBOLDEF(0x01DD3920, "_ZN28CCSTutorWaitingForStartState19HandlePlayerSpawnedEP11CBaseEntityS1_", CCSTutorWaitingForStartState::HandlePlayerSpawned), // NOXREF - //HOOK_SYMBOLDEF(0x01DD3960, "_ZN28CCSTutorWaitingForStartState18HandleBuyTimeStartEP11CBaseEntityS1_", CCSTutorWaitingForStartState::HandleBuyTimeStart), // NOXREF -//CCSTutorBuyMenuState - //HOOK_SYMBOLDEF(0x01DD3970, "_ZN20CCSTutorBuyMenuStateC2Ev", CCSTutorBuyMenuState::CCSTutorBuyMenuState), - // virtual func - //HOOK_SYMBOLDEF(0x01DD3990, "_ZN20CCSTutorBuyMenuStateD0Ev", CCSTutorBuyMenuState::~CCSTutorBuyMenuState), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD39D0, "_ZN20CCSTutorBuyMenuState23CheckForStateTransitionE13GameEventTypeP11CBaseEntityS2_", CCSTutorBuyMenuState::CheckForStateTransition), - HOOK_SYMBOL_VIRTUAL_DEF(0x01DD39F0, "_ZN20CCSTutorBuyMenuState14GetStateStringEv", CCSTutorBuyMenuState::GetStateString), - // non-virtual func - //HOOK_SYMBOLDEF(0x01DD3A00, "_ZN20CCSTutorBuyMenuState16HandleRoundStartEP11CBaseEntityS1_", CCSTutorBuyMenuState::HandleRoundStart), // NOXREF - HOOK_SYMBOLDEF(0x01DD3FB0, "_ZL22ParseMessageParametersRPcP12TutorMessage", ParseMessageParameters), - //HOOK_DEF(0x0, ConstructTutorMessage), // NOXREF - //HOOK_DEF(0x0, ReadDefaultValues), // NOXREF - -#endif // Tutor_CS_Region - -#ifndef Bot_Profile - -//BotProfile - //HOOK_DEF(0x0, MethodThunk::Constructor), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK10BotProfile7GetNameEv", BotProfile::GetName), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK10BotProfile13GetAggressionEv", BotProfile::GetAggression), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK10BotProfile8GetSkillEv", BotProfile::GetSkill), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK10BotProfile11GetTeamworkEv", BotProfile::GetTeamwork), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK10BotProfile19GetWeaponPreferenceEi", BotProfile::GetWeaponPreference), // NOXREF - HOOK_SYMBOLDEF(0x01D34DC0, "_ZNK10BotProfile27GetWeaponPreferenceAsStringEi", BotProfile::GetWeaponPreferenceAsString), - //HOOK_SYMBOLDEF(0x0, "_ZNK10BotProfile24GetWeaponPreferenceCountEv", BotProfile::GetWeaponPreferenceCount), // NOXREF - HOOK_SYMBOLDEF(0x01D34DF0, "_ZNK10BotProfile20HasPrimaryPreferenceEv", BotProfile::HasPrimaryPreference), - HOOK_SYMBOLDEF(0x01D34E50, "_ZNK10BotProfile19HasPistolPreferenceEv", BotProfile::HasPistolPreference), - //HOOK_SYMBOLDEF(0x0, "_ZNK10BotProfile7GetCostEv", BotProfile::GetCost), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK10BotProfile7GetSkinEv", BotProfile::GetSkin), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK10BotProfile12IsDifficultyE17BotDifficultyType", BotProfile::IsDifficulty), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK10BotProfile13GetVoicePitchEv", BotProfile::GetVoicePitch), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK10BotProfile15GetReactionTimeEv", BotProfile::GetReactionTime), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK10BotProfile14GetAttackDelayEv", BotProfile::GetAttackDelay), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK10BotProfile12GetVoiceBankEv", BotProfile::GetVoiceBank), // NOXREF - HOOK_SYMBOLDEF(0x01D34E90, "_ZNK10BotProfile14IsValidForTeamE18BotProfileTeamType", BotProfile::IsValidForTeam), - //HOOK_SYMBOLDEF(0x0, "_ZNK10BotProfile15PrefersSilencerEv", BotProfile::PrefersSilencer), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN10BotProfile7InheritEPKS_S1_", BotProfile::Inherit), -//BotProfileManager - //HOOK_SYMBOLDEF(0x01D34EC0, "_ZN17BotProfileManagerC2Ev", BotProfileManager::BotProfileManager), - //HOOK_SYMBOLDEF(0x01D35C30, "_ZN17BotProfileManagerD2Ev", BotProfileManager::~BotProfileManager), - HOOK_SYMBOLDEF(0x01D34F20, "_ZN17BotProfileManager4InitEPKcPj", BotProfileManager::Init), - HOOK_SYMBOLDEF(0x01D35CE0, "_ZN17BotProfileManager5ResetEv", BotProfileManager::Reset), - //HOOK_SYMBOLDEF(0x0, "_ZNK17BotProfileManager10GetProfileEPKc18BotProfileTeamType", BotProfileManager::GetProfile), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK17BotProfileManager14GetProfileListEv", BotProfileManager::GetProfileList), // NOXREF - HOOK_SYMBOLDEF(0x01D36070, "_ZNK17BotProfileManager16GetRandomProfileE17BotDifficultyType18BotProfileTeamType", BotProfileManager::GetRandomProfile), - HOOK_SYMBOLDEF(0x01D35D90, "_ZN17BotProfileManager13GetCustomSkinEi", BotProfileManager::GetCustomSkin), - HOOK_SYMBOLDEF(0x01D35DD0, "_ZN17BotProfileManager22GetCustomSkinModelnameEi", BotProfileManager::GetCustomSkinModelname), - HOOK_SYMBOLDEF(0x01D35DB0, "_ZN17BotProfileManager18GetCustomSkinFnameEi", BotProfileManager::GetCustomSkinFname), - //HOOK_SYMBOLDEF(0x01D35DF0, "_ZN17BotProfileManager18GetCustomSkinIndexEPKcS1_", BotProfileManager::GetCustomSkinIndex), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK17BotProfileManager13GetVoiceBanksEv", BotProfileManager::GetVoiceBanks), // NOXREF - HOOK_SYMBOLDEF(0x01D35E60, "_ZN17BotProfileManager18FindVoiceBankIndexEPKc", BotProfileManager::FindVoiceBankIndex), - -#endif // Bot_Profile - -#ifndef VoiceManager_Region - -//CVoiceGameMgr - //constructor/destructor func - //HOOK_SYMBOLDEF(0x0, "_ZN13CVoiceGameMgrD0Ev", CVoiceGameMgr::~CVoiceGameMgr), - // non-virtual func - //HOOK_SYMBOLDEF(0x01DCC6F0, "_ZN13CVoiceGameMgrC2Ev", CVoiceGameMgr::CVoiceGameMgr), - HOOK_SYMBOLDEF(0x01DCC740, "_ZN13CVoiceGameMgr4InitEP19IVoiceGameMgrHelperi", CVoiceGameMgr::Init), - //HOOK_SYMBOLDEF(0x01DCC7D0, "_ZN13CVoiceGameMgr9SetHelperEP19IVoiceGameMgrHelper", CVoiceGameMgr::SetHelper), // NOXREF - HOOK_SYMBOLDEF(0x01DCC7E0, "_ZN13CVoiceGameMgr6UpdateEd", CVoiceGameMgr::Update), - HOOK_SYMBOLDEF(0x01DCC800, "_ZN13CVoiceGameMgr15ClientConnectedEP7edict_s", CVoiceGameMgr::ClientConnected), - HOOK_SYMBOLDEF(0x01DCC910, "_ZN13CVoiceGameMgr13ClientCommandEP11CBasePlayerPKc", CVoiceGameMgr::ClientCommand), - HOOK_SYMBOLDEF(0x01DCC890, "_ZN13CVoiceGameMgr22PlayerHasBlockedPlayerEP11CBasePlayerS1_", CVoiceGameMgr::PlayerHasBlockedPlayer), - HOOK_SYMBOLDEF(0x01DCCB10, "_ZN13CVoiceGameMgr11UpdateMasksEv", CVoiceGameMgr::UpdateMasks), - HOOK_SYMBOLDEF(0x01DCCAB0, "_ZL16VoiceServerDebugPKcz", VoiceServerDebug), - -#endif // VoiceManager_Region - -#ifndef Vector_Region - - HOOK_SYMBOLDEF(0x01D71160, "_ZN8Vector2D16NormalizeInPlaceEv", Vector2D::NormalizeInPlace), - -#ifdef PLAY_GAMEDLL - HOOK_SYMBOLDEF(0x01D290C0, "_ZN6Vector16NormalizeInPlaceEv", Vector::NormalizeInPlace<>), -#else - HOOK_SYMBOLDEF(0x01D290C0, "_ZN6Vector16NormalizeInPlaceEv", Vector::NormalizeInPlace), -#endif - -#ifdef _WIN32 - - HOOK_DEF(0x01D12570, Vector::Length), - HOOK_DEF(0x01D9C290, Vector::Length2D), - HOOK_DEF(0x01D4EA30, Vector::Normalize), - HOOK_DEF(0x01DCB800, Vector::operator==), - HOOK_DEF(0x01D130D0, Vector::IsLengthLessThan), - HOOK_DEF(0x01D18AC0, Vector::IsLengthGreaterThan), - HOOK_DEF(0x01D34D90, DotProduct, float_precision (const Vector &, const Vector &)), - -#endif // _WIN32 - -#endif // Vector_Region - -#ifndef Nav_Region - -//Nav_File - //HOOK_DEF(0x0, COM_FixSlashes), // NOXREF - //HOOK_SYMBOLDEF(0x01D44E00, "_Z14GetBspFilenamePKc", GetBspFilename), // NOXREF - HOOK_SYMBOLDEF(0x01D45CF0, "_Z17SaveNavigationMapPKc", SaveNavigationMap), - HOOK_SYMBOLDEF(0x01D45F80, "_Z16LoadLocationFilePKc", LoadLocationFile), - HOOK_SYMBOLDEF(0x01D46170, "_Z24SanityCheckNavigationMapPKc", SanityCheckNavigationMap), - HOOK_SYMBOLDEF(0x01D46310, "_Z17LoadNavigationMapv", LoadNavigationMap), -//IImprovEvent - // virtual func - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56970, "_ZN12IImprovEvent15OnMoveToSuccessERK6Vector", IImprovEvent::OnMoveToSuccess), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56980, "_ZN12IImprovEvent15OnMoveToFailureERK6VectorNS_17MoveToFailureTypeE", IImprovEvent::OnMoveToFailure), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56990, "_ZN12IImprovEvent8OnInjuryEf", IImprovEvent::OnInjury), -//CImprov - // virtual func - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov7IsAliveEv", CImprov::IsAlive), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov6MoveToERK6Vector", CImprov::MoveTo), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov6LookAtERK6Vector", CImprov::LookAt), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov11ClearLookAtEv", CImprov::ClearLookAt), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov6FaceToERK6Vector", CImprov::FaceTo), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov11ClearFaceToEv", CImprov::ClearFaceTo), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov12IsAtMoveGoalEf", CImprov::IsAtMoveGoal), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov9HasLookAtEv", CImprov::HasLookAt), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov9HasFaceToEv", CImprov::HasFaceTo), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov12IsAtFaceGoalEv", CImprov::IsAtFaceGoal), - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZNK7CImprov16IsFriendInTheWayERK6Vector", CImprov::IsFriendInTheWay, bool(const Vector &) const), - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZNK7CImprov16IsFriendInTheWayEP11CBaseEntityRK6Vector", CImprov::IsFriendInTheWay, bool(CBaseEntity *, const Vector &) const), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov11MoveForwardEv", CImprov::MoveForward), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov12MoveBackwardEv", CImprov::MoveBackward), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov10StrafeLeftEv", CImprov::StrafeLeft), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov11StrafeRightEv", CImprov::StrafeRight), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov4JumpEv", CImprov::Jump), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov6CrouchEv", CImprov::Crouch), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov7StandUpEv", CImprov::StandUp), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov9TrackPathERK6Vectorf", CImprov::TrackPath), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov11StartLadderEPK10CNavLadder15NavTraverseTypePK6VectorS6_", CImprov::StartLadder), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov14TraverseLadderEPK10CNavLadder15NavTraverseTypePK6VectorS6_f", CImprov::TraverseLadder), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov30GetSimpleGroundHeightWithFloorEPK6VectorPfPS0_", CImprov::GetSimpleGroundHeightWithFloor), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov3RunEv", CImprov::Run), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov4WalkEv", CImprov::Walk), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov4StopEv", CImprov::Stop), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov12GetMoveAngleEv", CImprov::GetMoveAngle), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov12GetFaceAngleEv", CImprov::GetFaceAngle), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov7GetFeetEv", CImprov::GetFeet), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov11GetCentroidEv", CImprov::GetCentroid), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov7GetEyesEv", CImprov::GetEyes), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov9IsRunningEv", CImprov::IsRunning), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov9IsWalkingEv", CImprov::IsWalking), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov9IsStoppedEv", CImprov::IsStopped), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov11IsCrouchingEv", CImprov::IsCrouching), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov9IsJumpingEv", CImprov::IsJumping), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov13IsUsingLadderEv", CImprov::IsUsingLadder), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov10IsOnGroundEv", CImprov::IsOnGround), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov8IsMovingEv", CImprov::IsMoving), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov6CanRunEv", CImprov::CanRun), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov9CanCrouchEv", CImprov::CanCrouch), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov7CanJumpEv", CImprov::CanJump), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov9IsVisibleERK6Vectorb", CImprov::IsVisible), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov19IsPlayerLookingAtMeEP11CBasePlayerf", CImprov::IsPlayerLookingAtMe), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov22IsAnyPlayerLookingAtMeEif", CImprov::IsAnyPlayerLookingAtMe), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov32GetClosestPlayerByTravelDistanceEiPf", CImprov::GetClosestPlayerByTravelDistance), - //HOOK_SYMBOLDEF(0x0, "_ZNK7CImprov16GetLastKnownAreaEv", CImprov::GetLastKnownArea), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov8OnUpdateEf", CImprov::OnUpdate), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov8OnUpkeepEf", CImprov::OnUpkeep), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov7OnResetEv", CImprov::OnReset), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov11OnGameEventE13GameEventTypeP11CBaseEntityS2_", CImprov::OnGameEvent), - //HOOK_SYMBOLDEF(0x0, "_ZN7CImprov7OnTouchEP11CBaseEntity", CImprov::OnTouch), -//CNavNode - //HOOK_SYMBOLDEF(0x01D46F60, "_ZN8CNavNodeC2EPK6VectorS2_PS_", CNavNode::CNavNode), - HOOK_SYMBOLDEF(0x01D47000, "_ZN8CNavNode7GetNodeEPK6Vector", CNavNode::GetNode), - //HOOK_SYMBOLDEF(0x0, "_ZNK8CNavNode16GetConnectedNodeE10NavDirType", CNavNode::GetConnectedNode), - //HOOK_SYMBOLDEF(0x0, "_ZNK8CNavNode11GetPositionEv", CNavNode::GetPosition), - //HOOK_SYMBOLDEF(0x0, "_ZNK8CNavNode9GetNormalEv", CNavNode::GetNormal), - //HOOK_SYMBOLDEF(0x0, "_ZNK8CNavNode5GetIDEv", CNavNode::GetID), - //HOOK_SYMBOLDEF(0x0, "_ZN8CNavNode8GetFirstEv", CNavNode::GetFirst), - //HOOK_SYMBOLDEF(0x0, "_ZN8CNavNode13GetListLengthEv", CNavNode::GetListLength), - //HOOK_SYMBOLDEF(0x0, "_ZN8CNavNode7GetNextEv", CNavNode::GetNext), - HOOK_SYMBOLDEF(0x01D46FF0, "_ZN8CNavNode9ConnectToEPS_10NavDirType", CNavNode::ConnectTo), - //HOOK_SYMBOLDEF(0x0, "_ZNK8CNavNode9GetParentEv", CNavNode::GetParent), - //HOOK_SYMBOLDEF(0x0, "_ZN8CNavNode13MarkAsVisitedE10NavDirType", CNavNode::MarkAsVisited), - //HOOK_SYMBOLDEF(0x0, "_ZN8CNavNode10HasVisitedE10NavDirType", CNavNode::HasVisited), - //HOOK_SYMBOLDEF(0x01D470E0, "_ZNK8CNavNode10IsBiLinkedE10NavDirType", CNavNode::IsBiLinked), // NOXREF - HOOK_SYMBOLDEF(0x01D47110, "_ZNK8CNavNode12IsClosedCellEv", CNavNode::IsClosedCell), - //HOOK_SYMBOLDEF(0x0, "_ZN8CNavNode5CoverEv", CNavNode::Cover), - //HOOK_SYMBOLDEF(0x0, "_ZNK8CNavNode9IsCoveredEv", CNavNode::IsCovered), - //HOOK_SYMBOLDEF(0x0, "_ZN8CNavNode10AssignAreaEP8CNavArea", CNavNode::AssignArea), - //HOOK_SYMBOLDEF(0x0, "_ZNK8CNavNode7GetAreaEv", CNavNode::GetArea), - //HOOK_SYMBOLDEF(0x0, "_ZN8CNavNode13SetAttributesEh", CNavNode::SetAttributes), - //HOOK_SYMBOLDEF(0x0, "_ZNK8CNavNode13GetAttributesEv", CNavNode::GetAttributes), -//CNavPath - //HOOK_DEF(0x0, MethodThunk::Constructor), - //HOOK_SYMBOLDEF(0x0, "_ZN8CNavPathixEi", CNavPath::operator[]), - //HOOK_SYMBOLDEF(0x0, "_ZNK8CNavPath15GetSegmentCountEv", CNavPath::GetSegmentCount), - //HOOK_SYMBOLDEF(0x0, "_ZNK8CNavPath11GetEndpointEv", CNavPath::GetEndpoint), - HOOK_SYMBOLDEF(0x01D47570, "_ZNK8CNavPath7IsAtEndERK6Vector", CNavPath::IsAtEnd), - HOOK_SYMBOLDEF(0x01D475D0, "_ZNK8CNavPath9GetLengthEv", CNavPath::GetLength), - //HOOK_SYMBOLDEF(0x01D47620, "_ZNK8CNavPath17GetPointAlongPathEfP6Vector", CNavPath::GetPointAlongPath), // NOXREF - HOOK_SYMBOLDEF(0x01D47760, "_ZNK8CNavPath24GetSegmentIndexAlongPathEf", CNavPath::GetSegmentIndexAlongPath), - //HOOK_SYMBOLDEF(0x0, "_ZNK8CNavPath7IsValidEv", CNavPath::IsValid), - //HOOK_SYMBOLDEF(0x0, "_ZN8CNavPath10InvalidateEv", CNavPath::Invalidate), - //HOOK_SYMBOLDEF(0x01D47AB0, "_ZN8CNavPath4DrawEv", CNavPath::Draw), // NOXREF - //HOOK_SYMBOLDEF(0x01D477F0, "_ZNK8CNavPath22FindClosestPointOnPathEPK6VectoriiPS0_", CNavPath::FindClosestPointOnPath), // NOXREF - HOOK_SYMBOLDEF(0x01D47E20, "_ZN8CNavPath8OptimizeEv", CNavPath::Optimize), // PURE - HOOK_SYMBOLDEF(0x01D47170, "_ZN8CNavPath20ComputePathPositionsEv", CNavPath::ComputePathPositions), - HOOK_SYMBOLDEF(0x01D47A00, "_ZN8CNavPath16BuildTrivialPathEPK6VectorS2_", CNavPath::BuildTrivialPath), - //HOOK_SYMBOLDEF(0x01D47B40, "_ZN8CNavPath20FindNextOccludedNodeEi", CNavPath::FindNextOccludedNode), // NOXREF -//CStuckMonitor - //HOOK_DEF(0x01D49B70, MethodThunk::Constructor), - HOOK_SYMBOLDEF(0x01D49B90, "_ZN13CStuckMonitor5ResetEv", CStuckMonitor::Reset), - HOOK_SYMBOLDEF(0x01D49BA0, "_ZN13CStuckMonitor6UpdateEP7CImprov", CStuckMonitor::Update), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CStuckMonitor7IsStuckEv", CStuckMonitor::IsStuck), - //HOOK_SYMBOLDEF(0x0, "_ZNK13CStuckMonitor11GetDurationEv", CStuckMonitor::GetDuration), -//CNavPathFollower - HOOK_DEF(0x01D47E30, MethodThunk::Constructor), - //HOOK_SYMBOLDEF(0x0, "_ZN16CNavPathFollower9SetImprovEP7CImprov", CNavPathFollower::SetImprov), - //HOOK_SYMBOLDEF(0x0, "_ZN16CNavPathFollower7SetPathEP8CNavPath", CNavPathFollower::SetPath), - HOOK_SYMBOLDEF(0x01D47E60, "_ZN16CNavPathFollower5ResetEv", CNavPathFollower::Reset), - HOOK_SYMBOLDEF(0x01D47E80, "_ZN16CNavPathFollower6UpdateEfb", CNavPathFollower::Update), - //HOOK_SYMBOLDEF(0x0, "_ZN16CNavPathFollower5DebugEb", CNavPathFollower::Debug), - //HOOK_SYMBOLDEF(0x0, "_ZNK16CNavPathFollower7IsStuckEv", CNavPathFollower::IsStuck), - //HOOK_SYMBOLDEF(0x0, "_ZN16CNavPathFollower10ResetStuckEv", CNavPathFollower::ResetStuck), - //HOOK_SYMBOLDEF(0x0, "_ZNK16CNavPathFollower16GetStuckDurationEv", CNavPathFollower::GetStuckDuration), - HOOK_SYMBOLDEF(0x01D49460, "_ZN16CNavPathFollower22FeelerReflexAdjustmentEP6Vectorf", CNavPathFollower::FeelerReflexAdjustment), - HOOK_SYMBOLDEF(0x01D48450, "_ZNK16CNavPathFollower21FindOurPositionOnPathEP6Vectorb", CNavPathFollower::FindOurPositionOnPath), - HOOK_SYMBOLDEF(0x01D487B0, "_ZN16CNavPathFollower13FindPathPointEfP6VectorPi", CNavPathFollower::FindPathPoint), -//HidingSpot - //HOOK_DEF(0x01D37DB0, (MethodThunk::Constructor), void()), - //HOOK_DEF(0x01D37E40, (MethodThunk::Constructor), void(const Vector *, unsigned char)), - - HOOK_SYMBOLDEF(0x01D37EC0, "_ZNK10HidingSpot4SaveEij", HidingSpot::Save), - HOOK_SYMBOLDEF(0x01D37F00, "_ZN10HidingSpot4LoadEP9SteamFilej", HidingSpot::Load), -//SteamFile - //HOOK_DEF(0x0, MethodThunk::Constructor), - //HOOK_DEF(0x0, MethodThunk::Destructor), - //HOOK_SYMBOLDEF(0x0, "_ZNK9SteamFile7IsValidEv", SteamFile::IsValid), - HOOK_SYMBOLDEF(0x01D46F00, "_ZN9SteamFile4ReadEPvi", SteamFile::Read), -//CNavArea - //HOOK_SYMBOLDEF(0x01D45A50, "_ZNK14PlaceDirectory12EntryToPlaceEt", PlaceDirectory::EntryToPlace), // NOTE: need hook LoadNavigationMap - HOOK_SYMBOLDEF(0x01D44F80, "_ZN8CNavArea4SaveEij", CNavArea::Save, void (int, unsigned int)), - HOOK_SYMBOLDEF(0x01D44E60, "_ZNK8CNavArea4SaveEP8_IO_FILE", CNavArea::Save, void (FILE *) const), - HOOK_SYMBOLDEF(0x01D45330, "_ZN8CNavArea4LoadEP9SteamFilej", CNavArea::Load), - HOOK_SYMBOLDEF(0x01D45AA0, "_ZN8CNavArea8PostLoadEv", CNavArea::PostLoad), - HOOK_DEF(0x01D38040, (MethodThunk::Constructor), void()), - //HOOK_DEF(0x0, (MethodThunk::Constructor), void (const Vector *, const Vector *)), - //HOOK_DEF(0x0, (MethodThunk::Constructor), void (const Vector *, const Vector *, const Vector *, const Vector *)), - //HOOK_DEF(0x0, (MethodThunk::Constructor), void (CNavNode *, CNavNode *, CNavNode *, CNavNode *)), - //HOOK_DEF(0x01D386A0, MethodThunk::Destructor), - HOOK_SYMBOLDEF(0x01D37FE0, "_ZN8CNavArea10InitializeEv", CNavArea::Initialize), - //HOOK_SYMBOLDEF(0x01D388A0, "_ZN8CNavArea15OnDestroyNotifyEPS_", CNavArea::OnDestroyNotify), // NOXREF - HOOK_SYMBOLDEF(0x01D38960, "_ZN8CNavArea9ConnectToEPS_10NavDirType", CNavArea::ConnectTo), - //HOOK_SYMBOLDEF(0x01D389D0, "_ZN8CNavArea10DisconnectEPS_", CNavArea::Disconnect), // NOXREF - HOOK_SYMBOLDEF(0x01D38A40, "_ZN8CNavArea11FinishMergeEPS_", CNavArea::FinishMerge), - HOOK_SYMBOLDEF(0x01D38B60, "_ZN8CNavArea24MergeAdjacentConnectionsEPS_", CNavArea::MergeAdjacentConnections), - //HOOK_SYMBOLDEF(0x01D38D70, "_ZN8CNavArea11AssignNodesEPS_", CNavArea::AssignNodes), // NOXREF - HOOK_SYMBOLDEF(0x01D38DC0, "_ZN8CNavArea9SplitEditEbfPPS_S1_", CNavArea::SplitEdit), - HOOK_SYMBOLDEF(0x01D390F0, "_ZNK8CNavArea11IsConnectedEPKS_10NavDirType", CNavArea::IsConnected), - HOOK_SYMBOLDEF(0x01D391B0, "_ZN8CNavArea19ComputeHeightChangeEPKS_", CNavArea::ComputeHeightChange), - HOOK_SYMBOLDEF(0x01D391E0, "_ZN8CNavArea15FinishSplitEditEPS_10NavDirType", CNavArea::FinishSplitEdit), - HOOK_SYMBOLDEF(0x01D39500, "_ZN8CNavArea10SpliceEditEPS_", CNavArea::SpliceEdit), - HOOK_SYMBOLDEF(0x01D39CA0, "_ZN8CNavArea9MergeEditEPS_", CNavArea::MergeEdit), - //HOOK_SYMBOLDEF(0x01D3A290, "_ZN8CNavArea5StripEv", CNavArea::Strip), // NOXREF - HOOK_SYMBOLDEF(0x01D3C6C0, "_ZNK8CNavArea13IsOverlappingEPK6Vector", CNavArea::IsOverlapping, bool (const Vector *) const), - HOOK_SYMBOLDEF(0x01D3C710, "_ZNK8CNavArea13IsOverlappingEPKS_", CNavArea::IsOverlapping, bool (const CNavArea *) const), - //HOOK_SYMBOLDEF(0x01D3C760, "_ZNK8CNavArea14IsOverlappingXEPKS_", CNavArea::IsOverlappingX), // NOXREF - //HOOK_SYMBOLDEF(0x01D3C790, "_ZNK8CNavArea14IsOverlappingYEPKS_", CNavArea::IsOverlappingY), // NOXREF - HOOK_SYMBOLDEF(0x01D3C7C0, "_ZNK8CNavArea8ContainsEPK6Vector", CNavArea::Contains), - HOOK_SYMBOLDEF(0x01D3C8B0, "_ZNK8CNavArea10IsCoplanarEPKS_", CNavArea::IsCoplanar), - HOOK_SYMBOLDEF(0x01D3CA60, "_ZNK8CNavArea4GetZEPK6Vector", CNavArea::GetZ, float (const Vector *) const), // NOTE: definitely need to hook CNavAreaGrid::GetNavArea!! - //HOOK_SYMBOLDEF(0x01D3CB50, "_ZNK8CNavArea4GetZEff", CNavArea::GetZ, float (float x, float y) const), // NOXREF - HOOK_SYMBOLDEF(0x01D3CB80, "_ZNK8CNavArea21GetClosestPointOnAreaEPK6VectorPS0_", CNavArea::GetClosestPointOnArea), - //HOOK_SYMBOLDEF(0x01D3CCD0, "_ZNK8CNavArea25GetDistanceSquaredToPointEPK6Vector", CNavArea::GetDistanceSquaredToPoint), // NOXREF - //HOOK_SYMBOLDEF(0x01D3CDF0, "_ZNK8CNavArea21GetRandomAdjacentAreaE10NavDirType", CNavArea::GetRandomAdjacentArea), // NOXREF - HOOK_SYMBOLDEF(0x01D3CE40, "_ZNK8CNavArea13ComputePortalEPKS_10NavDirTypeP6VectorPf", CNavArea::ComputePortal), - HOOK_SYMBOLDEF(0x01D3CFD0, "_ZNK8CNavArea27ComputeClosestPointInPortalEPKS_10NavDirTypePK6VectorPS3_", CNavArea::ComputeClosestPointInPortal), - //HOOK_SYMBOLDEF(0x01D3D280, "_ZNK8CNavArea6IsEdgeE10NavDirType", CNavArea::IsEdge), // NOXREF - HOOK_SYMBOLDEF(0x01D3D310, "_ZNK8CNavArea16ComputeDirectionEP6Vector", CNavArea::ComputeDirection), - HOOK_SYMBOLDEF(0x01D3D420, "_ZN8CNavArea4DrawEhhhi", CNavArea::Draw), - HOOK_SYMBOLDEF(0x01D3D860, "_ZN8CNavArea16DrawMarkedCornerE13NavCornerTypehhhi", CNavArea::DrawMarkedCorner), - HOOK_SYMBOLDEF(0x01D3DAB0, "_ZN8CNavArea13AddToOpenListEv", CNavArea::AddToOpenList), - HOOK_SYMBOLDEF(0x01D3DB50, "_ZN8CNavArea16UpdateOnOpenListEv", CNavArea::UpdateOnOpenList), - HOOK_SYMBOLDEF(0x01D3DBC0, "_ZN8CNavArea18RemoveFromOpenListEv", CNavArea::RemoveFromOpenList), - HOOK_SYMBOLDEF(0x01D3DC10, "_ZN8CNavArea16ClearSearchListsEv", CNavArea::ClearSearchLists), - HOOK_SYMBOLDEF(0x01D3DC40, "_ZNK8CNavArea9GetCornerE13NavCornerType", CNavArea::GetCorner), - HOOK_SYMBOLDEF(0x01D3DCF0, "_ZNK8CNavArea21IsHidingSpotCollisionEPK6Vector", CNavArea::IsHidingSpotCollision), - HOOK_SYMBOLDEF(0x01D3DD50, "_Z19IsHidingSpotInCoverPK6Vector", IsHidingSpotInCover), - HOOK_SYMBOLDEF(0x01D3DEA0, "_ZN8CNavArea18ComputeHidingSpotsEv", CNavArea::ComputeHidingSpots), - HOOK_SYMBOLDEF(0x01D3E790, "_ZN8CNavArea18ComputeSniperSpotsEv", CNavArea::ComputeSniperSpots), - HOOK_SYMBOLDEF(0x01D3E7D0, "_ZN8CNavArea16GetSpotEncounterEPKS_S1_", CNavArea::GetSpotEncounter), - HOOK_SYMBOLDEF(0x01D3E810, "_ZN8CNavArea17AddSpotEncountersEPKS_10NavDirTypeS1_S2_", CNavArea::AddSpotEncounters), - HOOK_SYMBOLDEF(0x01D3EC50, "_ZN8CNavArea21ComputeSpotEncountersEv", CNavArea::ComputeSpotEncounters), - HOOK_SYMBOLDEF(0x01D3ED20, "_ZN8CNavArea11DecayDangerEv", CNavArea::DecayDanger), - HOOK_SYMBOLDEF(0x01D3ED60, "_ZN8CNavArea14IncreaseDangerEif", CNavArea::IncreaseDanger), - HOOK_SYMBOLDEF(0x01D3EDC0, "_ZN8CNavArea9GetDangerEi", CNavArea::GetDanger), - HOOK_SYMBOLDEF(0x01D40110, "_ZNK8CNavArea14GetPlayerCountEiP11CBasePlayer", CNavArea::GetPlayerCount), - HOOK_SYMBOLDEF(0x01D40340, "_ZN8CNavArea18DrawConnectedAreasEv", CNavArea::DrawConnectedAreas), - HOOK_SYMBOLDEF(0x01D40870, "_ZN8CNavArea11RaiseCornerE13NavCornerTypei", CNavArea::RaiseCorner), - HOOK_SYMBOLDEF(0x01D427C0, "_ZN8CNavArea20ComputeApproachAreasEv", CNavArea::ComputeApproachAreas), - //HOOK_DEF(0x0, MethodThunk::Constructor), - //HOOK_SYMBOLDEF(0x0, "_ZN25CollectHidingSpotsFunctor10RemoveSpotEi", CollectHidingSpotsFunctor::RemoveSpot), - //HOOK_DEF(0x01D43000, MethodThunk::Constructor), // NOXREF - //HOOK_DEF(0x01D43090, MethodThunk::Destructor), // NOXREF - //HOOK_SYMBOLDEF(0x01D43180, "_ZN12CNavAreaGrid5ResetEv", CNavAreaGrid::Reset), // NOXREF - HOOK_SYMBOLDEF(0x01D43230, "_ZN12CNavAreaGrid10InitializeEffff", CNavAreaGrid::Initialize), - HOOK_SYMBOLDEF(0x01D43390, "_ZN12CNavAreaGrid10AddNavAreaEP8CNavArea", CNavAreaGrid::AddNavArea), - HOOK_SYMBOLDEF(0x01D43560, "_ZN12CNavAreaGrid13RemoveNavAreaEP8CNavArea", CNavAreaGrid::RemoveNavArea), - HOOK_SYMBOLDEF(0x01D43710, "_ZNK12CNavAreaGrid10GetNavAreaEPK6Vectorf", CNavAreaGrid::GetNavArea), - HOOK_SYMBOLDEF(0x01D43860, "_ZNK12CNavAreaGrid17GetNearestNavAreaEPK6Vectorb", CNavAreaGrid::GetNearestNavArea), - HOOK_SYMBOLDEF(0x01D439C0, "_ZNK12CNavAreaGrid14GetNavAreaByIDEj", CNavAreaGrid::GetNavAreaByID), - HOOK_SYMBOLDEF(0x01D439F0, "_ZNK12CNavAreaGrid8GetPlaceEPK6Vector", CNavAreaGrid::GetPlace), - HOOK_SYMBOLDEF(0x01D3E4F0, "_Z18ClassifySniperSpotP10HidingSpot", ClassifySniperSpot), - //HOOK_DEF(0x0, buildGoodSizedList), // NOXREF - HOOK_SYMBOLDEF(0x01D37CF0, "_Z18DestroyHidingSpotsv", DestroyHidingSpots), - HOOK_SYMBOLDEF(0x01D40920, "_Z12EditNavAreas14NavEditCmdType", EditNavAreas), - HOOK_SYMBOLDEF(0x01D42540, "_Z15GetGroundHeightPK6VectorPfPS_", GetGroundHeight), - HOOK_SYMBOLDEF(0x01D42740, "_Z21GetSimpleGroundHeightPK6VectorPfPS_", GetSimpleGroundHeight), - //HOOK_DEF(0x0, IsAreaVisible), // NOXREF - HOOK_SYMBOLDEF(0x01D40250, "_Z13GetMarkedAreav", GetMarkedArea), - //HOOK_SYMBOLDEF(0x01D40260, "_Z17EditNavAreasResetv", EditNavAreasReset), // NOXREF - HOOK_SYMBOLDEF(0x01D40290, "_Z15DrawHidingSpotsPK8CNavArea", DrawHidingSpots), - HOOK_SYMBOLDEF(0x01D3EE10, "_Z20IncreaseDangerNearbyifP8CNavAreaPK6Vectorf", IncreaseDangerNearby), - HOOK_SYMBOLDEF(0x01D3F020, "_Z10DrawDangerv", DrawDanger), - HOOK_SYMBOLDEF(0x01D3F1C0, "_Z14IsSpotOccupiedP11CBaseEntityPK6Vector", IsSpotOccupied), - HOOK_SYMBOLDEF(0x01D3F2A0, "_Z20FindNearbyHidingSpotP11CBaseEntityPK6VectorP8CNavAreafbb", FindNearbyHidingSpot), - //HOOK_SYMBOLDEF(0x01D3F650, "_ZN25CollectHidingSpotsFunctorclEP8CNavArea", CollectHidingSpotsFunctor::operator(), bool (CNavArea *area)), - HOOK_SYMBOLDEF(0x01D3FDE0, "_Z21FindNearbyRetreatSpotP11CBaseEntityPK6VectorP8CNavAreafib", FindNearbyRetreatSpot, const Vector *(CBaseEntity *, const Vector *, CNavArea *, float, int, bool)), - HOOK_SYMBOLDEF(0x01D3FAD0, "_Z20IsCrossingLineOfFireRK6VectorS1_P11CBaseEntityi", IsCrossingLineOfFire), - HOOK_SYMBOLDEF(0x01D3F850, "_Z20FindRandomHidingSpotP11CBaseEntityjb", FindRandomHidingSpot), - HOOK_SYMBOLDEF(0x01D37FB0, "_Z17GetHidingSpotByIDj", GetHidingSpotByID), - HOOK_SYMBOLDEF(0x01D39F30, "_Z24ApproachAreaAnalysisPrepv", ApproachAreaAnalysisPrep), - HOOK_SYMBOLDEF(0x01D39FD0, "_Z31CleanupApproachAreaAnalysisPrepv", CleanupApproachAreaAnalysisPrep), - //HOOK_SYMBOLDEF(0x01D3A010, "_Z14DestroyLaddersv", DestroyLadders), // NOXREF - HOOK_SYMBOLDEF(0x01D3A060, "_Z20DestroyNavigationMapv", DestroyNavigationMap), - HOOK_SYMBOLDEF(0x01D3A210, "_Z20StripNavigationAreasv", StripNavigationAreas), - -#ifdef _WIN32 - - HOOK_SYMBOLDEF(0x01D13120, "_ZNK8CNavArea15GetAdjacentAreaE10NavDirTypei", CNavArea::GetAdjacentArea), - HOOK_SYMBOLDEF(0x01D2B2A0, "_ZN8CNavArea11PopOpenListEv", CNavArea::PopOpenList), - HOOK_SYMBOLDEF(0x01D2B2C0, "_ZNK8CNavArea8IsClosedEv", CNavArea::IsClosed), - - HOOK_DEF(0x01D224C0, SnapToGrid, void (Vector *)), - HOOK_DEF(0x01D22460, AddDirectionVector), - HOOK_DEF(0x01D13150, AddAreaToOpenList), - HOOK_DEF(0x01D3A870, FindFirstAreaInDirection), - HOOK_DEF(0x01D3AD20, IsAreaRoughlySquare), - HOOK_DEF(0x01D2B030, IsEntityWalkable), - HOOK_DEF(0x01D2B0B0, IsWalkableTraceLineClear), - HOOK_DEF(0x01D3A9E0, testJumpDown), - -#endif // _WIN32 - - //HOOK_DEF(0x0, findJumpDownArea), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_Z6SplitYP8CNavArea", SplitY), // NOXREF - - HOOK_SYMBOLDEF(0x01D3A330, "_Z21ConnectGeneratedAreasv", ConnectGeneratedAreas), - HOOK_SYMBOLDEF(0x01D3AAF0, "_Z19MergeGeneratedAreasv", MergeGeneratedAreas), - HOOK_SYMBOLDEF(0x01D3AE00, "_Z6SplitXP8CNavArea", SplitX), - HOOK_SYMBOLDEF(0x01D3AEE0, "_Z13SquareUpAreasv", SquareUpAreas), - HOOK_SYMBOLDEF(0x01D3B100, "_Z8TestAreaP8CNavNodeii", TestArea), - HOOK_SYMBOLDEF(0x01D3B2E0, "_Z9BuildAreaP8CNavNodeii", BuildArea), - HOOK_SYMBOLDEF(0x01D3B3F0, "_Z12BuildLaddersv", BuildLadders), - HOOK_SYMBOLDEF(0x01D3C1B0, "_Z13MarkJumpAreasv", MarkJumpAreas), - HOOK_SYMBOLDEF(0x01D3C280, "_Z26GenerateNavigationAreaMeshv", GenerateNavigationAreaMesh), - -#endif // Nav_Region - -#ifndef Hostage_Region - -//HostageState - //HOOK_DEF(0x01D50DA0, MethodThunk::Constructor), - //HOOK_DEF(0x01D56E30, MethodThunk::Destructor), - // virtual func - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56D70, "_ZN14CHostageImprov15OnMoveToSuccessERK6Vector", CHostageImprov::OnMoveToSuccess), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D562D0, "_ZN14CHostageImprov15OnMoveToFailureERK6VectorN12IImprovEvent17MoveToFailureTypeE", CHostageImprov::OnMoveToFailure), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56D80, "_ZN14CHostageImprov8OnInjuryEf", CHostageImprov::OnInjury), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D51040, "_ZNK14CHostageImprov7IsAliveEv", CHostageImprov::IsAlive), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D51060, "_ZN14CHostageImprov6MoveToERK6Vector", CHostageImprov::MoveTo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D51240, "_ZN14CHostageImprov6LookAtERK6Vector", CHostageImprov::LookAt), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D51270, "_ZN14CHostageImprov11ClearLookAtEv", CHostageImprov::ClearLookAt), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D51280, "_ZN14CHostageImprov6FaceToERK6Vector", CHostageImprov::FaceTo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D512B0, "_ZN14CHostageImprov11ClearFaceToEv", CHostageImprov::ClearFaceTo), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D51AC0, "_ZNK14CHostageImprov12IsAtMoveGoalEf", CHostageImprov::IsAtMoveGoal), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56C20, "_ZNK14CHostageImprov9HasLookAtEv", CHostageImprov::HasLookAt), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56C30, "_ZNK14CHostageImprov9HasFaceToEv", CHostageImprov::HasFaceTo), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D51B20, "_ZNK14CHostageImprov12IsAtFaceGoalEv", CHostageImprov::IsAtFaceGoal), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D51B30, "_ZNK14CHostageImprov16IsFriendInTheWayERK6Vector", CHostageImprov::IsFriendInTheWay, bool (const Vector &) const), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D51CB0, "_ZNK14CHostageImprov16IsFriendInTheWayEP11CBaseEntityRK6Vector", CHostageImprov::IsFriendInTheWay, bool (CBaseEntity *, const Vector &) const), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56C40, "_ZN14CHostageImprov11MoveForwardEv", CHostageImprov::MoveForward), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56C50, "_ZN14CHostageImprov12MoveBackwardEv", CHostageImprov::MoveBackward), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56C60, "_ZN14CHostageImprov10StrafeLeftEv", CHostageImprov::StrafeLeft), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56C70, "_ZN14CHostageImprov11StrafeRightEv", CHostageImprov::StrafeRight), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D52260, "_ZN14CHostageImprov4JumpEv", CHostageImprov::Jump), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D56710, "_ZN14CHostageImprov6CrouchEv", CHostageImprov::Crouch), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D567A0, "_ZN14CHostageImprov7StandUpEv", CHostageImprov::StandUp), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D52D80, "_ZN14CHostageImprov9TrackPathERK6Vectorf", CHostageImprov::TrackPath), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D530D0, "_ZN14CHostageImprov11StartLadderEPK10CNavLadder15NavTraverseTypePK6VectorS6_", CHostageImprov::StartLadder), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D530E0, "_ZN14CHostageImprov14TraverseLadderEPK10CNavLadder15NavTraverseTypePK6VectorS6_f", CHostageImprov::TraverseLadder), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D51150, "_ZN14CHostageImprov30GetSimpleGroundHeightWithFloorEPK6VectorPfPS0_", CHostageImprov::GetSimpleGroundHeightWithFloor), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D52350, "_ZN14CHostageImprov3RunEv", CHostageImprov::Run), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D52360, "_ZN14CHostageImprov4WalkEv", CHostageImprov::Walk), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D52380, "_ZN14CHostageImprov4StopEv", CHostageImprov::Stop), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56C80, "_ZNK14CHostageImprov12GetMoveAngleEv", CHostageImprov::GetMoveAngle), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56C90, "_ZNK14CHostageImprov12GetFaceAngleEv", CHostageImprov::GetFaceAngle), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D523F0, "_ZNK14CHostageImprov7GetFeetEv", CHostageImprov::GetFeet), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D52400, "_ZNK14CHostageImprov11GetCentroidEv", CHostageImprov::GetCentroid), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D52430, "_ZNK14CHostageImprov7GetEyesEv", CHostageImprov::GetEyes), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56CA0, "_ZNK14CHostageImprov9IsRunningEv", CHostageImprov::IsRunning), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56CB0, "_ZNK14CHostageImprov9IsWalkingEv", CHostageImprov::IsWalking), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56CC0, "_ZNK14CHostageImprov9IsStoppedEv", CHostageImprov::IsStopped), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56CD0, "_ZNK14CHostageImprov11IsCrouchingEv", CHostageImprov::IsCrouching), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56CE0, "_ZNK14CHostageImprov9IsJumpingEv", CHostageImprov::IsJumping), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56D20, "_ZNK14CHostageImprov13IsUsingLadderEv", CHostageImprov::IsUsingLadder), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D52460, "_ZNK14CHostageImprov10IsOnGroundEv", CHostageImprov::IsOnGround), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D52480, "_ZNK14CHostageImprov8IsMovingEv", CHostageImprov::IsMoving), - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZNK14CHostageImprov6CanRunEv", CHostageImprov::CanRun), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZNK14CHostageImprov9CanCrouchEv", CHostageImprov::CanCrouch), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x0, "_ZNK14CHostageImprov7CanJumpEv", CHostageImprov::CanJump), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D524C0, "_ZNK14CHostageImprov9IsVisibleERK6Vectorb", CHostageImprov::IsVisible), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D52530, "_ZNK14CHostageImprov19IsPlayerLookingAtMeEP11CBasePlayerf", CHostageImprov::IsPlayerLookingAtMe), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D526A0, "_ZNK14CHostageImprov22IsAnyPlayerLookingAtMeEif", CHostageImprov::IsAnyPlayerLookingAtMe), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D527B0, "_ZNK14CHostageImprov32GetClosestPlayerByTravelDistanceEiPf", CHostageImprov::GetClosestPlayerByTravelDistance), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56D60, "_ZNK14CHostageImprov16GetLastKnownAreaEv", CHostageImprov::GetLastKnownArea), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D54500, "_ZN14CHostageImprov8OnUpdateEf", CHostageImprov::OnUpdate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D53FF0, "_ZN14CHostageImprov8OnUpkeepEf", CHostageImprov::OnUpkeep), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D52A60, "_ZN14CHostageImprov7OnResetEv", CHostageImprov::OnReset), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D54C10, "_ZN14CHostageImprov11OnGameEventE13GameEventTypeP11CBaseEntityS2_", CHostageImprov::OnGameEvent), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D55280, "_ZN14CHostageImprov7OnTouchEP11CBaseEntity", CHostageImprov::OnTouch), - // non-virtual func - HOOK_SYMBOLDEF(0x01D51900, "_ZN14CHostageImprov12FaceOutwardsEv", CHostageImprov::FaceOutwards), - HOOK_SYMBOLDEF(0x01D51F80, "_ZNK14CHostageImprov16IsFriendInTheWayEv", CHostageImprov::IsFriendInTheWay, bool () const), - //HOOK_SYMBOLDEF(0x01D52150, "_ZN10CheckAheadclEP11CBaseEntity", CheckAhead::operator()), - //HOOK_SYMBOLDEF(0x0, "_ZN15CheckWayFunctorclEP8CHostage", CheckWayFunctor::operator()), - HOOK_SYMBOLDEF(0x01D53E70, "_ZNK17KeepPersonalSpaceclEP11CBaseEntity", KeepPersonalSpace::operator()), - //HOOK_SYMBOLDEF(0x01D52EE0, "_ZN14CHostageImprov20SetKnownGoodPositionERK6Vector", CHostageImprov::SetKnownGoodPosition), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK14CHostageImprov20GetKnownGoodPositionEv", CHostageImprov::GetKnownGoodPosition), - HOOK_SYMBOLDEF(0x01D52F90, "_ZN14CHostageImprov24ResetToKnownGoodPositionEv", CHostageImprov::ResetToKnownGoodPosition), - //HOOK_SYMBOLDEF(0x0, "_ZN14CHostageImprov9ResetJumpEv", CHostageImprov::ResetJump), - HOOK_SYMBOLDEF(0x01D55950, "_ZN14CHostageImprov10ApplyForceE6Vector", CHostageImprov::ApplyForce), - //HOOK_SYMBOLDEF(0x0, "_ZNK14CHostageImprov17GetActualVelocityEv", CHostageImprov::GetActualVelocity), - //HOOK_SYMBOLDEF(0x0, "_ZN14CHostageImprov12SetMoveLimitENS_8MoveTypeE", CHostageImprov::SetMoveLimit), - //HOOK_SYMBOLDEF(0x0, "_ZNK14CHostageImprov12GetMoveLimitEv", CHostageImprov::GetMoveLimit), - //HOOK_SYMBOLDEF(0x0, "_ZN14CHostageImprov7GetPathEv", CHostageImprov::GetPath), - //HOOK_SYMBOLDEF(0x0, "_ZN14CHostageImprov15GetPathFollowerEv", CHostageImprov::GetPathFollower), - //HOOK_SYMBOLDEF(0x0, "_ZN14CHostageImprov4IdleEv", CHostageImprov::Idle), - //HOOK_SYMBOLDEF(0x0, "_ZNK14CHostageImprov6IsIdleEv", CHostageImprov::IsIdle), - //HOOK_SYMBOLDEF(0x0, "_ZN14CHostageImprov6FollowEP11CBasePlayer", CHostageImprov::Follow), - //HOOK_SYMBOLDEF(0x0, "_ZNK14CHostageImprov11IsFollowingEPK11CBaseEntity", CHostageImprov::IsFollowing), - //HOOK_SYMBOLDEF(0x0, "_ZN14CHostageImprov6EscapeEv", CHostageImprov::Escape), - //HOOK_SYMBOLDEF(0x0, "_ZNK14CHostageImprov10IsEscapingEv", CHostageImprov::IsEscaping), - //HOOK_SYMBOLDEF(0x0, "_ZN14CHostageImprov7RetreatEv", CHostageImprov::Retreat), - //HOOK_SYMBOLDEF(0x0, "_ZNK14CHostageImprov12IsRetreatingEv", CHostageImprov::IsRetreating), - HOOK_SYMBOLDEF(0x01D55980, "_ZNK14CHostageImprov8IsAtHomeEv", CHostageImprov::IsAtHome), - HOOK_SYMBOLDEF(0x01D559D0, "_ZNK14CHostageImprov16CanSeeRescueZoneEv", CHostageImprov::CanSeeRescueZone), - //HOOK_SYMBOLDEF(0x0, "_ZNK14CHostageImprov15GetFollowLeaderEv", CHostageImprov::GetFollowLeader), - HOOK_SYMBOLDEF(0x01D55A10, "_ZN14CHostageImprov23GetClosestVisiblePlayerEi", CHostageImprov::GetClosestVisiblePlayer), - HOOK_SYMBOLDEF(0x01D55AD0, "_ZN14CHostageImprov25GetTimeSinceLastSawPlayerEi", CHostageImprov::GetTimeSinceLastSawPlayer), - //HOOK_SYMBOLDEF(0x01D55B90, "_ZN14CHostageImprov22GetTimeSinceLastInjuryEv", CHostageImprov::GetTimeSinceLastInjury), // NOXREF - //HOOK_SYMBOLDEF(0x01D55BC0, "_ZN14CHostageImprov21GetTimeSinceLastNoiseEv", CHostageImprov::GetTimeSinceLastNoise), // NOXREF - HOOK_SYMBOLDEF(0x01D54010, "_ZN14CHostageImprov17IsTerroristNearbyEv", CHostageImprov::IsTerroristNearby), - HOOK_SYMBOLDEF(0x01D55C20, "_ZN14CHostageImprov8FrightenENS_9ScareTypeE", CHostageImprov::Frighten), - HOOK_SYMBOLDEF(0x01D55BF0, "_ZNK14CHostageImprov8IsScaredEv", CHostageImprov::IsScared), - //HOOK_SYMBOLDEF(0x0, "_ZNK14CHostageImprov17GetScareIntensityEv", CHostageImprov::GetScareIntensity), // DEFAULT - //HOOK_SYMBOLDEF(0x0, "_ZNK14CHostageImprov20IsIgnoringTerroristsEv", CHostageImprov::IsIgnoringTerrorists), // DEFAULT - //HOOK_SYMBOLDEF(0x0, "_ZNK14CHostageImprov13GetAggressionEv", CHostageImprov::GetAggression), // DEFAULT - HOOK_SYMBOLDEF(0x01D55ED0, "_ZN14CHostageImprov7ChatterE18HostageChatterTypeb", CHostageImprov::Chatter), - HOOK_SYMBOLDEF(0x01D55F80, "_ZN14CHostageImprov14DelayedChatterEf18HostageChatterTypeb", CHostageImprov::DelayedChatter), - //HOOK_SYMBOLDEF(0x01D55FE0, "_ZN14CHostageImprov20UpdateDelayedChatterEv", CHostageImprov::UpdateDelayedChatter), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK14CHostageImprov9IsTalkingEv", CHostageImprov::IsTalking), // DEFAULT - HOOK_SYMBOLDEF(0x01D54150, "_ZN14CHostageImprov22UpdateGrenadeReactionsEv", CHostageImprov::UpdateGrenadeReactions), - HOOK_SYMBOLDEF(0x01D55D20, "_ZN14CHostageImprov6AfraidEv", CHostageImprov::Afraid), - HOOK_SYMBOLDEF(0x01D56290, "_ZN14CHostageImprov4WaveEv", CHostageImprov::Wave), - HOOK_SYMBOLDEF(0x01D56210, "_ZN14CHostageImprov5AgreeEv", CHostageImprov::Agree), - HOOK_SYMBOLDEF(0x01D56240, "_ZN14CHostageImprov8DisagreeEv", CHostageImprov::Disagree), - //HOOK_SYMBOLDEF(0x01D561E0, "_ZN14CHostageImprov9CrouchDieEv", CHostageImprov::CrouchDie), // NOXREF - HOOK_SYMBOLDEF(0x01D56120, "_ZN14CHostageImprov6FlinchE8Activity", CHostageImprov::Flinch), - HOOK_SYMBOLDEF(0x01D55E20, "_ZN14CHostageImprov18UpdateIdleActivityE8ActivityS0_", CHostageImprov::UpdateIdleActivity), - //HOOK_SYMBOLDEF(0x01D56910, "_ZN14CHostageImprov25UpdateStationaryAnimationEv", CHostageImprov::UpdateStationaryAnimation), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK14CHostageImprov9GetEntityEv", CHostageImprov::GetEntity), - //HOOK_SYMBOLDEF(0x01D540C0, "_ZN14CHostageImprov24CheckForNearbyTerroristsEv", CHostageImprov::CheckForNearbyTerrorists), // NOXREF - HOOK_SYMBOLDEF(0x01D534F0, "_ZN14CHostageImprov14UpdatePositionEf", CHostageImprov::UpdatePosition), - HOOK_SYMBOLDEF(0x01D512C0, "_ZN14CHostageImprov11MoveTowardsERK6Vectorf", CHostageImprov::MoveTowards), - HOOK_SYMBOLDEF(0x01D517A0, "_ZN14CHostageImprov11FaceTowardsERK6Vectorf", CHostageImprov::FaceTowards), - //HOOK_SYMBOLDEF(0x01D52250, "_ZN14CHostageImprov8GetSpeedEv", CHostageImprov::GetSpeed), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN14CHostageImprov12SetMoveAngleEf", CHostageImprov::SetMoveAngle), - HOOK_SYMBOLDEF(0x01D56300, "_ZN14CHostageImprov6WiggleEv", CHostageImprov::Wiggle), - HOOK_SYMBOLDEF(0x01D564E0, "_ZN14CHostageImprov9ClearPathEv", CHostageImprov::ClearPath), - //@HOOK_SYMBOLDEF(0x01D4A890, "_Z16NavAreaBuildPathI15HostagePathCostEbP8CNavAreaS2_PK6VectorRT_PS2_", NavAreaBuildPath__HostagePathCost__wrapper), - //@HOOK_SYMBOLDEF(0x01D15AD0, "_Z16NavAreaBuildPathI16ShortestPathCostEbP8CNavAreaS2_PK6VectorRT_PS2_", NavAreaBuildPath__ShortestPathCost__wrapper), - HOOK_SYMBOLDEF(0x01D4A890, "_Z16NavAreaBuildPathI15HostagePathCostEbP8CNavAreaS2_PK6VectorRT_PS2_", NavAreaBuildPath), - HOOK_SYMBOLDEF(0x01D15AD0, "_Z16NavAreaBuildPathI16ShortestPathCostEbP8CNavAreaS2_PK6VectorRT_PS2_", NavAreaBuildPath), - //HOOK_SYMBOLDEF(0x01D511C0, "_ZN14CHostageImprov17DiscontinuityJumpEfbb", CHostageImprov::DiscontinuityJump), // NOXREF - HOOK_SYMBOLDEF(0x01D52C00, "_ZN14CHostageImprov12UpdateVisionEv", CHostageImprov::UpdateVision), -//HostageState - // virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN12HostageStateD0Ev", HostageState::~HostageState), - //HOOK_SYMBOLDEF(0x0, "_ZN12HostageStateD2Ev", HostageState::~HostageState), - //HOOK_SYMBOLDEF(0x01D569C0, "_ZN12HostageState25UpdateStationaryAnimationEP14CHostageImprov", HostageState::UpdateStationaryAnimation), -//HostageIdleState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4B3A0, "_ZN16HostageIdleState7OnEnterEP14CHostageImprov", HostageIdleState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4B3C0, "_ZN16HostageIdleState8OnUpdateEP14CHostageImprov", HostageIdleState::OnUpdate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4BBB0, "_ZN16HostageIdleState6OnExitEP14CHostageImprov", HostageIdleState::OnExit), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56A30, "_ZNK16HostageIdleState7GetNameEv", HostageIdleState::GetName), // DEFAULT - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4BBD0, "_ZN16HostageIdleState25UpdateStationaryAnimationEP14CHostageImprov", HostageIdleState::UpdateStationaryAnimation), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56A40, "_ZN16HostageIdleState15OnMoveToSuccessERK6Vector", HostageIdleState::OnMoveToSuccess), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56A50, "_ZN16HostageIdleState15OnMoveToFailureERK6VectorN12IImprovEvent17MoveToFailureTypeE", HostageIdleState::OnMoveToFailure), // DEFAULT - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56A60, "_ZN16HostageIdleState8OnInjuryEf", HostageIdleState::OnInjury), // DEFAULT -//HostageStateMachine - // virtual func - //HOOK_SYMBOLDEF(0x01D569D0, "_ZN19HostageStateMachine15OnMoveToSuccessERK6Vector", HostageStateMachine::OnMoveToSuccess), - //HOOK_SYMBOLDEF(0x01D569F0, "_ZN19HostageStateMachine15OnMoveToFailureERK6VectorN12IImprovEvent17MoveToFailureTypeE", HostageStateMachine::OnMoveToFailure), - //HOOK_SYMBOLDEF(0x01D56A10, "_ZN19HostageStateMachine8OnInjuryEf", HostageStateMachine::OnInjury), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN19HostageStateMachine25UpdateStationaryAnimationEP14CHostageImprov", HostageStateMachine::UpdateStationaryAnimation), -//HostageEscapeToCoverState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4A200, "_ZN25HostageEscapeToCoverState7OnEnterEP14CHostageImprov", HostageEscapeToCoverState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4A4A0, "_ZN25HostageEscapeToCoverState8OnUpdateEP14CHostageImprov", HostageEscapeToCoverState::OnUpdate), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D4A590, "_ZN25HostageEscapeToCoverState6OnExitEP14CHostageImprov", HostageEscapeToCoverState::OnExit), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56B00, "_ZNK25HostageEscapeToCoverState7GetNameEv", HostageEscapeToCoverState::GetName), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D4A5A0, "_ZN25HostageEscapeToCoverState15OnMoveToFailureERK6VectorN12IImprovEvent17MoveToFailureTypeE", HostageEscapeToCoverState::OnMoveToFailure), // DEFAULT - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN25HostageEscapeToCoverState13SetRescueGoalERK6Vector", HostageEscapeToCoverState::SetRescueGoal), -//HostageEscapeLookAroundState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4A5E0, "_ZN28HostageEscapeLookAroundState7OnEnterEP14CHostageImprov", HostageEscapeLookAroundState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4A620, "_ZN28HostageEscapeLookAroundState8OnUpdateEP14CHostageImprov", HostageEscapeLookAroundState::OnUpdate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4A680, "_ZN28HostageEscapeLookAroundState6OnExitEP14CHostageImprov", HostageEscapeLookAroundState::OnExit), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56B40, "_ZNK28HostageEscapeLookAroundState7GetNameEv", HostageEscapeLookAroundState::GetName), -//HostageEscapeState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4A690, "_ZN18HostageEscapeState7OnEnterEP14CHostageImprov", HostageEscapeState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4A720, "_ZN18HostageEscapeState8OnUpdateEP14CHostageImprov", HostageEscapeState::OnUpdate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4A880, "_ZN18HostageEscapeState6OnExitEP14CHostageImprov", HostageEscapeState::OnExit), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56A80, "_ZNK18HostageEscapeState7GetNameEv", HostageEscapeState::GetName), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56A70, "_ZN18HostageEscapeState15OnMoveToFailureERK6VectorN12IImprovEvent17MoveToFailureTypeE", HostageEscapeState::OnMoveToFailure), // NOXREF - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN18HostageEscapeState7ToCoverEv", HostageEscapeState::ToCover), - //HOOK_SYMBOLDEF(0x0, "_ZN18HostageEscapeState10LookAroundEv", HostageEscapeState::LookAround), -//HostageRetreatState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4BC30, "_ZN19HostageRetreatState7OnEnterEP14CHostageImprov", HostageRetreatState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4BC50, "_ZN19HostageRetreatState8OnUpdateEP14CHostageImprov", HostageRetreatState::OnUpdate), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D4BDB0, "_ZN19HostageRetreatState6OnExitEP14CHostageImprov", HostageRetreatState::OnExit), // PURE - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56BD0, "_ZNK19HostageRetreatState7GetNameEv", HostageRetreatState::GetName), // DEFAULT -//HostageFollowState - // virtual func - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4AC70, "_ZN18HostageFollowState7OnEnterEP14CHostageImprov", HostageFollowState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4ACF0, "_ZN18HostageFollowState8OnUpdateEP14CHostageImprov", HostageFollowState::OnUpdate), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4B320, "_ZN18HostageFollowState6OnExitEP14CHostageImprov", HostageFollowState::OnExit), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56BE0, "_ZNK18HostageFollowState7GetNameEv", HostageFollowState::GetName), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4B330, "_ZN18HostageFollowState25UpdateStationaryAnimationEP14CHostageImprov", HostageFollowState::UpdateStationaryAnimation), - // non-virtual func - //HOOK_SYMBOLDEF(0x0, "_ZN18HostageFollowState9SetLeaderEP11CBaseEntity", HostageFollowState::SetLeader), - //HOOK_SYMBOLDEF(0x0, "_ZNK18HostageFollowState9GetLeaderEv", HostageFollowState::GetLeader), -//HostageAnimateState - // virtual func - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D4A060, "_ZN19HostageAnimateState7OnEnterEP14CHostageImprov", HostageAnimateState::OnEnter), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4A070, "_ZN19HostageAnimateState8OnUpdateEP14CHostageImprov", HostageAnimateState::OnUpdate), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D4A1B0, "_ZN19HostageAnimateState6OnExitEP14CHostageImprov", HostageAnimateState::OnExit), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D56BF0, "_ZNK19HostageAnimateState7GetNameEv", HostageAnimateState::GetName), - // non-virtual func - HOOK_SYMBOLDEF(0x01D49D60, "_ZN19HostageAnimateState5ResetEv", HostageAnimateState::Reset), - HOOK_SYMBOLDEF(0x01D49E10, "_ZN19HostageAnimateState11AddSequenceEP14CHostageImprovPKcff", HostageAnimateState::AddSequence, void (CHostageImprov *, const char *, float, float)), - HOOK_SYMBOLDEF(0x01D49F00, "_ZN19HostageAnimateState11AddSequenceEP14CHostageImproviff", HostageAnimateState::AddSequence, void (CHostageImprov *, int, float, float)), - //HOOK_SYMBOLDEF(0x0, "_ZNK19HostageAnimateState6IsBusyEv", HostageAnimateState::IsBusy), - //HOOK_SYMBOLDEF(0x01D4A1C0, "_ZNK19HostageAnimateState9IsPlayingEP14CHostageImprovPKc", HostageAnimateState::IsPlaying), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN19HostageAnimateState20GetCurrentSequenceIDEv", HostageAnimateState::GetCurrentSequenceID), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK19HostageAnimateState14GetPerformanceEv", HostageAnimateState::GetPerformance), - //HOOK_SYMBOLDEF(0x0, "_ZN19HostageAnimateState14SetPerformanceENS_15PerformanceTypeE", HostageAnimateState::SetPerformance), - //HOOK_SYMBOLDEF(0x01D49D70, "_ZN19HostageAnimateState13StartSequenceEP14CHostageImprovPKNS_7SeqInfoE", HostageAnimateState::StartSequence), // NOXREF - HOOK_SYMBOLDEF(0x01D4A000, "_ZN19HostageAnimateState13IsDoneHoldingEv", HostageAnimateState::IsDoneHolding), -//CHostage - // virtual func - // HOOK_SYMBOL_VIRTUAL_DEF(0x01D4BE60, "_ZN8CHostage5SpawnEv", CHostage::Spawn), // do not use the hook together CHostage::IdleThink - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4C2C0, "_ZN8CHostage8PrecacheEv", CHostage::Precache), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4DB00, "_ZN8CHostage10ObjectCapsEv", CHostage::ObjectCaps), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D50D80, "_ZN8CHostage8ClassifyEv", CHostage::Classify), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4CE30, "_ZN8CHostage10TakeDamageEP9entvars_sS1_fi", CHostage::TakeDamage), - //HOOK_SYMBOL_VIRTUAL_DEF(0x01D50D90, "_ZN8CHostage10BloodColorEv", CHostage::BloodColor), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4DB10, "_ZN8CHostage5TouchEP11CBaseEntity", CHostage::Touch), - HOOK_SYMBOL_VIRTUAL_DEF(0x01D4D710, "_ZN8CHostage3UseEP11CBaseEntityS1_8USE_TYPEf", CHostage::Use), - // non-virtual func - // HOOK_SYMBOLDEF(0x01D4C450, "_ZN8CHostage9IdleThinkEv", CHostage::IdleThink), // export func - HOOK_SYMBOLDEF(0x01D4CBB0, "_ZN8CHostage6RemoveEv", CHostage::Remove), - // HOOK_SYMBOLDEF(0x01D4CC20, "_ZN8CHostage10RePositionEv", CHostage::RePosition), // do not use the hook together CHostage::IdleThink - HOOK_SYMBOLDEF(0x01D4C3E0, "_ZN8CHostage11SetActivityEi", CHostage::SetActivity), - //HOOK_SYMBOLDEF(0x0, "_ZN8CHostage11GetActivityEv", CHostage::GetActivity), // NOXREF - //HOOK_SYMBOLDEF(0x01D4D290, "_ZN8CHostage17GetModifiedDamageEfi", CHostage::GetModifiedDamage), // NOXREF - //HOOK_SYMBOLDEF(0x01D4D390, "_ZN8CHostage17SetFlinchActivityEv", CHostage::SetFlinchActivity), // NOXREF - HOOK_SYMBOLDEF(0x01D4D400, "_ZN8CHostage16SetDeathActivityEv", CHostage::SetDeathActivity), - //HOOK_SYMBOLDEF(0x01D4D310, "_ZN8CHostage13PlayPainSoundEv", CHostage::PlayPainSound), // NOXREF - HOOK_SYMBOLDEF(0x01D4D990, "_ZN8CHostage21PlayFollowRescueSoundEv", CHostage::PlayFollowRescueSound), - HOOK_SYMBOLDEF(0x01D4D580, "_ZN8CHostage13AnnounceDeathEP11CBasePlayer", CHostage::AnnounceDeath), - //HOOK_SYMBOLDEF(0x01D4D6A0, "_ZN8CHostage19ApplyHostagePenaltyEP11CBasePlayer", CHostage::ApplyHostagePenalty), // NOXREF - //HOOK_SYMBOLDEF(0x01D4DA80, "_ZN8CHostage16GiveCTTouchBonusEP11CBasePlayer", CHostage::GiveCTTouchBonus), // NOXREF - HOOK_SYMBOLDEF(0x01D4E580, "_ZN8CHostage22SendHostagePositionMsgEv", CHostage::SendHostagePositionMsg), - HOOK_SYMBOLDEF(0x01D4E6F0, "_ZN8CHostage19SendHostageEventMsgEv", CHostage::SendHostageEventMsg), - // HOOK_SYMBOLDEF(0x01D4DC10, "_ZN8CHostage8DoFollowEv", CHostage::DoFollow), - //HOOK_SYMBOLDEF(0x01D4E380, "_ZN8CHostage10IsOnLadderEv", CHostage::IsOnLadder), // NOXREF - HOOK_SYMBOLDEF(0x01D4E010, "_ZN8CHostage7PointAtERK6Vector", CHostage::PointAt), // NOXREF - // HOOK_SYMBOLDEF(0x01D4E080, "_ZN8CHostage10MoveTowardERK6Vector", CHostage::MoveToward), - HOOK_SYMBOLDEF(0x01D4E3A0, "_ZN8CHostage8NavReadyEv", CHostage::NavReady), - HOOK_SYMBOLDEF(0x01D4E850, "_ZN8CHostage6WiggleEv", CHostage::Wiggle), - HOOK_SYMBOLDEF(0x01D4EAB0, "_ZN8CHostage8PreThinkEv", CHostage::PreThink), - //HOOK_SYMBOLDEF(0x0, "_ZN8CHostage18IsFollowingSomeoneEv", CHostage::IsFollowingSomeone), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN8CHostage9GetLeaderEv", CHostage::GetLeader), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN8CHostage11IsFollowingEPK11CBaseEntity", CHostage::IsFollowing), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN8CHostage7IsValidEv", CHostage::IsValid), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN8CHostage6IsDeadEv", CHostage::IsDead), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK8CHostage8IsAtHomeEv", CHostage::IsAtHome), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZNK8CHostage15GetHomePositionEv", CHostage::GetHomePosition), // NOXREF - HOOK_DEF(0x01D4BDC0, hostage_entity), - HOOK_DEF(0x01D4BE10, monster_scientist), -//CHostageManager - //HOOK_SYMBOLDEF(0x01D4EEE0, "_ZN15CHostageManagerC2Ev", CHostageManager::CHostageManager), - HOOK_SYMBOLDEF(0x01D4EF10, "_ZN15CHostageManager14ServerActivateEv", CHostageManager::ServerActivate), - //HOOK_SYMBOLDEF(0x0, "_ZN15CHostageManager16ServerDeactivateEv", CHostageManager::ServerDeactivate), - HOOK_SYMBOLDEF(0x01D50670, "_ZN15CHostageManager12RestartRoundEv", CHostageManager::RestartRound), - //HOOK_SYMBOLDEF(0x01D506A0, "_ZN15CHostageManager10AddHostageEP8CHostage", CHostageManager::AddHostage), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN15CHostageManager10GetChatterEv", CHostageManager::GetChatter), - HOOK_SYMBOLDEF(0x01D506D0, "_ZNK15CHostageManager22IsNearbyHostageTalkingEP14CHostageImprov", CHostageManager::IsNearbyHostageTalking), - //HOOK_SYMBOLDEF(0x01D50790, "_ZNK15CHostageManager22IsNearbyHostageJumpingEP14CHostageImprov", CHostageManager::IsNearbyHostageJumping), - HOOK_SYMBOLDEF(0x01D50850, "_ZN15CHostageManager7OnEventE13GameEventTypeP11CBaseEntityS2_", CHostageManager::OnEvent), - //HOOK_SYMBOLDEF(0x0, "_ZN15CHostageManager17GetClosestHostageERK6VectorPf", CHostageManager::GetClosestHostage), - //HOOK_SYMBOLDEF(0x01D4EE20, "_Z21Hostage_RegisterCVarsv", Hostage_RegisterCVars), // NOXREF - //HOOK_SYMBOLDEF(0x01D4EE40, "_Z21InstallHostageManagerv", InstallHostageManager), -//SimpleChatter - //HOOK_SYMBOLDEF(0x01D508A0, "_ZN13SimpleChatterC2Ev", SimpleChatter::SimpleChatter), - //HOOK_SYMBOLDEF(0x01D508D0, "_ZN13SimpleChatterD2Ev", SimpleChatter::~SimpleChatter), - HOOK_SYMBOLDEF(0x01D50910, "_ZN13SimpleChatter8AddSoundE18HostageChatterTypePc", SimpleChatter::AddSound), - HOOK_SYMBOLDEF(0x01D50B40, "_ZN13SimpleChatter9PlaySoundEP11CBaseEntity18HostageChatterType", SimpleChatter::PlaySound), - //HOOK_SYMBOLDEF(0x01D50A60, "_ZN13SimpleChatter8GetSoundE18HostageChatterTypePf", SimpleChatter::GetSound), // NOXREF - //HOOK_SYMBOLDEF(0x01D509E0, "_ZN13SimpleChatter7ShuffleEPNS_10ChatterSetE", SimpleChatter::Shuffle), // NOXREF -//CLocalNav - //HOOK_SYMBOLDEF(0x01D56E80, "_ZN9CLocalNavC2EP8CHostage", CLocalNav::CLocalNav), - //HOOK_SYMBOLDEF(0x01D56ED0, "_ZN9CLocalNavD2Ev", CLocalNav::~CLocalNav), - //HOOK_SYMBOLDEF(0x0, "_ZN9CLocalNav12SetTargetEntEP11CBaseEntity", CLocalNav::SetTargetEnt), // NOXREF - HOOK_SYMBOLDEF(0x01D57420, "_ZN9CLocalNav8FindPathER6VectorS1_fi", CLocalNav::FindPath), - HOOK_SYMBOLDEF(0x01D57380, "_ZN9CLocalNav14SetupPathNodesEiP6Vectori", CLocalNav::SetupPathNodes), - HOOK_SYMBOLDEF(0x01D573D0, "_ZN9CLocalNav26GetFurthestTraversableNodeER6VectorPS0_ii", CLocalNav::GetFurthestTraversableNode), - HOOK_SYMBOLDEF(0x01D57AC0, "_ZN9CLocalNav15PathTraversableER6VectorS1_i", CLocalNav::PathTraversable), - //HOOK_SYMBOLDEF(0x01D57A50, "_ZN9CLocalNav9PathClearER6VectorS1_iR11TraceResult", CLocalNav::PathClear, BOOL (Vector &, Vector &, int, TraceResult &)), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN9CLocalNav9PathClearER6VectorS1_i", CLocalNav::PathClear, BOOL (Vector &, Vector &, int)), // NOXREF - HOOK_SYMBOLDEF(0x01D58AC0, "_ZN9CLocalNav5ThinkEv", CLocalNav::Think), - HOOK_SYMBOLDEF(0x01D58D50, "_ZN9CLocalNav10RequestNavEP8CHostage", CLocalNav::RequestNav), - HOOK_SYMBOLDEF(0x01D58E20, "_ZN9CLocalNav5ResetEv", CLocalNav::Reset), - //HOOK_SYMBOLDEF(0x01D58E50, "_ZN9CLocalNav15HostagePrethinkEv", CLocalNav::HostagePrethink), // NOXREF - //HOOK_SYMBOLDEF(0x01D56F20, "_ZN9CLocalNav7AddNodeEiR6Vectoriih", CLocalNav::AddNode), // NOXREF - //HOOK_SYMBOLDEF(0x0, "_ZN9CLocalNav7GetNodeEi", CLocalNav::GetNode), // NOXREF - //HOOK_SYMBOLDEF(0x01D56F80, "_ZN9CLocalNav10NodeExistsEii", CLocalNav::NodeExists), // NOXREF - //HOOK_SYMBOLDEF(0x01D56FC0, "_ZN9CLocalNav12AddPathNodesEii", CLocalNav::AddPathNodes), // NOXREF - HOOK_SYMBOLDEF(0x01D57040, "_ZN9CLocalNav11AddPathNodeEiiii", CLocalNav::AddPathNode), - HOOK_SYMBOLDEF(0x01D57290, "_ZN9CLocalNav11GetBestNodeER6VectorS1_", CLocalNav::GetBestNode), - HOOK_SYMBOLDEF(0x01D57EB0, "_ZN9CLocalNav16SlopeTraversableER6VectorS1_iR11TraceResult", CLocalNav::SlopeTraversable), - HOOK_SYMBOLDEF(0x01D580A0, "_ZN9CLocalNav17LadderTraversableER6VectorS1_iR11TraceResult", CLocalNav::LadderTraversable), - HOOK_SYMBOLDEF(0x01D581D0, "_ZN9CLocalNav15StepTraversableER6VectorS1_iR11TraceResult", CLocalNav::StepTraversable), - HOOK_SYMBOLDEF(0x01D583C0, "_ZN9CLocalNav12StepJumpableER6VectorS1_iR11TraceResult", CLocalNav::StepJumpable), - HOOK_SYMBOLDEF(0x01D57810, "_ZN9CLocalNav14FindDirectPathER6VectorS1_fi", CLocalNav::FindDirectPath), - HOOK_SYMBOLDEF(0x01D585C0, "_ZN9CLocalNav9LadderHitER6VectorS1_R11TraceResult", CLocalNav::LadderHit), - -#endif // Hostage_Region - - { 0, nullptr, 0, 0, false } -}; - -// refs for uncompleted virtual function -VirtualTableRef g_TableRefs[] = -{ - // Weapon shared - VTABLE_LINK(0x01DF46BC, "CKnife", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF4394, "CGLOCK18", 95), - VTABLE_LINK(0x01DF368C, "CC4", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF5C6C, "CUSP", 95), - VTABLE_LINK(0x01DF57DC, "CSmokeGrenade", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF4B8C, "CM4A1", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF453C, "CHEGrenade", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF3ED4, "CFlashbang", 95), - VTABLE_LINK(0x01DF3B94, "CFamas", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF39D4, "CELITE", 95), - VTABLE_LINK(0x01DF3D34, "CFiveSeven", 95), - VTABLE_LINK(0x01DF502C, "CP228", 95), - VTABLE_LINK(0x01DF5DF4, "CXM1014", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF407C, "CG3SG1", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF54CC, "CSG550", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF3824, "CDEAGLE", 95), - VTABLE_LINK(0x01DF34E4, "CAWP", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF5334, "CSCOUT", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF5654, "CSG552", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF49FC, "CM3", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF333C, "CAUG", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF420C, "CGalil", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF3174, "CAK47", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF4864, "CM249", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF51AC, "CP90", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF4D0C, "CMAC10", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF5AE4, "CUMP45", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF4E9C, "CMP5N", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF595C, "CTMP", CWEAPON_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFD984, "CWShield", CBASE_VIRTUAL_COUNT), - - // CBaseEntity - VTABLE_LINK(0x01DF8A94, "CGib", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFD824, "CBaseDelay", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF607C, "CBaseEntity", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFA894, "CGrenade", 77), - VTABLE_LINK(0x01DF67D4, "CBaseToggle", 59), - VTABLE_LINK(0x01DF652C, "CBasePlayer", 88), - VTABLE_LINK(0x01DF6694, "CBaseMonster", 76), - VTABLE_LINK(0x01DFDA84, "CSprayCan", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFDB74, "CBloodSplat", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFDC6C, "CDeadHEV", 76), - VTABLE_LINK(0x01DFDF84, "CInfoIntermission",CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFDE94, "CRevertSaved", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFDDA4, "CStripWeapons", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF69B4, "CBot", 116), - VTABLE_LINK(0x01DF61DC, "CCSBot", 116), - VTABLE_LINK(0x01DF64F0, "CCSBotManager", 12), - VTABLE_LINK(0x01DF6C9C, "CHostage", 76), - VTABLE_LINK(0x01DF6FF4, "CImprov", 56), - VTABLE_LINK(0x01DF6E24, "CHostageImprov", 56), - - // hostage states - VTABLE_LINK(0x01DF6FE4, "HostageStateMachine", 4), - VTABLE_LINK(0x01DF6FC8, "HostageIdleState", 4), - VTABLE_LINK(0x01DF6F9C, "HostageEscapeState", 6), - VTABLE_LINK(0x01DF6F70, "HostageRetreatState", 6), - VTABLE_LINK(0x01DF6F44, "HostageFollowState", 4), - VTABLE_LINK(0x01DF7180, "HostageEscapeToCoverState",4), - VTABLE_LINK(0x01DF6F18, "HostageAnimateState", 4), - - VTABLE_LINK(0x01E00BBC, "CArmoury", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFE4E4, "CSoundEnt", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFE20C, "CAmbientGeneric", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFE2FC, "CEnvSound", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFE3F4, "CSpeaker", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01E00D9C, "CCorpse", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01E00CAC, "CDecal", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01E00E8C, "CWorld", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFE8D4, "CBaseGrenCatch", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFE9C4, "CFuncWeaponCheck", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01E00ACC, "CWeaponBox", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF9F94, "CShower", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFA1BC, "CBreakable", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFA2AC, "CPushable", CBASE_VIRTUAL_COUNT), - - VTABLE_LINK(0x01DF7D1C, "CFuncWall", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF7E0C, "CFuncWallToggle", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF7EFC, "CFuncConveyor", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF7FF4, "CFuncIllusionary", 59), - VTABLE_LINK(0x01DF80E4, "CFuncMonsterClip", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF81D4, "CFuncRotating", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF82C4, "CPendulum", CBASE_VIRTUAL_COUNT), - - VTABLE_LINK(0x01DFAAF4, "CGenericCycler", 76), - VTABLE_LINK(0x01DFAC2C, "CCyclerProbe", 76), - VTABLE_LINK(0x01DFAD64, "CCyclerSprite", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFAFD4, "CWreckage", 76), - - //VTABLE_LINK(0x0, "CFuncTank", 60), - VTABLE_LINK(0x01DFA3BC, "CFuncTankGun", 60), - VTABLE_LINK(0x01DFA4B4, "CFuncTankLaser", 60), - VTABLE_LINK(0x01DFA5AC, "CFuncTankRocket", 60), - VTABLE_LINK(0x01DFA6A4, "CFuncTankMortar", 60), - VTABLE_LINK(0x01DFA79C, "CFuncTankControls",CBASE_VIRTUAL_COUNT), - - VTABLE_LINK(0x01DF83BC, "CEnvGlobal", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF84AC, "CMultiSource", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF859C, "CBaseButton", 59), - VTABLE_LINK(0x01DF868C, "CRotButton", 59), - VTABLE_LINK(0x01DF877C, "CMomentaryRotButton", 59), - VTABLE_LINK(0x01DF886C, "CEnvSpark", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF895C, "CButtonTarget", CBASE_VIRTUAL_COUNT), - - VTABLE_LINK(0x01DFE5D4, "CNullEntity", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFE6C4, "CBaseDMStart", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF8EAC, "CPointEntity", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFEAB4, "CFrictionModifier", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFEBA4, "CAutoTrigger", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFEC94, "CTriggerRelay", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFF6E4, "CTriggerVolume", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFF7D4, "CFireAndDie", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01E00404, "CTriggerChangeTarget", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01E004F4, "CTriggerCamera", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01E006D4, "CClientFog", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFEE74, "CRenderFxManager", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFF324, "CTargetCDAudio", CBASE_VIRTUAL_COUNT), - - VTABLE_LINK(0x01DFCD1C, "CPathCorner", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFCE0C, "CPathTrack", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01E007D4, "CFuncVehicle", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01E009C4, "CFuncVehicleControls", CBASE_VIRTUAL_COUNT), - - VTABLE_LINK(0x01DFBD4C, "CGameScore", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFBE3C, "CGameEnd", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFBF2C, "CGameText", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFC01C, "CGameTeamMaster", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFC10C, "CGameTeamSet", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFC1FC, "CGamePlayerZone", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFC2EC, "CGamePlayerHurt", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFC3DC, "CGameCounter", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFC4CC, "CGameCounterSet", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFC5BC, "CGamePlayerEquip", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFC6AC, "CGamePlayerTeam", CBASE_VIRTUAL_COUNT), - - VTABLE_LINK(0x01DFCEFC, "CFuncPlat", 64), - VTABLE_LINK(0x01DFD0F4, "CFuncPlatRot", 64), - VTABLE_LINK(0x01DFD1FC, "CFuncTrain", 60), - VTABLE_LINK(0x01DFD2F4, "CFuncTrackTrain", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFD3EC, "CFuncTrainControls", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFD4DC, "CFuncTrackChange", 65), - VTABLE_LINK(0x01DFD5E4, "CFuncTrackAuto", 65), - VTABLE_LINK(0x01DFD6EC, "CGunTarget", 76), - VTABLE_LINK(0x01DFD004, "CPlatTrigger", CBASE_VIRTUAL_COUNT), - - VTABLE_LINK(0x01DFED84, "CMultiManager", 59), - VTABLE_LINK(0x01DFEF64, "CBaseTrigger", 59), - VTABLE_LINK(0x01DFF054, "CTriggerHurt", 59), - VTABLE_LINK(0x01DFF144, "CTriggerMonsterJump", 59), - - VTABLE_LINK(0x01DFF234, "CTriggerCDAudio", 59), - VTABLE_LINK(0x01DFF414, "CTriggerMultiple", 59), - VTABLE_LINK(0x01DFF504, "CTriggerOnce", 59), - VTABLE_LINK(0x01DFF5F4, "CTriggerCounter", 59), - VTABLE_LINK(0x01DFF8C4, "CChangeLevel", 59), - VTABLE_LINK(0x01DFF9B4, "CLadder", 59), - VTABLE_LINK(0x01DFFAA4, "CTriggerPush", 59), - VTABLE_LINK(0x01DFFB94, "CTriggerTeleport", 59), - VTABLE_LINK(0x01DFFC84, "CBuyZone", 59), - VTABLE_LINK(0x01DFFD74, "CBombTarget", 59), - VTABLE_LINK(0x01DFFE64, "CHostageRescue", 59), - VTABLE_LINK(0x01DFFF54, "CEscapeZone", 59), - VTABLE_LINK(0x01E00044, "CVIP_SafetyZone", 59), - VTABLE_LINK(0x01E00134, "CTriggerSave", 59), - - VTABLE_LINK(0x01E00224, "CTriggerEndSection", 59), - VTABLE_LINK(0x01E00314, "CTriggerGravity", 59), - VTABLE_LINK(0x01E005E4, "CWeather", 59), - - VTABLE_LINK(0x01DFA084, "CEnvExplosion", 76), - VTABLE_LINK(0x01DFC79C, "CFuncMortarField", 59), - VTABLE_LINK(0x01DF7204, "CAirtank", 77), - VTABLE_LINK(0x01DFC88C, "CMortar", 77), - VTABLE_LINK(0x01DF7344, "C9MMAmmo", 59), - VTABLE_LINK(0x01DF7434, "CBuckShotAmmo", 59), - VTABLE_LINK(0x01DF7524, "C556NatoAmmo", 59), - VTABLE_LINK(0x01DF7614, "C556NatoBoxAmmo", 59), - VTABLE_LINK(0x01DF7704, "C762NatoAmmo", 59), - VTABLE_LINK(0x01DF77F4, "C45ACPAmmo", 59), - VTABLE_LINK(0x01DF78E4, "C50AEAmmo", 59), - VTABLE_LINK(0x01DF79D4, "C338MagnumAmmo", 59), - VTABLE_LINK(0x01DF7AC4, "C57MMAmmo", 59), - VTABLE_LINK(0x01DF7BB4, "C357SIGAmmo", 59), - - // doors - VTABLE_LINK(0x01DF8BDC, "CBaseDoor", 59), - VTABLE_LINK(0x01DF8CCC, "CRotDoor", 59), - VTABLE_LINK(0x01DF8DBC, "CMomentaryDoor", 59), - - // rules - VTABLE_LINK(0x01DFCBFC, "CGameRules", 63), - VTABLE_LINK(0x01DFE10C, "CHalfLifeRules", 63), - VTABLE_LINK(0x01DFCADC, "CHalfLifeMultiplay", 70), - VTABLE_LINK(0x01DFE7B4, "CHalfLifeTraining", 70), - VTABLE_LINK(0x01DFC9D4, "CMapInfo", CBASE_VIRTUAL_COUNT), - - VTABLE_LINK(0x01E01074, "CPreventDefuseTask", 0), - VTABLE_LINK(0x01E01084, "CCareerTask", 0), - - // effects - VTABLE_LINK(0x01DF8F9C, "CBubbling", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF908C, "CBeam", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF917C, "CLightning", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF926C, "CLaser", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF944C, "CGlow", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF953C, "CBombGlow", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF935C, "CSprite", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFB2EC, "CWorldItem", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFBB5C, "CLight", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFBC4C, "CEnvLight", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFEAB4, "CFrictionModifier", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFEBA4, "CAutoTrigger", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DFBA6C, "CItemThighPack", 59), - VTABLE_LINK(0x01DFB97C, "CItemAssaultSuit", 59), - VTABLE_LINK(0x01DFB88C, "CItemKevlar", 59), - VTABLE_LINK(0x01DFB79C, "CItemLongJump", 59), - VTABLE_LINK(0x01DFB6AC, "CItemSecurity", 59), - VTABLE_LINK(0x01DFB5BC, "CItemAntidote", 59), - VTABLE_LINK(0x01DFB4CC, "CItemBattery", 59), - VTABLE_LINK(0x01DFB3DC, "CItemSuit", 59), - VTABLE_LINK(0x01DFB10C, "CHealthKit", 59), - VTABLE_LINK(0x01DFB1FC, "CWallHealth", 59), - VTABLE_LINK(0x01DFA9FC, "CRecharge", 59), - VTABLE_LINK(0x01DF9634, "CGibShooter", 59), - VTABLE_LINK(0x01DF9724, "CEnvShooter", 59), - VTABLE_LINK(0x01DF9814, "CTestEffect", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF9904, "CBlood", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF99F4, "CShake", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF9AE4, "CFade", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF9BD4, "CMessage", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF9CC4, "CEnvFunnel", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF9DB4, "CEnvBeverage", CBASE_VIRTUAL_COUNT), - VTABLE_LINK(0x01DF9EA4, "CItemSoda", CBASE_VIRTUAL_COUNT), - - // tutor - VTABLE_LINK(0x01E00FA4, "CBaseTutor", 12), - VTABLE_LINK(0x01E00F9C, "TutorMessageEvent", 1), - VTABLE_LINK(0x01E01024, "CCSTutor", 12), - VTABLE_LINK(0x01E00FEC, "CCSTutorStateSystem", 4), - VTABLE_LINK(0x01E00F78, "CBaseTutorStateSystem", 4), - VTABLE_LINK(0x01E00F8C, "CBaseTutorState", 3), - VTABLE_LINK(0x01E00FDC, "CCSTutorUndefinedState", 3), - VTABLE_LINK(0x01E01000, "CCSTutorBuyMenuState", 3), - VTABLE_LINK(0x01E01010, "CCSTutorWaitingForStartState", 3), - - VTABLE_LINK(0x01DF6198, "BotFollowMeme", 1), - VTABLE_LINK(0x01DF617C, "BotHelpMeme", 1), - VTABLE_LINK(0x01DF61A0, "BotDefendHereMeme", 1), - VTABLE_LINK(0x01DF61B0, "BotBombsiteStatusMeme", 1), - VTABLE_LINK(0x01DF618C, "BotBombStatusMeme", 1), - VTABLE_LINK(0x01DF61B8, "BotHostageBeingTakenMeme", 1), - VTABLE_LINK(0x01DF61A8, "BotWhereBombMeme", 1), - VTABLE_LINK(0x01DF6184, "BotRequestReportMeme", 1), - - // bot states - VTABLE_LINK(0x01DF64A0, "IdleState", 4), - VTABLE_LINK(0x01DF648C, "HuntState", 4), - VTABLE_LINK(0x01DF6478, "AttackState", 4), - VTABLE_LINK(0x01DF6464, "InvestigateNoiseState", 4), - VTABLE_LINK(0x01DF6450, "BuyState", 4), - VTABLE_LINK(0x01DF643C, "MoveToState", 4), - VTABLE_LINK(0x01DF6428, "FetchBombState", 4), - VTABLE_LINK(0x01DF6414, "PlantBombState", 4), - VTABLE_LINK(0x01DF6400, "DefuseBombState", 4), - VTABLE_LINK(0x01DF63EC, "HideState", 4), - VTABLE_LINK(0x01DF63D8, "EscapeFromBombState", 4), - VTABLE_LINK(0x01DF63C4, "FollowState", 4), - VTABLE_LINK(0x01DF63B0, "UseEntityState", 4), - - { 0, nullptr, 0 } // BaseClass__for_vtbl -}; - -// references -AddressRef g_FunctionRefs[] = -{ -#ifndef Function_References_Region - - GLOBALVAR_LINK(0x01D2EDD0, "_ZN6CCSBot16UpdateLookAnglesEv", pCCSBot__UpdateLookAngles), - GLOBALVAR_LINK(0x01D19C70, "_ZN9BotPhrase9RandomizeEv", pBotPhrase__Randomize), - -#endif // Function_References_Region - - { 0, nullptr, 0, 0, false } -}; - -AddressRef g_DataRefs[] = -{ -#ifndef Data_References_Region - - GLOBALVAR_LINK(0x01E61BD0, "g_engfuncs", pg_engfuncs), - GLOBALVAR_LINK(0x01E61E48, "gpGlobals", pgpGlobals), - GLOBALVAR_LINK(0x01E10768, "GameEventName", pGameEventName), - GLOBALVAR_LINK(0x01E2A3F8, "_ZL14s_shared_token", ps_shared_token), - GLOBALVAR_LINK(0x01E13218, "_ZL14s_shared_quote", ps_shared_quote), - GLOBALVAR_LINK(0x01E61BA4, "g_vecZero", pg_vecZero), - GLOBALVAR_LINK(0x01E61BB4, "g_Language", pg_Language), - //GLOBALVAR_LINK(0x01E61BB8, "g_ulFrameCount", pg_ulFrameCount), // NOXREF - //GLOBALVAR_LINK(0x0, "g_ulModelIndexEyes", pg_ulModelIndexEyes), // NOXREF - GLOBALVAR_LINK(0x01E61BC0, "g_vecAttackDir", pg_vecAttackDir), - GLOBALVAR_LINK(0x01E61BBC, "g_iSkillLevel", pg_iSkillLevel), - GLOBALVAR_LINK(0x01E61B9C, "gDisplayTitle", pgDisplayTitle), - GLOBALVAR_LINK(0x01E61BA0, "g_fGameOver", pg_fGameOver), - GLOBALVAR_LINK(0x01E754B8, "st_szNextMap", pst_szNextMap), - GLOBALVAR_LINK(0x01E75498, "st_szNextSpot", pst_szNextSpot), - GLOBALVAR_LINK(0x01E683A0, "gSkillData", pgSkillData), - GLOBALVAR_LINK(0x01E75EC8, "g_sModelIndexLaser", pg_sModelIndexLaser), - GLOBALVAR_LINK(0x01E227A8, "g_pModelNameLaser", pg_pModelNameLaser), - GLOBALVAR_LINK(0x01E75FD8, "g_sModelIndexLaserDot", pg_sModelIndexLaserDot), - GLOBALVAR_LINK(0x01E75EC6, "g_sModelIndexFireball", pg_sModelIndexFireball), - GLOBALVAR_LINK(0x01E75EB4, "g_sModelIndexSmoke", pg_sModelIndexSmoke), - GLOBALVAR_LINK(0x01E75EB2, "g_sModelIndexWExplosion", pg_sModelIndexWExplosion), - GLOBALVAR_LINK(0x01E76562, "g_sModelIndexBubbles", pg_sModelIndexBubbles), - GLOBALVAR_LINK(0x01E75EB6, "g_sModelIndexBloodDrop", pg_sModelIndexBloodDrop), - GLOBALVAR_LINK(0x01E75ECA, "g_sModelIndexBloodSpray", pg_sModelIndexBloodSpray), - GLOBALVAR_LINK(0x01E76566, "g_sModelIndexSmokePuff", pg_sModelIndexSmokePuff), - GLOBALVAR_LINK(0x01E75ED0, "g_sModelIndexFireball2", pg_sModelIndexFireball2), - GLOBALVAR_LINK(0x01E75ECC, "g_sModelIndexFireball3", pg_sModelIndexFireball3), - GLOBALVAR_LINK(0x01E75ECE, "g_sModelIndexFireball4", pg_sModelIndexFireball4), - GLOBALVAR_LINK(0x01E76564, "g_sModelIndexCTGhost", pg_sModelIndexCTGhost), - GLOBALVAR_LINK(0x01E75EB0, "g_sModelIndexTGhost", pg_sModelIndexTGhost), - GLOBALVAR_LINK(0x01E76560, "g_sModelIndexC4Glow", pg_sModelIndexC4Glow), - GLOBALVAR_LINK(0x01E76568, "giAmmoIndex", pgiAmmoIndex), - GLOBALVAR_LINK(0x01E75EC4, "g_sModelIndexRadio", pg_sModelIndexRadio), - GLOBALVAR_LINK(0x01E75EB8, "gMultiDamage", pgMultiDamage), - GLOBALVAR_LINK(0x01E29880, "_ZL13s_iBeamSprite", ps_iBeamSprite), - GLOBALVAR_LINK(0x01E29480, "_ZL8cosTable", pcosTable), - GLOBALVAR_LINK(0x01E23AA8, "TutorIdentifierList", pTutorIdentifierList), - GLOBALVAR_LINK(0x01E23678, "_ZL19g_TutorStateStrings", pg_TutorStateStrings), - //GLOBALVAR_LINK(0x01E61E4C, "WorldGraph", pWorldGraph), - //GLOBALVAR_LINK(0x01E61E5C, "_ZN12CTalkMonster14g_talkWaitTimeE", CTalkMonster::pg_talkWaitTime), - GLOBALVAR_LINK(0x01E61B98, "g_pGameRules", pg_pGameRules), - GLOBALVAR_LINK(0x01E62560, "g_pMPGameRules", pg_pMPGameRules), - //GLOBALVAR_LINK(0x01E61E70, "_ZL12mp_com_token", pmp_com_token), - GLOBALVAR_LINK(0x01E636F0, "vec3_origin", pvec3_origin), - GLOBALVAR_LINK(0x01E1F420, "nanmask", pnanmask), - GLOBALVAR_LINK(0x01E0B0B0, "_ZL15weaponAliasInfo", pg_weaponAliasInfo), - GLOBALVAR_LINK(0x01E0B1E8, "_ZL18weaponBuyAliasInfo", pg_weaponBuyAliasInfo), - GLOBALVAR_LINK(0x01E0B3F0, "_ZL20weaponClassAliasInfo", pg_weaponClassAliasInfo), - GLOBALVAR_LINK(0x01E0B560, "g_autoBuyInfo", pg_autoBuyInfo), - GLOBALVAR_LINK(0x01E0B708, "_ZL10weaponInfo", pg_weaponInfo), - GLOBALVAR_LINK(0x01E6AC80, "gszallsentencenames", pgszallsentencenames), - GLOBALVAR_LINK(0x01E683E0, "rgsentenceg", prgsentenceg), - GLOBALVAR_LINK(0x01E75480, "fSentencesInit", pfSentencesInit), - GLOBALVAR_LINK(0x01E75484, "gcallsentences", pgcallsentences), - GLOBALVAR_LINK(0x01E1F5B0, "rgdpvpreset", prgdpvpreset), - GLOBALVAR_LINK(0x01E75488, "fTextureTypeInit", pfTextureTypeInit), - GLOBALVAR_LINK(0x01E7548C, "gcTextures", pgcTextures, 2), - GLOBALVAR_LINK(0x01E70C80, "grgszTextureName", pgrgszTextureName, 2), - GLOBALVAR_LINK(0x01E75080, "grgchTextureType", pgrgchTextureType, 2), - // implementation at PM_Shared - GLOBALVAR_LINK(0x01E68390, "gcTextures", ppm_gcTextures, 1), - GLOBALVAR_LINK(0x01E63B88, "grgszTextureName", ppm_grgszTextureName, 1), - GLOBALVAR_LINK(0x01E67F88, "grgchTextureType", ppm_grgchTextureType, 1), - GLOBALVAR_LINK(0x01E68388, "pm_shared_initialized", ppm_shared_initialized), - GLOBALVAR_LINK(0x01E63700, "rgv3tStuckTable", prgv3tStuckTable), - GLOBALVAR_LINK(0x01E63A88, "rgStuckLast", prgStuckLast), - GLOBALVAR_LINK(0x01E68394, "g_onladder", pg_onladder), - GLOBALVAR_LINK(0x01E6838C, "pmove", pg_ppmove), - GLOBALVAR_LINK(0x01E76578, "g_flWeaponCheat", pg_flWeaponCheat), - GLOBALVAR_LINK(0x01E62778, "gEvilImpulse101", pgEvilImpulse101), - GLOBALVAR_LINK(0x01E62790, "g_szMapBriefingText", pg_szMapBriefingText), - GLOBALVAR_LINK(0x01E1DD78, "gInitHUD", pgInitHUD), - GLOBALVAR_LINK(0x01E75CFC, "g_groupmask", pg_groupmask), - GLOBALVAR_LINK(0x01E75D00, "g_groupop", pg_groupop), - GLOBALVAR_LINK(0x01E21EF8, "_ZL6gSizes", pgSizes), - GLOBALVAR_LINK(0x01E75490, "pSoundEnt", ppSoundEnt), - GLOBALVAR_LINK(0x01E75CF8, "_ZL6glSeed", pglSeed), - GLOBALVAR_LINK(0x01E21598, "seed_table", pseed_table), - GLOBALVAR_LINK(0x01E21998, "gEntvarsDescription", pgEntvarsDescription), - GLOBALVAR_LINK(0x01E22DBC, "gGlobalEntitySaveData", pgGlobalEntitySaveData), - GLOBALVAR_LINK(0x01E7656C, "g_pBodyQueueHead", pg_pBodyQueueHead), - GLOBALVAR_LINK(0x01E76570, "gGlobalState", pgGlobalState), - GLOBALVAR_LINK(0x01E22C50, "gDecals", pgDecals), - GLOBALVAR_LINK(0x01E31748, "stringsHashTable", pstringsHashTable), - GLOBALVAR_LINK(0x01E312E8, "hashItemMemPool", phashItemMemPool), - //GLOBALVAR_LINK(0x01E3175C, "gTouchDisabled", pgTouchDisabled), - GLOBALVAR_LINK(0x01E6359C, "giPrecacheGrunt", pgiPrecacheGrunt), - GLOBALVAR_LINK(0x01E6360C, "gmsgWeapPickup", pgmsgWeapPickup), - GLOBALVAR_LINK(0x01E635E0, "gmsgHudText", pgmsgHudText), - GLOBALVAR_LINK(0x01E635E4, "gmsgHudTextArgs", pgmsgHudTextArgs), - GLOBALVAR_LINK(0x01E635A0, "gmsgShake", pgmsgShake), - GLOBALVAR_LINK(0x01E635A4, "gmsgFade", pgmsgFade), - GLOBALVAR_LINK(0x01E635A8, "gmsgFlashlight", pgmsgFlashlight), - GLOBALVAR_LINK(0x01E635AC, "gmsgFlashBattery", pgmsgFlashBattery), - GLOBALVAR_LINK(0x01E635B0, "gmsgResetHUD", pgmsgResetHUD), - GLOBALVAR_LINK(0x01E635B4, "gmsgInitHUD", pgmsgInitHUD), - GLOBALVAR_LINK(0x01E635B8, "gmsgViewMode", pgmsgViewMode), - GLOBALVAR_LINK(0x01E635BC, "gmsgShowGameTitle", pgmsgShowGameTitle), - GLOBALVAR_LINK(0x01E635C0, "gmsgCurWeapon", pgmsgCurWeapon), - GLOBALVAR_LINK(0x01E635C4, "gmsgHealth", pgmsgHealth), - GLOBALVAR_LINK(0x01E635C8, "gmsgDamage", pgmsgDamage), - GLOBALVAR_LINK(0x01E635CC, "gmsgBattery", pgmsgBattery), - GLOBALVAR_LINK(0x01E635D0, "gmsgTrain", pgmsgTrain), - GLOBALVAR_LINK(0x01E635D4, "gmsgLogo", pgmsgLogo), - GLOBALVAR_LINK(0x01E635D8, "gmsgWeaponList", pgmsgWeaponList), - GLOBALVAR_LINK(0x01E635DC, "gmsgAmmoX", pgmsgAmmoX), - GLOBALVAR_LINK(0x01E635E8, "gmsgDeathMsg", pgmsgDeathMsg), - GLOBALVAR_LINK(0x01E635EC, "gmsgScoreAttrib", pgmsgScoreAttrib), - GLOBALVAR_LINK(0x01E635F0, "gmsgScoreInfo", pgmsgScoreInfo), - GLOBALVAR_LINK(0x01E635F4, "gmsgTeamInfo", pgmsgTeamInfo), - GLOBALVAR_LINK(0x01E635F8, "gmsgTeamScore", pgmsgTeamScore), - GLOBALVAR_LINK(0x01E635FC, "gmsgGameMode", pgmsgGameMode), - GLOBALVAR_LINK(0x01E63600, "gmsgMOTD", pgmsgMOTD), - GLOBALVAR_LINK(0x01E63604, "gmsgServerName", pgmsgServerName), - GLOBALVAR_LINK(0x01E63608, "gmsgAmmoPickup", pgmsgAmmoPickup), - GLOBALVAR_LINK(0x01E63610, "gmsgItemPickup", pgmsgItemPickup), - GLOBALVAR_LINK(0x01E63614, "gmsgHideWeapon", pgmsgHideWeapon), - GLOBALVAR_LINK(0x01E63618, "gmsgSayText", pgmsgSayText), - GLOBALVAR_LINK(0x01E6361C, "gmsgTextMsg", pgmsgTextMsg), - GLOBALVAR_LINK(0x01E63620, "gmsgSetFOV", pgmsgSetFOV), - GLOBALVAR_LINK(0x01E63624, "gmsgShowMenu", pgmsgShowMenu), - GLOBALVAR_LINK(0x01E63628, "gmsgSendAudio", pgmsgSendAudio), - GLOBALVAR_LINK(0x01E6362C, "gmsgRoundTime", pgmsgRoundTime), - GLOBALVAR_LINK(0x01E63630, "gmsgMoney", pgmsgMoney), - GLOBALVAR_LINK(0x01E63634, "gmsgBlinkAcct", pgmsgBlinkAcct), - GLOBALVAR_LINK(0x01E63638, "gmsgArmorType", pgmsgArmorType), - GLOBALVAR_LINK(0x01E6363C, "gmsgStatusValue", pgmsgStatusValue), - GLOBALVAR_LINK(0x01E63640, "gmsgStatusText", pgmsgStatusText), - GLOBALVAR_LINK(0x01E63644, "gmsgStatusIcon", pgmsgStatusIcon), - GLOBALVAR_LINK(0x01E63648, "gmsgBarTime", pgmsgBarTime), - GLOBALVAR_LINK(0x01E6364C, "gmsgReloadSound", pgmsgReloadSound), - GLOBALVAR_LINK(0x01E63650, "gmsgCrosshair", pgmsgCrosshair), - GLOBALVAR_LINK(0x01E63654, "gmsgNVGToggle", pgmsgNVGToggle), - GLOBALVAR_LINK(0x01E63658, "gmsgRadar", pgmsgRadar), - GLOBALVAR_LINK(0x01E6365C, "gmsgSpectator", pgmsgSpectator), - GLOBALVAR_LINK(0x01E63660, "gmsgVGUIMenu", pgmsgVGUIMenu), - GLOBALVAR_LINK(0x01E63664, "gmsgCZCareer", pgmsgCZCareer), - GLOBALVAR_LINK(0x01E63668, "gmsgCZCareerHUD", pgmsgCZCareerHUD), - GLOBALVAR_LINK(0x01E6366C, "gmsgTaskTime", pgmsgTaskTime), - GLOBALVAR_LINK(0x01E63670, "gmsgTutorText", pgmsgTutorText), - GLOBALVAR_LINK(0x01E63674, "gmsgTutorLine", pgmsgTutorLine), - GLOBALVAR_LINK(0x01E63678, "gmsgShadowIdx", pgmsgShadowIdx), - GLOBALVAR_LINK(0x01E6367C, "gmsgTutorState", pgmsgTutorState), - GLOBALVAR_LINK(0x01E63680, "gmsgTutorClose", pgmsgTutorClose), - GLOBALVAR_LINK(0x01E63684, "gmsgAllowSpec", pgmsgAllowSpec), - GLOBALVAR_LINK(0x01E63688, "gmsgBombDrop", pgmsgBombDrop), - GLOBALVAR_LINK(0x01E6368C, "gmsgBombPickup", pgmsgBombPickup), - GLOBALVAR_LINK(0x01E63690, "gmsgHostagePos", pgmsgHostagePos), - GLOBALVAR_LINK(0x01E63694, "gmsgHostageK", pgmsgHostageK), - GLOBALVAR_LINK(0x01E63698, "gmsgGeigerRange", pgmsgGeigerRange), - GLOBALVAR_LINK(0x01E6369C, "gmsgSendCorpse", pgmsgSendCorpse), - GLOBALVAR_LINK(0x01E636A0, "gmsgHLTV", pgmsgHLTV), - GLOBALVAR_LINK(0x01E636A4, "gmsgSpecHealth", pgmsgSpecHealth), - GLOBALVAR_LINK(0x01E636A8, "gmsgForceCam", pgmsgForceCam), - GLOBALVAR_LINK(0x01E636AC, "gmsgADStop", pgmsgADStop), - GLOBALVAR_LINK(0x01E636B0, "gmsgReceiveW", pgmsgReceiveW), - GLOBALVAR_LINK(0x01E636B4, "gmsgScenarioIcon", pgmsgScenarioIcon), - GLOBALVAR_LINK(0x01E636B8, "gmsgBotVoice", pgmsgBotVoice), - GLOBALVAR_LINK(0x01E636BC, "gmsgBuyClose", pgmsgBuyClose), - GLOBALVAR_LINK(0x01E636C0, "gmsgItemStatus", pgmsgItemStatus), - GLOBALVAR_LINK(0x01E636C4, "gmsgLocation", pgmsgLocation), - GLOBALVAR_LINK(0x01E636C8, "gmsgSpecHealth2", pgmsgSpecHealth2), - GLOBALVAR_LINK(0x01E636CC, "gmsgBarTime2", pgmsgBarTime2), - GLOBALVAR_LINK(0x01E636D0, "gmsgBotProgress", pgmsgBotProgress), - GLOBALVAR_LINK(0x01E636D4, "gmsgBrass", pgmsgBrass), - GLOBALVAR_LINK(0x01E636D8, "gmsgFog", pgmsgFog), - GLOBALVAR_LINK(0x01E636DC, "gmsgShowTimer", pgmsgShowTimer), - GLOBALVAR_LINK(0x01E61B80, "g_psv_gravity", pg_psv_gravity), - GLOBALVAR_LINK(0x01E61B84, "g_psv_aim", pg_psv_aim),//TODO: unused, used cvar_t *sv_aim - GLOBALVAR_LINK(0x01E63598, "sv_aim", psv_aim), - GLOBALVAR_LINK(0x01E61E6C, "sv_clienttrace", psv_clienttrace), - GLOBALVAR_LINK(0x01E61E68, "_ZL15g_GameMgrHelper", pg_GameMgrHelper), - GLOBALVAR_LINK(0x01E22624, "voice_serverdebug", pvoice_serverdebug), - GLOBALVAR_LINK(0x01E22638, "sv_alltalk", psv_alltalk), - GLOBALVAR_LINK(0x01E75D20, "g_PlayerModEnable", pg_PlayerModEnable), - GLOBALVAR_LINK(0x01E75D28, "g_BanMasks", pg_BanMasks), - GLOBALVAR_LINK(0x01E75DA8, "g_SentGameRulesMasks", pg_SentGameRulesMasks), - GLOBALVAR_LINK(0x01E75E30, "g_SentBanMasks", pg_SentBanMasks), - GLOBALVAR_LINK(0x01E75E28, "g_bWantModEnable", pg_bWantModEnable), - GLOBALVAR_LINK(0x01E76580, "_ZL23s_tutorDisabledThisGame", ps_tutorDisabledThisGame), - GLOBALVAR_LINK(0x01E76584, "_ZL19s_nextCvarCheckTime", ps_nextCvarCheckTime), - GLOBALVAR_LINK(0x01E11214, "BotDifficultyName", pBotDifficultyName), - GLOBALVAR_LINK(0x01E61B88, "g_footsteps", pg_footsteps), - GLOBALVAR_LINK(0x01E61B8C, "g_psv_accelerate", pg_psv_accelerate), - GLOBALVAR_LINK(0x01E61B90, "g_psv_friction", pg_psv_friction), - GLOBALVAR_LINK(0x01E61B94, "g_psv_stopspeed", pg_psv_stopspeed), - GLOBALVAR_LINK(0x01E18738, "displaysoundlist", pdisplaysoundlist), - GLOBALVAR_LINK(0x01E18774, "timelimit", ptimelimit), - GLOBALVAR_LINK(0x01E1879C, "flashlight", pflashlight), - GLOBALVAR_LINK(0x01E187B0, "decalfrequency", pdecalfrequency), - GLOBALVAR_LINK(0x01E189A4, "fadetoblack", pfadetoblack), - GLOBALVAR_LINK(0x01E1874C, "fragsleft", pfragsleft), - GLOBALVAR_LINK(0x01E18760, "timeleft", ptimeleft), - GLOBALVAR_LINK(0x01E18788, "friendlyfire", pfriendlyfire), - GLOBALVAR_LINK(0x01E187C4, "allowmonsters", pallowmonsters), - GLOBALVAR_LINK(0x01E187D8, "roundtime", proundtime), - GLOBALVAR_LINK(0x01E187EC, "buytime", pbuytime), - GLOBALVAR_LINK(0x01E18800, "freezetime", pfreezetime), - GLOBALVAR_LINK(0x01E18814, "c4timer", pc4timer), - GLOBALVAR_LINK(0x01E18828, "ghostfrequency", pghostfrequency), - GLOBALVAR_LINK(0x01E1883C, "autokick", pautokick), - GLOBALVAR_LINK(0x01E18850, "autokick_timeout", pautokick_timeout), - GLOBALVAR_LINK(0x01E18864, "restartround", prestartround), - GLOBALVAR_LINK(0x01E18878, "sv_restart", psv_restart), - GLOBALVAR_LINK(0x01E1888C, "limitteams", plimitteams), - GLOBALVAR_LINK(0x01E188A0, "autoteambalance", pautoteambalance), - GLOBALVAR_LINK(0x01E188B4, "tkpunish", ptkpunish), - GLOBALVAR_LINK(0x01E188C8, "hostagepenalty", phostagepenalty), - GLOBALVAR_LINK(0x01E188DC, "mirrordamage", pmirrordamage), - GLOBALVAR_LINK(0x01E188F0, "logmessages", plogmessages), - GLOBALVAR_LINK(0x01E18904, "forcecamera", pforcecamera), - GLOBALVAR_LINK(0x01E18918, "forcechasecam", pforcechasecam), - GLOBALVAR_LINK(0x01E1892C, "mapvoteratio", pmapvoteratio), - GLOBALVAR_LINK(0x01E18940, "logdetail", plogdetail), - GLOBALVAR_LINK(0x01E18954, "startmoney", pstartmoney), - GLOBALVAR_LINK(0x01E18968, "maxrounds", pmaxrounds), - GLOBALVAR_LINK(0x01E1897C, "winlimit", pwinlimit), - GLOBALVAR_LINK(0x01E18990, "windifference", pwindifference), - GLOBALVAR_LINK(0x01E189B8, "playerid", pplayerid), - GLOBALVAR_LINK(0x01E189CC, "allow_spectators", pallow_spectators), - GLOBALVAR_LINK(0x01E189E0, "mp_chattime", pmp_chattime), - GLOBALVAR_LINK(0x01E189F4, "kick_percent", pkick_percent), - GLOBALVAR_LINK(0x01E18A08, "humans_join_team", phumans_join_team), - GLOBALVAR_LINK(0x01E195D4, "sk_plr_9mm_bullet1", psk_plr_9mm_bullet1), - GLOBALVAR_LINK(0x01E195E8, "sk_plr_9mm_bullet2", psk_plr_9mm_bullet2), - GLOBALVAR_LINK(0x01E195FC, "sk_plr_9mm_bullet3", psk_plr_9mm_bullet3), - GLOBALVAR_LINK(0x01E19610, "sk_plr_357_bullet1", psk_plr_357_bullet1), - GLOBALVAR_LINK(0x01E19624, "sk_plr_357_bullet2", psk_plr_357_bullet2), - GLOBALVAR_LINK(0x01E19638, "sk_plr_357_bullet3", psk_plr_357_bullet3), - GLOBALVAR_LINK(0x01E1964C, "sk_plr_9mmAR_bullet1", psk_plr_9mmAR_bullet1), - GLOBALVAR_LINK(0x01E19660, "sk_plr_9mmAR_bullet2", psk_plr_9mmAR_bullet2), - GLOBALVAR_LINK(0x01E19674, "sk_plr_9mmAR_bullet3", psk_plr_9mmAR_bullet3), - GLOBALVAR_LINK(0x01E19688, "sk_plr_9mmAR_grenade1", psk_plr_9mmAR_grenade1), - GLOBALVAR_LINK(0x01E1969C, "sk_plr_9mmAR_grenade2", psk_plr_9mmAR_grenade2), - GLOBALVAR_LINK(0x01E196B0, "sk_plr_9mmAR_grenade3", psk_plr_9mmAR_grenade3), - GLOBALVAR_LINK(0x01E196C4, "sk_plr_buckshot1", psk_plr_buckshot1), - GLOBALVAR_LINK(0x01E196D8, "sk_plr_buckshot2", psk_plr_buckshot2), - GLOBALVAR_LINK(0x01E196EC, "sk_plr_buckshot3", psk_plr_buckshot3), - GLOBALVAR_LINK(0x01E19778, "sk_plr_rpg1", psk_plr_rpg1), - GLOBALVAR_LINK(0x01E1978C, "sk_plr_rpg2", psk_plr_rpg2), - GLOBALVAR_LINK(0x01E197A0, "sk_plr_rpg3", psk_plr_rpg3), - GLOBALVAR_LINK(0x01E1991C, "sk_12mm_bullet1", psk_12mm_bullet1), - GLOBALVAR_LINK(0x01E19930, "sk_12mm_bullet2", psk_12mm_bullet2), - GLOBALVAR_LINK(0x01E19944, "sk_12mm_bullet3", psk_12mm_bullet3), - GLOBALVAR_LINK(0x01E19958, "sk_9mmAR_bullet1", psk_9mmAR_bullet1), - GLOBALVAR_LINK(0x01E1996C, "sk_9mmAR_bullet2", psk_9mmAR_bullet2), - GLOBALVAR_LINK(0x01E19980, "sk_9mmAR_bullet3", psk_9mmAR_bullet3), - GLOBALVAR_LINK(0x01E19994, "sk_9mm_bullet1", psk_9mm_bullet1), - GLOBALVAR_LINK(0x01E199A8, "sk_9mm_bullet2", psk_9mm_bullet2), - GLOBALVAR_LINK(0x01E199BC, "sk_9mm_bullet3", psk_9mm_bullet3), - GLOBALVAR_LINK(0x01E19A0C, "sk_suitcharger1", psk_suitcharger1), - GLOBALVAR_LINK(0x01E19A20, "sk_suitcharger2", psk_suitcharger2), - GLOBALVAR_LINK(0x01E19A34, "sk_suitcharger3", psk_suitcharger3), - GLOBALVAR_LINK(0x01E19A48, "sk_battery1", psk_battery1), - GLOBALVAR_LINK(0x01E19A5C, "sk_battery2", psk_battery2), - GLOBALVAR_LINK(0x01E19A70, "sk_battery3", psk_battery3), - GLOBALVAR_LINK(0x01E19A84, "sk_healthcharger1", psk_healthcharger1), - GLOBALVAR_LINK(0x01E19A98, "sk_healthcharger2", psk_healthcharger2), - GLOBALVAR_LINK(0x01E19AAC, "sk_healthcharger3", psk_healthcharger3), - GLOBALVAR_LINK(0x01E19AC0, "sk_healthkit1", psk_healthkit1), - GLOBALVAR_LINK(0x01E19AD4, "sk_healthkit2", psk_healthkit2), - GLOBALVAR_LINK(0x01E19AE8, "sk_healthkit3", psk_healthkit3), - GLOBALVAR_LINK(0x01E19AFC, "sk_scientist_heal1", psk_scientist_heal1), - GLOBALVAR_LINK(0x01E19B10, "sk_scientist_heal2", psk_scientist_heal2), - GLOBALVAR_LINK(0x01E19B24, "sk_scientist_heal3", psk_scientist_heal3), - GLOBALVAR_LINK(0x01E10738, "g_flBotCommandInterval", pg_flBotCommandInterval), - GLOBALVAR_LINK(0x01E1073C, "g_flBotFullThinkInterval", pg_flBotFullThinkInterval), - GLOBALVAR_LINK(0x01E61B44, "_ZL11gTankSpread", pgTankSpread), - GLOBALVAR_LINK(0x01E28A20, "BotArgs", pBotArgs), - GLOBALVAR_LINK(0x01E28A30, "UseBotArgs", pUseBotArgs), - GLOBALVAR_LINK(0x01E1E040, "g_weaponStruct", pg_weaponStruct), - GLOBALVAR_LINK(0x01E0EFF8, "cv_bot_traceview", pcv_bot_traceview), - GLOBALVAR_LINK(0x01E0F00C, "cv_bot_stop", pcv_bot_stop), - GLOBALVAR_LINK(0x01E0F020, "cv_bot_show_nav", pcv_bot_show_nav), - GLOBALVAR_LINK(0x01E0F034, "cv_bot_show_danger", pcv_bot_show_danger), - GLOBALVAR_LINK(0x01E0F048, "cv_bot_nav_edit", pcv_bot_nav_edit), - GLOBALVAR_LINK(0x01E0F05C, "cv_bot_nav_zdraw", pcv_bot_nav_zdraw), - GLOBALVAR_LINK(0x01E0F070, "cv_bot_walk", pcv_bot_walk), - GLOBALVAR_LINK(0x01E0F084, "cv_bot_difficulty", pcv_bot_difficulty), - GLOBALVAR_LINK(0x01E0F098, "cv_bot_debug", pcv_bot_debug), - GLOBALVAR_LINK(0x01E0F0AC, "cv_bot_quicksave", pcv_bot_quicksave), - GLOBALVAR_LINK(0x01E0F0C0, "cv_bot_quota", pcv_bot_quota), - GLOBALVAR_LINK(0x01E0F0D4, "cv_bot_quota_match", pcv_bot_quota_match), - GLOBALVAR_LINK(0x01E0F0E8, "cv_bot_prefix", pcv_bot_prefix), - GLOBALVAR_LINK(0x01E0F0FC, "cv_bot_allow_rogues", pcv_bot_allow_rogues), - GLOBALVAR_LINK(0x01E0F110, "cv_bot_allow_pistols", pcv_bot_allow_pistols), - GLOBALVAR_LINK(0x01E0F124, "cv_bot_allow_shotguns", pcv_bot_allow_shotguns), - GLOBALVAR_LINK(0x01E0F138, "cv_bot_allow_sub_machine_guns", pcv_bot_allow_sub_machine_guns), - GLOBALVAR_LINK(0x01E0F14C, "cv_bot_allow_rifles", pcv_bot_allow_rifles), - GLOBALVAR_LINK(0x01E0F160, "cv_bot_allow_machine_guns", pcv_bot_allow_machine_guns), - GLOBALVAR_LINK(0x01E0F174, "cv_bot_allow_grenades", pcv_bot_allow_grenades), - GLOBALVAR_LINK(0x01E0F188, "cv_bot_allow_snipers", pcv_bot_allow_snipers), - GLOBALVAR_LINK(0x01E0F19C, "cv_bot_allow_shield", pcv_bot_allow_shield), - GLOBALVAR_LINK(0x01E0F1B0, "cv_bot_join_team", pcv_bot_join_team), - GLOBALVAR_LINK(0x01E0F1C4, "cv_bot_join_after_player", pcv_bot_join_after_player), - GLOBALVAR_LINK(0x01E0F1D8, "cv_bot_auto_vacate", pcv_bot_auto_vacate), - GLOBALVAR_LINK(0x01E0F1EC, "cv_bot_zombie", pcv_bot_zombie), - GLOBALVAR_LINK(0x01E0F200, "cv_bot_defer_to_human", pcv_bot_defer_to_human), - GLOBALVAR_LINK(0x01E0F214, "cv_bot_chatter", pcv_bot_chatter), - GLOBALVAR_LINK(0x01E0F228, "cv_bot_profile_db", pcv_bot_profile_db), - GLOBALVAR_LINK(0x01E233BC, "cv_tutor_message_repeats", pcv_tutor_message_repeats), - GLOBALVAR_LINK(0x01E233D0, "cv_tutor_debug_level", pcv_tutor_debug_level), - GLOBALVAR_LINK(0x01E233E4, "cv_tutor_view_distance", pcv_tutor_view_distance), - GLOBALVAR_LINK(0x01E233F8, "cv_tutor_viewable_check_interval", pcv_tutor_viewable_check_interval), - GLOBALVAR_LINK(0x01E2340C, "cv_tutor_look_distance", pcv_tutor_look_distance), - GLOBALVAR_LINK(0x01E23420, "cv_tutor_look_angle", pcv_tutor_look_angle), - GLOBALVAR_LINK(0x01E23434, "cv_tutor_examine_time", pcv_tutor_examine_time), - GLOBALVAR_LINK(0x01E23448, "cv_tutor_message_minimum_display_time", pcv_tutor_message_minimum_display_time), - GLOBALVAR_LINK(0x01E2345C, "cv_tutor_message_character_display_time_coefficient", pcv_tutor_message_character_display_time_coefficient), - GLOBALVAR_LINK(0x01E23470, "cv_tutor_hint_interval_time", pcv_tutor_hint_interval_time), - GLOBALVAR_LINK(0x01E287F8, "_ZL12navAreaCount", pnavAreaCount), - GLOBALVAR_LINK(0x01E287FC, "_ZL12currentIndex", pcurrentIndex), - GLOBALVAR_LINK(0x01E2A3E8, "_ZN9CLocalNav15flNextCvarCheckE", CLocalNav::pflNextCvarCheck), - GLOBALVAR_LINK(0x01E2A3D8, "_ZN9CLocalNav12s_flStepSizeE", CLocalNav::ps_flStepSize), - GLOBALVAR_LINK(0x01E2A3EC, "_ZN9CLocalNav15flLastThinkTimeE", CLocalNav::pflLastThinkTime), - GLOBALVAR_LINK(0x01E2A3E4, "_ZN9CLocalNav7nodevalE", CLocalNav::pnodeval), - GLOBALVAR_LINK(0x01E2A3F0, "_ZN9CLocalNav12tot_hostagesE", CLocalNav::ptot_hostages), - GLOBALVAR_LINK(0x01E2A298, "_ZN9CLocalNav8hostagesE", CLocalNav::phostages), - GLOBALVAR_LINK(0x01E2A3E0, "_ZN9CLocalNav11tot_inqueueE", CLocalNav::ptot_inqueue), - GLOBALVAR_LINK(0x01E2A3DC, "_ZN9CLocalNav4qptrE", CLocalNav::pqptr), - GLOBALVAR_LINK(0x01E2A338, "_ZN9CLocalNav5queueE", CLocalNav::pqueue), - GLOBALVAR_LINK(0x01E17AD0, "_ZN10CBreakable13pSpawnObjectsE", CBreakable::ppSpawnObjects), - GLOBALVAR_LINK(0x01E17BA0, "_ZN10CBreakable11pSoundsWoodE", CBreakable::ppSoundsWood), - GLOBALVAR_LINK(0x01E17BAC, "_ZN10CBreakable12pSoundsFleshE", CBreakable::ppSoundsFlesh), - GLOBALVAR_LINK(0x01E17BC4, "_ZN10CBreakable12pSoundsMetalE", CBreakable::ppSoundsMetal), - GLOBALVAR_LINK(0x01E17BD0, "_ZN10CBreakable15pSoundsConcreteE", CBreakable::ppSoundsConcrete), - GLOBALVAR_LINK(0x01E17BDC, "_ZN10CBreakable12pSoundsGlassE", CBreakable::ppSoundsGlass), - GLOBALVAR_LINK(0x01E17C08, "_ZN9CPushable12m_soundNamesE", CPushable::pm_soundNames), - GLOBALVAR_LINK(0x01E1E00C, "_ZN8CDeadHEV9m_szPosesE", CDeadHEV::pm_szPoses), - GLOBALVAR_LINK(0x01E1DD88, "_ZN11CBasePlayer16m_playerSaveDataE", CBasePlayer::pm_playerSaveData), - GLOBALVAR_LINK(0x01E14A68, "_ZN11CBaseEntity10m_SaveDataE", CBaseEntity::pm_SaveData), - GLOBALVAR_LINK(0x01E22DAC, "_ZN12CGlobalState10m_SaveDataE", CGlobalState::pm_SaveData), - GLOBALVAR_LINK(0x01E14390, "_ZN9CEnvSpark10m_SaveDataE", CEnvSpark::pm_SaveData), - GLOBALVAR_LINK(0x01E14330, "_ZN19CMomentaryRotButton10m_SaveDataE", CMomentaryRotButton::pm_SaveData), - GLOBALVAR_LINK(0x01E14240, "_ZN10CEnvGlobal10m_SaveDataE", CEnvGlobal::pm_SaveData), - GLOBALVAR_LINK(0x01E1B4C0, "_ZN8CGrenade10m_SaveDataE", CGrenade::pm_SaveData), - GLOBALVAR_LINK(0x01E1B998, "_ZN9CWreckage10m_SaveDataE", CWreckage::pm_SaveData), - GLOBALVAR_LINK(0x01E1B968, "_ZN13CCyclerSprite10m_SaveDataE", CCyclerSprite::pm_SaveData), - GLOBALVAR_LINK(0x01E1B958, "_ZN7CCycler10m_SaveDataE", CCycler::pm_SaveData), - GLOBALVAR_LINK(0x01E1BE38, "_ZN6CLight10m_SaveDataE", CLight::pm_SaveData), - GLOBALVAR_LINK(0x01E1BB00, "_ZN11CWallHealth10m_SaveDataE", CWallHealth::pm_SaveData), - GLOBALVAR_LINK(0x01E1B850, "_ZN9CRecharge10m_SaveDataE", CRecharge::pm_SaveData), - GLOBALVAR_LINK(0x01E1C248, "_ZN16CFuncMortarField10m_SaveDataE", CFuncMortarField::pm_SaveData), - GLOBALVAR_LINK(0x01E17A08, "_ZN13CEnvExplosion10m_SaveDataE", CEnvExplosion::pm_SaveData), - GLOBALVAR_LINK(0x01E13F38, "_ZN13CFuncRotating10m_SaveDataE", CFuncRotating::pm_SaveData), - GLOBALVAR_LINK(0x01E13F88, "_ZN9CPendulum10m_SaveDataE", CPendulum::pm_SaveData), - GLOBALVAR_LINK(0x01E16FB0, "_ZN9CBaseDoor10m_SaveDataE", CBaseDoor::pm_SaveData), - GLOBALVAR_LINK(0x01E17020, "_ZN14CMomentaryDoor10m_SaveDataE", CMomentaryDoor::pm_SaveData), - GLOBALVAR_LINK(0x01E17B50, "_ZN10CBreakable10m_SaveDataE", CBreakable::pm_SaveData), - GLOBALVAR_LINK(0x01E17BE8, "_ZN9CPushable10m_SaveDataE", CPushable::pm_SaveData), - GLOBALVAR_LINK(0x01E18180, "_ZN9CFuncTank10m_SaveDataE", CFuncTank::pm_SaveData), - GLOBALVAR_LINK(0x01E18320, "_ZN14CFuncTankLaser10m_SaveDataE", CFuncTankLaser::pm_SaveData), - GLOBALVAR_LINK(0x01E18340, "_ZN17CFuncTankControls10m_SaveDataE", CFuncTankControls::pm_SaveData), - GLOBALVAR_LINK(0x01E22408, "_ZN12CFuncVehicle10m_SaveDataE", CFuncVehicle::pm_SaveData), - GLOBALVAR_LINK(0x01E1D2D8, "_ZN11CPathCorner10m_SaveDataE", CPathCorner::pm_SaveData), - GLOBALVAR_LINK(0x01E1D2E8, "_ZN10CPathTrack10m_SaveDataE", CPathTrack::pm_SaveData), - GLOBALVAR_LINK(0x01E1E01C, "_ZN12CRevertSaved10m_SaveDataE", CRevertSaved::pm_SaveData), - GLOBALVAR_LINK(0x01E1BF38, "_ZN11CRuleEntity10m_SaveDataE", CRuleEntity::pm_SaveData), - GLOBALVAR_LINK(0x01E1BF48, "_ZN9CGameText10m_SaveDataE", CGameText::pm_SaveData), - GLOBALVAR_LINK(0x01E1BF58, "_ZN15CGamePlayerZone10m_SaveDataE", CGamePlayerZone::pm_SaveData), - GLOBALVAR_LINK(0x01E20B10, "_ZN17CFrictionModifier10m_SaveDataE", CFrictionModifier::pm_SaveData), - GLOBALVAR_LINK(0x01E20B20, "_ZN12CAutoTrigger10m_SaveDataE", CAutoTrigger::pm_SaveData), - GLOBALVAR_LINK(0x01E20B40, "_ZN13CTriggerRelay10m_SaveDataE", CTriggerRelay::pm_SaveData), - GLOBALVAR_LINK(0x01E20B50, "_ZN13CMultiManager10m_SaveDataE", CMultiManager::pm_SaveData), - GLOBALVAR_LINK(0x01E20BA0, "_ZN12CChangeLevel10m_SaveDataE", CChangeLevel::pm_SaveData), - GLOBALVAR_LINK(0x01E20BE0, "_ZN20CTriggerChangeTarget10m_SaveDataE", CTriggerChangeTarget::pm_SaveData), - GLOBALVAR_LINK(0x01E20BF0, "_ZN14CTriggerCamera10m_SaveDataE", CTriggerCamera::pm_SaveData), - GLOBALVAR_LINK(0x01E208D8, "_ZN16CFuncWeaponCheck10m_SaveDataE", CFuncWeaponCheck::pm_SaveData), - GLOBALVAR_LINK(0x01E20888, "_ZN14CBaseGrenCatch10m_SaveDataE", CBaseGrenCatch::pm_SaveData), - GLOBALVAR_LINK(0x01E13228, "_ZN8CAirtank10m_SaveDataE", CAirtank::pm_SaveData), - GLOBALVAR_LINK(0x01E14270, "_ZN12CMultiSource10m_SaveDataE", CMultiSource::pm_SaveData), - GLOBALVAR_LINK(0x01E20538, "_ZN10CBaseDelay10m_SaveDataE", CBaseDelay::pm_SaveData), - GLOBALVAR_LINK(0x01E13438, "_ZN14CBaseAnimating10m_SaveDataE", CBaseAnimating::pm_SaveData), - GLOBALVAR_LINK(0x01E20558, "_ZN11CBaseToggle10m_SaveDataE", CBaseToggle::pm_SaveData), - GLOBALVAR_LINK(0x01E142B0, "_ZN11CBaseButton10m_SaveDataE", CBaseButton::pm_SaveData), - GLOBALVAR_LINK(0x01E20040, "_ZN15CAmbientGeneric10m_SaveDataE", CAmbientGeneric::pm_SaveData), - GLOBALVAR_LINK(0x01E20080, "_ZN9CEnvSound10m_SaveDataE", CEnvSound::pm_SaveData), - GLOBALVAR_LINK(0x01E200A0, "_ZN8CSpeaker10m_SaveDataE", CSpeaker::pm_SaveData), - GLOBALVAR_LINK(0x01E17258, "_ZN9CBubbling10m_SaveDataE", CBubbling::pm_SaveData), - GLOBALVAR_LINK(0x01E17288, "_ZN10CLightning10m_SaveDataE", CLightning::pm_SaveData), - GLOBALVAR_LINK(0x01E17358, "_ZN6CLaser10m_SaveDataE", CLaser::pm_SaveData), - GLOBALVAR_LINK(0x01E17388, "_ZN5CGlow10m_SaveDataE", CGlow::pm_SaveData), - GLOBALVAR_LINK(0x01E173A8, "_ZN7CSprite10m_SaveDataE", CSprite::pm_SaveData), - GLOBALVAR_LINK(0x01E173C8, "_ZN11CGibShooter10m_SaveDataE", CGibShooter::pm_SaveData), - GLOBALVAR_LINK(0x01E227AC, "_ZN15CBasePlayerItem10m_SaveDataE", CBasePlayerItem::pm_SaveData), - GLOBALVAR_LINK(0x01E227E0, "_ZN17CBasePlayerWeapon10m_SaveDataE", CBasePlayerWeapon::pm_SaveData), - GLOBALVAR_LINK(0x01E22850, "_ZN10CWeaponBox10m_SaveDataE", CWeaponBox::pm_SaveData), - GLOBALVAR_LINK(0x01E1D420, "_ZN14CBasePlatTrain10m_SaveDataE", CBasePlatTrain::pm_SaveData), - GLOBALVAR_LINK(0x01E1D450, "_ZN12CFuncPlatRot10m_SaveDataE", CFuncPlatRot::pm_SaveData), - GLOBALVAR_LINK(0x01E1D470, "_ZN10CFuncTrain10m_SaveDataE", CFuncTrain::pm_SaveData), - GLOBALVAR_LINK(0x01E1D4A0, "_ZN15CFuncTrackTrain10m_SaveDataE", CFuncTrackTrain::pm_SaveData), - GLOBALVAR_LINK(0x01E1D560, "_ZN16CFuncTrackChange10m_SaveDataE", CFuncTrackChange::pm_SaveData), - GLOBALVAR_LINK(0x01E1D5F0, "_ZN10CGunTarget10m_SaveDataE", CGunTarget::pm_SaveData), - GLOBALVAR_LINK(0x01E75FE0, "_ZN15CBasePlayerItem13ItemInfoArrayE", CBasePlayerItem::pm_ItemInfoArray), - GLOBALVAR_LINK(0x01E75ED8, "_ZN15CBasePlayerItem13AmmoInfoArrayE", CBasePlayerItem::pm_AmmoInfoArray), - GLOBALVAR_LINK(0x01E28816, "_ZN13CCSBotManager17m_isMapDataLoadedE", CCSBotManager::pm_isMapDataLoaded), - GLOBALVAR_LINK(0x01E28818, "_ZN13CCSBotManager9m_editCmdE", CCSBotManager::pm_editCmd), - GLOBALVAR_LINK(0x01E2881C, "_ZN13CCSBotManager17m_flNextCVarCheckE", CCSBotManager::pm_flNextCVarCheck), - GLOBALVAR_LINK(0x01E28814, "_ZN13CCSBotManager15m_isLearningMapE", CCSBotManager::pm_isLearningMap), - GLOBALVAR_LINK(0x01E28815, "_ZN13CCSBotManager21m_isAnalysisRequestedE", CCSBotManager::pm_isAnalysisRequested), - GLOBALVAR_LINK(0x01E233BC, "cv_tutor_message_repeats", pcv_tutor_message_repeats), - GLOBALVAR_LINK(0x01E233D0, "cv_tutor_debug_level", pcv_tutor_debug_level), - GLOBALVAR_LINK(0x01E233E4, "cv_tutor_view_distance", pcv_tutor_view_distance), - GLOBALVAR_LINK(0x01E233F8, "cv_tutor_viewable_check_interval", pcv_tutor_viewable_check_interval), - GLOBALVAR_LINK(0x01E2340C, "cv_tutor_look_distance", pcv_tutor_look_distance), - GLOBALVAR_LINK(0x01E23420, "cv_tutor_look_angle", pcv_tutor_look_angle), - GLOBALVAR_LINK(0x01E23434, "cv_tutor_examine_time", pcv_tutor_examine_time), - GLOBALVAR_LINK(0x01E23448, "cv_tutor_message_minimum_display_time", pcv_tutor_message_minimum_display_time), - GLOBALVAR_LINK(0x01E2345C, "cv_tutor_message_character_display_time_coefficient", pcv_tutor_message_character_display_time_coefficient), - GLOBALVAR_LINK(0x01E23470, "cv_tutor_hint_interval_time", pcv_tutor_hint_interval_time), - GLOBALVAR_LINK(0x01E11EE4, "cv_hostage_debug", pcv_hostage_debug), - GLOBALVAR_LINK(0x01E11EF8, "cv_hostage_stop", pcv_hostage_stop), - //GLOBALVAR_LINK(0x01E2A228, "_ZL14placeDirectory", pplaceDirectory), // DONT USE - NOXREF - GLOBALVAR_LINK(0x01E2A0E4, "TheNavLadderList", pTheNavLadderList), - GLOBALVAR_LINK(0x01E2A0F0, "TheHidingSpotList", pTheHidingSpotList), - GLOBALVAR_LINK(0x01E14C5C, "sPlayerModelFiles", psPlayerModelFiles), - GLOBALVAR_LINK(0x01E5D6F0, "g_flTimeLimit", pg_flTimeLimit), - GLOBALVAR_LINK(0x01E5D6F4, "g_flResetTime", pg_flResetTime), - GLOBALVAR_LINK(0x01E14C58, "g_bClientPrintEnable", pg_bClientPrintEnable), - GLOBALVAR_LINK(0x01E5D6F8, "g_skipCareerInitialSpawn", pg_skipCareerInitialSpawn), - GLOBALVAR_LINK(0x01E31768, "m_usResetDecals", pm_usResetDecals), - GLOBALVAR_LINK(0x01E31760, "g_iShadowSprite", pg_iShadowSprite), - GLOBALVAR_LINK(0x01E31770, "_ZL11g_PVSStatus", pg_PVSStatus), - GLOBALVAR_LINK(0x01E14C90, "_ZL18entity_field_alias", pentity_field_alias), - GLOBALVAR_LINK(0x01E14D68, "_ZL18player_field_alias", pplayer_field_alias), - GLOBALVAR_LINK(0x01E14DD8, "custom_entity_field_alias", pcustom_entity_field_alias), - //GLOBALVAR_LINK(0x01E5D718, "_ZL14g_serveractive", pg_serveractive), - GLOBALVAR_LINK(0x01E2A0A8, "_ZL17goodSizedAreaList", pgoodSizedAreaList), - GLOBALVAR_LINK(0x01E2A0D8, "TheNavAreaList", pTheNavAreaList), - GLOBALVAR_LINK(0x01E29888, "TheNavAreaGrid", pTheNavAreaGrid), - GLOBALVAR_LINK(0x01E11E88, "Opposite", pOpposite), - GLOBALVAR_LINK(0x01E2A250, "_ZN8CNavNode6m_listE", CNavNode::pm_list), - GLOBALVAR_LINK(0x01E2A254, "_ZN8CNavNode12m_listLengthE", CNavNode::pm_listLength), - GLOBALVAR_LINK(0x01E11584, "_ZN8CNavArea14m_masterMarkerE", CNavArea::pm_masterMarker), - GLOBALVAR_LINK(0x01E11588, "_ZN10HidingSpot8m_nextIDE", HidingSpot::pm_nextID), - GLOBALVAR_LINK(0x01E2A108, "_ZN10HidingSpot14m_masterMarkerE", HidingSpot::pm_masterMarker), - GLOBALVAR_LINK(0x01E11580, "_ZN8CNavArea8m_nextIDE", CNavArea::pm_nextID), - GLOBALVAR_LINK(0x01E2A100, "_ZN8CNavArea9m_isResetE", CNavArea::pm_isReset), - GLOBALVAR_LINK(0x01E2A0FC, "_ZN8CNavArea10m_openListE", CNavArea::pm_openList), - GLOBALVAR_LINK(0x01E2A104, "lastDrawTimestamp", plastDrawTimestamp), - GLOBALVAR_LINK(0x01E2A118, "_ZL13editTimestamp", peditTimestamp), - GLOBALVAR_LINK(0x01E2A10C, "_ZL10markedArea", pmarkedArea), - GLOBALVAR_LINK(0x01E2A110, "_ZL16lastSelectedArea", plastSelectedArea), - GLOBALVAR_LINK(0x01E1158C, "_ZL12markedCorner", pmarkedCorner), - GLOBALVAR_LINK(0x01E2A114, "_ZL17isCreatingNavArea", pisCreatingNavArea), - GLOBALVAR_LINK(0x01E2A115, "_ZL10isAnchored", pisAnchored), - GLOBALVAR_LINK(0x01E2A0C8, "_ZL6anchor", panchor), - GLOBALVAR_LINK(0x01E2A116, "_ZL11isPlaceMode", pisPlaceMode), - GLOBALVAR_LINK(0x01E2A117, "_ZL15isPlacePainting", pisPlacePainting), - GLOBALVAR_LINK(0x01E29CA4, "_ZL9BlockedID", pBlockedID), - GLOBALVAR_LINK(0x01E2A120, "_ZL14BlockedIDCount", pBlockedIDCount), - GLOBALVAR_LINK(0x01E14988, "_ZL14gFunctionTable", pgFunctionTable), - GLOBALVAR_LINK(0x01E14A50, "gNewDLLFunctions", pgNewDLLFunctions), - GLOBALVAR_LINK(0x01E28810, "TheBots", pTheBots), - GLOBALVAR_LINK(0x01E24950, "_ZL8taskInfo", ptaskInfo), - GLOBALVAR_LINK(0x01E76594, "TheCareerTasks", pTheCareerTasks), - GLOBALVAR_LINK(0x01E28C7C, "TheBotProfiles", pTheBotProfiles), - //GLOBALVAR_LINK(0x01E287CC, "g_pSelectedZombieSpawn", pg_pSelectedZombieSpawn), - GLOBALVAR_LINK(0x01E287F0, "TheBotPhrases", pTheBotPhrases), - GLOBALVAR_LINK(0x01E7657C, "TheTutor", pTheTutor), - GLOBALVAR_LINK(0x01E2A25C, "g_pHostages", pg_pHostages), - GLOBALVAR_LINK(0x01E2A258, "g_iHostageNumber", pg_iHostageNumber), - GLOBALVAR_LINK(0x01E16EE0, "_ZL11outputLevel", poutputLevel), - GLOBALVAR_LINK(0x01E61B40, "_ZL19theDebugOutputTypes", ptheDebugOutputTypes), - GLOBALVAR_LINK(0x01E61740, "_ZL14theDebugBuffer", ptheDebugBuffer), - //GLOBALVAR_LINK(0x01E75D04, "_ZL9g_LessCtx", pg_LessCtx), - GLOBALVAR_LINK(0x01E62670, "g_pevLastInflictor", pg_pevLastInflictor), - GLOBALVAR_LINK(0x01E62788, "g_pLastSpawn", pg_pLastSpawn), - GLOBALVAR_LINK(0x01E63590, "g_pLastCTSpawn", pg_pLastCTSpawn), - GLOBALVAR_LINK(0x01E63594, "g_pLastTerroristSpawn", pg_pLastTerroristSpawn), - //GLOBALVAR_LINK(0x01E62990, "_ZL11zombieSpawn", pzombieSpawn), - //GLOBALVAR_LINK(0x01E636E8, "_ZL16zombieSpawnCount", pzombieSpawnCount), - GLOBALVAR_LINK(0x01E13838, "svBlending", psvBlending), - GLOBALVAR_LINK(0x01E312D0, "IEngineStudio", pIEngineStudio), - GLOBALVAR_LINK(0x01E2DAA8, "g_pstudiohdr", pg_pstudiohdr), - GLOBALVAR_LINK(0x01E2F8C0, "g_pRotationMatrix", pg_pRotationMatrix), - GLOBALVAR_LINK(0x01E2F8B0, "g_pBoneTransform", pg_pBoneTransform), - GLOBALVAR_LINK(0x01E0DF70, "primaryWeaponBuyInfoCT", pprimaryWeaponBuyInfoCT), - GLOBALVAR_LINK(0x01E0E00C, "secondaryWeaponBuyInfoCT", psecondaryWeaponBuyInfoCT), - GLOBALVAR_LINK(0x01E0E030, "primaryWeaponBuyInfoT", pprimaryWeaponBuyInfoT), - GLOBALVAR_LINK(0x01E0E0CC, "secondaryWeaponBuyInfoT", psecondaryWeaponBuyInfoT), - GLOBALVAR_LINK(0x01E287E8, "_ZN19BotChatterInterface16m_encourageTimerE", BotChatterInterface::pm_encourageTimer), - GLOBALVAR_LINK(0x01E287E0, "_ZN19BotChatterInterface22m_radioSilenceIntervalE", BotChatterInterface::pm_radioSilenceInterval), - //GLOBALVAR_LINK(0x01E2F8BC, "omega", pomega), // LOCAL - //GLOBALVAR_LINK(0x01E312E0, "cosom", pcosom), // LOCAL - //GLOBALVAR_LINK(0x01E306C8, "sinom", psinom), // LOCAL - //GLOBALVAR_LINK(0x01E2F8B4, "sclp", psclp), // LOCAL - //GLOBALVAR_LINK(0x01E2F8B8, "sclq", psclq), // LOCAL - -#endif // Data_References_Region - - { 0, nullptr, 0, 0, false } -}; diff --git a/regamedll/hookers/hooklist.h b/regamedll/hookers/hooklist.h deleted file mode 100644 index 928f9eec..00000000 --- a/regamedll/hookers/hooklist.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include "hookers/memory.h" -#include "hookers/helper.h" -#include "hookers/hooker.h" - -#define _LOG_TRACE\ - static int iNumPassed = 0;\ - UTIL_ServerPrint("%s:: iNumPassed - %d", __func__, iNumPassed++); - -#define _LOG_TRACE2\ - static int iNumPassed2 = 0;\ - UTIL_ServerPrint("%s:: iNumPassed - %d", __func__, iNumPassed2++);\ - UTIL_Log("%s:: iNumPassed - %d", __func__, iNumPassed2++); - -#ifdef HOOK_GAMEDLL - // STL containers Visual Studio 6.0 - #include "stl/vector" - #include "stl/list" - - #define STD_LIST list_vs6 // use STL containers of the old version from Visual Studio 6.0 sp6 - #define STD_VECTOR vector_vs6 -#else - #define STD_LIST list - #define STD_VECTOR vector -#endif // HOOK_GAMEDLL diff --git a/regamedll/hookers/main.cpp b/regamedll/hookers/main.cpp deleted file mode 100644 index 52c7c5bc..00000000 --- a/regamedll/hookers/main.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/* -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -*/ - -#include "precompiled.h" -#include "FileSystem.h" - -#ifdef _WIN32 - #include -#else - #include -#endif - -#define GIVEFNPTRS_TO_DLL_PROCNAME "GiveFnptrsToDll" - -#ifdef _WIN32 - #define ORIGINAL_ENGINE_DLL_NAME "swds.dll" - #define ORIGINAL_GAME_DLL_NAME "mp.dll" - #define ORIGINAL_FILESYSTEM_DLL_NAME "filesystem_stdio2.dll" -#else - #define ORIGINAL_ENGINE_DLL_NAME "engine_i486.so" - #define ORIGINAL_GAME_DLL_NAME "cs.so" - #define ORIGINAL_FILESYSTEM_DLL_NAME "filesystem_stdio2.so" -#endif - -IBaseInterface *CreateFileSystemInterface(); -InterfaceReg iface = InterfaceReg(CreateFileSystemInterface, "VFileSystem009"); - -int HookGameDLL(size_t gameAddr, size_t engAddr); - -CSysModule *g_pOriginalFileSystemModule = NULL; -CSysModule *g_pOriginalGameDLLModule = NULL; - -CreateInterfaceFn g_OriginalFileSystemFactory = NULL; -IFileSystem *g_pOriginalFileSystem = NULL; - -IBaseInterface *CreateFileSystemInterface() -{ - if (g_pOriginalFileSystem) - return g_pOriginalFileSystem; - - if (g_pOriginalFileSystemModule) - { - g_OriginalFileSystemFactory = Sys_GetFactory(g_pOriginalFileSystemModule); - if (g_OriginalFileSystemFactory) - { - int returnCode = 0; - g_pOriginalFileSystem = reinterpret_cast(g_OriginalFileSystemFactory(FILESYSTEM_INTERFACE_VERSION, &returnCode)); - return g_pOriginalFileSystem; - } - } - - return NULL; -} - -const char *shrPathGameDLL() -{ - static char szDllFilename[ MAX_PATH ]; - -#ifdef _WIN32 - _getcwd(szDllFilename, MAX_PATH); -#else - getcwd(szDllFilename, MAX_PATH); -#endif - - if (g_ReGameDLLRuntimeConfig.IsCzero()) - Q_strcat(szDllFilename, "\\czero\\dlls\\" ORIGINAL_GAME_DLL_NAME); - else - Q_strcat(szDllFilename, "\\cstrike\\dlls\\" ORIGINAL_GAME_DLL_NAME); - - return (const char *)szDllFilename; -} - -#ifdef _WIN32 -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - if (fdwReason == DLL_PROCESS_ATTACH) - { -#ifdef HOOK_GAMEDLL - g_ReGameDLLRuntimeConfig.parseFromCommandLine(GetCommandLineA()); - - g_pOriginalGameDLLModule = Sys_LoadModule(shrPathGameDLL()); - g_pOriginalFileSystemModule = Sys_LoadModule(ORIGINAL_FILESYSTEM_DLL_NAME); - - size_t gameAddr = (size_t)Sys_GetProcAddress((void *)g_pOriginalGameDLLModule, GIVEFNPTRS_TO_DLL_PROCNAME); - size_t engAddr = (size_t)Sys_GetProcAddress(ORIGINAL_ENGINE_DLL_NAME, CREATEINTERFACE_PROCNAME); - - HookGameDLL(gameAddr, engAddr); -#endif - } - else if (fdwReason == DLL_PROCESS_DETACH) - { - if (g_pOriginalFileSystemModule) - { - Sys_UnloadModule(g_pOriginalFileSystemModule); - g_pOriginalFileSystemModule = NULL; - g_OriginalFileSystemFactory = NULL; - g_pOriginalFileSystem = NULL; - } - if (g_pOriginalGameDLLModule) - { - Sys_UnloadModule(g_pOriginalGameDLLModule); - g_pOriginalGameDLLModule = NULL; - } - } - - return TRUE; -} -#else // _WIN32 -void __attribute__((constructor)) DllMainLoad() -{ - g_pOriginalGameDLLModule = Sys_LoadModule(shrPathGameDLL()); - g_pOriginalFileSystemModule = Sys_LoadModule(ORIGINAL_FILESYSTEM_DLL_NAME); - - size_t gameAddr = (size_t)Sys_GetProcAddress((void *)g_pOriginalGameDLLModule, GIVEFNPTRS_TO_DLL_PROCNAME); - size_t engAddr = (size_t)Sys_GetProcAddress(ORIGINAL_ENGINE_DLL_NAME, CREATEINTERFACE_PROCNAME); - - HookGameDLL(gameAddr, engAddr); -} -void __attribute__((destructor)) DllMainUnload() -{ - if (g_pOriginalFileSystemModule) - { - Sys_UnloadModule(g_pOriginalFileSystemModule); - g_pOriginalFileSystemModule = NULL; - g_OriginalFileSystemFactory = NULL; - g_pOriginalFileSystem = NULL; - } - if (g_pOriginalGameDLLModule) - { - Sys_UnloadModule(g_pOriginalGameDLLModule); - g_pOriginalGameDLLModule = NULL; - } -} -#endif // _WIN32 diff --git a/regamedll/hookers/memory.cpp b/regamedll/hookers/memory.cpp deleted file mode 100644 index 474296f4..00000000 --- a/regamedll/hookers/memory.cpp +++ /dev/null @@ -1,924 +0,0 @@ -/* -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -*/ - -#include "precompiled.h" - -#ifdef _WIN32 - -#ifdef _MSC_VER -#pragma comment(lib, "psapi.lib") // Process Status API -#endif // _MSC_VER - -bool HIDDEN FindModuleByAddress(size_t addr, Module *module) -{ - if (!module) - return false; - - MEMORY_BASIC_INFORMATION mem; - VirtualQuery((void *)addr, &mem, sizeof(mem)); - - IMAGE_DOS_HEADER *dos = (IMAGE_DOS_HEADER*)mem.AllocationBase; - IMAGE_NT_HEADERS *pe = (IMAGE_NT_HEADERS*)((unsigned long)dos + (unsigned long)dos->e_lfanew); - - if (pe->Signature != IMAGE_NT_SIGNATURE) - return false; - - module->base = (size_t)mem.AllocationBase; - module->size = (size_t)pe->OptionalHeader.SizeOfImage; - module->end = module->base + module->size - 1; - module->handle = NULL; - - ProcessModuleData(module); - - return true; -} - -bool HIDDEN FindModuleByName(const char *moduleName, Module *module) -{ - if (!moduleName || !*moduleName || !module) - return false; - - HANDLE hProcess = GetCurrentProcess(); - HMODULE hModuleDll = GetModuleHandle(moduleName); - - if (!hProcess || !hModuleDll) - return false; - - MODULEINFO moduleInfo; - GetModuleInformation(hProcess, hModuleDll, &moduleInfo, sizeof(moduleInfo)); - - module->base = (size_t)moduleInfo.lpBaseOfDll; - module->size = (size_t)moduleInfo.SizeOfImage; - module->end = module->base + module->size - 1; - module->handle = NULL; - - ProcessModuleData(module); - - return true; -} - -#else // _WIN32 - -static Section _initialSection = {}; // will hold all process memory sections - -// Parses /proc/PID/maps file for the process memory sections. -bool HIDDEN ReloadProcessMemoryInfo() -{ - Section *section = _initialSection.next; - while (section != NULL) - { - Section *next = section->next; - delete section; - section = next; - } - _initialSection.next = NULL; - - char file[_MAX_FNAME]; - char buffer[2048]; - - pid_t pid = getpid(); - snprintf(file, sizeof(file), "/proc/%d/maps", pid); - file[sizeof(file)-1] = 0; - - FILE *fp = fopen(file, "rt"); - if (!fp) - return false; - - static char mbuffer[65536]; - setbuffer(fp, mbuffer, sizeof(mbuffer)); - - size_t length = 0; - size_t start, end, size; - char accessProtection[5]; - int inode; - int fields; - section = &_initialSection; - while (!feof(fp)) - { - if (fgets(buffer, sizeof(buffer), fp) == NULL) - break; - - fields = sscanf(buffer, "%lx-%lx %4s %*s %*s %d %255s", &start, &end, accessProtection, &inode, file); - //printf("%lx-%lx %4s %d %s\n", start, end, accessProtection, inode, fields > 4 ? file : ""); - if (fields < 4) - return false; - - section->next = new Section; - section = section->next; - section->next = NULL; - section->start = start; - section->end = end; - section->size = end - start; - section->protection = 0; - if (accessProtection[0] == 'r') section->protection |= PROT_READ; - if (accessProtection[1] == 'w') section->protection |= PROT_WRITE; - if (accessProtection[2] == 'x') section->protection |= PROT_EXEC; - section->inode = inode; - if (fields > 4) - { - strncpy(section->filename, file, _MAX_FNAME); - section->filename[_MAX_FNAME - 1] = 0; - section->namelen = strlen(section->filename); - } - else - { - section->filename[0] = 0; - section->namelen = 0; - } - } - - fclose(fp); - - return true; -} - -// Finds section by the address. -Section* HIDDEN FindSectionByAddress(size_t addr) -{ - Section *section = _initialSection.next; - while (section != NULL) - { - if (section->start <= addr && addr < section->end) - break; - section = section->next; - } - return section; -} - -// Finds section by the file name. -Section* HIDDEN FindSectionByName(const char *moduleName) -{ - int len = strlen(moduleName); - Section *section = _initialSection.next; - while (section != NULL) - { - if (len < section->namelen && - section->filename[section->namelen - len - 1] == '/' && - !_stricmp(section->filename + section->namelen - len, moduleName)) - break; - section = section->next; - } - return section; -} - -// Finds section by the address. -Section* HIDDEN GetSectionByAddress(size_t addr) -{ - Section *section = FindSectionByAddress(addr); - if (section == NULL) - { - // Update sections info - if (!ReloadProcessMemoryInfo()) - return NULL; - section = FindSectionByAddress(addr); - } - return section; -} - -// Finds section by the file name. -Section* HIDDEN GetSectionByName(const char *moduleName) -{ - Section *section = FindSectionByName(moduleName); - if (section == NULL) - { - // Update sections info - if (!ReloadProcessMemoryInfo()) - return NULL; - section = FindSectionByName(moduleName); - } - return section; -} - -// Fills module structure by info from the sections. Should be supplied with the first module section. -bool HIDDEN FillModule(Section *section, Module *module) -{ - if (!section || !module) - return false; - - size_t base = section->start; - size_t end = section->end; - char *filename = section->filename; - - // Iterate thru next sections to find the end - section = section->next; - while (section != NULL) - { - if (end != section->start) // not adjacent sections - we don't support this - return false; - else if (section->inode == 0) // end of the module memory - break; - else - end = section->end; - section = section->next; - } - - //printf("%s: %lx-%lx\n", filename, base, end); - - module->base = base; - module->size = end - base; - module->end = module->base + module->size - 1; - module->handle = (size_t)dlopen(filename, RTLD_NOW); // lock from unloading - - ProcessModuleData(module); - - return true; -} - -bool HIDDEN FindModuleByAddress(size_t addr, Module *module) -{ - if (!module) - return false; - - Section *section = GetSectionByAddress(addr); - if (section == NULL) - return false; - - if (section->filename[0] != '/') // should point to a real file - return false; - - // Start over with the name to find module start - return FindModuleByName(section->filename + 1, module); -} - -bool HIDDEN FindModuleByName(const char *moduleName, Module *module) -{ - if (!moduleName || !*moduleName || !module) - return false; - - Section *section = GetSectionByName(moduleName); - if (section == NULL) - return false; - - return FillModule(section, module); -} - -#endif // _WIN32 - - -#ifdef _WIN32 - -inline size_t HIDDEN FindSymbol(Module *module, const char* symbolName, int index) -{ - return NULL; -} - -#else // _WIN32 - -size_t HIDDEN FindSymbol(Module *module, const char* symbolName, int index) -{ - int i; - link_map *dlmap; - struct stat dlstat; - int dlfile; - uintptr_t map_base; - Elf32_Ehdr *file_hdr; - Elf32_Shdr *sections, *shstrtab_hdr, *symtab_hdr, *strtab_hdr; - Elf32_Sym *symtab; - const char *shstrtab, *strtab; - uint16 section_count; - uint32 symbol_count; - size_t address; - - // If index > 0 then we shouldn't use dlsym, cos it will give wrong result - if (index == 0) - { - address = (size_t)dlsym((void *)module->handle, symbolName); - if (address != NULL) - return address; - } - - dlmap = (struct link_map *)module->handle; - symtab_hdr = NULL; - strtab_hdr = NULL; - - dlfile = open(dlmap->l_name, O_RDONLY); - if (dlfile == -1 || fstat(dlfile, &dlstat) == -1) - { - close(dlfile); - return NULL; - } - - // Map library file into memory - file_hdr = (Elf32_Ehdr *)mmap(NULL, dlstat.st_size, PROT_READ, MAP_PRIVATE, dlfile, 0); - map_base = (uintptr_t)file_hdr; - close(dlfile); - if (file_hdr == MAP_FAILED) - { - return NULL; - } - - if (file_hdr->e_shoff == 0 || file_hdr->e_shstrndx == SHN_UNDEF) - { - munmap(file_hdr, dlstat.st_size); - return NULL; - } - - sections = (Elf32_Shdr *)(map_base + file_hdr->e_shoff); - section_count = file_hdr->e_shnum; - // Get ELF section header string table - shstrtab_hdr = §ions[file_hdr->e_shstrndx]; - shstrtab = (const char *)(map_base + shstrtab_hdr->sh_offset); - - // Iterate sections while looking for ELF symbol table and string table - for (uint16 i = 0; i < section_count; i++) - { - Elf32_Shdr &hdr = sections[i]; - const char *section_name = shstrtab + hdr.sh_name; - //printf("Seg[%d].name = '%s'\n", i, section_name); - - if (strcmp(section_name, ".symtab") == 0) - { - symtab_hdr = &hdr; - } - else if (strcmp(section_name, ".strtab") == 0) - { - strtab_hdr = &hdr; - } - } - - if (symtab_hdr == NULL || strtab_hdr == NULL) - { - munmap(file_hdr, dlstat.st_size); - return NULL; - } - - symtab = (Elf32_Sym *)(map_base + symtab_hdr->sh_offset); - strtab = (const char *)(map_base + strtab_hdr->sh_offset); - symbol_count = symtab_hdr->sh_size / symtab_hdr->sh_entsize; - - int mangleNameLength; - int mangleNameLastLength = 1024; // Is it enouph? - - // If index is 0 then we need to take first entry - if (index == 0) index++; - - // Iterate symbol table - int match = 1; - for (uint32 i = 0; i < symbol_count; i++) - { - Elf32_Sym &sym = symtab[i]; - unsigned char sym_type = ELF32_ST_TYPE(sym.st_info); - const char *sym_name = strtab + sym.st_name; - - // Skip symbols that are undefined or do not refer to functions or objects - if (sym.st_shndx == SHN_UNDEF || (sym_type != STT_FUNC && sym_type != STT_OBJECT)) - { - continue; - } - - if (strcmp(sym_name, symbolName) == 0) - { - if (match == index) - { - address = (size_t)(dlmap->l_addr + sym.st_value); - break; - } - else - { - match++; - } - } - // Try to find lowest length mangled name then - if (sym_name[0] == '_' && sym_name[1] == 'Z' && strstr(sym_name + 2, symbolName) != NULL && (mangleNameLength = strlen(sym_name)) < mangleNameLastLength) - { - mangleNameLastLength = mangleNameLength; - address = (size_t)(dlmap->l_addr + sym.st_value); -#ifdef _DEBUG - printf("FindSymbol (mangled name): symbol: \"%s\", address: %lx\n", sym_name, address); -#endif - } - } - - munmap(file_hdr, dlstat.st_size); - -#ifdef _DEBUG - printf("FindSymbol (elf): symbol: \"%s\", address: %lx\n", symbolName, address); -#endif - - return address; -} - -#endif // _WIN32 - -#ifdef _WIN32 -void ProcessModuleData(Module *module) -{ - int i = 0; - PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER)module->base; - if (dosHeader->e_magic != IMAGE_DOS_SIGNATURE) { - Sys_Error("%s: Invalid DOS header signature", __func__); - return; - } - - PIMAGE_NT_HEADERS NTHeaders = (PIMAGE_NT_HEADERS)((size_t)module->base + dosHeader->e_lfanew); - if (NTHeaders->Signature != 0x4550) { - Sys_Error("%s: Invalid NT header signature", __func__); - return; - } - - PIMAGE_SECTION_HEADER cSection = (PIMAGE_SECTION_HEADER)((size_t)(&NTHeaders->OptionalHeader) + NTHeaders->FileHeader.SizeOfOptionalHeader); - - PIMAGE_SECTION_HEADER CodeSection = NULL; - - for (i = 0; i < NTHeaders->FileHeader.NumberOfSections; i++, cSection++) { - if (cSection->VirtualAddress == NTHeaders->OptionalHeader.BaseOfCode) - CodeSection = cSection; - } - - if (CodeSection == NULL) { - Sys_Error("%s: Code section not found", __func__); - return; - } - - module->codeSection.start = (uint32)module->base + CodeSection->VirtualAddress; - module->codeSection.size = CodeSection->Misc.VirtualSize; - module->codeSection.end = module->codeSection.start + module->codeSection.size; - module->codeSection.next = NULL; -} - -#else // _WIN32 - -void ProcessModuleData(Module *module) -{ - -} - -#endif // _WIN32 - -#ifdef _WIN32 - -static DWORD oldPageProtection; - -inline bool HIDDEN EnablePageWrite(size_t addr, size_t size) -{ - return VirtualProtect((void *)addr, size, PAGE_EXECUTE_READWRITE, &oldPageProtection) != 0; -} - -inline bool HIDDEN RestorePageProtection(size_t addr, size_t size) -{ - bool ret = VirtualProtect((void *)addr, size, oldPageProtection, &oldPageProtection) != 0; - FlushInstructionCache(GetCurrentProcess(), (void *)addr, size); - return ret; -} - -#else // _WIN32 - -bool HIDDEN EnablePageWrite(size_t addr, size_t size) -{ - size_t alignedAddr = ALIGN(addr); - size += addr - alignedAddr; - return mprotect((void *)alignedAddr, size, PROT_READ | PROT_WRITE | PROT_EXEC) == 0; -} - -bool HIDDEN RestorePageProtection(size_t addr, size_t size) -{ - Section *section = GetSectionByAddress(addr); - if (section == NULL) - return false; - size_t alignedAddr = ALIGN(addr); - size += addr - alignedAddr; - return mprotect((void *)alignedAddr, size, section->protection) == 0; -} - -#endif // _WIN32 - -// Converts HEX string containing pairs of symbols 0-9, A-F, a-f with possible space splitting into byte array -size_t HIDDEN ConvertHexString(const char *srcHexString, unsigned char *outBuffer, size_t bufferSize) -{ - unsigned char *in = (unsigned char *)srcHexString; - unsigned char *out = outBuffer; - unsigned char *end = outBuffer + bufferSize; - bool low = false; - uint8 byte = 0; - while (*in && out < end) - { - if (*in >= '0' && *in <= '9') { byte |= *in - '0'; } - else if (*in >= 'A' && *in <= 'F') { byte |= *in - 'A' + 10; } - else if (*in >= 'a' && *in <= 'f') { byte |= *in - 'a' + 10; } - else if (*in == ' ') { in++; continue; } - - if (!low) - { - byte = byte << 4; - in++; - low = true; - continue; - } - low = false; - - *out = byte; - byte = 0; - - in++; - out++; - } - return out - outBuffer; -} - -size_t HIDDEN MemoryFindForward(size_t start, size_t end, const unsigned char *pattern, const unsigned char *mask, size_t len) -{ - // Ensure start is lower than the end - if (start > end) - { - size_t reverse = end; - end = start; - start = reverse; - } - - unsigned char *cend = (unsigned char*)(end - len + 1); - unsigned char *current = (unsigned char*)(start); - - // Just linear search for sequence of bytes from the start till the end minus pattern length - size_t i; - if (mask) - { - // honoring mask - while (current < cend) - { - for (i = 0; i < len; i++) - { - if ((current[i] & mask[i]) != (pattern[i] & mask[i])) - break; - } - - if (i == len) - return (size_t)(void*)current; - - current++; - } - } - else - { - // without mask - while (current < cend) - { - for (i = 0; i < len; i++) - { - if (current[i] != pattern[i]) - break; - } - - if (i == len) - return (size_t)(void*)current; - - current++; - } - } - - return NULL; -} - -size_t HIDDEN MemoryFindBackward(size_t start, size_t end, const unsigned char *pattern, const unsigned char *mask, size_t len) -{ - // Ensure start is higher than the end - if (start < end) - { - size_t reverse = end; - end = start; - start = reverse; - } - - unsigned char *cend = (unsigned char*)(end); - unsigned char *current = (unsigned char*)(start - len); - - // Just linear search backward for sequence of bytes from the start minus pattern length till the end - size_t i; - if (mask) - { - // honoring mask - while (current >= cend) - { - for (i = 0; i < len; i++) - { - if ((current[i] & mask[i]) != (pattern[i] & mask[i])) - break; - } - - if (i == len) - return (size_t)(void*)current; - - current--; - } - } - else - { - // without mask - while (current >= cend) - { - for (i = 0; i < len; i++) - { - if (current[i] != pattern[i]) - break; - } - - if (i == len) - return (size_t)(void*)current; - - current--; - } - } - - return NULL; -} - -size_t HIDDEN MemoryFindRefForwardPrefix8(size_t start, size_t end, size_t refAddress, uint8 prefixValue, bool relative) -{ - // Ensure start is lower than the end - if (start > end) - { - size_t reverse = end; - end = start; - start = reverse; - } - - unsigned char *cend = (unsigned char*)(end - 5 + 1); - unsigned char *current = (unsigned char*)(start); - - // Just linear search for sequence of bytes from the start till the end minus pattern length - while (current < cend) - { - if (*current == prefixValue) - { - if (relative) - { - if ((size_t)(*(size_t *)(current + 1) + current + 5) == refAddress) - return (size_t)(void*)current; - } - else - { - if (*(size_t *)(current + 1) == refAddress) - return (size_t)(void*)current; - } - } - current++; - } - - return NULL; -} - -// Replaces double word on specified address with a new dword, returns old dword -uint32 HIDDEN HookDWord(size_t addr, uint32 newDWord) -{ - uint32 origDWord = *(size_t *)addr; - EnablePageWrite(addr, sizeof(uint32)); - *(size_t *)addr = newDWord; - RestorePageProtection(addr, sizeof(uint32)); - return origDWord; -} - -// Exchanges bytes between memory address and bytes array -void HIDDEN ExchangeMemoryBytes(size_t origAddr, size_t dataAddr, uint32 size) -{ - EnablePageWrite(origAddr, size); - unsigned char data[MAX_PATTERN]; - int32 iSize = size; - while (iSize > 0) - { - size_t s = iSize <= MAX_PATTERN ? iSize : MAX_PATTERN; - memcpy(data, (void *)origAddr, s); - memcpy((void *)origAddr, (void *)dataAddr, s); - memcpy((void *)dataAddr, data, s); - iSize -= MAX_PATTERN; - } - RestorePageProtection(origAddr, size); -} - -bool HIDDEN GetAddress(Module *module, Address *addr, size_t baseOffset) -{ - if (addr->originalAddress == NULL || baseOffset == NULL) - { - if (addr->symbolName != NULL) - { - // Find address under Linux - size_t address = FindSymbol(module, addr->symbolName, addr->symbolIndex); - if (address == NULL) - return false; - addr->originalAddress = address; - } - else - { - return false; - } - } - else - { - addr->originalAddress += module->base - baseOffset; - } - - return true; -} - -#if HOOK_GAMEDLL -void *addr_orig; -char patchByte[5]; -char patchByteOriginal[5]; -#endif - -bool HIDDEN HookFunction(Module *module, FunctionHook *hook) -{ - if (hook->originalAddress == NULL) - return false; - - // Calculate and store offset for jump to our handler - unsigned char patch[5]; - *(size_t *)&patch[1] = hook->handlerFunc - hook->originalAddress - 5; - patch[0] = 0xE9; - -#if HOOK_GAMEDLL - //static DWORD oldProtection; - ///VirtualProtect(addr_orig,5,PAGE_EXECUTE_READWRITE,&oldProtection); - //memcpy(addr_orig,patchByteOriginal,5); - //pWeaponUSP(a); - //int seedad = pUTIL_SharedRandomLong(seed,low,high); - //memcpy(addr_orig,patchByte,5); - - if (strcmp(hook->symbolName, "_ZN25HostageEscapeToCoverState15OnMoveToFailureERK6VectorN12IImprovEvent17MoveToFailureTypeE") == 0) - { - addr_orig = (void *)hook->originalAddress; - - memcpy(patchByte,patch,5); - memcpy(patchByteOriginal,addr_orig,5); - } -#endif - ExchangeMemoryBytes(hook->originalAddress, (size_t)patch, 5); - - hook->bIsHooked = true; - return true; -} - -void HIDDEN HookFunctionCall(void* hookWhat, void* hookAddr) -{ - unsigned char patch[5]; - *(size_t *)&patch[1] = (size_t)hookAddr - (size_t)hookWhat - 5; - patch[0] = 0xE8; - - ExchangeMemoryBytes((size_t)hookWhat, (size_t)patch, 5); -} - -bool HIDDEN FindDataRef(Module *module, AddressRef *ref) -{ - if (ref->originalAddress == NULL) - return false; - - if (ref->addressRef) { - if (ref->reverse) - *(size_t*)ref->originalAddress = *(size_t*)ref->addressRef; - else - *(size_t*)ref->addressRef = ref->originalAddress; - } - - return true; -} - -#ifdef _WIN32 -void FindAllCalls(Section* section, CFuncAddr** calls, uint32 findRefsTo) -{ - uint32 coderef_addr = section->start; - coderef_addr = MemoryFindRefForwardPrefix8(coderef_addr, section->end, findRefsTo, 0xE8, true); - while (coderef_addr) { - CFuncAddr* cfa = new CFuncAddr(coderef_addr); - cfa->Next = *calls; - *calls = cfa; - - coderef_addr = MemoryFindRefForwardPrefix8(coderef_addr + 1, section->end, findRefsTo, 0xE8, true); - } -} -#endif // _WIN32 - -template -size_t vtable_size(const T &t) -{ - typedef void Function(); - Function *const *const vtable = reinterpret_cast(t); - size_t size = 0; - - byte first_addr_byte = '\x2A'; - - while (vtable[size]) - { - byte addr_byte = *((byte *)(&vtable[size]) + 3); - - if (first_addr_byte == '\x2A') - first_addr_byte = addr_byte; - - if (addr_byte != first_addr_byte) - break; - - ++size; - } - - return size; -} - -const char *stripClass(const char *str) -{ - const int BufLen = 256; - static char string[ BufLen ]; - const char pattern[] = "class "; - - int curlen = Q_strlen(str); - - Q_strncpy(string, str, curlen); - string[ curlen ] = '\0'; - - curlen = (Q_strstr(string, pattern) != NULL) ? Q_strlen(pattern) : 0; - - return &string[ curlen ]; -} - -#if defined(HOOK_GAMEDLL) && defined(_WIN32) && !defined(REGAMEDLL_UNIT_TESTS) - -void VirtualTableInit(void *ptr, const char *baseClass) -{ - if (!baseClass || *baseClass == '\0') - { - return; - } - - VirtualTableRef *refsVtbl = GetVirtualTableRefAddr(baseClass); - if (!refsVtbl) - { - Sys_Error("%s: Missing vtable for \"%s\"", __func__, baseClass); - } - - /* - int nCount = vtable_size(refsVtbl->originalAddress); - if (nCount != refsVtbl->size) - Sys_Error("%s: Invalid size virtual table, expected [%d], got [%d]", __func__, nCount, refsVtbl->size); - */ - - int **ivtable = *(int ***)ptr; - int **ivtable_orig = (int **)refsVtbl->originalAddress; - - for (size_t i = 0; i < refsVtbl->size; i++) - { - if (!GetAddressUsingHook((size_t)ivtable_orig[i])) - { - EnablePageWrite((size_t)&ivtable[i], 5); - ivtable[i] = ivtable_orig[i]; - RestorePageProtection((size_t)&ivtable[i], 5); - } - } -} - -void HIDDEN GetAddressVtableByClassname(const char *szClassName, const int iOffset, bool bCreate) -{ - void *vtable; - - if (bCreate) - { - edict_t *pObject = CREATE_ENTITY(); - - void *addr = GetFunctionEntity(szClassName); - - if (addr == NULL) - { - //can't create object. - UTIL_ServerPrint("%s: Not found export function of binaries. Presumably looks '__declspec(dllexport) void %s(entvars_t *pev)'", __func__, szClassName); - REMOVE_ENTITY(pObject); - return; - } - - // call link to class GetClassPtr(pev); - reinterpret_cast(addr)(&pObject->v); - - vtable = *(void **)pObject->pvPrivateData; - } - else - { - VirtualTableRef *refsVtbl = GetVirtualTableRefAddr(szClassName); - vtable = (void *)refsVtbl->originalAddress; - } - - UTIL_ServerPrint("%s: ADDRESS VTABLE: %p | ADDRESS VIRTUAL FUNC: %p", - __func__, - OffsetToRebase((size_t)vtable), - OffsetToRebase(*(((size_t **)&vtable)[ iOffset ]))); -} - -#endif // _WIN32 && REGAMEDLL_UNIT_TESTS diff --git a/regamedll/hookers/memory.h b/regamedll/hookers/memory.h deleted file mode 100644 index e415ed7c..00000000 --- a/regamedll/hookers/memory.h +++ /dev/null @@ -1,159 +0,0 @@ -/* -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -*/ - -#ifndef _MEMORY_H -#define _MEMORY_H - -#include "osconfig.h" - -#define MAX_PATTERN 128 - -struct Section; -struct Section -{ - Section *next; - size_t start; - size_t size; - size_t end; - int protection; - int inode; - char filename[_MAX_FNAME]; - int namelen; -}; - -struct Module -{ - size_t base; - size_t size; - size_t end; - size_t handle; - -#ifdef WIN32 - Section codeSection; -#endif -}; - -struct Address -{ - // Keeps offset for SWDS on application start; during HookEngine() an real address is written here. - size_t originalAddress; - const char *symbolName; - size_t address; - int symbolIndex; -}; - -struct FunctionHook -{ - // Keeps offset for SWDS on application start; during HookEngine() an real address is written here. - size_t originalAddress; - const char *symbolName; - size_t handlerFunc; - int symbolIndex; - bool bIsHooked; -}; - -struct VirtualTableRef -{ - size_t originalAddress; - const char *symbolName; - size_t size; -}; - -struct AddressRef -{ - // Keeps offset for SWDS on application start; during HookEngine() an real address is written here. - size_t originalAddress; - const char *symbolName; - size_t addressRef; - int symbolIndex; - bool reverse; -}; - -class CFuncAddr { -public: - uint32 Addr; - CFuncAddr *Next; - - void *operator new(size_t size){ - return malloc(size * sizeof(CFuncAddr)); - } - - void operator delete(void *cPoint) { - free(cPoint); - } - - CFuncAddr(uint32 addr) { - Addr = addr; - Next = NULL; - } - - ~CFuncAddr() { - if (Next) { - delete Next; - Next = NULL; - } - } -}; - -bool FindModuleByAddress(size_t addr, Module *module); -bool FindModuleByName(const char *moduleName, Module *module); - -void ProcessModuleData(Module *module); - -size_t ConvertHexString(const char *srcHexString, unsigned char *outBuffer, size_t bufferSize); -size_t MemoryFindForward(size_t start, size_t end, const unsigned char *pattern, const unsigned char *mask, size_t len); -size_t MemoryFindBackward(size_t start, size_t end, const unsigned char *pattern, const unsigned char *mask, size_t len); -size_t MemoryFindRefForwardPrefix8(size_t start, size_t end, size_t refAddress, uint8 prefixValue, bool relative); - -uint32 HookDWord(size_t addr, uint32 newDWord); -void ExchangeMemoryBytes(size_t origAddr, size_t dataAddr, uint32 size); - -bool GetAddress(Module *module, Address *addr, size_t baseOffset); -bool HookFunction(Module *module, FunctionHook *hook); -void HookFunctionCall(void* hookWhat, void* hookAddr); -bool HIDDEN FindDataRef(Module *module, AddressRef *ref); - -#ifdef WIN32 -void FindAllCalls(Section* section, CFuncAddr** calls, uint32 findRefsTo); -#endif - -#if defined(HOOK_GAMEDLL) && defined(_WIN32) && !defined(REGAMEDLL_UNIT_TESTS) - -const char *stripClass(const char *str); -void VirtualTableInit(void *ptr, const char *baseClass = NULL); -void HIDDEN GetAddressVtableByClassname(const char *szClassName, const int iOffset = 0, bool bCreate = true); - -#endif // _WIN32 && REGAMEDLL_UNIT_TESTS - -#ifdef HOOK_GAMEDLL -extern void *addr_orig; -extern char patchByte[5]; -extern char patchByteOriginal[5]; -#endif - -#endif // _MEMORY_H diff --git a/regamedll/hookers/stl/iosfwd b/regamedll/hookers/stl/iosfwd deleted file mode 100644 index 3264779b..00000000 --- a/regamedll/hookers/stl/iosfwd +++ /dev/null @@ -1,311 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -#pragma warning(disable : 4348) - -#ifdef _MSC_VER -#pragma pack(push, 8) -#endif // _MSC_VER -_STD_BEGIN - // STREAM POSITIONING TYPES (from ) -typedef long streamoff_; -const streamoff_ __BADOFF = -1; -typedef int streamsize_; -#undef _Fpz -extern _CRTIMP2 const fpos_t _Fpz; - // TEMPLATE CLASS fpos_ (from ) -template - class fpos_ { - typedef fpos_<_St> _Myt; -public: -#ifdef _MT - fpos_(streamoff_ _O = 0) - : _Off(_O), _Fpos(_Fpz) - {_Lockit _Lk; - _State = _Stz; } -#else - fpos_(streamoff_ _O = 0) - : _Off(_O), _Fpos(_Fpz), _State(_Stz) {} -#endif - fpos_(_St _S, fpos_t _F) - : _Off(0), _Fpos(_F), _State(_S) {} - _St state() const - {return (_State); } - void state(_St _S) - {_State = _S; } - fpos_t get_fpos_t() const - {return (_Fpos); } - operator streamoff_() const - {return (_Off + _FPOSOFF(_Fpos)); } - streamoff_ operator-(const _Myt& _R) const - {return ((streamoff_)*this - (streamoff_)_R); } - _Myt& operator+=(streamoff_ _O) - {_Off += _O; - return (*this); } - _Myt& operator-=(streamoff_ _O) - {_Off -= _O; - return (*this); } - _Myt operator+(streamoff_ _O) const - {_Myt _Tmp = *this; - return (_Tmp += _O); } - _Myt operator-(streamoff_ _O) const - {_Myt _Tmp = *this; - return (_Tmp -= _O); } - bool operator==(const _Myt& _R) const - {return ((streamoff_)*this == (streamoff_)_R); } - bool operator!=(const _Myt& _R) const - {return (!(*this == _R)); } -private: - static _St _Stz; - streamoff_ _Off; - fpos_t _Fpos; - _St _State; - }; -template - _St fpos_<_St>::_Stz; -typedef fpos_ streampos_; -typedef streampos_ wstreampos_; - // TEMPLATE STRUCT char_traits_ (FROM ) -template - struct char_traits_ { - typedef _E char_type; - typedef _E int_type; - typedef streampos_ pos_type; - typedef streamoff_ off_type; - typedef mbstate_t state_type; - static void __cdecl assign(_E& _X, const _E& _Y) - {_X = _Y; } - static bool __cdecl eq(const _E& _X, const _E& _Y) - {return (_X == _Y); } - static bool __cdecl lt(const _E& _X, const _E& _Y) - {return (_X < _Y); } - static int __cdecl compare(const _E *_U, const _E *_V, size_t _N) - {for (size_t _I = 0; _I < _N; ++_I, ++_U, ++_V) - if (!eq(*_U, *_V)) - return (lt(*_U, *_V) ? -1 : +1); - return (0); } - static size_t __cdecl length(const _E *_U) - {size_t _N; - for (_N = 0; !eq(*_U, _E(0)); ++_U) - ++_N; - return (_N); } - static _E * __cdecl copy(_E *_U, const _E *_V, size_t _N) - {_E *_S = _U; - for (; 0 < _N; --_N, ++_U, ++_V) - assign(*_U, *_V); - return (_S); } - static const _E * __cdecl find(const _E *_U, size_t _N, - const _E& _C) - {for (; 0 < _N; --_N, ++_U) - if (eq(*_U, _C)) - return (_U); - return (0); } - static _E * __cdecl move(_E *_U, const _E *_V, size_t _N) - {_E *_Ans = _U; - if (_V < _U && _U < _V + _N) - for (_U += _N, _V += _N; 0 < _N; --_N) - assign(*--_U, *--_V); - else - for (; 0 < _N; --_N, ++_U, ++_V) - assign(*_U, *_V); - return (_Ans); } - static _E * __cdecl assign(_E *_U, size_t _N, const _E& _C) - {_E *_Ans = _U; - for (; 0 < _N; --_N, ++_U) - assign(*_U, _C); - return (_Ans); } - static _E __cdecl to_char_type(const int_type& _C) - {return ((_E)_C); } - static int_type __cdecl to_int_type(const _E& _C) - {return ((int_type)_C); } - static bool __cdecl eq_int_type(const int_type& _X, - const int_type& _Y) - {return (_X == _Y); } - static int_type __cdecl eof() - {return (EOF); } - static int_type __cdecl not_eof(const int_type& _C) - {return (_C != eof() ? _C : !eof()); } - }; - // STRUCT char_traits_ -template<> struct _CRTIMP2 char_traits_ { - typedef wchar_t _E; - typedef _E char_type; // for overloads - typedef wint_t int_type; - typedef streampos_ pos_type; - typedef streamoff_ off_type; - typedef mbstate_t state_type; - static void __cdecl assign(_E& _X, const _E& _Y) - {_X = _Y; } - static bool __cdecl eq(const _E& _X, const _E& _Y) - {return (_X == _Y); } - static bool __cdecl lt(const _E& _X, const _E& _Y) - {return (_X < _Y); } - static int __cdecl compare(const _E *_U, const _E *_V, size_t _N) - {return (wmemcmp(_U, _V, _N)); } - static size_t __cdecl length(const _E *_U) - {return (wcslen(_U)); } - static _E *__cdecl copy(_E *_U, const _E *_V, size_t _N) - {return (wmemcpy(_U, _V, _N)); } - static const _E * __cdecl find(const _E *_U, size_t _N, - const _E& _C) - {return ((const _E *)wmemchr(_U, _C, _N)); } - static _E * __cdecl move(_E *_U, const _E *_V, size_t _N) - {return (wmemmove(_U, _V, _N)); } - static _E * __cdecl assign(_E *_U, size_t _N, const _E& _C) - {return (wmemset(_U, _C, _N)); } - static _E __cdecl to_char_type(const int_type& _C) - {return ((_E)_C); } - static int_type __cdecl to_int_type(const _E& _C) - {return ((int_type)_C); } - static bool __cdecl eq_int_type(const int_type& _X, - const int_type& _Y) - {return (_X == _Y); } - static int_type __cdecl eof() - {return (WEOF); } - static int_type __cdecl not_eof(const int_type& _C) - {return (_C != eof() ? _C : !eof()); } - }; - // STRUCT char_traits_ (FROM ) -template<> struct _CRTIMP2 char_traits_ { - typedef char _E; - typedef _E char_type; - typedef int int_type; - typedef streampos_ pos_type; - typedef streamoff_ off_type; - typedef mbstate_t state_type; - static void __cdecl assign(_E& _X, const _E& _Y) - {_X = _Y; } - static bool __cdecl eq(const _E& _X, const _E& _Y) - {return (_X == _Y); } - static bool __cdecl lt(const _E& _X, const _E& _Y) - {return (_X < _Y); } - static int __cdecl compare(const _E *_U, const _E *_V, size_t _N) - {return (memcmp(_U, _V, _N)); } - static size_t __cdecl length(const _E *_U) - {return (strlen(_U)); } - static _E * __cdecl copy(_E *_U, const _E *_V, size_t _N) - {return ((_E *)memcpy(_U, _V, _N)); } - static const _E * __cdecl find(const _E *_U, size_t _N, - const _E& _C) - {return ((const _E *)memchr(_U, _C, _N)); } - static _E * __cdecl move(_E *_U, const _E *_V, size_t _N) - {return ((_E *)memmove(_U, _V, _N)); } - static _E * __cdecl assign(_E *_U, size_t _N, const _E& _C) - {return ((_E *)memset(_U, _C, _N)); } - static _E __cdecl to_char_type(const int_type& _C) - {return ((_E)_C); } - static int_type __cdecl to_int_type(const _E& _C) - {return ((int_type)((unsigned char)_C)); } - static bool __cdecl eq_int_type(const int_type& _X, - const int_type& _Y) - {return (_X == _Y); } - static int_type __cdecl eof() - {return (EOF); } - static int_type __cdecl not_eof(const int_type& _C) - {return (_C != eof() ? _C : !eof()); } - }; - // FORWARD REFERENCES -template - class allocator_; -class ios_base; -template > - class basic_ios; -template > - class istreambuf_iterator_; -template > - class ostreambuf_iterator_; -template > - class basic_streambuf; -template > - class basic_istream; -template > - class basic_ostream; -template > - class basic_iostream; -template, - class _A = allocator_<_E> > - class basic_stringbuf; -template, - class _A = allocator_<_E> > - class basic_istringstream; -template, - class _A = allocator_<_E> > - class basic_ostringstream; -template, - class _A = allocator_<_E> > - class basic_stringstream; -template > - class basic_filebuf; -template > - class basic_ifstream; -template > - class basic_ofstream; -template > - class basic_fstream; - - // char TYPEDEFS -typedef basic_ios > ios_; -typedef basic_streambuf > streambuf_; -typedef basic_istream > istream_; -typedef basic_ostream > ostream_; -typedef basic_iostream > iostream_; -typedef basic_stringbuf, - allocator_ > stringbuf_; -typedef basic_istringstream, - allocator_ > istringstream_; -typedef basic_ostringstream, - allocator_ > ostringstream_; -typedef basic_stringstream, - allocator_ > stringstream_; -typedef basic_filebuf > filebuf_; -typedef basic_ifstream > ifstream_; -typedef basic_ofstream > ofstream_; -typedef basic_fstream > fstream_; - // wchar_t TYPEDEFS -typedef basic_ios > wios_; -typedef basic_streambuf > - wstreambuf_; -typedef basic_istream > wistream_; -typedef basic_ostream > wostream_; -typedef basic_iostream > wiostream_; -typedef basic_stringbuf, - allocator_ > wstringbuf_; -typedef basic_istringstream, - allocator_ > wistringstream_; -typedef basic_ostringstream, - allocator_ > wostringstream_; -typedef basic_stringstream, - allocator_ > wstringstream_; -typedef basic_filebuf > wfilebuf_; -typedef basic_ifstream > wifstream_; -typedef basic_ofstream > wofstream_; -typedef basic_fstream > wfstream_; - -#ifdef _DLL -template - class num_get; -template - class num_put; -template - class collate; - -typedef num_get > > numget_; -typedef num_get > > wnumget_; - -typedef num_put > > numput_; -typedef num_put > > wnumput_; - -typedef collate ncollate; -typedef collate wcollate; - -#endif // _DLL - -_STD_END - -#ifdef _MSC_VER -#pragma pack(pop) -#endif // _MSC_VER diff --git a/regamedll/hookers/stl/iterator b/regamedll/hookers/stl/iterator deleted file mode 100644 index 0e724acc..00000000 --- a/regamedll/hookers/stl/iterator +++ /dev/null @@ -1,255 +0,0 @@ -#pragma once - -#include "utility" - -#ifdef _MSC_VER -#pragma pack(push, 8) -#endif // _MSC_VER - -_STD_BEGIN - // TEMPLATE CLASS reverse_bidirectional_iterator -template - class reverse_bidirectional_iterator - : public _Bidit<_Ty, _D> { -public: - typedef reverse_bidirectional_iterator<_BI, - _Ty, _Rt, _Pt, _D> _Myt; - typedef _BI iter_type; - typedef _Rt reference_type; - typedef _Pt pointer_type; - reverse_bidirectional_iterator() - {} - explicit reverse_bidirectional_iterator(_BI _X) - : current(_X) {} - _BI base() const - {return (current); } - _Rt operator*() const - {_BI _Tmp = current; - return (*--_Tmp); } - _Pt operator->() const - {return (&**this); } - _Myt& operator++() - {--current; - return (*this); } - _Myt operator++(int) - {_Myt _Tmp = *this; - --current; - return (_Tmp); } - _Myt& operator--() - {++current; - return (*this); } - _Myt operator--(int) - {_Myt _Tmp = *this; - ++current; - return (_Tmp); } -protected: - _BI current; -}; - -template inline - bool operator==(const reverse_bidirectional_iterator<_BI, - _Ty, _Rt, _Pt, _D>& _X, - const reverse_bidirectional_iterator<_BI, - _Ty, _Rt, _Pt, _D>& _Y) - {return (_X.base() == _Y.base()); } -template inline - bool operator!=(const reverse_bidirectional_iterator<_BI, - _Ty, _Rt, _Pt, _D>& _X, - const reverse_bidirectional_iterator<_BI, - _Ty, _Rt, _Pt, _D>& _Y) - {return (!(_X == _Y)); } - // TEMPLATE CLASS back_insert_iterator_ -template - class back_insert_iterator_ - : public iterator_ { -public: - typedef _C container_type; - typedef typename _C::value_type value_type; - explicit back_insert_iterator_(_C& _X) - : container(_X) {} - back_insert_iterator_<_C>& operator=( - const value_type& _V) - {container.push_back(_V); - return (*this); } - back_insert_iterator_<_C>& operator*() - {return (*this); } - back_insert_iterator_<_C>& operator++() - {return (*this); } - back_insert_iterator_<_C> operator++(int) - {return (*this); } -protected: - _C& container; -}; - -template inline - back_insert_iterator_<_C> back_inserter(_C& _X) - {return (back_insert_iterator_<_C>(_X)); } - // TEMPLATE CLASS front_insert_iterator_ -template - class front_insert_iterator_ - : public iterator_ { -public: - typedef _C container_type; - typedef typename _C::value_type value_type; - explicit front_insert_iterator_(_C& _X) - : container(_X) {} - front_insert_iterator_<_C>& operator=( - const value_type& _V) - {container.push_front(_V); - return (*this); } - front_insert_iterator_<_C>& operator*() - {return (*this); } - front_insert_iterator_<_C>& operator++() - {return (*this); } - front_insert_iterator_<_C> operator++(int) - {return (*this); } -protected: - _C& container; - }; -template inline - front_insert_iterator_<_C> front_inserter(_C& _X) - {return (front_insert_iterator_<_C>(_X)); } - // TEMPLATE CLASS insert_iterator_ -template - class insert_iterator_ - : public iterator_ { -public: - typedef _C container_type; - typedef typename _C::value_type value_type; - insert_iterator_(_C& _X, typename _C::iterator_ _I) - : container(_X), iter(_I) {} - insert_iterator_<_C>& operator=( - const value_type& _V) - {iter = container.insert(iter, _V); - ++iter; - return (*this); } - insert_iterator_<_C>& operator*() - {return (*this); } - insert_iterator_<_C>& operator++() - {return (*this); } - insert_iterator_<_C>& operator++(int) - {return (*this); } -protected: - _C& container; - typename _C::iterator_ iter; -}; - -template inline - insert_iterator_<_C> inserter(_C& _X, _XI _I) - {return (insert_iterator_<_C>(_X, _C::iterator_(_I))); } - // TEMPLATE CLASS istream_iterator_ -template > - class istream_iterator_ - : public iterator_ { -public: - typedef _E char_type; - typedef _Tr traits_type; - typedef basic_istream<_E, _Tr> istream_type; - istream_iterator_() - : _Istr(0) {} - istream_iterator_(istream_type& _I) - : _Istr(&_I) {_Getval(); } - const _U& operator*() const - {return (_Val); } - const _U *operator->() const - {return (&**this); } - istream_iterator_<_U, _E, _Tr>& operator++() - {_Getval(); - return (*this); } - istream_iterator_<_U, _E, _Tr> operator++(int) - {istream_iterator_<_U, _E, _Tr> _Tmp = *this; - _Getval(); - return (_Tmp); } - bool _Equal(const istream_iterator_<_U, _E, _Tr>& _X) const - {return (_Istr == _X._Istr); } -protected: - void _Getval() - {if (_Istr != 0 && !(*_Istr >> _Val)) - _Istr = 0; } - istream_type *_Istr; - _U _Val; -}; - -template inline - bool operator==(const istream_iterator_<_U, _E, _Tr>& _X, - const istream_iterator_<_U, _E, _Tr>& _Y) - {return (_X._Equal(_Y)); } -template inline - bool operator!=(const istream_iterator_<_U, _E, _Tr>& _X, - const istream_iterator_<_U, _E, _Tr>& _Y) - {return (!(_X == _Y)); } - // TEMPLATE CLASS ostream_iterator_ -template > - class ostream_iterator_ - : public iterator_ { -public: - typedef _U value_type; - typedef _E char_type; - typedef _Tr traits_type; - typedef basic_ostream<_E, _Tr> ostream_type; - ostream_iterator_(ostream_type& _O, - const _E *_D = 0) - : _Ostr(&_O), _Delim(_D) {} - ostream_iterator_<_U, _E, _Tr>& operator=(const _U& _X) - {*_Ostr << _X; - if (_Delim != 0) - *_Ostr << _Delim; - return (*this); } - ostream_iterator_<_U, _E, _Tr>& operator*() - {return (*this); } - ostream_iterator_<_U, _E, _Tr>& operator++() - {return (*this); } - ostream_iterator_<_U, _E, _Tr> operator++(int) - {return (*this); } -protected: - const _E *_Delim; - ostream_type *_Ostr; -}; - // TEMPLATE FUNCTION _Val_type -template inline - _Ty *_Val_type(const iterator_<_C, _Ty, _D>&) - {return ((_Ty *)0); } -template inline - _Ty *_Val_type(const _Ty *) - {return ((_Ty *)0); } - // TEMPLATE FUNCTION advance_ -template inline - void advance_(_II& _I, _D _N) - {_Advance(_I, _N, _Iter_cat(_I)); } -/*template inline - void _Advance(_II& _I, _D _N, input_iterator_tag) - {for (; 0 < _N; --_N) - ++_I; } -template inline - void _Advance(_FI& _I, _D _N, forward_iterator_tag) - {for (; 0 < _N; --_N) - ++_I; } -template inline - void _Advance(_BI& _I, _D _N, bidirectional_iterator_tag) - {for (; 0 < _N; --_N) - ++_I; - for (; _N < 0; ++_N) - --_I; } -template inline - void _Advance(_RI& _I, _D _N, random_access_iterator_tag) - {_I += _N; }*/ - // TEMPLATE FUNCTION _Dist_type -template inline - _D *_Dist_type(const iterator_<_C, _Ty, _D>&) - {return ((_D *)0); } -template inline - ptrdiff_t *_Dist_type(const _Ty *) - {return ((ptrdiff_t *)0); } -_STD_END - -#ifdef _MSC_VER -#pragma pack(pop) -#endif // _MSC_VER diff --git a/regamedll/hookers/stl/list b/regamedll/hookers/stl/list deleted file mode 100644 index 90a796c3..00000000 --- a/regamedll/hookers/stl/list +++ /dev/null @@ -1,445 +0,0 @@ -#pragma once - -#include - -// custom -#include "use_ansi.H" -#include "iterator" -#include "memory" - -#ifdef _MSC_VER -#pragma pack(push, 8) -#endif // _MSC_VER -_STD_BEGIN - // TEMPLATE CLASS list_vs6 -template > - class list_vs6 { -protected: - struct _Node; - friend struct _Node; - - typedef _POINTER_X(_Node, _A) _Mapptr; - typedef _POINTER_X(_Node, _A) _Nodeptr; - struct _Node { - _Nodeptr _Next, _Prev; - _Ty _Value; - }; - struct _Acc; - friend struct _Acc; - struct _Acc { - typedef _REFERENCE_X(_Nodeptr, _A) _Nodepref; - typedef typename _A::reference _Vref; - static _Nodepref _Next(_Nodeptr _P) - {return ((_Nodepref)(*_P)._Next); } - static _Nodepref _Prev(_Nodeptr _P) - {return ((_Nodepref)(*_P)._Prev); } - static _Vref _Value(_Nodeptr _P) - {return ((_Vref)(*_P)._Value); } - }; -public: - typedef list_vs6<_Ty, _A> _Myt; - typedef _A allocator_type; - typedef typename _A::size_type size_type; - typedef typename _A::difference_type difference_type; - typedef typename _A::pointer _Tptr; - typedef typename _A::const_pointer _Ctptr; - typedef typename _A::reference reference; - typedef typename _A::const_reference const_reference; - typedef typename _A::value_type value_type; - // CLASS const_iterator - class iterator; - class const_iterator; - friend class const_iterator; - - class const_iterator : public _Bidit<_Ty, difference_type> { - public: - const_iterator() - {} - const_iterator(_Nodeptr _P) - : _Ptr(_P) {} - const_iterator(const iterator& _X) - : _Ptr(_X._Ptr) {} - const_reference operator*() const - {return (_Acc::_Value(_Ptr)); } - _Ctptr operator->() const - {return (&**this); } - const_iterator& operator++() - {_Ptr = _Acc::_Next(_Ptr); - return (*this); } - const_iterator operator++(int) - {const_iterator _Tmp = *this; - ++*this; - return (_Tmp); } - const_iterator& operator--() - {_Ptr = _Acc::_Prev(_Ptr); - return (*this); } - const_iterator operator--(int) - {const_iterator _Tmp = *this; - --*this; - return (_Tmp); } - bool operator==(const const_iterator& _X) const - {return (_Ptr == _X._Ptr); } - bool operator!=(const const_iterator& _X) const - {return (!(*this == _X)); } - _Nodeptr _Mynode() const - {return (_Ptr); } - protected: - _Nodeptr _Ptr; - }; - // CLASS iterator - friend class iterator; - class iterator : public const_iterator { - public: - iterator() - {} - iterator(_Nodeptr _P) - : const_iterator(_P) {} - reference operator*() const - {return (_Acc::_Value(_Ptr)); } - _Tptr operator->() const - {return (&**this); } - iterator& operator++() - {_Ptr = _Acc::_Next(_Ptr); - return (*this); } - iterator operator++(int) - {iterator _Tmp = *this; - ++*this; - return (_Tmp); } - iterator& operator--() - {_Ptr = _Acc::_Prev(_Ptr); - return (*this); } - iterator operator--(int) - {iterator _Tmp = *this; - --*this; - return (_Tmp); } - bool operator==(const iterator& _X) const - {return (_Ptr == _X._Ptr); } - bool operator!=(const iterator& _X) const - {return (!(*this == _X)); } - }; - typedef reverse_bidirectional_iterator - reverse_iterator; - typedef reverse_bidirectional_iterator - const_reverse_iterator; - explicit list_vs6(const _A& _Al = _A()) - : allocator(_Al), - _Head(_Buynode()), _Size(0) {} - explicit list_vs6(size_type _N, const _Ty& _V = _Ty(), - const _A& _Al = _A()) - : allocator(_Al), - _Head(_Buynode()), _Size(0) - {insert(begin(), _N, _V); } - list_vs6(const _Myt& _X) - : allocator(_X.allocator), - _Head(_Buynode()), _Size(0) - {insert(begin(), _X.begin(), _X.end()); } - list_vs6(const _Ty *_F, const _Ty *_L, const _A& _Al = _A()) - : allocator(_Al), - _Head(_Buynode()), _Size(0) - {insert(begin(), _F, _L); } - typedef const_iterator _It; - list_vs6(_It _F, _It _L, const _A& _Al = _A()) - : allocator(_Al), - _Head(_Buynode()), _Size(0) - {insert(begin(), _F, _L); } - ~list_vs6() - {erase(begin(), end()); - _Freenode(_Head); - _Head = 0, _Size = 0; } - _Myt& operator=(const _Myt& _X) - {if (this != &_X) - {iterator _F1 = begin(); - iterator _L1 = end(); - const_iterator _F2 = _X.begin(); - const_iterator _L2 = _X.end(); - for (; _F1 != _L1 && _F2 != _L2; ++_F1, ++_F2) - *_F1 = *_F2; - erase(_F1, _L1); - insert(_L1, _F2, _L2); } - return (*this); } - iterator begin() - {return (iterator(_Acc::_Next(_Head))); } - const_iterator begin() const - {return (const_iterator(_Acc::_Next(_Head))); } - iterator end() - {return (iterator(_Head)); } - const_iterator end() const - {return (const_iterator(_Head)); } - reverse_iterator rbegin() - {return (reverse_iterator(end())); } - const_reverse_iterator rbegin() const - {return (const_reverse_iterator(end())); } - reverse_iterator rend() - {return (reverse_iterator(begin())); } - const_reverse_iterator rend() const - {return (const_reverse_iterator(begin())); } - void resize(size_type _N, _Ty _X = _Ty()) - {if (size() < _N) - insert(end(), _N - size(), _X); - else - while (_N < size()) - pop_back(); } - size_type size() const - {return (_Size); } - size_type max_size() const - {return (allocator.max_size()); } - bool empty() const - {return (size() == 0); } - _A get_allocator() const - {return (allocator); } - reference front() - {return (*begin()); } - const_reference front() const - {return (*begin()); } - reference back() - {return (*(--end())); } - const_reference back() const - {return (*(--end())); } - void push_front(const _Ty& _X) - {insert(begin(), _X); } - void pop_front() - {erase(begin()); } - void push_back(const _Ty& _X) - {insert(end(), _X); } - void pop_back() - {erase(--end()); } - void assign(_It _F, _It _L) - {erase(begin(), end()); - insert(begin(), _F, _L); } - void assign(size_type _N, const _Ty& _X = _Ty()) - {erase(begin(), end()); - insert(begin(), _N, _X); } - iterator insert(iterator _P, const _Ty& _X = _Ty()) - {_Nodeptr _S = _P._Mynode(); - _Acc::_Prev(_S) = _Buynode(_S, _Acc::_Prev(_S)); - _S = _Acc::_Prev(_S); - _Acc::_Next(_Acc::_Prev(_S)) = _S; - allocator.construct(&_Acc::_Value(_S), _X); - ++_Size; - return (iterator(_S)); } - void insert(iterator _P, size_type _M, const _Ty& _X) - {for (; 0 < _M; --_M) - insert(_P, _X); } - void insert(iterator _P, const _Ty *_F, const _Ty *_L) - {for (; _F != _L; ++_F) - insert(_P, *_F); } - void insert(iterator _P, _It _F, _It _L) - {for (; _F != _L; ++_F) - insert(_P, *_F); } - iterator erase(iterator _P) - {_Nodeptr _S = (_P++)._Mynode(); - _Acc::_Next(_Acc::_Prev(_S)) = _Acc::_Next(_S); - _Acc::_Prev(_Acc::_Next(_S)) = _Acc::_Prev(_S); - allocator.destroy(&_Acc::_Value(_S)); - _Freenode(_S); - --_Size; - return (_P); } - iterator erase(iterator _F, iterator _L) - {while (_F != _L) - erase(_F++); - return (_F); } - void clear() - {erase(begin(), end()); } - void swap(_Myt& _X) - {if (allocator == _X.allocator) - {std::swap(_Head, _X._Head); - std::swap(_Size, _X._Size); } - else - {iterator _P = begin(); - splice(_P, _X); - _X.splice(_X.begin(), *this, _P, end()); }} - friend void swap(_Myt& _X, _Myt& _Y) - {_X.swap(_Y); } - void splice(iterator _P, _Myt& _X) - {if (!_X.empty()) - {_Splice(_P, _X, _X.begin(), _X.end()); - _Size += _X._Size; - _X._Size = 0; }} - void splice(iterator _P, _Myt& _X, iterator _F) - {iterator _L = _F; - if (_P != _F && _P != ++_L) - {_Splice(_P, _X, _F, _L); - ++_Size; - --_X._Size; }} - void splice(iterator _P, _Myt& _X, iterator _F, iterator _L) - {if (_F != _L) - {if (&_X != this) - {difference_type _N = 0; - _Distance(_F, _L, _N); - _Size += _N; - _X._Size -= _N; } - _Splice(_P, _X, _F, _L); }} - void remove(const _Ty& _V) - {iterator _L = end(); - for (iterator _F = begin(); _F != _L; ) - if (*_F == _V) - erase(_F++); - else - ++_F; } - typedef binder2nd > _Pr1; - void remove_if(_Pr1 _Pr) - {iterator _L = end(); - for (iterator _F = begin(); _F != _L; ) - if (_Pr(*_F)) - erase(_F++); - else - ++_F; } - void unique() - {iterator _F = begin(), _L = end(); - if (_F != _L) - for (iterator _M = _F; ++_M != _L; _M = _F) - if (*_F == *_M) - erase(_M); - else - _F = _M; } - typedef not_equal_to<_Ty> _Pr2; - void unique(_Pr2 _Pr) - {iterator _F = begin(), _L = end(); - if (_F != _L) - for (iterator _M = _F; ++_M != _L; _M = _F) - if (_Pr(*_F, *_M)) - erase(_M); - else - _F = _M; } - void merge(_Myt& _X) - {if (&_X != this) - {iterator _F1 = begin(), _L1 = end(); - iterator _F2 = _X.begin(), _L2 = _X.end(); - while (_F1 != _L1 && _F2 != _L2) - if (*_F2 < *_F1) - {iterator _Mid2 = _F2; - _Splice(_F1, _X, _F2, ++_Mid2); - _F2 = _Mid2; } - else - ++_F1; - if (_F2 != _L2) - _Splice(_L1, _X, _F2, _L2); - _Size += _X._Size; - _X._Size = 0; }} - typedef greater<_Ty> _Pr3; - void merge(_Myt& _X, _Pr3 _Pr) - {if (&_X != this) - {iterator _F1 = begin(), _L1 = end(); - iterator _F2 = _X.begin(), _L2 = _X.end(); - while (_F1 != _L1 && _F2 != _L2) - if (_Pr(*_F2, *_F1)) - {iterator _Mid2 = _F2; - _Splice(_F1, _X, _F2, ++_Mid2); - _F2 = _Mid2; } - else - ++_F1; - if (_F2 != _L2) - _Splice(_L1, _X, _F2, _L2); - _Size += _X._Size; - _X._Size = 0; }} - void sort() - {if (2 <= size()) - {const size_t _MAXN = 15; - _Myt _X(allocator), _A[_MAXN + 1]; - size_t _N = 0; - while (!empty()) - {_X.splice(_X.begin(), *this, begin()); - size_t _I; - for (_I = 0; _I < _N && !_A[_I].empty(); ++_I) - {_A[_I].merge(_X); - _A[_I].swap(_X); } - if (_I == _MAXN) - _A[_I].merge(_X); - else - {_A[_I].swap(_X); - if (_I == _N) - ++_N; }} - while (0 < _N) - merge(_A[--_N]); }} - void sort(_Pr3 _Pr) - {if (2 <= size()) - {const size_t _MAXN = 15; - _Myt _X(allocator), _A[_MAXN + 1]; - size_t _N = 0; - while (!empty()) - {_X.splice(_X.begin(), *this, begin()); - size_t _I; - for (_I = 0; _I < _N && !_A[_I].empty(); ++_I) - {_A[_I].merge(_X, _Pr); - _A[_I].swap(_X); } - if (_I == _MAXN) - _A[_I].merge(_X, _Pr); - else - {_A[_I].swap(_X); - if (_I == _N) - ++_N; }} - while (0 < _N) - merge(_A[--_N], _Pr); }} - void reverse() - {if (2 <= size()) - {iterator _L = end(); - for (iterator _F = ++begin(); _F != _L; ) - {iterator _M = _F; - _Splice(begin(), *this, _M, ++_F); }}} -protected: - _Nodeptr _Buynode(_Nodeptr _Narg = 0, _Nodeptr _Parg = 0) - {_Nodeptr _S = (_Nodeptr)allocator._Charalloc( - 1 * sizeof (_Node)); - _Acc::_Next(_S) = _Narg != 0 ? _Narg : _S; - _Acc::_Prev(_S) = _Parg != 0 ? _Parg : _S; - return (_S); } - void _Freenode(_Nodeptr _S) - {allocator.deallocate(_S, 1); } - void _Splice(iterator _P, _Myt& _X, iterator _F, iterator _L) - {if (allocator == _X.allocator) - {_Acc::_Next(_Acc::_Prev(_L._Mynode())) = - _P._Mynode(); - _Acc::_Next(_Acc::_Prev(_F._Mynode())) = - _L._Mynode(); - _Acc::_Next(_Acc::_Prev(_P._Mynode())) = - _F._Mynode(); - _Nodeptr _S = _Acc::_Prev(_P._Mynode()); - _Acc::_Prev(_P._Mynode()) = - _Acc::_Prev(_L._Mynode()); - _Acc::_Prev(_L._Mynode()) = - _Acc::_Prev(_F._Mynode()); - _Acc::_Prev(_F._Mynode()) = _S; } - else - {insert(_P, _F, _L); - _X.erase(_F, _L); }} - void _Xran() const - {_THROW(out_of_range, "invalid list_vs6 subscript"); } - _A allocator; - _Nodeptr _Head; - size_type _Size; -}; - -// list_vs6 TEMPLATE OPERATORS -template inline - bool operator==(const list_vs6<_Ty, _A>& _X, - const list_vs6<_Ty, _A>& _Y) - {return (_X.size() == _Y.size() - && equal(_X.begin(), _X.end(), _Y.begin())); } -template inline - bool operator!=(const list_vs6<_Ty, _A>& _X, - const list_vs6<_Ty, _A>& _Y) - {return (!(_X == _Y)); } -template inline - bool operator<(const list_vs6<_Ty, _A>& _X, - const list_vs6<_Ty, _A>& _Y) - {return (lexicographical_compare(_X.begin(), _X.end(), - _Y.begin(), _Y.end())); } -template inline - bool operator>(const list_vs6<_Ty, _A>& _X, - const list_vs6<_Ty, _A>& _Y) - {return (_Y < _X); } -template inline - bool operator<=(const list_vs6<_Ty, _A>& _X, - const list_vs6<_Ty, _A>& _Y) - {return (!(_Y < _X)); } -template inline - bool operator>=(const list_vs6<_Ty, _A>& _X, - const list_vs6<_Ty, _A>& _Y) - {return (!(_X < _Y)); } -_STD_END - -#ifdef _MSC_VER -#pragma pack(pop) -#endif // _MSC_VER diff --git a/regamedll/hookers/stl/memory b/regamedll/hookers/stl/memory deleted file mode 100644 index d04428f6..00000000 --- a/regamedll/hookers/stl/memory +++ /dev/null @@ -1,166 +0,0 @@ -#pragma once - -#include "xmemory" - -#ifdef _MSC_VER -#pragma pack(push, 8) -#endif // _MSC_VER - - // TEMPLATE OPERATOR new -template - inline void *operator new(size_t _N, std::allocator_<_Ty>& _Al) - {return (_Al._Charalloc(_N)); } -_STD_BEGIN - // TEMPLATE FUNCTION get_temporary_buffer_ -template inline - pair_<_Ty _FARQ *, _PDFT> - get_temporary_buffer_(_PDFT _N, _Ty _FARQ *) - {_Ty _FARQ *_P; - for (_P = 0; 0 < _N; _N /= 2) - if ((_P = (_Ty _FARQ *)operator new( - (_SIZT)_N * sizeof (_Ty), nothrow)) != 0) - break; - return (pair_<_Ty _FARQ *, _PDFT>(_P, _N)); } - // TEMPLATE FUNCTION return_temporary_buffer_ -template inline - void return_temporary_buffer_(_Ty *_P) - {operator delete(_P); } - // TEMPLATE FUNCTION uninitialized_copy_ -template inline - _FI uninitialized_copy_(_II _F, _II _L, _FI _X) - {for (; _F != _L; ++_X, ++_F) - __Construct(&*_X, *_F); - return (_X); } - // TEMPLATE FUNCTION uninitialized_fill_ -template inline - void uninitialized_fill_(_FI _F, _FI _L, const _Ty& _X) - {for (; _F != _L; ++_F) - __Construct(&*_F, _X); } - // TEMPLATE FUNCTION uninitialized_fill_n -template inline - void uninitialized_fill_n(_FI _F, _S _N, const _Ty& _X) - {for (; 0 < _N; --_N, ++_F) - __Construct(&*_F, _X); } - // TEMPLATE CLASS raw_storage_iterator_ -template - class raw_storage_iterator_ - : public iterator_ { -public: - typedef _OI iterator_type; - typedef _Ty element_type; - explicit raw_storage_iterator_(_OI _X) - : _Next(_X) {} - raw_storage_iterator_<_OI, _Ty>& operator*() - {return (*this); } - raw_storage_iterator_<_OI, _Ty>& operator=(const _Ty& _X) - {__Construct(&*_Next, _X); - return (*this); } - raw_storage_iterator_<_OI, _Ty>& operator++() - {++_Next; - return (*this); } - raw_storage_iterator_<_OI, _Ty> operator++(int) - {raw_storage_iterator_<_OI, _Ty> _Ans = *this; - ++_Next; - return (_Ans); } -private: - _OI _Next; - }; - // TEMPLATE CLASS _Temp_iterator_ -template - class _Temp_iterator_ - : public iterator_ { -public: - typedef _Ty _FARQ *_Pty; - _Temp_iterator_(_PDFT _N = 0) - {pair_<_Pty, _PDFT> _Pair = - get_temporary_buffer_(_N, (_Pty)0); - _Buf._Begin = _Pair.first; - _Buf._Cur = _Pair.first; - _Buf._Hiwater = _Pair.first; - _Buf._Len = _Pair.second; - _Pb = &_Buf; } - _Temp_iterator_(const _Temp_iterator_<_Ty>& _X) - {_Buf._Begin = 0; - _Buf._Cur = 0; - _Buf._Hiwater = 0; - _Buf._Len = 0; - *this = _X; } - ~_Temp_iterator_() - {if (_Buf._Begin != 0) - {for (_Pty _F = _Buf._Begin; - _F != _Buf._Hiwater; ++_F) - __Destroy(&*_F); - return_temporary_buffer_(_Buf._Begin); }} - _Temp_iterator_<_Ty>& operator=(const _Temp_iterator_<_Ty>& _X) - {_Pb = _X._Pb; - return (*this); } - _Temp_iterator_<_Ty>& operator=(const _Ty& _V) - {if (_Pb->_Cur < _Pb->_Hiwater) - *_Pb->_Cur++ = _V; - else - {__Construct(&*_Pb->_Cur, _V); - _Pb->_Hiwater = ++_Pb->_Cur; } - return (*this); } - _Temp_iterator_<_Ty>& operator*() - {return (*this); } - _Temp_iterator_<_Ty>& operator++() - {return (*this); } - _Temp_iterator_<_Ty>& operator++(int) - {return (*this); } - _Temp_iterator_<_Ty>& _Init() - {_Pb->_Cur = _Pb->_Begin; - return (*this); } - _Pty _First() const - {return (_Pb->_Begin); } - _Pty _Last() const - {return (_Pb->_Cur); } - _PDFT _Maxlen() const - {return (_Pb->_Len); } -private: - struct _Bufpar { - _Pty _Begin; - _Pty _Cur; - _Pty _Hiwater; - _PDFT _Len; - } _Buf, *_Pb; - }; - // TEMPLATE CLASS auto_ptr -template - class auto_ptr_ { -public: - typedef _Ty element_type; - explicit auto_ptr_(_Ty *_P = 0) _THROW0() - : _Owns(_P != 0), _Ptr(_P) {} - auto_ptr_(const auto_ptr_<_Ty>& _Y) _THROW0() - : _Owns(_Y._Owns), _Ptr(_Y.release()) {} - auto_ptr_<_Ty>& operator=(const auto_ptr_<_Ty>& _Y) _THROW0() - {if (this != &_Y) - {if (_Ptr != _Y.get()) - {if (_Owns) - delete _Ptr; - _Owns = _Y._Owns; } - else if (_Y._Owns) - _Owns = true; - _Ptr = _Y.release(); } - return (*this); } - ~auto_ptr_() - {if (_Owns) - delete _Ptr; } - _Ty& operator*() const _THROW0() - {return (*get()); } - _Ty *operator->() const _THROW0() - {return (get()); } - _Ty *get() const _THROW0() - {return (_Ptr); } - _Ty *release() const _THROW0() - {((auto_ptr_<_Ty> *)this)->_Owns = false; - return (_Ptr); } -private: - bool _Owns; - _Ty *_Ptr; - }; -_STD_END - -#ifdef _MSC_VER -#pragma pack(pop) -#endif // _MSC_VER diff --git a/regamedll/hookers/stl/use_ansi.h b/regamedll/hookers/stl/use_ansi.h deleted file mode 100644 index e3eded15..00000000 --- a/regamedll/hookers/stl/use_ansi.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#ifdef _MT -#ifdef _DLL -#ifdef _DEBUG -#pragma comment(lib,"msvcprtd") -#else // _DEBUG -#pragma comment(lib,"msvcprt") -#endif // _DEBUG - -#else // _DLL -#ifdef _DEBUG -#pragma comment(lib,"libcpmtd") -#else // _DEBUG -#pragma comment(lib,"libcpmt") -#endif // _DEBUG -#endif // _DLL - -#else // _MT -#ifdef _DEBUG -#pragma comment(lib,"libcpd") -#else // _DEBUG -#pragma comment(lib,"libcp") -#endif // _DEBUG -#endif // _MT diff --git a/regamedll/hookers/stl/utility b/regamedll/hookers/stl/utility deleted file mode 100644 index 09bef6c7..00000000 --- a/regamedll/hookers/stl/utility +++ /dev/null @@ -1,342 +0,0 @@ -#pragma once - -#include "iosfwd" -#include "xstddef" - -#ifdef _MSC_VER -#pragma pack(push,8) -#endif // _MSC_VER - -_STD_BEGIN - // TEMPLATE STRUCT pair_ -template struct pair_ { - typedef _T1 first_type; - typedef _T2 second_type; - pair_() - : first(_T1()), second(_T2()) {} - pair_(const _T1& _V1, const _T2& _V2) - : first(_V1), second(_V2) {} - template pair_(const pair_ &p) - : first(p.first), second(p.second) {} - _T1 first; - _T2 second; -}; - -template inline - bool __cdecl operator==(const pair_<_T1, _T2>& _X, - const pair_<_T1, _T2>& _Y) - {return (_X.first == _Y.first && _X.second == _Y.second); } - -template inline - bool __cdecl operator!=(const pair_<_T1, _T2>& _X, - const pair_<_T1, _T2>& _Y) - {return (!(_X == _Y)); } -template inline - bool __cdecl operator<(const pair_<_T1, _T2>& _X, - const pair_<_T1, _T2>& _Y) - {return (_X.first < _Y.first || - !(_Y.first < _X.first) && _X.second < _Y.second); } -template inline - bool __cdecl operator>(const pair_<_T1, _T2>& _X, - const pair_<_T1, _T2>& _Y) - {return (_Y < _X); } -template inline - bool __cdecl operator<=(const pair_<_T1, _T2>& _X, - const pair_<_T1, _T2>& _Y) - {return (!(_Y < _X)); } -template inline - bool __cdecl operator>=(const pair_<_T1, _T2>& _X, - const pair_<_T1, _T2>& _Y) - {return (!(_X < _Y)); } -template inline - pair_<_T1, _T2> __cdecl make_pair(const _T1& _X, const _T2& _Y) - {return (pair_<_T1, _T2>(_X, _Y)); } - // ITERATOR TAGS (from ) - -struct input_iterator_tag_ {}; -struct output_iterator_tag_ {}; -struct forward_iterator_tag_ - : public input_iterator_tag_ {}; -struct bidirectional_iterator_tag_ - : public forward_iterator_tag_ {}; -struct random_access_iterator_tag_ - : public bidirectional_iterator_tag_ {}; - // TEMPLATE CLASS iterator_ (from ) -template - struct iterator_ { - typedef _C iterator_category; - typedef _Ty value_type; - typedef _D distance_type; -}; - -template - struct _Bidit : public iterator_ {}; -template - struct _Ranit : public iterator_ {}; - // TEMPLATE CLASS iterator_traits_ (from ) -template - struct iterator_traits_ { - typedef typename _It::iterator_category iterator_category; - typedef typename _It::value_type value_type; - typedef typename _It::distance_type distance_type; - }; - // TEMPLATE FUNCTION _Iter_cat (from ) -template inline - _C __cdecl _Iter_cat(const iterator_<_C, _Ty, _D>&) - {_C _IterCatTag; - _C* _pIterCatTag; - _pIterCatTag = &_IterCatTag; // Workaround for C4700 warning - return (_IterCatTag); } -template inline - random_access_iterator_tag_ __cdecl _Iter_cat(const _Ty *) - {random_access_iterator_tag_ _RandIterTag; - random_access_iterator_tag_* _pRandIterTag; - _pRandIterTag = &_RandIterTag; // Workaround for C4700 warning - return (_RandIterTag); } - // TEMPLATE FUNCTION __Distance -template inline - _CNTSIZ(_II) __cdecl distance(_II _F, _II _L) - {_CNTSIZ(_II) _N = 0; - __Distance(_F, _L, _N, _Iter_cat(_F)); - return (_N); } -template inline - void __cdecl __Distance(_II _F, _II _L, _D& _N) - {__Distance(_F, _L, _N, _Iter_cat(_F)); } -template inline - void __cdecl __Distance(_II _F, _II _L, _D& _N, input_iterator_tag_) - {for (; _F != _L; ++_F) - ++_N; } -template inline - void __cdecl __Distance(_II _F, _II _L, _D& _N, forward_iterator_tag_) - {for (; _F != _L; ++_F) - ++_N; } -template inline - void __cdecl __Distance(_II _F, _II _L, _D& _N, - bidirectional_iterator_tag_) - {for (; _F != _L; ++_F) - ++_N; } -template inline - void __cdecl __Distance(_RI _F, _RI _L, _D& _N, - random_access_iterator_tag_) - {_N += _L - _F; } - // TEMPLATE CLASS reverse_iterator_ (from ) -template - class reverse_iterator_ : public _Ranit<_Ty, _D> { -public: - typedef reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D> _Myt; - typedef _RI iter_type; - typedef _Rt reference_type; - typedef _Pt pointer_type; - reverse_iterator_() - {} - explicit reverse_iterator_(_RI _X) - : current(_X) {} - _RI base() const - {return (current); } - _Rt operator*() const - {return (*(current - 1)); } - _Pt operator->() const - {return (&**this); } - _Myt& operator++() - {--current; - return (*this); } - _Myt operator++(int) - {_Myt _Tmp = *this; - --current; - return (_Tmp); } - _Myt& operator--() - {++current; - return (*this); } - _Myt operator--(int) - {_Myt _Tmp = *this; - ++current; - return (_Tmp); } - _Myt& operator+=(_D _N) - {current -= _N; - return (*this); } - _Myt operator+(_D _N) const - {return (_Myt(current - _N)); } - _Myt& operator-=(_D _N) - {current += _N; - return (*this); } - _Myt operator-(_D _N) const - {return (_Myt(current + _N)); } - _Rt operator[](_D _N) const - {return (*(*this + _N)); } -protected: - _RI current; - }; - -template inline - bool __cdecl operator==( - const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _X, - const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _Y) - {return (_X.base() == _Y.base()); } - -template inline - bool __cdecl operator!=( - const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _X, - const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _Y) - {return (!(_X == _Y)); } -template inline - bool __cdecl operator<( - const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _X, - const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _Y) - {return (_Y.base() < _X.base()); } -template inline - bool __cdecl operator>( - const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _X, - const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _Y) - {return (_Y < _X); } -template inline - bool __cdecl operator<=( - const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _X, - const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _Y) - {return (!(_Y < _X)); } -template inline - bool __cdecl operator>=( - const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _X, - const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _Y) - {return (!(_X < _Y)); } -template inline - _D __cdecl operator-( - const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _X, - const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _Y) - {return (_Y.base() - _X.base()); } -template inline - reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D> __cdecl operator+(_D _N, - const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _Y) - {return (reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>( - _Y.base() - _N)); } - // TEMPLATE CLASS istreambuf_iterator_ (from ) - -template - class istreambuf_iterator_ - : public iterator_ { -public: - typedef istreambuf_iterator_<_E, _Tr> _Myt; - typedef _E char_type; - typedef _Tr traits_type; - typedef typename _Tr::int_type int_type; - typedef basic_streambuf<_E, _Tr> streambuf_type; - typedef basic_istream<_E, _Tr> istream_type; - istreambuf_iterator_(streambuf_type *_Sb = 0) _THROW0() - : _Sbuf(_Sb), _Got(_Sb == 0) {} - istreambuf_iterator_(istream_type& _I) _THROW0() - : _Sbuf(_I.rdbuf()), _Got(_I.rdbuf() == 0) {} - const _E& operator*() const - {if (!_Got) - ((_Myt *)this)->_Peek(); - return (_Val); } - const _E *operator->() const - {return (&**this); } - _Myt& operator++() - {_Inc(); - return (*this); } - _Myt operator++(int) - {if (!_Got) - _Peek(); - _Myt _Tmp = *this; - _Inc(); - return (_Tmp); } - bool equal(const _Myt& _X) const - {if (!_Got) - ((_Myt *)this)->_Peek(); - if (!_X._Got) - ((_Myt *)&_X)->_Peek(); - return (_Sbuf == 0 && _X._Sbuf == 0 - || _Sbuf != 0 && _X._Sbuf != 0); } -private: - void _Inc() - {if (_Sbuf == 0 - || _Tr::eq_int_type(_Tr::eof(), _Sbuf->sbumpc())) - _Sbuf = 0, _Got = true; - else - _Got = false; } - _E _Peek() - {int_type _C; - if (_Sbuf == 0 - || _Tr::eq_int_type(_Tr::eof(), _C = _Sbuf->sgetc())) - _Sbuf = 0; - else - _Val = _Tr::to_char_type(_C); - _Got = true; - return (_Val); } - streambuf_type *_Sbuf; - bool _Got; - _E _Val; -}; - -template inline - bool __cdecl operator==(const istreambuf_iterator_<_E, _Tr>& _X, - const istreambuf_iterator_<_E, _Tr>& _Y) - {return (_X.equal(_Y)); } -template inline - bool __cdecl operator!=(const istreambuf_iterator_<_E, _Tr>& _X, - const istreambuf_iterator_<_E, _Tr>& _Y) - {return (!(_X == _Y)); } - // TEMPLATE CLASS ostreambuf_iterator_ (from ) -template - class ostreambuf_iterator_ - : public iterator_ { - typedef ostreambuf_iterator_<_E, _Tr> _Myt; -public: - typedef _E char_type; - typedef _Tr traits_type; - typedef basic_streambuf<_E, _Tr> streambuf_type; - typedef basic_ostream<_E, _Tr> ostream_type; - ostreambuf_iterator_(streambuf_type *_Sb) _THROW0() - : _Failed(false), _Sbuf(_Sb) {} - ostreambuf_iterator_(ostream_type& _O) _THROW0() - : _Failed(false), _Sbuf(_O.rdbuf()) {} - _Myt& operator=(_E _X) - {if (_Sbuf == 0 - || _Tr::eq_int_type(_Tr::eof(), _Sbuf->sputc(_X))) - _Failed = true; - return (*this); } - _Myt& operator*() - {return (*this); } - _Myt& operator++() - {return (*this); } - _Myt& operator++(int) - {return (*this); } - bool failed() const _THROW0() - {return (_Failed); } -private: - bool _Failed; - streambuf_type *_Sbuf; -}; - // TEMPLATE OPERATORS - namespace rel_ops_ { -template inline - bool __cdecl operator!=(const _Ty& _X, const _Ty& _Y) - {return (!(_X == _Y)); } -template inline - bool __cdecl operator>(const _Ty& _X, const _Ty& _Y) - {return (_Y < _X); } -template inline - bool __cdecl operator<=(const _Ty& _X, const _Ty& _Y) - {return (!(_Y < _X)); } -template inline - bool __cdecl operator>=(const _Ty& _X, const _Ty& _Y) - {return (!(_X < _Y)); } - _STD_END -_STD_END - -#ifdef _MSC_VER -#pragma pack(pop) -#endif // _MSC_VER diff --git a/regamedll/hookers/stl/vector b/regamedll/hookers/stl/vector deleted file mode 100644 index ad3157df..00000000 --- a/regamedll/hookers/stl/vector +++ /dev/null @@ -1,595 +0,0 @@ -#pragma once - -#include "iterator" -#include "xutility" -#include "memory" - -#ifdef _MSC_VER -#pragma pack(push, 8) -#endif // _MSC_VER - -_STD_BEGIN - // TEMPLATE CLASS vector_vs6 -template > - class vector_vs6 { -public: - typedef vector_vs6<_Ty, _A> _Myt; - typedef _A allocator_type; - typedef typename _A::size_type size_type; - typedef typename _A::difference_type difference_type; - typedef typename _A::pointer _Tptr; - typedef typename _A::const_pointer _Ctptr; - typedef typename _A::reference reference; - typedef typename _A::const_reference const_reference; - typedef typename _A::value_type value_type; - typedef _Tptr iterator; - typedef _Ctptr const_iterator; - typedef reverse_iterator_ - const_reverse_iterator; - typedef reverse_iterator_ - reverse_iterator; - explicit vector_vs6(const _A& _Al = _A()) - : allocator(_Al), _First(0), _Last(0), _End(0) {} - explicit vector_vs6(size_type _N, const _Ty& _V = _Ty(), - const _A& _Al = _A()) - : allocator(_Al) - {_First = allocator.allocate(_N, (void *)0); - _Ufill(_First, _N, _V); - _Last = _First + _N; - _End = _Last; } - vector_vs6(const _Myt& _X) - : allocator(_X.allocator) - {_First = allocator.allocate(_X.size(), (void *)0); - _Last = _Ucopy(_X.begin(), _X.end(), _First); - _End = _Last; } - typedef const_iterator _It; - vector_vs6(_It _F, _It _L, const _A& _Al = _A()) - : allocator(_Al), _First(0), _Last(0), _End(0) - {insert(begin(), _F, _L); } - ~vector_vs6() - {__Destroy(_First, _Last); - allocator.deallocate(_First, _End - _First); - _First = 0, _Last = 0, _End = 0; } - _Myt& operator=(const _Myt& _X) - {if (this == &_X) - ; - else if (_X.size() <= size()) - {iterator_ _S = copy_(_X.begin(), _X.end(), _First); - __Destroy(_S, _Last); - _Last = _First + _X.size(); } - else if (_X.size() <= capacity()) - {const_iterator _S = _X.begin() + size(); - copy_(_X.begin(), _S, _First); - _Ucopy(_S, _X.end(), _Last); - _Last = _First + _X.size(); } - else - {__Destroy(_First, _Last); - allocator.deallocate(_First, _End - _First); - _First = allocator.allocate(_X.size(), (void *)0); - _Last = _Ucopy(_X.begin(), _X.end(), - _First); - _End = _Last; } - return (*this); } - void reserve(size_type _N) - {if (capacity() < _N) - {iterator _S = allocator.allocate(_N, (void *)0); - _Ucopy(_First, _Last, _S); - __Destroy(_First, _Last); - allocator.deallocate(_First, _End - _First); - _End = _S + _N; - _Last = _S + size(); - _First = _S; }} - size_type capacity() const - {return (_First == 0 ? 0 : _End - _First); } - iterator begin() - {return (_First); } - const_iterator begin() const - {return ((const_iterator)_First); } - iterator end() - {return (_Last); } - const_iterator end() const - {return ((const_iterator)_Last); } - reverse_iterator rbegin() - {return (reverse_iterator(end())); } - const_reverse_iterator rbegin() const - {return (const_reverse_iterator(end())); } - reverse_iterator rend() - {return (reverse_iterator(begin())); } - const_reverse_iterator rend() const - {return (const_reverse_iterator(begin())); } - void resize(size_type _N, const _Ty& _X = _Ty()) - {if (size() < _N) - insert(end(), _N - size(), _X); - else if (_N < size()) - erase(begin() + _N, end()); } - size_type size() const - {return (_First == 0 ? 0 : _Last - _First); } - size_type max_size() const - {return (allocator.max_size()); } - bool empty() const - {return (size() == 0); } - _A get_allocator() const - {return (allocator); } - const_reference at(size_type _P) const - {if (size() <= _P) - _Xran(); - return (*(begin() + _P)); } - reference at(size_type _P) - {if (size() <= _P) - _Xran(); - return (*(begin() + _P)); } - const_reference operator[](size_type _P) const - {return (*(begin() + _P)); } - reference operator[](size_type _P) - {return (*(begin() + _P)); } - reference front() - {return (*begin()); } - const_reference front() const - {return (*begin()); } - reference back() - {return (*(end() - 1)); } - const_reference back() const - {return (*(end() - 1)); } - void push_back(const _Ty& _X) - {insert(end(), _X); } - void pop_back() - {erase(end() - 1); } - void assign(_It _F, _It _L) - {erase(begin(), end()); - insert(begin(), _F, _L); } - void assign(size_type _N, const _Ty& _X = _Ty()) - {erase(begin(), end()); - insert(begin(), _N, _X); } - iterator insert(iterator _P, const _Ty& _X = _Ty()) - {size_type _O = size_type(_P - begin()); - insert(_P, 1, _X); - return (begin() + _O); } - void insert(iterator _P, size_type _M, const _Ty& _X) - {if (size_type(_End - _Last) < _M) - {size_type _N = size() + (_M < size() ? size() : _M); - iterator _S = allocator.allocate(_N, (void *)0); - iterator _Q = _Ucopy(_First, _P, _S); - _Ufill(_Q, _M, _X); - _Ucopy(_P, _Last, _Q + _M); - __Destroy(_First, _Last); - allocator.deallocate(_First, _End - _First); - _End = _S + _N; - _Last = _S + size() + _M; - _First = _S; } - else if (size_type(_Last - _P) < _M) - {_Ucopy(_P, _Last, _P + _M); - _Ufill(_Last, _M - (_Last - _P), _X); - fill_(_P, _Last, _X); - _Last += _M; } - else if (0 < _M) - {_Ucopy(_Last - _M, _Last, _Last); - copy_backward_(_P, _Last - _M, _Last); - fill_(_P, _P + _M, _X); - _Last += _M; }} - void insert(iterator _P, _It _F, _It _L) - {size_type _M = 0; - __Distance(_F, _L, _M); - if (_End - _Last < _M) - {size_type _N = size() + (_M < size() ? size() : _M); - iterator _S = allocator.allocate(_N, (void *)0); - iterator _Q = _Ucopy(_First, _P, _S); - _Q = _Ucopy(_F, _L, _Q); - _Ucopy(_P, _Last, _Q); - __Destroy(_First, _Last); - allocator.deallocate(_First, _End - _First); - _End = _S + _N; - _Last = _S + size() + _M; - _First = _S; } - else if (_Last - _P < _M) - {_Ucopy(_P, _Last, _P + _M); - _Ucopy(_F + (_Last - _P), _L, _Last); - copy_(_F, _F + (_Last - _P), _P); - _Last += _M; } - else if (0 < _M) - {_Ucopy(_Last - _M, _Last, _Last); - copy_backward_(_P, _Last - _M, _Last); - copy_(_F, _L, _P); - _Last += _M; }} - iterator erase(iterator _P) - {copy_(_P + 1, end(), _P); - __Destroy(_Last - 1, _Last); - --_Last; - return (_P); } - iterator erase(iterator _F, iterator _L) - {iterator _S = copy_(_L, end(), _F); - __Destroy(_S, end()); - _Last = _S; - return (_F); } - void clear() - {erase(begin(), end()); } - bool _Eq(const _Myt& _X) const - {return (size() == _X.size() - && equal_(begin(), end(), _X.begin())); } - bool _Lt(const _Myt& _X) const - {return (lexicographical_compare_(begin(), end(), - _X.begin(), _X.end())); } - void swap(_Myt& _X) - {if (allocator == _X.allocator) - {std::swap_(_First, _X._First); - std::swap_(_Last, _X._Last); - std::swap_(_End, _X._End); } - else - {_Myt _Ts = *this; *this = _X, _X = _Ts; }} - friend void swap(_Myt& _X, _Myt& _Y) - {_X.swap_(_Y); } -protected: - void __Destroy(iterator _F, iterator _L) - {for (; _F != _L; ++_F) - allocator.destroy(_F); } - iterator _Ucopy(const_iterator _F, const_iterator _L, - iterator _P) - {for (; _F != _L; ++_P, ++_F) - allocator.construct(_P, *_F); - return (_P); } - void _Ufill(iterator _F, size_type _N, const _Ty &_X) - {for (; 0 < _N; --_N, ++_F) - allocator.construct(_F, _X); } - void _Xran() const - {_THROW(out_of_range, "invalid vector_vs6 subscript"); } - _A allocator; - iterator _First, _Last, _End; - }; - // CLASS vector_vs6 -typedef unsigned int _Vbase; // word type for vector representation -const int __VBITS = CHAR_BIT * sizeof (_Vbase); // at least CHAR_BITS bits per word - -typedef allocator_<_Vbase> _Bool_allocator; -template -class vector_vs6 { -public: - typedef _Bool_allocator _A; - typedef bool _Ty; - typedef vector_vs6<_Ty, _A> _Myt; - typedef vector_vs6<_Vbase, _A> _Vbtype; - typedef _A allocator_type; - typedef typename _A::size_type size_type; - typedef typename _A::difference_type difference_type; - - // CLASS reference - class reference { - public: - reference() - : _Mask(0), _Ptr(0) {} - reference(size_t _O, _Vbase *_P) - : _Mask((_Vbase)1 << _O), _Ptr(_P) {} - reference& operator=(const reference& _X) - {return (*this = bool(_X)); } - reference& operator=(bool _V) - {if (_V) - *_Ptr |= _Mask; - else - *_Ptr &= ~_Mask; - return (*this); } - void flip() - {*_Ptr ^= _Mask; } - bool operator~() const - {return (!bool(*this)); } - operator bool() const - {return ((*_Ptr & _Mask) != 0); } - protected: - _Vbase _Mask, *_Ptr; - }; - - typedef const reference const_reference; - typedef bool value_type; - // CLASS const_iterator - class iterator_; - class const_iterator : public _Ranit { - public: - const_iterator() - : _Off(0), _Ptr(0) {} - const_iterator(size_t _O, const _Vbase *_P) - : _Off(_O), _Ptr((_Vbase*)_P) {} - const_iterator(const iterator_& _X) - : _Off(_X._Off), _Ptr(_X._Ptr) {} - const_reference operator*() const - {return (const_reference(_Off, _Ptr)); } - const_iterator& operator++() - {_Inc(); - return (*this); } - const_iterator operator++(int) - {const_iterator _Tmp = *this; - _Inc(); - return (_Tmp); } - const_iterator& operator--() - {_Dec(); - return (*this); } - const_iterator operator--(int) - {const_iterator _Tmp = *this; - _Dec(); - return (_Tmp); } - const_iterator& operator+=(difference_type _N) - {_Off += _N; - _Ptr += _Off / __VBITS; - _Off %= __VBITS; - return (*this); } - const_iterator& operator-=(difference_type _N) - {return (*this += -_N); } - const_iterator operator+(difference_type _N) const - {const_iterator _Tmp = *this; - return (_Tmp += _N); } - const_iterator operator-(difference_type _N) const - {const_iterator _Tmp = *this; - return (_Tmp -= _N); } - difference_type operator-(const const_iterator _X) const - {return (__VBITS * (_Ptr - _X._Ptr) - + (difference_type)_Off - - (difference_type)_X._Off); } - const_reference operator[](difference_type _N) const - {return (*(*this + _N)); } - bool operator==(const const_iterator& _X) const - {return (_Ptr == _X._Ptr && _Off == _X._Off); } - bool operator!=(const const_iterator& _X) const - {return (!(*this == _X)); } - bool operator<(const const_iterator& _X) const - {return (_Ptr < _X._Ptr - || _Ptr == _X._Ptr && _Off < _X._Off); } - bool operator>(const const_iterator& _X) const - {return (_X < *this); } - bool operator<=(const const_iterator& _X) const - {return (!(_X < *this)); } - bool operator>=(const const_iterator& _X) const - {return (!(*this < _X)); } - protected: - void _Dec() - {if (_Off != 0) - --_Off; - else - _Off = __VBITS - 1, --_Ptr; } - void _Inc() - {if (_Off < __VBITS - 1) - ++_Off; - else - _Off = 0, ++_Ptr; } - size_t _Off; - _Vbase *_Ptr; - }; - // CLASS iterator_ - class iterator_ : public const_iterator { - public: - iterator_() - : const_iterator() {} - iterator_(size_t _O, _Vbase *_P) - : const_iterator(_O, _P) {} - reference operator*() const - {return (reference(_Off, _Ptr)); } - iterator_& operator++() - {_Inc(); - return (*this); } - iterator_ operator++(int) - {iterator_ _Tmp = *this; - _Inc(); - return (_Tmp); } - iterator_& operator--() - {_Dec(); - return (*this); } - iterator_ operator--(int) - {iterator_ _Tmp = *this; - _Dec(); - return (_Tmp); } - iterator_& operator+=(difference_type _N) - {_Off += _N; - _Ptr += _Off / __VBITS; - _Off %= __VBITS; - return (*this); } - iterator_& operator-=(difference_type _N) - {return (*this += -_N); } - iterator_ operator+(difference_type _N) const - {iterator_ _Tmp = *this; - return (_Tmp += _N); } - iterator_ operator-(difference_type _N) const - {iterator_ _Tmp = *this; - return (_Tmp -= _N); } - difference_type operator-(const iterator_ _X) const - {return (__VBITS * (_Ptr - _X._Ptr) - + (difference_type)_Off - - (difference_type)_X._Off); } - reference operator[](difference_type _N) const - {return (*(*this + _N)); } - bool operator==(const iterator_& _X) const - {return (_Ptr == _X._Ptr && _Off == _X._Off); } - bool operator!=(const iterator_& _X) const - {return (!(*this == _X)); } - bool operator<(const iterator_& _X) const - {return (_Ptr < _X._Ptr - || _Ptr == _X._Ptr && _Off < _X._Off); } - bool operator>(const iterator_& _X) const - {return (_X < *this); } - bool operator<=(const iterator_& _X) const - {return (!(_X < *this)); } - bool operator>=(const iterator_& _X) const - {return (!(*this < _X)); } - }; - typedef reverse_iterator_ - const_reverse_iterator; - typedef reverse_iterator_ - reverse_iterator; - explicit vector_vs6(const _A& _Al = _A()) - : _Size(0), _Vec(_Al) {} - explicit vector_vs6(size_type _N, const bool _V = false, - const _A& _Al = _A()) - : _Vec(_Nw(_N), _V ? -1 : 0, _Al) {_Trim(_N); } - typedef const_iterator _It; - vector_vs6(_It _F, _It _L, const _A& _Al = _A()) - : _Size(0), _Vec(_Al) - {insert(begin(), _F, _L); } - ~vector_vs6() - {_Size = 0; } - void reserve(size_type _N) - {_Vec.reserve(_Nw(_N)); } - size_type capacity() const - {return (_Vec.capacity() * __VBITS); } - iterator_ begin() - {return (iterator_(0, _Vec.begin())); } - const_iterator begin() const - {return (const_iterator(0, _Vec.begin())); } - iterator_ end() - {iterator_ _Tmp = begin(); - if (0 < _Size) - _Tmp += _Size; - return (_Tmp); } - const_iterator end() const - {const_iterator _Tmp = begin(); - if (0 < _Size) - _Tmp += _Size; - return (_Tmp); } - reverse_iterator rbegin() - {return (reverse_iterator(end())); } - const_reverse_iterator rbegin() const - {return (const_reverse_iterator(end())); } - reverse_iterator rend() - {return (reverse_iterator(begin())); } - const_reverse_iterator rend() const - {return (const_reverse_iterator(begin())); } - void resize(size_type _N, bool _X = false) - {if (size() < _N) - insert(end(), _N - size(), _X); - else if (_N < size()) - erase(begin() + _N, end()); } - size_type size() const - {return (_Size); } - size_type max_size() const - {return (_Vec.max_size() * __VBITS); } - bool empty() const - {return (size() == 0); } - _A get_allocator() const - {return (_Vec.get_allocator()); } - const_reference at(size_type _P) const - {if (size() <= _P) - _Xran(); - return (*(begin() + _P)); } - reference at(size_type _P) - {if (size() <= _P) - _Xran(); - return (*(begin() + _P)); } - const_reference operator[](size_type _P) const - {return (*(begin() + _P)); } - reference operator[](size_type _P) - {return (*(begin() + _P)); } - reference front() - {return (*begin()); } - const_reference front() const - {return (*begin()); } - reference back() - {return (*(end() - 1)); } - const_reference back() const - {return (*(end() - 1)); } - void push_back(const bool _X) - {insert(end(), _X); } - void pop_back() - {erase(end() - 1); } - void assign(_It _F, _It _L) - {erase(begin(), end()); - insert(begin(), _F, _L); } - void assign(size_type _N, const bool _X = false) - {erase(begin(), end()); - insert(begin(), _N, _X); } - iterator_ insert(iterator_ _P, const bool _X = false) - {size_type _O = _P - begin(); - insert(_P, 1, _X); - return (begin() + _O); } - void insert(iterator_ _P, size_type _M, const bool _X) - {if (0 < _M) - {if (capacity() - size() < _M) - {size_type _O = _P - begin(); - _Vec.resize(_Nw(size() + _M), 0); - _P = begin() + _O; } - copy_backward_(_P, end(), end() + _M); - fill_(_P, _P + _M, _X); - _Size += _M; }} - void insert(iterator_ _P, _It _F, _It _L) - {size_type _M = 0; - __Distance(_F, _L, _M); - if (0 < _M) - {if (capacity() - size() < _M) - {size_type _O = _P - begin(); - _Vec.resize(_Nw(size() + _M), 0); - _P = begin() + _O; } - copy_backward_(_P, end(), end() + _M); - copy_(_F, _L, _P); - _Size += _M; }} - iterator_ erase(iterator_ _P) - {copy_(_P + 1, end(), _P); - _Trim(_Size - 1); - return (_P); } - iterator_ erase(iterator_ _F, iterator_ _L) - {iterator_ _S = copy_(_L, end(), _F); - _Trim(_S - begin()); - return (_F); } - void clear() - {erase(begin(), end()); } - void flip() - {for (_Vbtype::iterator_ _S = _Vec.begin(); - _S != _Vec.end(); ++_S) - *_S = ~*_S; - _Trim(_Size); } - bool _Eq(const _Myt& _X) const - {return (_Size == _X._Size && _Vec._Eq(_X._Vec)); } - bool _Lt(const _Myt& _X) const - {return (_Size < _X._Size - || _Size == _X._Size && _Vec._Lt(_X._Vec)); } - void swap(_Myt& _X) - {std::swap_(_Size, _X._Size); - _Vec.swap_(_X._Vec); } - friend void swap(_Myt& _X, _Myt& _Y) - {_X.swap_(_Y); } - static void swap(reference _X, reference _Y) - {bool _V = _X; - _X = _Y; - _Y = _V; } -protected: - static size_type _Nw(size_type _N) - {return ((_N + __VBITS - 1) / __VBITS); } - void _Trim(size_type _N) - {size_type _M = _Nw(_N); - if (_M < _Vec.size()) - _Vec.erase(_Vec.begin() + _M, _Vec.end()); - _Size = _N; - _N %= __VBITS; - if (0 < _N) - _Vec[_M - 1] &= ((_Vbase)1 << _N) - 1; } - void _Xran() const - {_THROW(out_of_range, "invalid vector_vs6 subscript"); } - size_type _Size; - _Vbtype _Vec; - }; -typedef vector_vs6 _Bvector; - // vector_vs6 TEMPLATE OPERATORS -template inline - bool operator==(const vector_vs6<_Ty, _A>& _X, - const vector_vs6<_Ty, _A>& _Y) - {return (_X._Eq(_Y)); } -template inline - bool operator!=(const vector_vs6<_Ty, _A>& _X, - const vector_vs6<_Ty, _A>& _Y) - {return (!(_X == _Y)); } -template inline - bool operator<(const vector_vs6<_Ty, _A>& _X, - const vector_vs6<_Ty, _A>& _Y) - {return (_X._Lt(_Y)); } -template inline - bool operator>(const vector_vs6<_Ty, _A>& _X, - const vector_vs6<_Ty, _A>& _Y) - {return (_Y < _X); } -template inline - bool operator<=(const vector_vs6<_Ty, _A>& _X, - const vector_vs6<_Ty, _A>& _Y) - {return (!(_Y < _X)); } -template inline - bool operator>=(const vector_vs6<_Ty, _A>& _X, - const vector_vs6<_Ty, _A>& _Y) - {return (!(_X < _Y)); } -_STD_END - -#ifdef _MSC_VER -#pragma pack(pop) -#endif // _MSC_VER diff --git a/regamedll/hookers/stl/xmemory b/regamedll/hookers/stl/xmemory deleted file mode 100644 index 3cc4a31d..00000000 --- a/regamedll/hookers/stl/xmemory +++ /dev/null @@ -1,85 +0,0 @@ -#pragma once - -#include -#include - -#ifdef _MSC_VER -#pragma pack(push, 8) -#endif // _MSC_VER - -#ifndef _FARQ // specify standard memory model - #define _FARQ - #define _PDFT ptrdiff_t - #define _SIZT size_t -#endif - #define _POINTER_X(T, A) T _FARQ * - #define _REFERENCE_X(T, A) T _FARQ & -_STD_BEGIN - // TEMPLATE FUNCTION _Allocate -template inline - _Ty _FARQ *_Allocate(_PDFT _N, _Ty _FARQ *) - {if (_N < 0) - _N = 0; - return ((_Ty _FARQ *)operator new( - (_SIZT)_N * sizeof (_Ty))); } - // TEMPLATE FUNCTION __Construct -template inline - void __Construct(_T1 _FARQ *_P, const _T2& _V) - {new ((void _FARQ *)_P) _T1(_V); } - // TEMPLATE FUNCTION __Destroy -template inline - void __Destroy(_Ty _FARQ *_P) - {_DESTRUCTOR(_Ty, _P); } -inline void __Destroy(char _FARQ *_P) - {} -inline void __Destroy(wchar_t _FARQ *_P) - {} - // TEMPLATE CLASS allocator -template - class allocator_ { -public: - typedef _SIZT size_type; - typedef _PDFT difference_type; - typedef _Ty _FARQ *pointer; - typedef const _Ty _FARQ *const_pointer; - typedef _Ty _FARQ& reference; - typedef const _Ty _FARQ& const_reference; - typedef _Ty value_type; - pointer address(reference _X) const - {return (&_X); } - const_pointer address(const_reference _X) const - {return (&_X); } - pointer allocate(size_type _N, const void *) - {return (_Allocate((difference_type)_N, (pointer)0)); } - char _FARQ *_Charalloc(size_type _N) - {return (_Allocate((difference_type)_N, - (char _FARQ *)0)); } - void deallocate(void _FARQ *_P, size_type) - {operator delete(_P); } - void construct(pointer _P, const _Ty& _V) - {__Construct(_P, _V); } - void destroy(pointer _P) - {__Destroy(_P); } - _SIZT max_size() const - {_SIZT _N = (_SIZT)(-1) / sizeof (_Ty); - return (0 < _N ? _N : 1); } - }; -template inline - bool operator==(const allocator_<_Ty>&, const allocator_<_U>&) - {return (true); } -template inline - bool operator!=(const allocator_<_Ty>&, const allocator_<_U>&) - {return (false); } - // CLASS allocator_ -template<> class _CRTIMP2 allocator_ { -public: - typedef void _Ty; - typedef _Ty _FARQ *pointer; - typedef const _Ty _FARQ *const_pointer; - typedef _Ty value_type; - }; -_STD_END - -#ifdef _MSC_VER -#pragma pack(pop) -#endif // _MSC_VER diff --git a/regamedll/hookers/stl/xstddef b/regamedll/hookers/stl/xstddef deleted file mode 100644 index 38b6f95a..00000000 --- a/regamedll/hookers/stl/xstddef +++ /dev/null @@ -1,52 +0,0 @@ -#pragma once - -#include - -#ifndef _CRTIMP2 -#ifdef CRTDLL2 -#define _CRTIMP2 __declspec(dllexport) -#else // CRTDLL2 -#ifdef _DLL -#define _CRTIMP2 __declspec(dllimport) -#else // _DLL -#define _CRTIMP2 -#endif // _DLL -#endif // CRTDLL2 -#endif // _CRTIMP2 - -#ifdef _MSC_VER -#pragma pack(push, 8) -#endif // _MSC_VER - -_STD_BEGIN - // EXCEPTION MACROS - #define _TRY_BEGIN try { - #define _CATCH(x) } catch (x) { - #define _CATCH_ALL } catch (...) { - #define _CATCH_END } - #define _RAISE(x) throw (x) - #define _RERAISE throw - #define _THROW0() throw () - #define _THROW1(x) throw (x) - #define _THROW(x, y) throw x(y) - // explicit KEYWORD - // BITMASK MACROS - #define _BITMASK(E, T) typedef int T - #define _BITMASK_OPS(T) - // MISCELLANEOUS MACROS -#define _DESTRUCTOR(ty, ptr) (ptr)->~ty() -#define _PROTECTED public -#define _TDEF(x) = x -#define _TDEF2(x, y) = x, y -#define _CNTSIZ(iter) ptrdiff_t -#define _TDEFP(x) -#define _STCONS(ty, name, val) enum {name = val} - // TYPE DEFINITIONS -//enum _Uninitialized {_Noinit}; - // FUNCTIONS -_CRTIMP2 void __cdecl _Nomemory(); -_STD_END - -#ifdef _MSC_VER -#pragma pack(pop) -#endif // _MSC_VER diff --git a/regamedll/hookers/stl/xutility b/regamedll/hookers/stl/xutility deleted file mode 100644 index 30921abb..00000000 --- a/regamedll/hookers/stl/xutility +++ /dev/null @@ -1,103 +0,0 @@ -#pragma once - -#include "utility" - -#ifdef _MSC_VER -#pragma pack(push, 8) -#endif // _MSC_VER - -_STD_BEGIN - // TEMPLATE FUNCTION copy -template inline - _OI copy_(_II _F, _II _L, _OI _X) - {for (; _F != _L; ++_X, ++_F) - *_X = *_F; - return (_X); } - // TEMPLATE FUNCTION copy_backward -template inline - _BI2 copy_backward_(_BI1 _F, _BI1 _L, _BI2 _X) - {while (_F != _L) - *--_X = *--_L; - return (_X); } - // TEMPLATE FUNCTION equal -template inline - bool equal_(_II1 _F, _II1 _L, _II2 _X) - {return (mismatch(_F, _L, _X).first == _L); } - // TEMPLATE FUNCTION equal WITH PRED -template inline - bool equal_(_II1 _F, _II1 _L, _II2 _X, _Pr _P) - {return (mismatch(_F, _L, _X, _P).first == _L); } - // TEMPLATE FUNCTION fill -template inline - void fill_(_FI _F, _FI _L, const _Ty& _X) - {for (; _F != _L; ++_F) - *_F = _X; } - // TEMPLATE FUNCTION fill_n -template inline - void fill_n(_OI _F, _Sz _N, const _Ty& _X) - {for (; 0 < _N; --_N, ++_F) - *_F = _X; } - // TEMPLATE FUNCTION lexicographical_compare -template inline - bool lexicographical_compare_(_II1 _F1, _II1 _L1, - _II2 _F2, _II2 _L2) - {for (; _F1 != _L1 && _F2 != _L2; ++_F1, ++_F2) - if (*_F1 < *_F2) - return (true); - else if (*_F2 < *_F1) - return (false); - return (_F1 == _L1 && _F2 != _L2); } - // TEMPLATE FUNCTION lexicographical_compare WITH PRED -template inline - bool lexicographical_compare_(_II1 _F1, _II1 _L1, - _II2 _F2, _II2 _L2, _Pr _P) - {for (; _F1 != _L1 && _F2 != _L2; ++_F1, ++_F2) - if (_P(*_F1, *_F2)) - return (true); - else if (_P(*_F2, *_F1)) - return (false); - return (_F1 == _L1 && _F2 != _L2); } - // TEMPLATE FUNCTION max - -#ifndef _MAX - #define _MAX _cpp_max - #define _MIN _cpp_min -#endif // _MAX - -template inline - const _Ty& _cpp_max(const _Ty& _X, const _Ty& _Y) - {return (_X < _Y ? _Y : _X); } - // TEMPLATE FUNCTION max WITH PRED -template inline - const _Ty& _cpp_max(const _Ty& _X, const _Ty& _Y, _Pr _P) - {return (_P(_X, _Y) ? _Y : _X); } - // TEMPLATE FUNCTION min -template inline - const _Ty& _cpp_min(const _Ty& _X, const _Ty& _Y) - {return (_Y < _X ? _Y : _X); } - // TEMPLATE FUNCTION min WITH PRED -template inline - const _Ty& _cpp_min(const _Ty& _X, const _Ty& _Y, _Pr _P) - {return (_P(_Y, _X) ? _Y : _X); } - // TEMPLATE FUNCTION mismatch -template inline - pair_<_II1, _II2> mismatch(_II1 _F, _II1 _L, _II2 _X) - {for (; _F != _L && *_F == *_X; ++_F, ++_X) - ; - return (pair_<_II1, _II2>(_F, _X)); } - // TEMPLATE FUNCTION mismatch WITH PRED -template inline - pair_<_II1, _II2> mismatch(_II1 _F, _II1 _L, _II2 _X, _Pr _P) - {for (; _F != _L && _P(*_F, *_X); ++_F, ++_X) - ; - return (pair_<_II1, _II2>(_F, _X)); } - // TEMPLATE FUNCTION swap -template inline - void swap_(_Ty& _X, _Ty& _Y) - {_Ty _Tmp = _X; - _X = _Y, _Y = _Tmp; } -_STD_END - -#ifdef _MSC_VER -#pragma pack(pop) -#endif // _MSC_VER diff --git a/regamedll/msvc/PostBuild.bat b/regamedll/msvc/PostBuild.bat index aa8a2944..5140aa5d 100644 --- a/regamedll/msvc/PostBuild.bat +++ b/regamedll/msvc/PostBuild.bat @@ -8,17 +8,23 @@ :: SET targetDir=%~1 +SET targetDirPlay=%targetDir:Play=% + SET targetName=%~2 SET targetExt=%~3 SET projectDir=%~4 -SET destination= +SET destination=PublishPath -IF NOT EXIST "%projectDir%\PublishPath.txt" ( - ECHO No deployment path specified. Create PublishPath.txt near PostBuild.bat with paths on separate lines for auto deployment. +IF NOT "%targetDir%"=="%targetDirPlay%" ( + SET destination=PublishPath_play +) + +IF NOT EXIST "%projectDir%\%destination%.txt" ( + ECHO No deployment path specified. Create %destination%.txt near PostBuild.bat with paths on separate lines for auto deployment. exit /B 0 ) -FOR /f "tokens=* delims= usebackq" %%a IN ("%projectDir%\PublishPath.txt") DO ( +FOR /f "tokens=* delims= usebackq" %%a IN ("%projectDir%\%destination%.txt") DO ( ECHO Deploying to: %%a IF NOT "%%a" == "" ( copy /Y "%targetDir%%targetName%%targetExt%" "%%a" diff --git a/regamedll/msvc/PostBuild_mp.bat b/regamedll/msvc/PostBuild_mp.bat deleted file mode 100644 index 9c6aaea3..00000000 --- a/regamedll/msvc/PostBuild_mp.bat +++ /dev/null @@ -1,45 +0,0 @@ -@echo OFF -:: -:: Post-build auto-deploy script -:: Create and fill PublishPath_mp.txt file with path to deployment folder -:: I.e. PublishPath_mp.txt should contain one line with a folder path -:: Call it so: -:: IF EXIST "$(ProjectDir)PostBuild_mp.bat" (CALL "$(ProjectDir)PostBuild_mp.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") -:: - -SET targetDir=%~1 -SET targetDirPlay=%targetDir:Play=% - -SET targetName=%~2 -SET targetExt=%~3 -SET projectDir=%~4 -SET destination=PublishPath_mp - -IF NOT "%targetDir%"=="%targetDirPlay%" ( - SET destination=PublishPath_mp_play -) - -IF NOT EXIST "%projectDir%\%destination%.txt" ( - ECHO No deployment path specified. Create %destination%.txt near PostBuild_mp.bat with paths on separate lines for auto deployment. - exit /B 0 -) - -FOR /f "tokens=* delims= usebackq" %%a IN ("%projectDir%\%destination%.txt") DO ( - ECHO Deploying to: %%a - IF NOT "%%a" == "" ( - copy /Y "%targetDir%%targetName%%targetExt%" "%%a" - IF NOT ERRORLEVEL 1 ( - IF EXIST "%targetDir%%targetName%.pdb" ( - copy /Y "%targetDir%%targetName%.pdb" "%%a" - ) - ) ELSE ( - ECHO PostBuild_mp.bat ^(27^) : warning : Can't copy '%targetName%%targetExt%' to deploy path '%%a' - ) - ) -) - -IF "%%a" == "" ( - ECHO No deployment path specified. -) - -exit /B 0 \ No newline at end of file diff --git a/regamedll/msvc/ReGameDLL.vcxproj b/regamedll/msvc/ReGameDLL.vcxproj index f9306bd7..574e628d 100644 --- a/regamedll/msvc/ReGameDLL.vcxproj +++ b/regamedll/msvc/ReGameDLL.vcxproj @@ -1,14 +1,6 @@  - - Debug MP Play - Win32 - - - Debug MP - Win32 - Debug Play Win32 @@ -17,14 +9,6 @@ Debug Win32 - - Release MP Play - Win32 - - - Release MP - Win32 - Release Play Win32 @@ -45,304 +29,207 @@ + + + + false - false - false - false - false - false false false + false + + + + + + - - - - - - - - false - false - false - false - false - false false false + false + + + + + + - - - - - - - - - false + + + + + + - - - - - - - - - false - false false - false - false - false - false - false false false + false + + + + + + - - - - - - - - false - false - false - false - false - false false false + false false - false - false - false - false - false false false + false - false + + + + + + - - - - - - - - - false - false - false + + + + + + - - - - - - - - - false - false + + + + + + - - - - - - - - + false + false + false false - false - false - false - false false - false - false - false - false - false false false + false + false + false + false false - false - false - false - false false - false - false - false - false - false false false + false false - false - false - false - false - false false false + false false - false - false - false - false - false false false + false false - false - false - false - false - false false false + false false - false - false - false - false - false false false + false false - false - false - false - false - false false false + false false - false - false - false - false - false false false + false false - false - false - false - false - false false false + false false - false - false - false - false - false false false + false false - false - false - false - false - false false false + false false - false - false - false - false - false false false + false false - false - false - false - false - false false false + false false - false - false - false - false - false false false + false @@ -365,67 +252,51 @@ false + false + false false - false - false - false - false false + false + false false - false - false - false - false false + false + false false - false - false - false - false false + false + false false - false - false - false - false false + false + false false - false - false - false - false false + false + false false - false - false - false - false false + false + false false - false - false - false - false false + false + false false - false - false - false - false @@ -440,18 +311,16 @@ + + - - false - + - - false - + @@ -463,294 +332,178 @@ - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false - false false + false false + false - false - false - false - false - false false false false + false - false - false - false - false - false - false false + false false + false @@ -763,136 +516,71 @@ - - true - true - true - true - true - - - true - true - true - true - - - true - true - true - true - - - true - true - true - true - - - true - true - true - - - - - - - - - true - true - - - true - true - true - true - - - - - true - true - true true - true true - true true true - true - true true + true - Create - precompiled.h - Create - precompiled.h Create - precompiled.h + Create + Create Create - Create - Create - Create - Create + precompiled.h + precompiled.h + precompiled.h precompiled.h - precompiled.h - precompiled.h - precompiled.h - precompiled.h Create precompiled.h - true - true - true - true + true + true + true + true - - - true - true - true - true + true + true + true + true - true - true - true - true + true + true + true + true - true - true - true - true + true + true + true + true - true - true - true - true + true + true + true + true @@ -922,50 +610,45 @@ + + + + + + + - - - - - - - - + + + + + + - - - - - - - - + + + + + + + - - - - - - - - + false + false + false false - false - false - false - false @@ -1064,13 +747,6 @@ - - - - - - - @@ -1085,9 +761,12 @@ + + + + - @@ -1100,37 +779,22 @@ - - - - - - - - - - - true + true + true true - true - true - true - true true true + true + true true - true - true - true - true true @@ -1152,9 +816,25 @@ DynamicLibrary true - v120_xp - v140_xp MultiByte + v120 + v140 + + + DynamicLibrary + true + MultiByte + v120 + v140 + true + + + DynamicLibrary + true + MultiByte + v120 + v140 + true DynamicLibrary @@ -1163,36 +843,6 @@ v120 v140 - - DynamicLibrary - true - MultiByte - v120 - v140 - - - DynamicLibrary - true - MultiByte - v120 - v140 - true - - - DynamicLibrary - true - MultiByte - v120 - v140 - true - - - DynamicLibrary - true - MultiByte - v120 - v140 - Application true @@ -1200,87 +850,46 @@ v140_xp MultiByte - - DynamicLibrary - false - v120_xp - v140_xp - true - MultiByte - - - DynamicLibrary - false - v120_xp - v140_xp - true - MultiByte - - + - - - - - - - - - - - - - - - - - - - + + + + + + + - filesystem_stdio + mp AllRules.ruleset - + + + mp + AllRules.ruleset + + + + + + mp + AllRules.ruleset + + + - filesystem_stdio - AllRules.ruleset - - - - - mp - AllRules.ruleset - - - - - mp - AllRules.ruleset - - - - - - mp - AllRules.ruleset - - - - - mp AllRules.ruleset @@ -1292,28 +901,6 @@ - - filesystem_stdio - AllRules.ruleset - - - $(VC_ExecutablePath_x86);$(WindowsSdk_71A_ExecutablePath);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); - $(VC_IncludePath);$(WindowsSdk_71A_IncludePath); - $(VC_LibraryPath_x86);$(WindowsSdk_71A_LibraryPath_x86); - - $(VC_IncludePath);$(WindowsSdk_71A_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86); - - - filesystem_stdio - AllRules.ruleset - - - $(VC_ExecutablePath_x86);$(WindowsSdk_71A_ExecutablePath);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); - $(VC_IncludePath);$(WindowsSdk_71A_IncludePath); - $(VC_LibraryPath_x86);$(WindowsSdk_71A_LibraryPath_x86); - - $(VC_IncludePath);$(WindowsSdk_71A_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86); - IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") @@ -1324,80 +911,7 @@ Level3 Disabled true - HOOK_GAMEDLL;REGAMEDLL_API;REGAMEDLL_SELF;REGAMEDLL_FIXES;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;NOMINMAX;%(PreprocessorDefinitions) - Precise - /arch:IA32 %(AdditionalOptions) - MultiThreadedDebug - Use - precompiled.h - Default - - - true - $(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies) - - - - $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - - - Automatic deployment script - IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") - - - echo Empty Action - Force build to run Pre-Build event - subversion.always.run - subversion.always.run - - - - - IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") - Setup version from Git revision - - - $(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories) - Level3 - Disabled - true - PLAY_GAMEDLL;HOOK_GAMEDLL;REGAMEDLL_SELF;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) - Precise - /arch:IA32 %(AdditionalOptions) - MultiThreadedDebug - Use - precompiled.h - - - true - %(AdditionalDependencies) - - - - $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - - - IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") - Automatic deployment script - - - echo Empty Action - Force build to run Pre-Build event - subversion.always.run - subversion.always.run - - - - - IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") - Setup version from Git revision - - - $(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories) - Level3 - Disabled - true - REGAMEDLL_ADD;REGAMEDLL_API;REGAMEDLL_FIXES;REGAMEDLL_SELF;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) + REGAMEDLL_ADD;REGAMEDLL_API;REGAMEDLL_XYUNYA;REGAMEDLL_FIXES;REGAMEDLL_SELF;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) Precise /arch:IA32 %(AdditionalOptions) MultiThreadedDebug @@ -1413,7 +927,7 @@ $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - IF EXIST "$(ProjectDir)PostBuild_mp.bat" (CALL "$(ProjectDir)PostBuild_mp.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") + IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") Automatic deployment script @@ -1423,7 +937,7 @@ subversion.always.run - + IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") Setup version from Git revision @@ -1458,7 +972,7 @@ true - IF EXIST "$(ProjectDir)PostBuild_mp.bat" (CALL "$(ProjectDir)PostBuild_mp.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") + IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") Automatic deployment script @@ -1468,7 +982,7 @@ subversion.always.run - + IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") Setup version from Git revision @@ -1478,7 +992,7 @@ Level3 Full true - REGAMEDLL_SELF;PLAY_GAMEDLL;REGAMEDLL_API;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;NDEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) + PLAY_GAMEDLL;REGAMEDLL_SELF;REGAMEDLL_API;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;NDEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) Precise /arch:IA32 %(AdditionalOptions) MultiThreaded @@ -1503,7 +1017,7 @@ true - IF EXIST "$(ProjectDir)PostBuild_mp.bat" (CALL "$(ProjectDir)PostBuild_mp.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") + IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") Automatic deployment script @@ -1513,7 +1027,7 @@ subversion.always.run - + IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") Setup version from Git revision @@ -1523,7 +1037,7 @@ Level3 Disabled true - REGAMEDLL_SELF;PLAY_GAMEDLL;REGAMEDLL_CHECKS;REGAMEDLL_API;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) + PLAY_GAMEDLL;REGAMEDLL_SELF;REGAMEDLL_CHECKS;REGAMEDLL_API;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) Precise /arch:IA32 %(AdditionalOptions) MultiThreadedDebug @@ -1539,7 +1053,7 @@ $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - IF EXIST "$(ProjectDir)PostBuild_mp.bat" (CALL "$(ProjectDir)PostBuild_mp.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") + IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") Automatic deployment script @@ -1586,86 +1100,6 @@ subversion.always.run - - - IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") - Setup version from Git revision - - - $(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories) - Level3 - MaxSpeed - true - true - true - HOOK_GAMEDLL;REGAMEDLL_SELF;REGAMEDLL_FIXES;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreaded - /arch:IA32 %(AdditionalOptions) - Use - precompiled.h - - - true - true - true - $(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies) - - - - $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - - - IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") - Automatic deployment script - - - echo Empty Action - Force build to run Pre-Build event - subversion.always.run - subversion.always.run - - - - - IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") - Setup version from Git revision - - - $(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories) - Level3 - MaxSpeed - true - true - true - REGAMEDLL_SELF;PLAY_GAMEDLL;HOOK_GAMEDLL;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions) - MultiThreaded - /arch:IA32 %(AdditionalOptions) - Use - precompiled.h - Precise - - - true - true - true - %(AdditionalDependencies) - - - - - $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - - - IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") - Automatic deployment script - - - echo Empty Action - Force build to run Pre-Build event - subversion.always.run - subversion.always.run - - diff --git a/regamedll/msvc/ReGameDLL.vcxproj.filters b/regamedll/msvc/ReGameDLL.vcxproj.filters index 1118ce3a..0cdd99cd 100644 --- a/regamedll/msvc/ReGameDLL.vcxproj.filters +++ b/regamedll/msvc/ReGameDLL.vcxproj.filters @@ -78,20 +78,17 @@ {cc40695f-5d17-4ee9-b410-1be65c49c099} + + {23a8e38b-6719-4a8e-9861-12425a661001} + + + {46ec2f1d-1feb-46e2-a801-0c87d1212c5c} + - - hookers - - - hookers - version - - hookers - regamedll @@ -266,9 +263,6 @@ dlls - - hookers - pm_shared @@ -518,21 +512,12 @@ regamedll - - regamedll - - - regamedll - public\tier0 regamedll - - hookers - regamedll @@ -542,9 +527,6 @@ regamedll - - hookers - dlls @@ -560,14 +542,26 @@ dlls\addons + + dlls + + + dlls + + + dlls\API + + + dlls\API + + + dlls\API + + + dlls\API + - - hookers - - - hookers - version @@ -577,9 +571,6 @@ public - - hookers - public @@ -985,27 +976,15 @@ dlls - - hookers\stl - regamedll - - regamedll - - - regamedll - public\regamedll public\regamedll - - public\regamedll - public\tier0 @@ -1015,9 +994,6 @@ game_shared\bot - - hookers - regamedll @@ -1039,12 +1015,6 @@ regamedll - - hookers - - - hookers - dlls @@ -1066,6 +1036,24 @@ dlls\addons + + dlls\bot + + + dlls\API + + + public\regamedll\API + + + public\regamedll\API + + + public\regamedll\API + + + public\regamedll\API + @@ -1074,32 +1062,5 @@ linux - - hookers\stl - - - hookers\stl - - - hookers\stl - - - hookers\stl - - - hookers\stl - - - hookers\stl - - - hookers\stl - - - hookers\stl - - - hookers\stl - \ No newline at end of file diff --git a/regamedll/msvc/Новая папка/ReGameDLL.vcxproj b/regamedll/msvc/Новая папка/ReGameDLL.vcxproj new file mode 100644 index 00000000..ed24e805 --- /dev/null +++ b/regamedll/msvc/Новая папка/ReGameDLL.vcxproj @@ -0,0 +1,1672 @@ + + + + + Debug MP Play + Win32 + + + Debug MP + Win32 + + + Debug Play + Win32 + + + Debug + Win32 + + + Release MP Play + Win32 + + + Release MP + Win32 + + + Release Play + Win32 + + + Release + Win32 + + + Tests + Win32 + + + + + + + + + + + + + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + false + + + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + + + + + + + + + + + false + false + + + false + + + + + + + + + + + false + false + + + + + + + + + + + + + + + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + false + + + + false + + + + + + + + + + + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + true + true + true + true + true + + + true + true + true + true + + + true + true + true + true + + + true + true + true + true + + + true + true + true + + + + + + + + + true + true + + + true + true + true + true + + + + + + + + + + + + + + + + true + true + true + true + + + true + true + true + true + true + true + true + true + + + + + Create + precompiled.h + Create + precompiled.h + Create + precompiled.h + Create + Create + Create + Create + Create + precompiled.h + precompiled.h + precompiled.h + precompiled.h + precompiled.h + Create + precompiled.h + + + + true + true + true + true + + + + + + true + true + true + true + + + true + true + true + true + + + true + true + true + true + + + true + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + true + true + true + + + true + true + true + true + true + true + true + + + + + {ceb94f7c-e459-4673-aabb-36e2074396c0} + false + true + false + true + false + + + + {70A2B904-B7DB-4C48-8DE0-AF567360D572} + ReGameDLL + + + + DynamicLibrary + true + v120_xp + v140_xp + MultiByte + + + DynamicLibrary + true + MultiByte + v120 + v140 + + + DynamicLibrary + true + MultiByte + v120 + v140 + + + DynamicLibrary + true + MultiByte + v120 + v140 + true + + + DynamicLibrary + true + MultiByte + v120 + v140 + true + + + DynamicLibrary + true + MultiByte + v120 + v140 + + + Application + true + v120_xp + v140_xp + MultiByte + + + DynamicLibrary + false + v120_xp + v140_xp + true + MultiByte + + + DynamicLibrary + false + v120_xp + v140_xp + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + filesystem_stdio + AllRules.ruleset + + + + + + filesystem_stdio + AllRules.ruleset + + + + + mp + AllRules.ruleset + + + + + mp + AllRules.ruleset + + + + + + mp + AllRules.ruleset + + + + + + mp + AllRules.ruleset + + + + + filesystem_stdio + AllRules.ruleset + + + + + filesystem_stdio + AllRules.ruleset + + + $(VC_ExecutablePath_x86);$(WindowsSdk_71A_ExecutablePath);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + $(VC_IncludePath);$(WindowsSdk_71A_IncludePath); + $(VC_LibraryPath_x86);$(WindowsSdk_71A_LibraryPath_x86); + + $(VC_IncludePath);$(WindowsSdk_71A_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86); + + + filesystem_stdio + AllRules.ruleset + + + $(VC_ExecutablePath_x86);$(WindowsSdk_71A_ExecutablePath);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + $(VC_IncludePath);$(WindowsSdk_71A_IncludePath); + $(VC_LibraryPath_x86);$(WindowsSdk_71A_LibraryPath_x86); + + $(VC_IncludePath);$(WindowsSdk_71A_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86); + + + + IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") + Setup version from Git revision + + + $(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories) + Level3 + Disabled + true + HOOK_GAMEDLL;REGAMEDLL_API;REGAMEDLL_SELF;REGAMEDLL_FIXES;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;NOMINMAX;%(PreprocessorDefinitions) + Precise + /arch:IA32 %(AdditionalOptions) + MultiThreadedDebug + Use + precompiled.h + Default + + + true + $(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies) + + + + $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + + + Automatic deployment script + IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") + + + echo Empty Action + Force build to run Pre-Build event + subversion.always.run + subversion.always.run + + + + + IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") + Setup version from Git revision + + + $(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories) + Level3 + Disabled + true + PLAY_GAMEDLL;HOOK_GAMEDLL;REGAMEDLL_SELF;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) + Precise + /arch:IA32 %(AdditionalOptions) + MultiThreadedDebug + Use + precompiled.h + + + true + %(AdditionalDependencies) + + + + $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + + + IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") + Automatic deployment script + + + echo Empty Action + Force build to run Pre-Build event + subversion.always.run + subversion.always.run + + + + + IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") + Setup version from Git revision + + + $(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories) + Level3 + Disabled + true + REGAMEDLL_ADD;REGAMEDLL_API;REGAMEDLL_FIXES;REGAMEDLL_SELF;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) + Precise + /arch:IA32 %(AdditionalOptions) + MultiThreadedDebug + Use + precompiled.h + + + true + $(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies) + + + mp.def + $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + + + IF EXIST "$(ProjectDir)PostBuild_mp.bat" (CALL "$(ProjectDir)PostBuild_mp.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") + Automatic deployment script + + + echo Empty Action + Force build to run Pre-Build event + subversion.always.run + subversion.always.run + + + + + IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") + Setup version from Git revision + + + $(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories) + Level3 + Full + true + REGAMEDLL_ADD;REGAMEDLL_FIXES;REGAMEDLL_SELF;REGAMEDLL_CHECKS;REGAMEDLL_API;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;NDEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) + Fast + /arch:IA32 %(AdditionalOptions) + MultiThreaded + Use + precompiled.h + ProgramDatabase + true + false + Default + true + true + + + true + $(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies) + + + mp.def + $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + true + true + true + + + IF EXIST "$(ProjectDir)PostBuild_mp.bat" (CALL "$(ProjectDir)PostBuild_mp.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") + Automatic deployment script + + + echo Empty Action + Force build to run Pre-Build event + subversion.always.run + subversion.always.run + + + + + IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") + Setup version from Git revision + + + $(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories) + Level3 + Full + true + REGAMEDLL_SELF;PLAY_GAMEDLL;REGAMEDLL_API;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;NDEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) + Precise + /arch:IA32 %(AdditionalOptions) + MultiThreaded + Use + precompiled.h + ProgramDatabase + true + false + Default + true + true + + + true + %(AdditionalDependencies) + + + mp.def + $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + true + true + true + + + IF EXIST "$(ProjectDir)PostBuild_mp.bat" (CALL "$(ProjectDir)PostBuild_mp.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") + Automatic deployment script + + + echo Empty Action + Force build to run Pre-Build event + subversion.always.run + subversion.always.run + + + + + IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") + Setup version from Git revision + + + $(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories) + Level3 + Disabled + true + REGAMEDLL_SELF;PLAY_GAMEDLL;REGAMEDLL_CHECKS;REGAMEDLL_API;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) + Precise + /arch:IA32 %(AdditionalOptions) + MultiThreadedDebug + Use + precompiled.h + + + true + %(AdditionalDependencies) + + + mp.def + $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + + + IF EXIST "$(ProjectDir)PostBuild_mp.bat" (CALL "$(ProjectDir)PostBuild_mp.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") + Automatic deployment script + + + echo Empty Action + Force build to run Pre-Build event + subversion.always.run + subversion.always.run + + + + + IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") + Setup version from Git revision + + + $(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories) + Level3 + Disabled + true + REGAMEDLL_SELF;REGAMEDLL_FIXES;DEDICATED;REGAMEDLL_SELF;HOOK_GAMEDLL;_BUILD_FROM_IDE;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;_ITERATOR_DEBUG_LEVEL=0;_DEBUG;%(PreprocessorDefinitions) + MultiThreadedDebug + Use + precompiled.h + NoExtensions + + + true + %(AdditionalDependencies) + + + + + $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + + + + + Automatic deployment script + + + echo Empty Action + Force build to run Pre-Build event + subversion.always.run + subversion.always.run + + + + + IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") + Setup version from Git revision + + + $(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories) + Level3 + MaxSpeed + true + true + true + HOOK_GAMEDLL;REGAMEDLL_SELF;REGAMEDLL_FIXES;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreaded + /arch:IA32 %(AdditionalOptions) + Use + precompiled.h + + + true + true + true + $(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies) + + + + $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + + + IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") + Automatic deployment script + + + echo Empty Action + Force build to run Pre-Build event + subversion.always.run + subversion.always.run + + + + + IF EXIST "$(ProjectDir)PreBuild.bat" (CALL "$(ProjectDir)PreBuild.bat" "$(ProjectDir)..\version\" "$(ProjectDir)..\") + Setup version from Git revision + + + $(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories) + Level3 + MaxSpeed + true + true + true + REGAMEDLL_SELF;PLAY_GAMEDLL;HOOK_GAMEDLL;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;USE_QSTRING;DEDICATED;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions) + MultiThreaded + /arch:IA32 %(AdditionalOptions) + Use + precompiled.h + Precise + + + true + true + true + %(AdditionalDependencies) + + + + + $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) + + + IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") + Automatic deployment script + + + echo Empty Action + Force build to run Pre-Build event + subversion.always.run + subversion.always.run + + + + + + \ No newline at end of file diff --git a/regamedll/pm_shared/pm_debug.cpp b/regamedll/pm_shared/pm_debug.cpp index 96e07b84..14866fef 100644 --- a/regamedll/pm_shared/pm_debug.cpp +++ b/regamedll/pm_shared/pm_debug.cpp @@ -38,7 +38,7 @@ void PM_ShowClipBox() int i; for (i = 0; i < pmove->numphysent; i++) { - if (pmove->physents[ i ].info >= 1 && pmove->physents[ i ].info <= 4) + if (pmove->physents[i].info >= 1 && pmove->physents[i].info <= 4) { PM_DrawBBox(pmove->player_mins[pmove->usehull], pmove->player_maxs[pmove->usehull], pmove->physents[i].origin, 132, 0.1); } diff --git a/regamedll/pm_shared/pm_debug.h b/regamedll/pm_shared/pm_debug.h index 9ab4a955..2a36f2f9 100644 --- a/regamedll/pm_shared/pm_debug.h +++ b/regamedll/pm_shared/pm_debug.h @@ -26,11 +26,7 @@ * */ -#ifndef PM_DEBUG_H -#define PM_DEBUG_H -#ifdef _WIN32 #pragma once -#endif void PM_ShowClipBox(); void PM_ParticleLine(vec3_t start, vec3_t end, int pcolor, float life, float vert); @@ -38,5 +34,3 @@ void PM_DrawRectangle(vec3_t tl, vec3_t bl, vec3_t tr, vec3_t br, int pcolor, fl void PM_DrawPhysEntBBox(int num, int pcolor, float life); void PM_DrawBBox(vec3_t mins, vec3_t maxs, vec3_t origin, int pcolor, float life); void PM_ViewEntity(); - -#endif // PM_DEBUG_H diff --git a/regamedll/pm_shared/pm_info.h b/regamedll/pm_shared/pm_info.h index 8a1aaeb3..8bd9093b 100644 --- a/regamedll/pm_shared/pm_info.h +++ b/regamedll/pm_shared/pm_info.h @@ -26,12 +26,6 @@ * */ -#ifndef PM_INFO_H -#define PM_INFO_H -#ifdef _WIN32 #pragma once -#endif -#define MAX_PHYSINFO_STRING 256 - -#endif // PM_INFO_H +const int MAX_PHYSINFO_STRING = 256; diff --git a/regamedll/pm_shared/pm_materials.h b/regamedll/pm_shared/pm_materials.h index 5471404b..083a8422 100644 --- a/regamedll/pm_shared/pm_materials.h +++ b/regamedll/pm_shared/pm_materials.h @@ -26,27 +26,22 @@ * */ -#ifndef PM_MATERIALS_H -#define PM_MATERIALS_H -#ifdef _WIN32 #pragma once -#endif -#define CTEXTURESMAX 1024 // max number of textures loaded -#define CBTEXTURENAMEMAX 17 // only load first n chars of name +const int MAX_TEXTURES = 1024; // max number of textures loaded +const int MAX_TEXTURENAME_LENGHT = 17; // only load first n chars of name -#define CHAR_TEX_CONCRETE 'C' // texture types -#define CHAR_TEX_METAL 'M' -#define CHAR_TEX_DIRT 'D' -#define CHAR_TEX_VENT 'V' -#define CHAR_TEX_GRATE 'G' -#define CHAR_TEX_TILE 'T' -#define CHAR_TEX_SLOSH 'S' -#define CHAR_TEX_WOOD 'W' -#define CHAR_TEX_COMPUTER 'P' -#define CHAR_TEX_GRASS 'X' -#define CHAR_TEX_GLASS 'Y' -#define CHAR_TEX_FLESH 'F' -#define CHAR_TEX_SNOW 'N' - -#endif // PM_MATERIALS_H +// Texture types +const char CHAR_TEX_CONCRETE = 'C'; // Cinder block +const char CHAR_TEX_METAL = 'M'; // Metal +const char CHAR_TEX_DIRT = 'D'; +const char CHAR_TEX_VENT = 'V'; +const char CHAR_TEX_GRATE = 'G'; +const char CHAR_TEX_TILE = 'T'; // Ceiling tile +const char CHAR_TEX_SLOSH = 'S'; +const char CHAR_TEX_WOOD = 'W'; +const char CHAR_TEX_COMPUTER = 'P'; +const char CHAR_TEX_GRASS = 'X'; +const char CHAR_TEX_GLASS = 'Y'; +const char CHAR_TEX_FLESH = 'F'; +const char CHAR_TEX_SNOW = 'N'; diff --git a/regamedll/pm_shared/pm_math.cpp b/regamedll/pm_shared/pm_math.cpp index 429ff9e8..2abe56ba 100644 --- a/regamedll/pm_shared/pm_math.cpp +++ b/regamedll/pm_shared/pm_math.cpp @@ -1,14 +1,7 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - vec3_t vec3_origin = { 0, 0, 0 }; -int nanmask = 255 << 23; - -#endif +const int nanmask = 255 << 23; float anglemod(float a) { diff --git a/regamedll/pm_shared/pm_math.h b/regamedll/pm_shared/pm_math.h index 2abace06..22aeb39b 100644 --- a/regamedll/pm_shared/pm_math.h +++ b/regamedll/pm_shared/pm_math.h @@ -26,18 +26,14 @@ * */ -#ifndef PM_MATH_H -#define PM_MATH_H -#ifdef _WIN32 #pragma once -#endif -#define PITCH 0 // up/down -#define YAW 1 // left/right -#define ROLL 2 // fall over +#define PITCH 0 // up/down +#define YAW 1 // left/right +#define ROLL 2 // fall over extern vec3_t vec3_origin; -extern int nanmask; +extern const int nanmask; #define IS_NAN(x) ((*reinterpret_cast(&(x)) & nanmask) == nanmask) @@ -68,5 +64,3 @@ void VectorScale(const vec_t *in, vec_t scale, vec_t *out); int Q_log2(int val); void VectorMatrix(vec_t *forward, vec_t *right, vec_t *up); void VectorAngles(const vec_t *forward, vec_t *angles); - -#endif // PM_MATH_H diff --git a/regamedll/pm_shared/pm_movevars.h b/regamedll/pm_shared/pm_movevars.h index 464556f5..d8aa251c 100644 --- a/regamedll/pm_shared/pm_movevars.h +++ b/regamedll/pm_shared/pm_movevars.h @@ -26,11 +26,7 @@ * */ -#ifndef PM_MOVEVARS_H -#define PM_MOVEVARS_H -#ifdef _WIN32 #pragma once -#endif typedef struct movevars_s { @@ -39,16 +35,16 @@ typedef struct movevars_s float maxspeed; // Max allowed speed float spectatormaxspeed; float accelerate; // Acceleration factor - float airaccelerate; // Same for when in open air - float wateraccelerate; // Same for when in water + float airaccelerate; // Same for when in open air + float wateraccelerate; // Same for when in water float friction; float edgefriction; // Extra friction near dropofs - float waterfriction; // Less in water + float waterfriction; // Less in water float entgravity; // 1.0 float bounce; // Wall bounce value. 1.0 float stepsize; // sv_stepsize; float maxvelocity; // maximum server velocity. - float zmax; // Max z-buffer range (for GL) + float zmax; // Max z-buffer range (for GL) float waveHeight; // Water wave height (for GL) qboolean footsteps; // Play footstep sounds char skyName[32]; // Name of the sky map @@ -62,5 +58,3 @@ typedef struct movevars_s float skyvec_z; } movevars_t; - -#endif // PM_MOVEVARS_H diff --git a/regamedll/pm_shared/pm_shared.cpp b/regamedll/pm_shared/pm_shared.cpp index 1f1dbd29..fc551d56 100644 --- a/regamedll/pm_shared/pm_shared.cpp +++ b/regamedll/pm_shared/pm_shared.cpp @@ -1,23 +1,16 @@ #include "precompiled.h" -/* -* Globals initialization -*/ -#ifndef HOOK_GAMEDLL - -int pm_shared_initialized = 0; +BOOL pm_shared_initialized = FALSE; vec3_t rgv3tStuckTable[54]; int rgStuckLast[MAX_CLIENTS][2]; int pm_gcTextures = 0; -char pm_grgszTextureName[1024][17]; -char pm_grgchTextureType[1024]; +char pm_grgszTextureName[MAX_TEXTURES][MAX_TEXTURENAME_LENGHT]; +char pm_grgchTextureType[MAX_TEXTURES]; -playermove_t *pmove = NULL; -int g_onladder = 0; - -#endif +playermove_t *pmove = nullptr; +BOOL g_onladder = FALSE; #ifdef CLIENT_DLL int iJumpSpectator; @@ -28,7 +21,7 @@ int g_onladder = 0; void PM_SwapTextures(int i, int j) { char chTemp; - char szTemp[CBTEXTURENAMEMAX]; + char szTemp[MAX_TEXTURENAME_LENGHT]; Q_strcpy(szTemp, pm_grgszTextureName[i]); chTemp = pm_grgchTextureType[i]; @@ -55,8 +48,7 @@ void PM_SortTextures() { // Bubble sort, yuck, but this only occurs at startup and it's only 512 elements... int i, j; - - for (i = 0; i < pm_gcTextures; ++i) + for (i = 0; i < pm_gcTextures; i++) { for (j = i + 1; j < pm_gcTextures; j++) { @@ -91,7 +83,7 @@ void PM_InitTextureTypes() return; // for each line in the file... - while (pmove->memfgets(pMemFile, fileSize, &filePos, buffer, sizeof(buffer) - 1) && (pm_gcTextures < CTEXTURESMAX)) + while (pmove->memfgets(pMemFile, fileSize, &filePos, buffer, sizeof(buffer) - 1) && (pm_gcTextures < MAX_TEXTURES)) { // skip whitespace i = 0; @@ -124,7 +116,7 @@ void PM_InitTextureTypes() continue; // null-terminate name and save in sentences array - j = Q_min(j, CBTEXTURENAMEMAX - 1 + i); + j = Q_min(j, MAX_TEXTURENAME_LENGHT - 1 + i); buffer[j] = '\0'; Q_strcpy(&(pm_grgszTextureName[pm_gcTextures++][0]), &(buffer[i])); @@ -151,7 +143,7 @@ char EXT_FUNC PM_FindTextureType(char *name) { pivot = (left + right) / 2; - val = Q_strnicmp(name, pm_grgszTextureName[pivot], CBTEXTURENAMEMAX - 1); + val = Q_strnicmp(name, pm_grgszTextureName[pivot], MAX_TEXTURENAME_LENGHT - 1); if (val == 0) { @@ -367,7 +359,7 @@ void PM_CatagorizeTextureType() pTextureName++; Q_strcpy(pmove->sztexturename, pTextureName); - pmove->sztexturename[CBTEXTURENAMEMAX - 1] = 0; + pmove->sztexturename[MAX_TEXTURENAME_LENGHT - 1] = '\0'; // get texture type pmove->chtexturetype = PM_FindTextureType(pmove->sztexturename); @@ -428,13 +420,13 @@ void EXT_FUNC __API_HOOK(PM_UpdateStepSound)() fvol = 0.35; pmove->flTimeStepSound = 350; } - else if (pmove->PM_PointContents(knee, NULL) == CONTENTS_WATER) + else if (pmove->PM_PointContents(knee, nullptr) == CONTENTS_WATER) { step = STEP_WADE; fvol = 0.65; pmove->flTimeStepSound = 600; } - else if (pmove->PM_PointContents(feet, NULL) == CONTENTS_WATER) + else if (pmove->PM_PointContents(feet, nullptr) == CONTENTS_WATER) { step = STEP_SLOSH; fvol = 0.5; @@ -529,7 +521,7 @@ void PM_CheckVelocity() int i; // bound velocity - for (i = 0; i < 3; ++i) + for (i = 0; i < 3; i++) { // See if it's bogus. if (IS_NAN(pmove->velocity[i])) @@ -590,7 +582,7 @@ int PM_ClipVelocity(vec_t *in, vec_t *normal, vec_t *out, float overbounce) // Scale by overbounce factor. backoff = DotProduct(in, normal) * overbounce; - for (i = 0; i < 3; ++i) + for (i = 0; i < 3; i++) { change = in[i] - normal[i] * backoff; out[i] = change; @@ -677,7 +669,7 @@ int PM_FlyMove() // Assume we can move all the way from the current origin to the // end point. - for (i = 0; i < 3; ++i) + for (i = 0; i < 3; i++) { float_precision flScale = time_left * pmove->velocity[i]; @@ -778,7 +770,7 @@ int PM_FlyMove() } else { - for (i = 0; i < numplanes; ++i) + for (i = 0; i < numplanes; i++) { PM_ClipVelocity(original_velocity, planes[i], pmove->velocity, 1); @@ -905,7 +897,7 @@ void PM_WalkMove() VectorNormalize(pmove->right); // Determine x and y parts of velocity - for (i = 0; i < 2; ++i) + for (i = 0; i < 2; i++) { wishvel[i] = pmove->forward[i] * fmove + pmove->right[i] * smove; } @@ -1169,7 +1161,7 @@ void PM_AirAccelerate(vec_t *wishdir, float wishspeed, float accel) accelspeed = addspeed; // Adjust pmove vel. - for (i = 0; i < 3; ++i) + for (i = 0; i < 3; i++) { pmove->velocity[i] += accelspeed * wishdir[i]; } @@ -1188,7 +1180,7 @@ void PM_WaterMove() float newspeed, addspeed; // user intentions - for (i = 0; i < 3; ++i) + for (i = 0; i < 3; i++) { wishvel[i] = (pmove->forward[i] * pmove->cmd.forwardmove) + (pmove->cmd.sidemove * pmove->right[i]); } @@ -1256,7 +1248,7 @@ void PM_WaterMove() accelspeed = addspeed; } - for (i = 0; i < 3; ++i) + for (i = 0; i < 3; i++) { pmove->velocity[i] += accelspeed * wishvel[i]; } @@ -1310,7 +1302,7 @@ void PM_AirMove_internal() VectorNormalize(pmove->right); // Determine x and y parts of velocity - for (i = 0; i < 2; ++i) + for (i = 0; i < 2; i++) { wishvel[i] = pmove->forward[i] * fmove + pmove->right[i] * smove; } @@ -1383,7 +1375,7 @@ qboolean PM_CheckWater() // Now check a point that is at the player hull midpoint. point[2] = pmove->origin[2] + heightover2; - cont = pmove->PM_PointContents(point, NULL); + cont = pmove->PM_PointContents(point, nullptr); // If that point is also under water... if (cont <= CONTENTS_WATER && cont > CONTENTS_TRANSLUCENT) @@ -1394,7 +1386,7 @@ qboolean PM_CheckWater() // Now check the eye position. (view_ofs is relative to the origin) point[2] = pmove->origin[2] + pmove->view_ofs[2]; - cont = pmove->PM_PointContents(point, NULL); + cont = pmove->PM_PointContents(point, nullptr); if (cont <= CONTENTS_WATER && cont > CONTENTS_TRANSLUCENT) { // In over our eyes @@ -1532,7 +1524,7 @@ qboolean PM_CheckStuck() if (!pmove->server) { // World or BSP model - if (hitent == 0 || pmove->physents[hitent].model != NULL) + if (hitent == 0 || pmove->physents[hitent].model) { int nReps = 0; PM_ResetStuckOffsets(pmove->player_index, pmove->server); @@ -1575,7 +1567,7 @@ qboolean PM_CheckStuck() i = PM_GetRandomStuckOffsets(pmove->player_index, pmove->server, offset); VectorAdd(base, offset, test); - if ((hitent = pmove->PM_TestPlayerPosition(test, NULL)) == -1) + if ((hitent = pmove->PM_TestPlayerPosition(test, nullptr)) == -1) { PM_ResetStuckOffsets(pmove->player_index, pmove->server); @@ -1609,7 +1601,7 @@ qboolean PM_CheckStuck() test[1] += y; test[2] += z; - if (pmove->PM_TestPlayerPosition(test, NULL) == -1) + if (pmove->PM_TestPlayerPosition(test, nullptr) == -1) { VectorCopy(test, pmove->origin); return FALSE; @@ -1685,7 +1677,7 @@ void PM_SpectatorMove() VectorNormalize(pmove->forward); VectorNormalize(pmove->right); - for (i = 0; i < 3; ++i) + for (i = 0; i < 3; i++) { wishvel[i] = pmove->forward[i] * fmove + pmove->right[i] * smove; } @@ -1716,7 +1708,7 @@ void PM_SpectatorMove() accelspeed = addspeed; } - for (i = 0; i < 3; ++i) + for (i = 0; i < 3; i++) { pmove->velocity[i] += accelspeed * wishdir[i]; } @@ -1780,7 +1772,7 @@ void PM_FixPlayerCrouchStuck(int direction) int i; vec3_t test; - hitent = pmove->PM_TestPlayerPosition (pmove->origin, NULL); + hitent = pmove->PM_TestPlayerPosition (pmove->origin, nullptr); if (hitent == -1) { @@ -1789,10 +1781,10 @@ void PM_FixPlayerCrouchStuck(int direction) VectorCopy(pmove->origin, test); - for (i = 0; i < 36; i++) + for (i = 0; i < HalfHumanHeight; i++) { pmove->origin[2] += direction; - hitent = pmove->PM_TestPlayerPosition(pmove->origin, NULL); + hitent = pmove->PM_TestPlayerPosition(pmove->origin, nullptr); if (hitent == -1) { @@ -1972,7 +1964,7 @@ void PM_LadderMove(physent_t *pLadder) VectorCopy(pmove->origin, floor); floor[2] += pmove->_player_mins[pmove->usehull][2] - 1; - if (pmove->PM_PointContents(floor, NULL) == CONTENTS_SOLID) + if (pmove->PM_PointContents(floor, nullptr) == CONTENTS_SOLID) onFloor = true; else onFloor = false; @@ -1992,7 +1984,7 @@ void PM_LadderMove(physent_t *pLadder) flSpeed = pmove->maxspeed; } - AngleVectors(pmove->angles, vpn, v_right, NULL); + AngleVectors(pmove->angles, vpn, v_right, nullptr); if (pmove->flags & FL_DUCKING) { @@ -2049,7 +2041,7 @@ void PM_LadderMove(physent_t *pLadder) // is roughly vertically perpendicular to the face of the ladder. // NOTE: It IS possible to face up and move down or face down and move up // because the velocity is a sum of the directional velocity and the converted - // velocity through the face of the ladder -- by design. + // velocity through the face of the ladder - by design. CrossProduct(trace.plane.normal, perp, tmp); VectorMA(lateral, -normal, tmp, pmove->velocity); @@ -2097,7 +2089,7 @@ physent_t *PM_Ladder() } } - return NULL; + return nullptr; } void PM_WaterJump() @@ -2280,7 +2272,7 @@ void PM_NoClip() VectorNormalize(pmove->right); // Determine x and y parts of velocity - for (i = 0; i < 3; ++i) + for (i = 0; i < 3; i++) { wishvel[i] = pmove->forward[i] * fmove + pmove->right[i] * smove; } @@ -2428,12 +2420,12 @@ void PM_Jump() if (pmove->bInDuck || (pmove->flags & FL_DUCKING)) { // Adjust for super long jump module - // UNDONE -- note this should be based on forward angles, not current velocity. + // UNDONE: note this should be based on forward angles, not current velocity. if (cansuperjump && (pmove->cmd.buttons & IN_DUCK) && pmove->flDuckTime > 0 && Length(pmove->velocity) > 50) { pmove->punchangle[0] = -5.0f; - for (int i = 0; i < 2; ++i) + for (int i = 0; i < 2; i++) { pmove->velocity[i] = pmove->forward[i] * PLAYER_LONGJUMP_SPEED * 1.6f; } @@ -2779,7 +2771,7 @@ qboolean PM_ShouldDoSpectMode() // were contacted during the move. void PM_PlayerMove(qboolean server) { - physent_t *pLadder = NULL; + physent_t *pLadder = nullptr; // Are we running server code? pmove->server = server; @@ -2832,7 +2824,7 @@ void PM_PlayerMove(qboolean server) pmove->flFallVelocity = -pmove->velocity[2]; } - g_onladder = 0; + g_onladder = FALSE; // Don't run ladder code if dead or on a train if (!pmove->dead && !(pmove->flags & FL_ONTRAIN)) @@ -2841,7 +2833,7 @@ void PM_PlayerMove(qboolean server) if (pLadder) { - g_onladder = 1; + g_onladder = TRUE; } } @@ -3101,7 +3093,7 @@ void PM_CreateStuckTable() zi[1] = 1.0f; zi[2] = 6.0f; - for (i = 0; i < 3; ++i) + for (i = 0; i < 3; i++) { // Z moves z = zi[i]; @@ -3140,7 +3132,7 @@ void PM_CreateStuckTable() } // Remaining multi axis nudges. - for (i = 0; i < 3; ++i) + for (i = 0; i < 3; i++) { z = zi[i]; @@ -3214,5 +3206,5 @@ void EXT_FUNC __API_HOOK(PM_Init)(struct playermove_s *ppmove) PM_CreateStuckTable(); PM_InitTextureTypes(); - pm_shared_initialized = 1; + pm_shared_initialized = TRUE; } diff --git a/regamedll/pm_shared/pm_shared.h b/regamedll/pm_shared/pm_shared.h index 75649719..c3ca7274 100644 --- a/regamedll/pm_shared/pm_shared.h +++ b/regamedll/pm_shared/pm_shared.h @@ -26,56 +26,52 @@ * */ -#ifndef PM_SHARED_H -#define PM_SHARED_H -#ifdef _WIN32 #pragma once -#endif -#define PM_DEAD_VIEWHEIGHT -8 +#define PM_DEAD_VIEWHEIGHT -8 -#define OBS_NONE 0 -#define OBS_CHASE_LOCKED 1 -#define OBS_CHASE_FREE 2 -#define OBS_ROAMING 3 -#define OBS_IN_EYE 4 -#define OBS_MAP_FREE 5 -#define OBS_MAP_CHASE 6 +#define OBS_NONE 0 +#define OBS_CHASE_LOCKED 1 +#define OBS_CHASE_FREE 2 +#define OBS_ROAMING 3 +#define OBS_IN_EYE 4 +#define OBS_MAP_FREE 5 +#define OBS_MAP_CHASE 6 -#define STEP_CONCRETE 0 -#define STEP_METAL 1 -#define STEP_DIRT 2 -#define STEP_VENT 3 -#define STEP_GRATE 4 -#define STEP_TILE 5 -#define STEP_SLOSH 6 -#define STEP_WADE 7 -#define STEP_LADDER 8 -#define STEP_SNOW 9 +#define STEP_CONCRETE 0 +#define STEP_METAL 1 +#define STEP_DIRT 2 +#define STEP_VENT 3 +#define STEP_GRATE 4 +#define STEP_TILE 5 +#define STEP_SLOSH 6 +#define STEP_WADE 7 +#define STEP_LADDER 8 +#define STEP_SNOW 9 -#define WJ_HEIGHT 8 -#define STOP_EPSILON 0.1 -#define MAX_CLIMB_SPEED 200 -#define PLAYER_DUCKING_MULTIPLIER 0.333 -#define PM_CHECKSTUCK_MINTIME 0.05 // Don't check again too quickly. +#define WJ_HEIGHT 8 +#define STOP_EPSILON 0.1 +#define MAX_CLIMB_SPEED 200 +#define PLAYER_DUCKING_MULTIPLIER 0.333 +#define PM_CHECKSTUCK_MINTIME 0.05 // Don't check again too quickly. -#define PLAYER_LONGJUMP_SPEED 350.0f // how fast we longjump +#define PLAYER_LONGJUMP_SPEED 350.0f // how fast we longjump // Ducking time -#define TIME_TO_DUCK 0.4 -#define STUCK_MOVEUP 1 +#define TIME_TO_DUCK 0.4 +#define STUCK_MOVEUP 1 -#define PM_VEC_DUCK_HULL_MIN -18 -#define PM_VEC_HULL_MIN -36 -#define PM_VEC_DUCK_VIEW 12 -#define PM_VEC_VIEW 17 +#define PM_VEC_DUCK_HULL_MIN -18 +#define PM_VEC_HULL_MIN -36 +#define PM_VEC_DUCK_VIEW 12 +#define PM_VEC_VIEW 17 -#define PM_PLAYER_MAX_SAFE_FALL_SPEED 580 // approx 20 feet -#define PM_PLAYER_MIN_BOUNCE_SPEED 350 -#define PM_PLAYER_FALL_PUNCH_THRESHHOLD 250 // won't punch player's screen/make scrape noise unless player falling at least this fast. +#define PM_PLAYER_MAX_SAFE_FALL_SPEED 580 // approx 20 feet +#define PM_PLAYER_MIN_BOUNCE_SPEED 350 +#define PM_PLAYER_FALL_PUNCH_THRESHHOLD 250 // won't punch player's screen/make scrape noise unless player falling at least this fast. // Only allow bunny jumping up to 1.2x server / player maxspeed setting -#define BUNNYJUMP_MAX_SPEED_FACTOR 1.2f +#define BUNNYJUMP_MAX_SPEED_FACTOR 1.2f void PM_Init(struct playermove_s *ppmove); void PM_Move(struct playermove_s *ppmove, int server); @@ -87,8 +83,8 @@ void PM_Init_OrigFunc(struct playermove_s *ppmove); void PM_Move_OrigFunc(struct playermove_s *ppmove, int server); void PM_AirMove_OrigFunc(int playerIndex = 0); void PM_UpdateStepSound_OrigFunc(); +#else +void PM_AirMove(int playerIndex = 0); #endif extern struct playermove_s *pmove; - -#endif // PM_SHARED_H diff --git a/regamedll/public/MemPool.cpp b/regamedll/public/MemPool.cpp index 760635fe..4c92794c 100644 --- a/regamedll/public/MemPool.cpp +++ b/regamedll/public/MemPool.cpp @@ -43,7 +43,7 @@ CMemoryPool::CMemoryPool(int blockSize, int numElements) CMemoryPool::~CMemoryPool() { - for (int i = 0; i < _numBlobs; ++i) + for (int i = 0; i < _numBlobs; i++) free(_memBlob[i]); } @@ -68,7 +68,7 @@ void CMemoryPool::AddNewBlob() #endif // _WIN32 void **newBlob = (void **)_headOfFreeList; - for (int j = 0; j < nElements - 1; ++j) + for (int j = 0; j < nElements - 1; j++) { newBlob[0] = (char *)newBlob + _blockSize; newBlob = (void **)newBlob[0]; @@ -77,7 +77,7 @@ void CMemoryPool::AddNewBlob() newBlob[0] = NULL; _numElements += nElements; - ++_numBlobs; + _numBlobs++; #ifdef _WIN32 if (_numBlobs >= MAX_BLOBS - 1) @@ -92,7 +92,7 @@ void *CMemoryPool::Alloc(unsigned int amount) if (amount > (unsigned int)_blockSize) return NULL; - ++_blocksAllocated; + _blocksAllocated++; _peakAlloc = Q_max(_peakAlloc, _blocksAllocated); if (_blocksAllocated >= _numElements) diff --git a/regamedll/public/interface.cpp b/regamedll/public/interface.cpp index bf58103b..1929153f 100644 --- a/regamedll/public/interface.cpp +++ b/regamedll/public/interface.cpp @@ -220,7 +220,7 @@ void *InitializeInterface(char const *interfaceName, CreateInterfaceFn *factoryL for (int i = 0; i < numFactories; i++) { - CreateInterfaceFn factory = factoryList[ i ]; + CreateInterfaceFn factory = factoryList[i]; if (!factory) continue; diff --git a/regamedll/public/regamedll/API/CSEntity.h b/regamedll/public/regamedll/API/CSEntity.h new file mode 100644 index 00000000..ef47f30f --- /dev/null +++ b/regamedll/public/regamedll/API/CSEntity.h @@ -0,0 +1,65 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + +#pragma once + +class CBaseEntity; +class CCSEntity +{ +public: + virtual ~CCSEntity() {} + virtual void FireBullets(int iShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker); + virtual Vector FireBullets3(Vector &vecSrc, Vector &vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand); + +public: + CBaseEntity *m_pContainingEntity; +}; + +class CCSDelay: public CCSEntity +{ +public: + +}; + +class CCSAnimating: public CCSDelay +{ +public: + +}; + +class CCSToggle: public CCSAnimating +{ +public: + +}; + +class CCSMonster: public CCSToggle +{ +public: + +}; diff --git a/regamedll/public/regamedll/regamedll_interfaces.h b/regamedll/public/regamedll/API/CSInterfaces.h similarity index 75% rename from regamedll/public/regamedll/regamedll_interfaces.h rename to regamedll/public/regamedll/API/CSInterfaces.h index 1ef926fa..ffef85c7 100644 --- a/regamedll/public/regamedll/regamedll_interfaces.h +++ b/regamedll/public/regamedll/API/CSInterfaces.h @@ -28,83 +28,11 @@ #pragma once -class CBaseEntity; -class CBasePlayer; +#include +#include -// Implementation wrapper -class CCSEntity { -public: - virtual ~CCSEntity() {} - virtual void FireBullets(int iShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker); - virtual Vector FireBullets3(Vector &vecSrc, Vector &vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand); -public: - CBaseEntity *m_pContainingEntity; -}; - -class CCSDelay: public CCSEntity {}; -class CCSAnimating: public CCSDelay {}; -class CCSPlayerItem: public CCSAnimating {}; -class CCSToggle: public CCSAnimating {}; -class CCSMonster: public CCSToggle {}; class CCSWeaponBox: public CCSEntity {}; class CCSArmoury: public CCSEntity {}; - -class CCSPlayer: public CCSMonster { -public: - CCSPlayer() : m_bForceShowMenu(false), m_flRespawnPending(0) - { - m_szModel[0] = '\0'; - } - - virtual bool IsConnected() const; - virtual void SetAnimation(PLAYER_ANIM playerAnim); - virtual void AddAccount(int amount, RewardType type = RT_NONE, bool bTrackChange = true); - virtual CBaseEntity *GiveNamedItem(const char *pszName); - virtual CBaseEntity *GiveNamedItemEx(const char *pszName); - virtual void GiveDefaultItems(); - virtual void GiveShield(bool bDeploy = true); - virtual void DropShield(bool bDeploy = true); - virtual void DropPlayerItem(const char *pszItemName); - virtual void RemoveShield(); - virtual void RemoveAllItems(bool bRemoveSuit); - virtual bool RemovePlayerItem(const char* pszItemName); - virtual void SetPlayerModel(bool bHasC4); - virtual void SetPlayerModelEx(const char *modelName); - virtual void SetNewPlayerModel(const char *modelName); - virtual void ClientCommand(const char *cmd, const char *arg1 = nullptr, const char *arg2 = nullptr, const char *arg3 = nullptr); - virtual void SetProgressBarTime(int time); - virtual void SetProgressBarTime2(int time, float timeElapsed); - virtual struct edict_s *EntSelectSpawnPoint(); - virtual void SetBombIcon(bool bFlash = false); - virtual void SetScoreAttrib(CBasePlayer *dest); - virtual void SendItemStatus(); - virtual void ReloadWeapons(CBasePlayerItem *pWeapon = nullptr, bool bForceReload = false, bool bForceRefill = false); - virtual void Observer_SetMode(int iMode); - virtual bool SelectSpawnSpot(const char *pEntClassName, CBaseEntity* &pSpot); - virtual bool SwitchWeapon(CBasePlayerItem *pWeapon); - virtual void SwitchTeam(); - virtual bool JoinTeam(TeamName team); - virtual void StartObserver(Vector& vecPosition, Vector& vecViewAngle); - virtual void TeamChangeUpdate(); - virtual void DropSecondary(); - virtual void DropPrimary(); - virtual bool HasPlayerItem(CBasePlayerItem *pCheckItem); - virtual bool HasNamedPlayerItem(const char *pszItemName); - virtual CBasePlayerItem *GetItemById(WeaponIdType weaponID); - virtual CBasePlayerItem *GetItemByName(const char *itemName); - virtual void Disappear(); - virtual void MakeVIP(); - virtual bool MakeBomber(); - virtual void ResetSequenceInfo(); - virtual void StartDeathCam(); - - CBasePlayer *BasePlayer() const; -public: - char m_szModel[32]; - bool m_bForceShowMenu; - float m_flRespawnPending; -}; - class CAPI_Bot: public CCSPlayer {}; class CAPI_CSBot: public CAPI_Bot {}; class CCSShield: public CCSEntity {}; @@ -300,7 +228,3 @@ class CCSWeather: public CCSTrigger {}; class CCSClientFog: public CCSEntity {}; class CCSTriggerSetOrigin: public CCSDelay {}; class CCSItemAirBox: public CCSArmoury {}; - -inline CBasePlayer *CCSPlayer::BasePlayer() const { - return reinterpret_cast(this->m_pContainingEntity); -} diff --git a/regamedll/public/regamedll/API/CSPlayer.h b/regamedll/public/regamedll/API/CSPlayer.h new file mode 100644 index 00000000..f306b1c7 --- /dev/null +++ b/regamedll/public/regamedll/API/CSPlayer.h @@ -0,0 +1,94 @@ +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + +#pragma once + +#include + +class CCSPlayer: public CCSMonster { +public: + CCSPlayer() : m_bForceShowMenu(false), m_flRespawnPending(0) + { + m_szModel[0] = '\0'; + } + + virtual bool IsConnected() const; + virtual void SetAnimation(PLAYER_ANIM playerAnim); + virtual void AddAccount(int amount, RewardType type = RT_NONE, bool bTrackChange = true); + virtual CBaseEntity *GiveNamedItem(const char *pszName); + virtual CBaseEntity *GiveNamedItemEx(const char *pszName); + virtual void GiveDefaultItems(); + virtual void GiveShield(bool bDeploy = true); + virtual void DropShield(bool bDeploy = true); + virtual void DropPlayerItem(const char *pszItemName); + virtual void RemoveShield(); + virtual void RemoveAllItems(bool bRemoveSuit); + virtual bool RemovePlayerItem(const char* pszItemName); + virtual void SetPlayerModel(bool bHasC4); + virtual void SetPlayerModelEx(const char *modelName); + virtual void SetNewPlayerModel(const char *modelName); + virtual void ClientCommand(const char *cmd, const char *arg1 = nullptr, const char *arg2 = nullptr, const char *arg3 = nullptr); + virtual void SetProgressBarTime(int time); + virtual void SetProgressBarTime2(int time, float timeElapsed); + virtual struct edict_s *EntSelectSpawnPoint(); + virtual void SetBombIcon(bool bFlash = false); + virtual void SetScoreAttrib(CBasePlayer *dest); + virtual void SendItemStatus(); + virtual void ReloadWeapons(CBasePlayerItem *pWeapon = nullptr, bool bForceReload = false, bool bForceRefill = false); + virtual void Observer_SetMode(int iMode); + virtual bool SelectSpawnSpot(const char *pEntClassName, CBaseEntity* &pSpot); + virtual bool SwitchWeapon(CBasePlayerItem *pWeapon); + virtual void SwitchTeam(); + virtual bool JoinTeam(TeamName team); + virtual void StartObserver(Vector& vecPosition, Vector& vecViewAngle); + virtual void TeamChangeUpdate(); + virtual void DropSecondary(); + virtual void DropPrimary(); + virtual bool HasPlayerItem(CBasePlayerItem *pCheckItem); + virtual bool HasNamedPlayerItem(const char *pszItemName); + virtual CBasePlayerItem *GetItemById(WeaponIdType weaponID); + virtual CBasePlayerItem *GetItemByName(const char *itemName); + virtual void Disappear(); + virtual void MakeVIP(); + virtual bool MakeBomber(); + virtual void ResetSequenceInfo(); + virtual void StartDeathCam(); + + CBasePlayer *BasePlayer() const; + +public: + char m_szModel[32]; + bool m_bForceShowMenu; + float m_flRespawnPending; +}; + +// Inlines +inline CBasePlayer *CCSPlayer::BasePlayer() const +{ + return reinterpret_cast(this->m_pContainingEntity); +} diff --git a/regamedll/hookers/main_mp.cpp b/regamedll/public/regamedll/API/CSPlayerItem.h similarity index 75% rename from regamedll/hookers/main_mp.cpp rename to regamedll/public/regamedll/API/CSPlayerItem.h index be3f7d12..8c47d6e5 100644 --- a/regamedll/hookers/main_mp.cpp +++ b/regamedll/public/regamedll/API/CSPlayerItem.h @@ -1,58 +1,52 @@ -/* -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -*/ - -#include "precompiled.h" - -#ifdef _WIN32 - -// DLL entry point -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - if (fdwReason == DLL_PROCESS_ATTACH) - { - } - else if (fdwReason == DLL_PROCESS_DETACH) - { - } - - return TRUE; -} - -#else // _WIN32 - -void __attribute__((constructor)) DllMainLoad() -{ - -} - -void __attribute__((destructor)) DllMainUnload() -{ - -} - -#endif // _WIN32 +/* +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at +* your option) any later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +* In addition, as a special exception, the author gives permission to +* link the code of this program with the Half-Life Game Engine ("HL +* Engine") and Modified Game Libraries ("MODs") developed by Valve, +* L.L.C ("Valve"). You must obey the GNU General Public License in all +* respects for all of the code used other than the HL Engine and MODs +* from Valve. If you modify this file, you may extend this exception +* to your version of the file, but you are not obligated to do so. If +* you do not wish to do so, delete this exception statement from your +* version. +* +*/ + +#pragma once + +class CBasePlayerItem; +class CCSPlayerItem: public CCSAnimating +{ +public: + CCSPlayerItem() + { + Q_memset(&m_ItemInfo, 0, sizeof(m_ItemInfo)); + } + + virtual void SetItemInfo(ItemInfo *pInfo); + + CBasePlayerItem *BasePlayerItem() const; + +public: + ItemInfo m_ItemInfo; +}; + +// Inlines +inline CBasePlayerItem *CCSPlayerItem::BasePlayerItem() const +{ + return reinterpret_cast(this->m_pContainingEntity); +} diff --git a/regamedll/public/regamedll/regamedll_api.h b/regamedll/public/regamedll/regamedll_api.h index 23c08ec2..d916f6d6 100644 --- a/regamedll/public/regamedll/regamedll_api.h +++ b/regamedll/public/regamedll/regamedll_api.h @@ -29,12 +29,13 @@ #pragma once #include "archtypes.h" -#include "regamedll_interfaces.h" -#include "hookchains.h" -#include "interface.h" -#include "player.h" -#include "gamerules.h" -#include "client.h" + +#include +#include +#include +#include +#include +#include #define REGAMEDLL_API_VERSION_MAJOR 5 #define REGAMEDLL_API_VERSION_MINOR 4 diff --git a/regamedll/regamedll/classes_dummy.cpp b/regamedll/regamedll/classes_dummy.cpp index 9aafd5f9..a7ce4d71 100644 --- a/regamedll/regamedll/classes_dummy.cpp +++ b/regamedll/regamedll/classes_dummy.cpp @@ -52,7 +52,7 @@ class CDummyWeaponClass: virtual int PrimaryAmmoIndex() { return 0; }; virtual int SecondaryAmmoIndex() { return 0; }; virtual int UpdateClientData(CBasePlayer *pPlayer) { return 0; }; - virtual CBasePlayerItem *GetWeaponPtr() { return NULL; } + virtual CBasePlayerItem *GetWeaponPtr() { return nullptr; } virtual int ExtractAmmo(CBasePlayerWeapon *pWeapon) { return 0; }; virtual int ExtractClipAmmo(CBasePlayerWeapon *pWeapon) { return 0; }; virtual int AddWeapon() { return 0; } @@ -86,7 +86,7 @@ class CDummyWeaponClassExtra: virtual int PrimaryAmmoIndex() { return 0; }; virtual int SecondaryAmmoIndex() { return 0; }; virtual int UpdateClientData(CBasePlayer *pPlayer) { return 0; }; - virtual CBasePlayerItem *GetWeaponPtr() { return NULL; } + virtual CBasePlayerItem *GetWeaponPtr() { return nullptr; } virtual int ExtractAmmo(CBasePlayerWeapon *pWeapon) { return 0; }; virtual int ExtractClipAmmo(CBasePlayerWeapon *pWeapon) { return 0; }; virtual int AddWeapon() { return 0; } diff --git a/regamedll/regamedll/dlls.h b/regamedll/regamedll/dlls.h index cd613259..136336b0 100644 --- a/regamedll/regamedll/dlls.h +++ b/regamedll/regamedll/dlls.h @@ -28,21 +28,19 @@ #include "extdll.h" -#define CUSTOM_MEMBER - -#if defined(REGAMEDLL_ADD) && !defined(HOOK_GAMEDLL) +#ifdef REGAMEDLL_ADD #define VFUNC virtual #else #define VFUNC #endif -// declared virtual function's and globals for hooks -#ifdef HOOK_GAMEDLL -#include "hooker_impl.h" +#ifdef REGAMEDLL_API +using VectorRef = Vector&; +using FloatRef = float&; #else -typedef Vector& VectorRef; -typedef float& FloatRef; -#endif // HOOK_GAMEDLL +using VectorRef = Vector; +using FloatRef = float; +#endif #include "archtypes.h" #include "enginecallback.h" @@ -62,7 +60,7 @@ typedef float& FloatRef; // GameInit #include "game.h" -//PM +// PM #include "pm_shared/pm_defs.h" #include "pm_shared/pm_materials.h" #include "pm_shared/pm_movevars.h" diff --git a/regamedll/regamedll/hookchains_impl.cpp b/regamedll/regamedll/hookchains_impl.cpp index 32ec882d..2ba024ce 100644 --- a/regamedll/regamedll/hookchains_impl.cpp +++ b/regamedll/regamedll/hookchains_impl.cpp @@ -90,10 +90,12 @@ void AbstractHookChainRegistry::removeHook(void* hookFunc) { { Q_memmove(&m_Hooks[i], &m_Hooks[i + 1], (m_NumHooks - i) * sizeof(m_Hooks[0])); Q_memmove(&m_Priorities[i], &m_Priorities[i + 1], (m_NumHooks - i) * sizeof(m_Priorities[0])); - m_Hooks[m_NumHooks] = NULL; + m_Hooks[m_NumHooks] = nullptr; } else - m_Hooks[i] = NULL; + { + m_Hooks[i] = nullptr; + } return; } diff --git a/regamedll/regamedll/hookchains_impl.h b/regamedll/regamedll/hookchains_impl.h index 54fcbc58..9aa37d0b 100644 --- a/regamedll/regamedll/hookchains_impl.h +++ b/regamedll/regamedll/hookchains_impl.h @@ -32,20 +32,20 @@ #define MAX_HOOKS_IN_CHAIN 30 -template +template bool is_void(t_ret (t_class::*)(t_args...)) { return false; } -template +template bool is_void(t_ret (*)(t_args...)) { return false; } -template +template bool is_void(void (t_class::*)(t_args...)) { return true; } -template +template bool is_void(void (*)(t_args...)) { return true; } // Implementation for chains in modules -template +template class IHookChainImpl : public IHookChain { public: typedef t_ret(*hookfunc_t)(IHookChain*, t_args...); @@ -81,7 +81,7 @@ private: }; // Implementation for chains in modules -template +template class IHookChainClassImpl : public IHookChainClass { public: typedef t_ret(*hookfunc_t)(IHookChainClass*, t_class *, t_args...); @@ -117,7 +117,7 @@ private: }; // Implementation for chains in modules -template +template class IHookChainClassEmptyImpl : public IHookChain { public: typedef t_ret(*hookfunc_t)(IHookChain*, t_args...); @@ -168,8 +168,8 @@ public: AbstractHookChainRegistry(); }; -template -class IHookChainRegistryImpl : public IHookChainRegistry < t_ret, t_args...>, public AbstractHookChainRegistry { +template +class IHookChainRegistryImpl : public IHookChainRegistry, public AbstractHookChainRegistry { public: typedef t_ret(*hookfunc_t)(IHookChain*, t_args...); typedef t_ret(*origfunc_t)(t_args...); @@ -189,8 +189,8 @@ public: } }; -template -class IHookChainRegistryClassImpl : public IHookChainRegistryClass , public AbstractHookChainRegistry { +template +class IHookChainRegistryClassImpl : public IHookChainRegistryClass, public AbstractHookChainRegistry { public: typedef t_ret(*hookfunc_t)(IHookChainClass*, t_class *, t_args...); typedef t_ret(t_class::*origfunc_t)(t_args...); @@ -210,8 +210,8 @@ public: } }; -template -class IHookChainRegistryClassEmptyImpl : public IHookChainRegistry , public AbstractHookChainRegistry { +template +class IHookChainRegistryClassEmptyImpl : public IHookChainRegistry, public AbstractHookChainRegistry { public: typedef t_ret(*hookfunc_t)(IHookChain*, t_args...); typedef t_ret(t_class::*origfunc_t)(t_args...); diff --git a/regamedll/regamedll/precompiled.h b/regamedll/regamedll/precompiled.h index c551ad71..18ba5db5 100644 --- a/regamedll/regamedll/precompiled.h +++ b/regamedll/regamedll/precompiled.h @@ -39,9 +39,6 @@ #include "MemPool.h" -// Hook stuff -#include "hookers/hooklist.h" - #include "engine.h" #include "RegameDLLRuntimeConfig.h" @@ -54,5 +51,6 @@ #include "hookchains_impl.h" #include "regamedll.h" -#include "regamedll_interfaces.h" -#include "regamedll_api_impl.h" +// API +#include "API/CSInterfaces.h" +#include "API/CAPI_Impl.h" diff --git a/regamedll/regamedll/regamedll_interfaces_impl.h b/regamedll/regamedll/regamedll_interfaces_impl.h deleted file mode 100644 index 30ea361a..00000000 --- a/regamedll/regamedll/regamedll_interfaces_impl.h +++ /dev/null @@ -1,112 +0,0 @@ -/* -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -*/ - -#pragma once - -#include "maintypes.h" -#include "regamedll_interfaces.h" - -#if !defined(HOOK_GAMEDLL) && defined(REGAMEDLL_API) - -#define __API_HOOK(fname)\ - fname##_OrigFunc - -#define LINK_HOOK_CLASS_VOID_CHAIN(className, functionName, args, ...)\ - void className::functionName args {\ - g_ReGameHookchains.m_##className##_##functionName.callChain(&className::functionName##_OrigFunc, this, __VA_ARGS__);\ - } -#define LINK_HOOK_CLASS_VOID_CHAIN2(className, functionName)\ - void EXT_FUNC className::functionName() {\ - g_ReGameHookchains.m_##className##_##functionName.callChain(&className::functionName##_OrigFunc, this);\ - } - -#define LINK_HOOK_CLASS_CHAIN(ret, className, functionName, args, ...)\ - ret className::functionName args {\ - return g_ReGameHookchains.m_##className##_##functionName.callChain(&className::functionName##_OrigFunc, this, __VA_ARGS__);\ - } -#define LINK_HOOK_CLASS_CHAIN2(ret, className, functionName)\ - ret className::functionName() {\ - return g_ReGameHookchains.m_##className##_##functionName.callChain(&className::functionName##_OrigFunc, this);\ - } - -#define LINK_HOOK_CLASS_VOID_CUSTOM_CHAIN(className, customPrefix, functionName, args, ...)\ - void className::functionName args {\ - g_ReGameHookchains.m_##customPrefix##_##functionName.callChain(&className::functionName##_OrigFunc, this, __VA_ARGS__);\ - } -#define LINK_HOOK_CLASS_VOID_CUSTOM_CHAIN2(className, customPrefix, functionName)\ - void className::functionName() {\ - g_ReGameHookchains.m_##customPrefix##_##functionName.callChain(&className::functionName##_OrigFunc, this);\ - } - -#define LINK_HOOK_CLASS_CUSTOM_CHAIN(ret, className, customPrefix, functionName, args, ...)\ - ret className::functionName args {\ - return g_ReGameHookchains.m_##customPrefix##_##functionName.callChain(&className::functionName##_OrigFunc, this, __VA_ARGS__);\ - } -#define LINK_HOOK_CLASS_CUSTOM_CHAIN2(ret, className, customPrefix, functionName)\ - ret className::functionName() {\ - return g_ReGameHookchains.m_##customPrefix##_##functionName.callChain(&className::functionName##_OrigFunc, this);\ - } - -#define LINK_HOOK_VOID_CHAIN(functionName, args, ...)\ - void functionName args {\ - g_ReGameHookchains.m_##functionName.callChain(functionName##_OrigFunc, __VA_ARGS__);\ - } - -#define LINK_HOOK_CHAIN(ret, functionName, args, ...)\ - ret functionName args {\ - return g_ReGameHookchains.m_##functionName.callChain(functionName##_OrigFunc, __VA_ARGS__);\ - } - -#define LINK_HOOK_VOID_CHAIN2(functionName)\ - void functionName() {\ - g_ReGameHookchains.m_##functionName.callChain(functionName##_OrigFunc);\ - } - -#define LINK_HOOK_CHAIN2(ret, functionName)\ - ret functionName() {\ - return g_ReGameHookchains.m_##functionName.callChain(functionName##_OrigFunc);\ - } -#else - -#define __API_HOOK(fname)\ - fname - -#define LINK_HOOK_CLASS_VOID_CHAIN(...) -#define LINK_HOOK_CLASS_VOID_CHAIN2(...) -#define LINK_HOOK_CLASS_CHAIN(...) -#define LINK_HOOK_CLASS_CHAIN2(...) -#define LINK_HOOK_CLASS_VOID_CUSTOM_CHAIN(...) -#define LINK_HOOK_CLASS_VOID_CUSTOM_CHAIN2(...) -#define LINK_HOOK_CLASS_CUSTOM_CHAIN(...) -#define LINK_HOOK_CLASS_CUSTOM_CHAIN2(...) -#define LINK_HOOK_VOID_CHAIN(...) -#define LINK_HOOK_VOID_CHAIN2(...) -#define LINK_HOOK_CHAIN(...) -#define LINK_HOOK_CHAIN2(...) - -#endif // !defined(HOOK_GAMEDLL) && defined(REGAMEDLL_API) diff --git a/regamedll/unittests/TestRunner.cpp b/regamedll/unittests/TestRunner.cpp index a5b20459..16536b1b 100644 --- a/regamedll/unittests/TestRunner.cpp +++ b/regamedll/unittests/TestRunner.cpp @@ -1,7 +1,8 @@ #include "precompiled.h" #include "cppunitlite/GradleAdapter.h" -int main(int argc, char* argv[]) { +int main(int argc, char *argv[]) +{ printf("TestRunner: main()\n"); GradleAdapter a; diff --git a/regamedll/unittests/struct_offsets_tests.cpp b/regamedll/unittests/struct_offsets_tests.cpp index 220e1dd2..c115f0c0 100644 --- a/regamedll/unittests/struct_offsets_tests.cpp +++ b/regamedll/unittests/struct_offsets_tests.cpp @@ -70,43 +70,6 @@ TEST(StructOffsets, ReversingChecks, 5000) REPEAT_OFFSETOF_PRINT(CBaseEntity, has_disconnected); //REPEAT_OFFSETOF_PRINT(CPreventDefuseTask, m_bombPlantedThisRound); //REPEAT_OFFSETOF_PRINT(CPreventDefuseTask, m_defuseStartedThisRound); - -#ifdef HOOK_GAMEDLL - // assert - CHECK_CLASS_SIZE(CNavArea, 0x238u, 0x214u); - - CHECK_CLASS_SIZE(CBasePlayer, 0x9B0, 0x9C4); - CHECK_CLASS_SIZE(CHostageImprov, 0x1C8Cu, 0x1C8Cu); - CHECK_CLASS_SIZE(CHostage, 0x7B0, 0x7C4); - - CHECK_CLASS_SIZE(CBaseGrenCatch, 0x98, 0xA8); - CHECK_CLASS_SIZE(CFuncWeaponCheck, 0x11C, 0x12C); - - CHECK_CLASS_SIZE(BotPhraseManager, 0x21Cu, 0x214u); - CHECK_CLASS_SIZE(BotPhrase, 0x50, 0x44); - - //CHECK_CLASS_SIZE(CHalfLifeMultiplay, 0x2D0u, 0x2C4u); - CHECK_CLASS_SIZE(CHalfLifeTraining, 0x2E8u, 0x2D8u); - CHECK_CLASS_SIZE(CGib, 0x98, 0xA8); - CHECK_CLASS_SIZE(CSprayCan, 0x88, 0x98); - CHECK_CLASS_SIZE(CBaseEntity, 0x88, 0x98); - CHECK_CLASS_SIZE(CGrenade, 0x1E0, 0x1F4); - //CHECK_CLASS_SIZE(CountdownTimer, 0xC, 0x8); - CHECK_CLASS_SIZE(CCareerTaskManager, 0x28, 0x24); - CHECK_CLASS_SIZE(CCareerTask, 0x2C, 0x2C); - CHECK_CLASS_SIZE(CPreventDefuseTask, 0x30, 0x30); - CHECK_CLASS_SIZE(CSoundEnt, 0x898, 0x8A8); - //CHECK_CLASS_SIZE(CCSTutor, 0x160u, 0x164u); // UNDONE: don't need a check this - - //CHECK_CLASS_SIZE(CBotManager, 12u, 12); - CHECK_CLASS_SIZE(CCSBot, 11404, 11424); - //CHECK_CLASS_SIZE(CCSBotManager, 740, 0x2E0u);//0x2E4u | 0x2E0u - - CHECK_CLASS_SIZE(BotStatement, 0x70u, 0x70u); - //CHECK_CLASS_SIZE(HostageStateMachine, 0x10, 0x10); - //CHECK_CLASS_SIZE(HostageFollowState, 0x4C, 0x4C); - //CHECK_CLASS_SIZE(CCSBot, 0x2CA0, 0x2CA0); -#endif // HOOK_GAMEDLL } #pragma warning( pop )