├── .github └── workflows │ ├── makefile.yml │ └── msbuild.yml ├── .gitignore ├── LICENSE ├── PugMod.sln ├── PugMod ├── Admin.cpp ├── Admin.h ├── AntiFlood.cpp ├── AntiFlood.h ├── AntiRetry.cpp ├── AntiRetry.h ├── Auth.cpp ├── Auth.h ├── Captain.cpp ├── Captain.h ├── Commands.cpp ├── Commands.h ├── Cvars.cpp ├── Cvars.h ├── KnifeRound.cpp ├── KnifeRound.h ├── LibCurl.cpp ├── LibCurl.h ├── Makefile ├── Menu.cpp ├── Menu.h ├── MetaDLL.cpp ├── MetaDLL.h ├── MetaEngine.cpp ├── MetaEngine.h ├── MetaMod.cpp ├── MetaMod.def ├── MetaMod.h ├── Player.cpp ├── Player.h ├── PostDebug.bat ├── PostRelease.bat ├── PugMod.cpp ├── PugMod.h ├── PugMod.vcxproj ├── PugMod.vcxproj.filters ├── ReAPI.cpp ├── ReAPI.h ├── ReGameDLL.cpp ├── ReGameDLL.h ├── Ready.cpp ├── Ready.h ├── Stats.cpp ├── Stats.h ├── StatsCommand.cpp ├── StatsCommand.h ├── Task.cpp ├── Task.h ├── TimeFormat.cpp ├── TimeFormat.h ├── Translate.cpp ├── Translate.h ├── Util.cpp ├── Util.h ├── VoteKick.cpp ├── VoteKick.h ├── VoteLevel.cpp ├── VoteLevel.h ├── VoteMap.cpp ├── VoteMap.h ├── VoteMenu.cpp ├── VoteMenu.h ├── VoteOvertime.cpp ├── VoteOvertime.h ├── VotePause.cpp ├── VotePause.h ├── VoteRestart.cpp ├── VoteRestart.h ├── VoteStop.cpp ├── VoteStop.h ├── VoteTeam.cpp ├── VoteTeam.h ├── include │ ├── cssdk │ │ ├── common │ │ │ ├── IGameServerData.h │ │ │ ├── Sequence.h │ │ │ ├── SteamCommon.h │ │ │ ├── beamdef.h │ │ │ ├── cl_entity.h │ │ │ ├── com_model.h │ │ │ ├── con_nprint.h │ │ │ ├── const.h │ │ │ ├── crc.h │ │ │ ├── cvardef.h │ │ │ ├── demo_api.h │ │ │ ├── director_cmds.h │ │ │ ├── dlight.h │ │ │ ├── dll_state.h │ │ │ ├── entity_state.h │ │ │ ├── entity_types.h │ │ │ ├── enums.h │ │ │ ├── event_api.h │ │ │ ├── event_args.h │ │ │ ├── event_flags.h │ │ │ ├── hltv.h │ │ │ ├── in_buttons.h │ │ │ ├── ivoicetweak.h │ │ │ ├── kbutton.h │ │ │ ├── mathlib.h │ │ │ ├── net_api.h │ │ │ ├── netadr.h │ │ │ ├── nowin.h │ │ │ ├── parsemsg.cpp │ │ │ ├── parsemsg.h │ │ │ ├── particledef.h │ │ │ ├── pmtrace.h │ │ │ ├── port.h │ │ │ ├── qfont.h │ │ │ ├── qlimits.h │ │ │ ├── quakedef.h │ │ │ ├── r_efx.h │ │ │ ├── r_studioint.h │ │ │ ├── ref_params.h │ │ │ ├── screenfade.h │ │ │ ├── studio_event.h │ │ │ ├── triangleapi.h │ │ │ ├── usercmd.h │ │ │ ├── vmodes.h │ │ │ ├── weaponinfo.h │ │ │ ├── winsani_in.h │ │ │ └── winsani_out.h │ │ ├── dlls │ │ │ ├── API │ │ │ │ ├── CSEntity.h │ │ │ │ ├── CSInterfaces.h │ │ │ │ ├── CSPlayer.h │ │ │ │ ├── CSPlayerItem.h │ │ │ │ └── CSPlayerWeapon.h │ │ │ ├── activity.h │ │ │ ├── activitymap.h │ │ │ ├── airtank.h │ │ │ ├── ammo.h │ │ │ ├── basemonster.h │ │ │ ├── bmodels.h │ │ │ ├── bot │ │ │ │ ├── cs_bot.h │ │ │ │ ├── cs_bot_chatter.h │ │ │ │ ├── cs_bot_manager.h │ │ │ │ └── cs_gamestate.h │ │ │ ├── buttons.h │ │ │ ├── cbase.h │ │ │ ├── cdll_dll.h │ │ │ ├── client.h │ │ │ ├── csbot_dll.h │ │ │ ├── decals.h │ │ │ ├── doors.h │ │ │ ├── effects.h │ │ │ ├── enginecallback.h │ │ │ ├── explode.h │ │ │ ├── extdef.h │ │ │ ├── extdll.h │ │ │ ├── func_break.h │ │ │ ├── func_tank.h │ │ │ ├── gamerules.h │ │ │ ├── gib.h │ │ │ ├── h_battery.h │ │ │ ├── h_cycler.h │ │ │ ├── healthkit.h │ │ │ ├── hintmessage.h │ │ │ ├── hookchains.h │ │ │ ├── hostage │ │ │ │ ├── hostage.h │ │ │ │ ├── hostage_improv.h │ │ │ │ ├── hostage_localnav.h │ │ │ │ └── hostage_states.h │ │ │ ├── items.h │ │ │ ├── lights.h │ │ │ ├── mapinfo.h │ │ │ ├── maprules.h │ │ │ ├── monsterevent.h │ │ │ ├── monsters.h │ │ │ ├── mortar.h │ │ │ ├── observer.h │ │ │ ├── pathcorner.h │ │ │ ├── plats.h │ │ │ ├── player.h │ │ │ ├── qstring.h │ │ │ ├── regamedll_api.h │ │ │ ├── regamedll_const.h │ │ │ ├── revert_saved.h │ │ │ ├── saverestore.h │ │ │ ├── schedule.h │ │ │ ├── skill.h │ │ │ ├── sound.h │ │ │ ├── spectator.h │ │ │ ├── subs.h │ │ │ ├── training_gamerules.h │ │ │ ├── trains.h │ │ │ ├── triggers.h │ │ │ ├── unisignals.h │ │ │ ├── util.h │ │ │ ├── vector.h │ │ │ ├── vehicle.h │ │ │ ├── weapons.h │ │ │ ├── weapontype.h │ │ │ └── wpn_shared.h │ │ ├── engine │ │ │ ├── FlightRecorder.h │ │ │ ├── Sequence.h │ │ │ ├── archtypes.h │ │ │ ├── bspfile.h │ │ │ ├── cmd_rehlds.h │ │ │ ├── common_rehlds.h │ │ │ ├── crc32c.cpp │ │ │ ├── crc32c.h │ │ │ ├── custom.h │ │ │ ├── customentity.h │ │ │ ├── d_local.h │ │ │ ├── edict.h │ │ │ ├── eiface.h │ │ │ ├── keydefs.h │ │ │ ├── maintypes.h │ │ │ ├── model.h │ │ │ ├── modelgen.h │ │ │ ├── osconfig.h │ │ │ ├── pr_dlls.h │ │ │ ├── progdefs.h │ │ │ ├── progs.h │ │ │ ├── rehlds_api.h │ │ │ ├── rehlds_interfaces.h │ │ │ ├── shake.h │ │ │ ├── spritegn.h │ │ │ ├── static_map.h │ │ │ ├── studio.h │ │ │ ├── sys_shared.cpp │ │ │ ├── sys_shared.h │ │ │ └── userid_rehlds.h │ │ ├── game_shared │ │ │ ├── GameEvent.h │ │ │ ├── bitvec.h │ │ │ ├── bot │ │ │ │ ├── bot.h │ │ │ │ ├── bot_constants.h │ │ │ │ ├── bot_manager.h │ │ │ │ ├── bot_profile.h │ │ │ │ ├── bot_util.h │ │ │ │ ├── improv.h │ │ │ │ ├── nav.h │ │ │ │ ├── nav_area.h │ │ │ │ ├── nav_node.h │ │ │ │ ├── nav_path.h │ │ │ │ └── simple_state_machine.h │ │ │ ├── perf_counter.h │ │ │ ├── shared_util.h │ │ │ ├── simple_checksum.h │ │ │ ├── steam_util.h │ │ │ ├── voice_common.h │ │ │ └── voice_gamemgr.h │ │ ├── pm_shared │ │ │ ├── pm_defs.h │ │ │ ├── pm_info.h │ │ │ ├── pm_materials.h │ │ │ ├── pm_movevars.h │ │ │ └── pm_shared.h │ │ └── public │ │ │ ├── FileSystem.h │ │ │ ├── basetypes.h │ │ │ ├── commonmacros.h │ │ │ ├── interface.cpp │ │ │ ├── interface.h │ │ │ ├── strtools.h │ │ │ ├── tier0 │ │ │ ├── dbg.cpp │ │ │ ├── dbg.h │ │ │ └── platform.h │ │ │ ├── utlmemory.h │ │ │ └── utlvector.h │ ├── curl │ │ ├── include │ │ │ └── curl │ │ │ │ ├── curl.h │ │ │ │ ├── curlver.h │ │ │ │ ├── easy.h │ │ │ │ ├── header.h │ │ │ │ ├── mprintf.h │ │ │ │ ├── multi.h │ │ │ │ ├── options.h │ │ │ │ ├── stdcheaders.h │ │ │ │ ├── system.h │ │ │ │ ├── typecheck-gcc.h │ │ │ │ ├── urlapi.h │ │ │ │ └── websockets.h │ │ └── lib │ │ │ ├── libcurl_a.lib │ │ │ └── libcurl_a_debug.lib │ ├── json.hpp │ └── metamod │ │ ├── dllapi.h │ │ ├── engine_api.h │ │ ├── enginecallbacks.h │ │ ├── h_export.h │ │ ├── meta_api.h │ │ ├── mutil.h │ │ └── plinfo.h ├── precompiled.cpp └── precompiled.h ├── README.md └── cstrike ├── addons ├── metamod │ ├── config.ini │ └── plugins.ini └── pugmod │ ├── cfg │ ├── end.cfg │ ├── esl-ot.cfg │ ├── esl.cfg │ ├── halftime.cfg │ ├── pugmod.cfg │ ├── start.cfg │ └── warmup.cfg │ ├── help_admin.htm │ ├── help_player.htm │ ├── lang.txt │ ├── maps.txt │ └── users.txt ├── liblist.gam └── server.cfg /.github/workflows/makefile.yml: -------------------------------------------------------------------------------- 1 | name: Makefile CI 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v3 16 | 17 | - name: Add i386 architecture 18 | run: sudo dpkg --add-architecture i386 19 | 20 | - name: Update repository 21 | run: sudo apt-get update 22 | 23 | - name: Install build dependencies 24 | run: sudo apt-get install -qq -y build-essential g++ gcc-multilib g++-multilib libgcc-s1:i386 libcurl4-openssl-dev:i386 zlib1g-dev:i386 libssl-dev:i386 25 | 26 | - name: Run build 27 | working-directory: ./PugMod 28 | run: make 29 | 30 | - name: Move files 31 | run: | 32 | mkdir -p publish/addons/pugmod/dlls 33 | mv ./PugMod/Release/pugmod_mm.so publish/addons/pugmod/dlls 34 | cp -ar cstrike/. publish 35 | 36 | - name: Deploy artifacts 37 | uses: actions/upload-artifact@v3 38 | with: 39 | name: linux 40 | path: publish/* 41 | -------------------------------------------------------------------------------- /.github/workflows/msbuild.yml: -------------------------------------------------------------------------------- 1 | name: MSBuild 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | env: 10 | # Path to the solution file relative to the root of the project. 11 | SOLUTION_FILE_PATH: . 12 | 13 | # Configuration type to build. 14 | # You can convert this to a build matrix if you need coverage of multiple configuration types. 15 | # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix 16 | BUILD_CONFIGURATION: Release 17 | 18 | permissions: 19 | contents: read 20 | 21 | jobs: 22 | build: 23 | runs-on: windows-latest 24 | 25 | steps: 26 | - uses: actions/checkout@v3 27 | 28 | - name: Add MSBuild to PATH 29 | uses: microsoft/setup-msbuild@v1.1.3 30 | 31 | - name: Restore NuGet packages 32 | working-directory: ${{env.GITHUB_WORKSPACE}} 33 | run: nuget restore ${{env.SOLUTION_FILE_PATH}} 34 | 35 | - name: Build 36 | working-directory: ${{env.GITHUB_WORKSPACE}} 37 | # Add additional options to the MSBuild command line here (like platform or verbosity level). 38 | # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference 39 | run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} 40 | 41 | - name: Move files 42 | working-directory: ${{env.GITHUB_WORKSPACE}} 43 | run: | 44 | move ${{env.SOLUTION_FILE_PATH}}\cstrike publish 45 | 46 | mkdir publish\addons\pugmod\dlls 47 | move ${{env.BUILD_CONFIGURATION}}\*.dll publish\addons\pugmod\dlls 48 | 49 | - name: Deploy artifacts 50 | uses: actions/upload-artifact@main 51 | with: 52 | name: win32 53 | path: publish/* 54 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Cleverson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /PugMod.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.32510.428 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PugMod", "PugMod\PugMod.vcxproj", "{8EF9FA4E-09F8-4404-9319-742E194DF024}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Release|Win32 = Release|Win32 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {8EF9FA4E-09F8-4404-9319-742E194DF024}.Debug|Win32.ActiveCfg = Debug|Win32 15 | {8EF9FA4E-09F8-4404-9319-742E194DF024}.Debug|Win32.Build.0 = Debug|Win32 16 | {8EF9FA4E-09F8-4404-9319-742E194DF024}.Release|Win32.ActiveCfg = Release|Win32 17 | {8EF9FA4E-09F8-4404-9319-742E194DF024}.Release|Win32.Build.0 = Release|Win32 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {B24EE1B9-81CC-4C59-9BF7-8D5EA54F4862} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /PugMod/Admin.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define ADMIN_CONFIG_FILE "cstrike/addons/pugmod/users.txt" 4 | 5 | class CAdmin 6 | { 7 | public: 8 | void Load(); 9 | bool Check(int EntityIndex); 10 | bool Check(edict_t* pEntity); 11 | bool Check(CBasePlayer* Player); 12 | bool Check(const char* Auth); 13 | 14 | void Menu(CBasePlayer* Player); 15 | static void MenuHandle(int EntityIndex, P_MENU_ITEM Item); 16 | 17 | void MenuKick(int EntityIndex); 18 | static void MenuKickHandle(int EntityIndex, P_MENU_ITEM Item); 19 | 20 | void MenuBan(int EntityIndex); 21 | static void MenuBanHandle(int EntityIndex, P_MENU_ITEM Item); 22 | static void MenuBanHandleExtra(int EntityIndex, P_MENU_ITEM Item); 23 | 24 | void MenuSlap(int EntityIndex); 25 | static void MenuSlapHandle(int EntityIndex, P_MENU_ITEM Item); 26 | 27 | void MenuTeam(int EntityIndex); 28 | static void MenuTeamHandle(int EntityIndex, P_MENU_ITEM Item); 29 | static void MenuTeamHandleExtra(int EntityIndex, P_MENU_ITEM Item); 30 | 31 | void MenuMap(int EntityIndex); 32 | static void MenuMapHandle(int EntityIndex, P_MENU_ITEM Item); 33 | 34 | void MenuControl(int EntityIndex); 35 | static void MenuControlHandle(int EntityIndex, P_MENU_ITEM Item); 36 | 37 | void Chat(CBasePlayer* Player, const char* Args); 38 | void Rcon(CBasePlayer* Player, const char* Args); 39 | void SwapTeams(CBasePlayer* Player); 40 | 41 | private: 42 | std::map m_Data; 43 | }; 44 | 45 | extern CAdmin gAdmin; 46 | -------------------------------------------------------------------------------- /PugMod/AntiFlood.cpp: -------------------------------------------------------------------------------- 1 | #include "precompiled.h" 2 | 3 | CAntiFlood gAntiFlood; 4 | 5 | bool CAntiFlood::ClientCommand(CBasePlayer* Player, const char* pcmd, const char* parg1) 6 | { 7 | if (Q_stricmp(pcmd, "say") == 0 || Q_stricmp(pcmd, "say_team") == 0) 8 | { 9 | float MaxChat = gCvars.GetFloodTime()->value; 10 | 11 | if (MaxChat) 12 | { 13 | float NexTime = gpGlobals->time; 14 | 15 | auto EntityIndex = Player->entindex(); 16 | 17 | if (this->m_Flooding[EntityIndex] > NexTime) 18 | { 19 | if (this->m_Flood[EntityIndex] >= MAX_FLOOD_REPEAT) 20 | { 21 | this->m_Flooding[EntityIndex] = (NexTime + MaxChat + MIN_FLOOD_NEXT_TIME); 22 | 23 | return true; 24 | } 25 | 26 | this->m_Flood[EntityIndex]++; 27 | } 28 | else if (this->m_Flood[EntityIndex]) 29 | { 30 | this->m_Flood[EntityIndex]--; 31 | } 32 | 33 | this->m_Flooding[EntityIndex] = NexTime + MaxChat; 34 | } 35 | } 36 | 37 | return false; 38 | } 39 | -------------------------------------------------------------------------------- /PugMod/AntiFlood.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define MAX_FLOOD_REPEAT 3 4 | #define MIN_FLOOD_NEXT_TIME 3.0 5 | 6 | class CAntiFlood 7 | { 8 | public: 9 | bool ClientCommand(CBasePlayer* Player, const char* pcmd, const char* parg1); 10 | 11 | private: 12 | int m_Flood[MAX_CLIENTS+1] = { 0 }; 13 | float m_Flooding[MAX_CLIENTS+1] = { 0 }; 14 | }; 15 | 16 | extern CAntiFlood gAntiFlood; -------------------------------------------------------------------------------- /PugMod/AntiRetry.cpp: -------------------------------------------------------------------------------- 1 | #include "precompiled.h" 2 | 3 | CAntiRetry gAntiRetry; 4 | 5 | void CAntiRetry::ClientConnected(edict_t * pEntity) 6 | { 7 | if (pEntity) 8 | { 9 | const char* Auth = GETPLAYERAUTHID(pEntity); 10 | 11 | if (Auth) 12 | { 13 | auto it = this->m_Data.find(Auth); 14 | 15 | if (it != this->m_Data.end()) 16 | { 17 | int Seconds = (it->second - time(NULL)); 18 | 19 | if (Seconds > 0) 20 | { 21 | gPlayer.DropClient(ENTINDEX(pEntity), _T("Wait %d seconds before retry."), Seconds); 22 | } 23 | } 24 | } 25 | } 26 | } 27 | 28 | void CAntiRetry::ClientDisconnected(edict_t* pEntity, const char* Reason) 29 | { 30 | if (FStrEq(Reason, "Client sent 'drop'") || FStrEq(Reason, "Timed out")) 31 | { 32 | if (gCvars.GetReconnectDelay()->value > 0) 33 | { 34 | const char* Auth = GETPLAYERAUTHID(pEntity); 35 | 36 | if (!gAdmin.Check(Auth)) 37 | { 38 | auto Player = UTIL_PlayerByIndexSafe(ENTINDEX(pEntity)); 39 | 40 | if (Player) 41 | { 42 | if (Player->m_iTeam == TERRORIST || Player->m_iTeam == CT) 43 | { 44 | if (gCvars.GetReconnectBanTime()->value > 0) 45 | { 46 | if (gPugMod.GetState() >= PUG_STATE_FIRST_HALF && gPugMod.GetState() <= PUG_STATE_OVERTIME) 47 | { 48 | gPlayer.BanClient(Player->entindex(), (int)gCvars.GetReconnectBanTime()->value, false); 49 | } 50 | } 51 | else 52 | { 53 | this->m_Data.erase(Auth); 54 | 55 | this->m_Data.insert(std::make_pair(Auth, time(NULL) + (int)gCvars.GetReconnectDelay()->value)); 56 | } 57 | } 58 | } 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /PugMod/AntiRetry.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CAntiRetry 4 | { 5 | public: 6 | void ClientConnected(edict_t* pEntity); 7 | void ClientDisconnected(edict_t* pEntity, const char* Reason); 8 | 9 | private: 10 | std::map m_Data; 11 | }; 12 | 13 | extern CAntiRetry gAntiRetry; 14 | 15 | -------------------------------------------------------------------------------- /PugMod/Auth.cpp: -------------------------------------------------------------------------------- 1 | #include "precompiled.h" 2 | 3 | CAuth gAuth; 4 | 5 | void CAuth::ClientConnected(edict_t* pEdict) 6 | { 7 | if (gCvars.GetApiCheckConnect()->value) 8 | { 9 | if (gCvars.GetApiUrl()->string[0] != '\0') 10 | { 11 | if (!FNullEnt(pEdict)) 12 | { 13 | if (!(pEdict->v.flags & FL_FAKECLIENT)) 14 | { 15 | if (!(pEdict->v.flags & FL_PROXY)) 16 | { 17 | const char* Auth = GETPLAYERAUTHID(pEdict); 18 | 19 | if (Auth && Auth[0] != '\0') 20 | { 21 | char Link[512] = { 0 }; 22 | 23 | Q_snprintf(Link, sizeof(Link), "%s?auth=%s", gCvars.GetApiUrl()->string, Auth); 24 | 25 | if (Link[0] && Link[0] != '\0') 26 | { 27 | gLibCurl.Get(Link, (void*)this->RequestCallback, ENTINDEX(pEdict)); 28 | } 29 | } 30 | } 31 | } 32 | } 33 | } 34 | } 35 | } 36 | 37 | void CAuth::RequestCallback(CURL* ch, size_t Size, const char* Memory, int EntityIndex) 38 | { 39 | auto pEntity = INDEXENT(EntityIndex); 40 | 41 | if (!FNullEnt(pEntity)) 42 | { 43 | if (ch) 44 | { 45 | long HttpResponseCode = 0; 46 | 47 | if (curl_easy_getinfo(ch, CURLINFO_RESPONSE_CODE, &HttpResponseCode) == CURLE_OK) 48 | { 49 | if (HttpResponseCode == 200) 50 | { 51 | if (Memory) 52 | { 53 | auto Result = nlohmann::json::parse(Memory); 54 | 55 | if (Result.contains("kick") && Result.contains("reason")) 56 | { 57 | auto KickPlayer = Result["kick"].get(); 58 | 59 | auto KickReason = Result["reason"].get(); 60 | 61 | if (KickPlayer) 62 | { 63 | if (KickReason.length()) 64 | { 65 | gUtil.DropClient(EntityIndex, "%s", KickReason.c_str()); 66 | } 67 | else 68 | { 69 | gUtil.DropClient(EntityIndex, "Failed to connect, contact: %s", CVAR_GET_STRING("sv_contact")); 70 | } 71 | } 72 | 73 | return; 74 | } 75 | } 76 | } 77 | } 78 | } 79 | } 80 | 81 | gUtil.DropClient(EntityIndex, "Failed to connect, contact: %s", CVAR_GET_STRING("sv_contact")); 82 | } 83 | -------------------------------------------------------------------------------- /PugMod/Auth.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CAuth 4 | { 5 | public: 6 | void ClientConnected(edict_t* pEdict); 7 | 8 | static void RequestCallback(CURL* ch, size_t Size, const char* Memory, int EntityIndex); 9 | }; 10 | 11 | extern CAuth gAuth; -------------------------------------------------------------------------------- /PugMod/Captain.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CCaptain 4 | { 5 | public: 6 | void Clear(); 7 | void Init(); 8 | void Stop(); 9 | void ClientDisconnected(int EntityIndex); 10 | 11 | void SetCaptain(CBasePlayer* Player, TeamName Team); 12 | TeamName GetCaptain(int EntityIndex); 13 | void GetPlayer(CBasePlayer* Player, CBasePlayer* Target); 14 | bool CheckPlayerCount(); 15 | bool GetPicking(int EntityIndex); 16 | int GetCaptainPicking(); 17 | 18 | void Menu(TeamName Team); 19 | 20 | static void MenuHandle(int EntityIndex, P_MENU_ITEM Item); 21 | static void GetRandomPlayer(); 22 | static void List(); 23 | private: 24 | int m_Captain[SPECTATOR + 1] = { 0 }; 25 | TeamName m_Picking = UNASSIGNED; 26 | }; 27 | 28 | extern CCaptain gCaptain; 29 | -------------------------------------------------------------------------------- /PugMod/Commands.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CCommands 4 | { 5 | public: 6 | bool ClientCommand(CBasePlayer* Player, const char* pcmd, const char* parg1); 7 | }; 8 | 9 | extern CCommands gCommands; -------------------------------------------------------------------------------- /PugMod/Cvars.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CCvars 4 | { 5 | public: 6 | void Load(); 7 | 8 | cvar_t* Register(const char* Name, const char* Value); 9 | 10 | cvar_t* GetConfig(int State); 11 | cvar_t* GetLanguage(); 12 | cvar_t* GetAutoStartDelay(); 13 | cvar_t* GetPlayersMin(); 14 | cvar_t* GetPlayersMax(); 15 | cvar_t* GetPlayRounds(); 16 | cvar_t* GetPlayRoundsOvertime(); 17 | cvar_t* GetPlayRoundsOvertimeType(); 18 | cvar_t* GetPlayRoundsOvertimeSwap(); 19 | cvar_t* GetPlayCheckPlayers(); 20 | cvar_t* GetPauseCount(); 21 | cvar_t* GetVoteDelay(); 22 | cvar_t* GetVoteMap(); 23 | cvar_t* GetVoteMapType(); 24 | cvar_t* GetVoteMapFailType(); 25 | cvar_t* GetVoteMapSelf(); 26 | cvar_t* GetVoteMapEnd(); 27 | cvar_t* GetVoteTeamType(); 28 | cvar_t* GetVotePercentage(); 29 | cvar_t* GetVotePauseTime(); 30 | cvar_t* GetVotePauseLimit(); 31 | cvar_t* GetVotePauseFreezetime(); 32 | cvar_t* GetVoteRestartLimit(); 33 | cvar_t* GetReadyType(); 34 | cvar_t* GetReadyTime(); 35 | cvar_t* GetShowScoreType(); 36 | cvar_t* GetFloodTime(); 37 | cvar_t* GetStatsRoundEnd(); 38 | cvar_t* GetReconnectDelay(); 39 | cvar_t* GetReconnectBanTime(); 40 | cvar_t* GetKnifeRoundPlay(); 41 | cvar_t* GetKnifeRoundEndType(); 42 | cvar_t* GetHelpFileAdmin(); 43 | cvar_t* GetHelpFilePlayer(); 44 | cvar_t* GetBanTimes(); 45 | cvar_t* GetApiUrl(); 46 | cvar_t* GetApiCheckConnect(); 47 | cvar_t* GetApiStats(); 48 | 49 | private: 50 | cvar_t* m_Config[8]; 51 | cvar_t* m_Language; 52 | cvar_t* m_AutoStartDelay; 53 | cvar_t* m_PlayersMin; 54 | cvar_t* m_PlayersMax; 55 | cvar_t* m_PlayRounds; 56 | cvar_t* m_PlayRoundsOvertime; 57 | cvar_t* m_PlayRoundsOvertimeType; 58 | cvar_t* m_PlayRoundsOvertimeSwap; 59 | cvar_t* m_PlayCheckPlayers; 60 | cvar_t* m_PauseCount; 61 | cvar_t* m_VoteDelay; 62 | cvar_t* m_VoteMap; 63 | cvar_t* m_VoteMapType; 64 | cvar_t* m_VoteMapFailType; 65 | cvar_t* m_VoteMapSelf; 66 | cvar_t* m_VoteMapEnd; 67 | cvar_t* m_VoteTeamType; 68 | cvar_t* m_VotePercentage; 69 | cvar_t* m_VotePauseTime; 70 | cvar_t* m_VotePauseLimit; 71 | cvar_t* m_VotePauseFreezetime; 72 | cvar_t* m_VoteRestartLimit; 73 | cvar_t* m_ReadyType; 74 | cvar_t* m_ReadyTime; 75 | cvar_t* m_ShowScoreType; 76 | cvar_t* m_FloodTime; 77 | cvar_t* m_StatsRoundEnd; 78 | cvar_t* m_ReconnectDelay; 79 | cvar_t* m_ReconnectBanTime; 80 | cvar_t* m_KnifeRoundPlay; 81 | cvar_t* m_KnifeRoundEndType; 82 | cvar_t* m_HelpFileAdmin; 83 | cvar_t* m_HelpFilePlayer; 84 | cvar_t* m_BanTimes; 85 | cvar_t* m_ApiUrl; 86 | cvar_t* m_ApiCheckConnect; 87 | cvar_t* m_ApiStats; 88 | }; 89 | 90 | extern CCvars gCvars; -------------------------------------------------------------------------------- /PugMod/KnifeRound.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CKnifeRound 4 | { 5 | public: 6 | void Init(); 7 | void Stop(bool ChangeTeams); 8 | 9 | bool ClientHasRestrictItem(CBasePlayer* Player, ItemID item, ItemRestType type); 10 | bool IsRunning(); 11 | 12 | void StartVote(TeamName Winner); 13 | void RoundEnd(int winStatus, ScenarioEventEndRound event, float tmDelay); 14 | 15 | static void List(); 16 | 17 | TeamName GetWinner(); 18 | int AddVote(TeamName Team); 19 | int GetVote(TeamName Team); 20 | 21 | static void MenuHandle(int EntityIndex, P_MENU_ITEM Item); 22 | static void VoteEnd(); 23 | 24 | private: 25 | bool m_Running = false; 26 | int m_Votes[SPECTATOR + 1] = { 0 }; 27 | }; 28 | 29 | extern CKnifeRound gKnifeRound; -------------------------------------------------------------------------------- /PugMod/LibCurl.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct P_CURL_MOD_MEMORY 4 | { 5 | char* Memory; 6 | size_t Size; 7 | void* Callback; 8 | int CallbackData; 9 | }; 10 | 11 | class CLibCurl 12 | { 13 | public: 14 | void Init(); 15 | void Stop(); 16 | 17 | void Frame(); 18 | 19 | void Get(const char* url, void* FunctionCallback, int CallbackData); 20 | void PostJSON(const char* url, std::string PostData, void* FunctionCallback, int CallbackData); 21 | 22 | static size_t WriteMemoryCallback(void* contents, size_t size, size_t nmemb, void* userp); 23 | 24 | private: 25 | CURLM* m_MultiHandle = NULL; 26 | 27 | long m_RequestIndex = 0; 28 | 29 | std::map m_Data; 30 | }; 31 | 32 | extern CLibCurl gLibCurl; 33 | -------------------------------------------------------------------------------- /PugMod/Makefile: -------------------------------------------------------------------------------- 1 | CSSDK = include/cssdk 2 | METAMOD = include/metamod 3 | LIBCURL = include/curl 4 | 5 | NAME = pugmod 6 | 7 | COMPILER = g++ 8 | 9 | OBJECTS = *.cpp 10 | 11 | LINK = -static-libstdc++ -lcurl -lssl -lcrypto -ldl -lm -lz 12 | 13 | OPT_FLAGS = -g0 -O3 -s -flto -funroll-loops -fno-stack-protector 14 | 15 | INCLUDE = -I. -I$(CSSDK)/common -I$(CSSDK)/dlls -I$(CSSDK)/engine -I$(CSSDK)/game_shared -I$(CSSDK)/pm_shared -I$(CSSDK)/public -I$(METAMOD) -I$(LIBCURL)/include 16 | 17 | CFLAGS = $(OPT_FLAGS) -g -DNDEBUG -Dlinux -D__linux__ -D__USE_GNU -U_FORTIFY_SOURCE -std=gnu++14 -m32 -msse -msse2 -msse3 -mssse3 -mmmx -shared 18 | 19 | BIN_DIR = Release 20 | 21 | OBJ_LINUX := $(OBJECTS:%.c=$(BIN_DIR)/%.o) 22 | 23 | $(BIN_DIR)/%.o: %.c 24 | 25 | $(COMPILER) $(INCLUDE) $(CFLAGS) -o $@ -c $< 26 | 27 | all: 28 | mkdir -p $(BIN_DIR) 29 | 30 | $(MAKE) $(NAME) 31 | 32 | $(NAME): $(OBJ_LINUX) 33 | 34 | $(COMPILER) $(INCLUDE) $(CFLAGS) $(OBJ_LINUX) $(LINK) -o$(BIN_DIR)/$(NAME)_mm.so 35 | 36 | check: 37 | cppcheck $(INCLUDE) --quiet --max-configs=100 --std=gnu++14 -DNDEBUG -Dlinux -D__linux__ -D__USE_GNU . 38 | 39 | default: all 40 | 41 | clean: 42 | rm -rf Release/*.o 43 | rm -rf Release/*.so 44 | -------------------------------------------------------------------------------- /PugMod/Menu.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define MENU_PAGE_OPTION 7 4 | 5 | typedef struct 6 | { 7 | int Info; 8 | std::string Text; 9 | bool Disabled; 10 | int Extra; 11 | } P_MENU_ITEM, *LP_MENU_ITEM; 12 | 13 | class CMenu 14 | { 15 | public: 16 | void Clear(); 17 | 18 | void Create(std::string Title, bool Exit, void* CallbackFunction); 19 | 20 | void AddItem(int Info, std::string Text); 21 | void AddItem(int Info, std::string Text, bool Disabled); 22 | void AddItem(int Info, std::string Text, bool Disabled, int Extra); 23 | void AddList(std::vector List); 24 | 25 | void Show(int EntityIndex); 26 | void Hide(int EntityIndex); 27 | 28 | bool Handle(int EntityIndex, int Key); 29 | 30 | private: 31 | void Display(int EntityIndex, int Page); 32 | void ShowMenu(int EntityIndex, int Slots, int Time, std::string MenuText); 33 | void HideMenu(int EntityIndex); 34 | 35 | std::string m_Text; 36 | std::vector m_Data; 37 | int m_Page = 0; 38 | bool m_Exit = false; 39 | int m_PageOption = MENU_PAGE_OPTION; 40 | void* m_Func = nullptr; 41 | }; 42 | 43 | extern CMenu gMenu[MAX_CLIENTS+1]; -------------------------------------------------------------------------------- /PugMod/MetaDLL.cpp: -------------------------------------------------------------------------------- 1 | #include "precompiled.h" 2 | 3 | // DLL PRE Functions Table 4 | DLL_FUNCTIONS gDLL_FunctionTable_Pre; 5 | 6 | // DLL POST Functions Table 7 | DLL_FUNCTIONS gDLL_FunctionTable_Post; 8 | 9 | #pragma region DLL_PRE 10 | C_DLLEXPORT int GetEntityAPI2(DLL_FUNCTIONS* pFunctionTable, int* interfaceVersion) 11 | { 12 | memset(&gDLL_FunctionTable_Pre, 0, sizeof(DLL_FUNCTIONS)); 13 | 14 | /**/ 15 | 16 | memcpy(pFunctionTable, &gDLL_FunctionTable_Pre, sizeof(DLL_FUNCTIONS)); 17 | 18 | return 1; 19 | } 20 | #pragma endregion 21 | 22 | #pragma region DLL_POST 23 | C_DLLEXPORT int GetEntityAPI2_Post(DLL_FUNCTIONS* pFunctionTable, int* interfaceVersion) 24 | { 25 | memset(&gDLL_FunctionTable_Post, 0, sizeof(DLL_FUNCTIONS)); 26 | 27 | gDLL_FunctionTable_Post.pfnServerActivate = DLL_POST_ServerActivate; 28 | 29 | gDLL_FunctionTable_Post.pfnServerDeactivate = DLL_POST_ServerDeactivate; 30 | 31 | gDLL_FunctionTable_Post.pfnStartFrame = DLL_POST_StartFrame; 32 | 33 | memcpy(pFunctionTable, &gDLL_FunctionTable_Post, sizeof(DLL_FUNCTIONS)); 34 | 35 | return 1; 36 | } 37 | 38 | void DLL_POST_ServerActivate(edict_t* pEdictList, int edictCount, int clientMax) 39 | { 40 | gLibCurl.Init(); 41 | 42 | gTask.Clear(); 43 | 44 | gCvars.Load(); 45 | 46 | gAdmin.Load(); 47 | 48 | gCaptain.Clear(); 49 | 50 | gVoteMap.Load(); 51 | 52 | gPugMod.Load(); 53 | 54 | gTranslate.Load(); 55 | 56 | gStats.ServerActivate(); 57 | 58 | RETURN_META(MRES_IGNORED); 59 | } 60 | 61 | void DLL_POST_ServerDeactivate(void) 62 | { 63 | gTask.Clear(); 64 | 65 | gCaptain.Clear(); 66 | 67 | gPugMod.Unload(); 68 | 69 | gStats.ServerDeactivate(); 70 | 71 | RETURN_META(MRES_IGNORED); 72 | } 73 | 74 | void DLL_POST_StartFrame(void) 75 | { 76 | gLibCurl.Frame(); 77 | 78 | gTask.Think(); 79 | 80 | RETURN_META(MRES_IGNORED); 81 | } 82 | #pragma endregion -------------------------------------------------------------------------------- /PugMod/MetaDLL.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #pragma region DLL_PRE 4 | #pragma endregion 5 | 6 | #pragma region DLL_POST 7 | void DLL_POST_ServerActivate(edict_t *pEdictList, int edictCount, int clientMax); 8 | void DLL_POST_ServerDeactivate(void); 9 | void DLL_POST_StartFrame(void); 10 | #pragma endregion -------------------------------------------------------------------------------- /PugMod/MetaEngine.cpp: -------------------------------------------------------------------------------- 1 | #include "precompiled.h" 2 | 3 | // ENGINE POST Functions Table 4 | enginefuncs_t gENGINE_FunctionTable_Pre; 5 | 6 | // ENGINE POST Functions Table 7 | enginefuncs_t gENGINE_FunctionTable_Post; 8 | 9 | #pragma region ENGINE_PRE 10 | C_DLLEXPORT int GetEngineFunctions(enginefuncs_t *pengfuncsFromEngine, int *interfaceVersion) 11 | { 12 | memset(&gENGINE_FunctionTable_Pre, 0, sizeof(enginefuncs_t)); 13 | 14 | // 15 | 16 | memcpy(pengfuncsFromEngine, &gENGINE_FunctionTable_Pre, sizeof(enginefuncs_t)); 17 | return 1; 18 | } 19 | #pragma endregion 20 | 21 | #pragma region ENGINE_POST 22 | C_DLLEXPORT int GetEngineFunctions_Post(enginefuncs_t *pengfuncsFromEngine, int *interfaceVersion) 23 | { 24 | memset(&gENGINE_FunctionTable_Post, 0, sizeof(enginefuncs_t)); 25 | 26 | // 27 | 28 | memcpy(pengfuncsFromEngine, &gENGINE_FunctionTable_Post, sizeof(enginefuncs_t)); 29 | 30 | return 1; 31 | } 32 | #pragma endregion -------------------------------------------------------------------------------- /PugMod/MetaEngine.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | -------------------------------------------------------------------------------- /PugMod/MetaMod.cpp: -------------------------------------------------------------------------------- 1 | #include "precompiled.h" 2 | 3 | plugin_info_t Plugin_info = 4 | { 5 | META_INTERFACE_VERSION, 6 | "Pug Mod", 7 | "0.2.0", 8 | __DATE__, 9 | "SmileY", 10 | "PugBR.net", 11 | "PUG", 12 | PT_ANYTIME, 13 | PT_ANYTIME, 14 | }; 15 | 16 | // Metamod Functions Table 17 | META_FUNCTIONS gMetaFunctionTable; 18 | 19 | // Engine Functions 20 | enginefuncs_t g_engfuncs; 21 | 22 | // Global Variables 23 | globalvars_t *gpGlobals; 24 | 25 | // Metamod Functions 26 | meta_globals_t *gpMetaGlobals; 27 | gamedll_funcs_t *gpGamedllFuncs; 28 | mutil_funcs_t *gpMetaUtilFuncs; 29 | 30 | C_DLLEXPORT void WINAPI GiveFnptrsToDll(enginefuncs_t *pengfuncsFromEngine, globalvars_t *pGlobals) 31 | { 32 | memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t)); 33 | 34 | gpGlobals = pGlobals; 35 | } 36 | 37 | C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, meta_globals_t *pMGlobals, gamedll_funcs_t *pGamedllFuncs) 38 | { 39 | memset(&gMetaFunctionTable, 0, sizeof(META_FUNCTIONS)); 40 | 41 | gMetaFunctionTable.pfnGetEntityAPI2 = GetEntityAPI2; 42 | 43 | gMetaFunctionTable.pfnGetEntityAPI2_Post = GetEntityAPI2_Post; 44 | 45 | gMetaFunctionTable.pfnGetEngineFunctions = GetEngineFunctions; 46 | 47 | gMetaFunctionTable.pfnGetEngineFunctions_Post = GetEngineFunctions_Post; 48 | 49 | memcpy(pFunctionTable, &gMetaFunctionTable, sizeof(META_FUNCTIONS)); 50 | 51 | gpMetaGlobals = pMGlobals; 52 | 53 | gpGamedllFuncs = pGamedllFuncs; 54 | 55 | ReAPI_Init(); 56 | 57 | ReGameDLL_Init(); 58 | 59 | return 1; 60 | } 61 | 62 | C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason) 63 | { 64 | ReAPI_Stop(); 65 | 66 | ReGameDLL_Stop(); 67 | 68 | return 1; 69 | } 70 | 71 | C_DLLEXPORT int Meta_Query(char *interfaceVersion, plugin_info_t **pPlugInfo, mutil_funcs_t *pMetaUtilFuncs) 72 | { 73 | *pPlugInfo = &Plugin_info; 74 | 75 | gpMetaUtilFuncs = pMetaUtilFuncs; 76 | 77 | return 1; 78 | } 79 | 80 | -------------------------------------------------------------------------------- /PugMod/MetaMod.def: -------------------------------------------------------------------------------- 1 | LIBRARY pugmod_mm 2 | 3 | EXPORTS 4 | 5 | GiveFnptrsToDll @1 6 | 7 | SECTIONS 8 | 9 | .data READ WRITE 10 | 11 | -------------------------------------------------------------------------------- /PugMod/MetaMod.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | -------------------------------------------------------------------------------- /PugMod/Player.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CPlayer 4 | { 5 | public: 6 | void TeamInfo(edict_t* pEntity, int playerIndex, const char *pszTeamName); 7 | 8 | int GetList(CBasePlayer* pPlayers[MAX_CLIENTS], bool InGameOnly); 9 | int GetList(CBasePlayer* pPlayers[MAX_CLIENTS], TeamName Team); 10 | 11 | int GetNum(bool CountBots, int &InGame, int &NumTerrorist, int &NumCT, int& NumSpectator); 12 | int GetNum(); 13 | int GetNum(TeamName Team); 14 | int GetNum(bool CountBots); 15 | int GetNum(bool CountBots,TeamName Team); 16 | int GetNum(int& NumAliveTerrorists, int& NumAliveCT); 17 | 18 | CBasePlayer* GetRandom(TeamName Team); 19 | 20 | void DropClient(int EntityIndex, const char* Format, ...); 21 | void BanClient(int EntityIndex, int Time, bool Kick); 22 | }; 23 | 24 | extern CPlayer gPlayer; -------------------------------------------------------------------------------- /PugMod/PostDebug.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | tasklist /fi "imagename eq hlds.exe" |find ":" > nul 4 | if errorlevel 1 (taskkill /f /im "hlds.exe") 5 | 6 | ping 127.0.0.1 -n 2 > nul 7 | 8 | set "outputFile=..\Debug\pugmod_mm.dll" 9 | 10 | set "copyPath1=C:\Files\Desktop\steamcmd\hlds\cstrike\addons\pugmod\dlls" 11 | set "copyPath2=D:\Files\Desktop\steamcmd\hlds\cstrike\addons\pugmod\dlls" 12 | 13 | if exist %copyPath1% (copy %outputFile% %copyPath1%) 14 | if exist %copyPath2% (copy %outputFile% %copyPath2%) 15 | 16 | set "hldsParam=-console -game cstrike -secure -pingboost 3 -master -bots +port 27020 +map de_inferno +maxplayers 32 +sys_ticrate 1000" 17 | 18 | set "hldsPath1=C:\Files\Desktop\steamcmd\hlds" 19 | set "hldsPath2=D:\Files\Desktop\steamcmd\hlds" 20 | 21 | if exist %hldsPath1% (start /min /d "%hldsPath1%" hlds.exe %hldsParam%) 22 | if exist %hldsPath2% (start /min /d "%hldsPath2%" hlds.exe %hldsParam%) -------------------------------------------------------------------------------- /PugMod/PostRelease.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | tasklist /fi "imagename eq hlds.exe" |find ":" > nul 4 | if errorlevel 1 (taskkill /f /im "hlds.exe") 5 | 6 | ping 127.0.0.1 -n 2 > nul 7 | 8 | set "outputFile=..\Release\pugmod_mm.dll" 9 | 10 | set "copyPath1=C:\Files\Desktop\steamcmd\hlds\cstrike\addons\pugmod\dlls" 11 | set "copyPath2=D:\Files\Desktop\steamcmd\hlds\cstrike\addons\pugmod\dlls" 12 | 13 | if exist %copyPath1% (copy %outputFile% %copyPath1%) 14 | if exist %copyPath2% (copy %outputFile% %copyPath2%) 15 | 16 | set "hldsParam=-console -game cstrike -secure -pingboost 3 -master -bots +port 27020 +map de_inferno +maxplayers 32 +sys_ticrate 1000" 17 | 18 | set "hldsPath1=C:\Files\Desktop\steamcmd\hlds" 19 | set "hldsPath2=D:\Files\Desktop\steamcmd\hlds" 20 | 21 | if exist %hldsPath1% (start /min /d "%hldsPath1%" hlds.exe %hldsParam%) 22 | if exist %hldsPath2% (start /min /d "%hldsPath2%" hlds.exe %hldsParam%) -------------------------------------------------------------------------------- /PugMod/PugMod.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | enum PUG_MOD_STATES_NUM 4 | { 5 | PUG_STATE_DEAD = 0, 6 | PUG_STATE_WARMUP = 1, 7 | PUG_STATE_START = 2, 8 | PUG_STATE_FIRST_HALF = 3, 9 | PUG_STATE_HALFTIME = 4, 10 | PUG_STATE_SECOND_HALF = 5, 11 | PUG_STATE_OVERTIME = 6, 12 | PUG_STATE_END = 7 13 | }; 14 | 15 | const char PUG_MOD_STATES_STR[][32] = 16 | { 17 | "Dead", 18 | "Warmup", 19 | "Starting", 20 | "First Half", 21 | "Half Time", 22 | "Second Half", 23 | "Overtime", 24 | "Finished" 25 | }; 26 | 27 | const char PUG_MOD_TEAM_STR[][21] = 28 | { 29 | "Unnasigned", 30 | "Terrorists", 31 | "Counter-Terrorists", 32 | "Spectators" 33 | }; 34 | 35 | const char PUG_MOD_TEAM_STR_SHORT[][6] = 36 | { 37 | "NONE", 38 | "TR", 39 | "CT", 40 | "SPEC" 41 | }; 42 | 43 | class CPugMod 44 | { 45 | public: 46 | void Load(); 47 | void Unload(); 48 | 49 | int GetState(); 50 | char* GetStateName(); 51 | 52 | bool IsLive(); 53 | 54 | void SetState(int State); 55 | void NextState(float Delay); 56 | static void RunState(); 57 | 58 | bool CheckBalanceTeams(); 59 | 60 | bool StartVoteMap(CBasePlayer* Player); 61 | bool StartVoteTeam(CBasePlayer* Player); 62 | bool StartMatch(CBasePlayer* Player); 63 | bool StopMatch(CBasePlayer* Player); 64 | bool RestarPeriod(CBasePlayer* Player); 65 | bool EndGame(TeamName Winner); 66 | bool PauseMatch(CBasePlayer* Player); 67 | 68 | int GetRound(); 69 | int GetScores(int Team); 70 | 71 | void ResetScores(); 72 | void ResetStateScores(); 73 | 74 | TeamName GetWinner(); 75 | bool GetOvertimeWinner(); 76 | 77 | void Help(CBasePlayer* Player,bool AdminHelp); 78 | void Status(CBasePlayer* Player); 79 | void Scores(CBasePlayer* Player); 80 | void ViewScores(CBasePlayer* Player); 81 | 82 | static void LO3(const char* Time); 83 | static void SwapTeams(); 84 | 85 | void SwapScores(); 86 | 87 | void ClientConnected(edict_t* pEntity); 88 | void ClientDisconnected(int EntityIndex); 89 | bool ClientAddAccount(CBasePlayer* Player, int amount, RewardType type, bool bTrackChange); 90 | bool ClientHasRestrictItem(CBasePlayer* Player, ItemID item, ItemRestType type); 91 | bool ClientJoinTeam(CBasePlayer* Player, int NewTeam); 92 | 93 | void RoundStart(); 94 | void RoundEnd(int winStatus, ScenarioEventEndRound event, float tmDelay); 95 | void RoundRestart(bool PreRestart); 96 | 97 | static void PauseTimer(); 98 | 99 | private: 100 | int m_State = PUG_STATE_DEAD; 101 | int m_Round[PUG_STATE_END + 1] = { 0 }; 102 | int m_Score[PUG_STATE_END + 1][SPECTATOR + 1] = { 0 }; 103 | int m_Pause = false; 104 | }; 105 | 106 | extern CPugMod gPugMod; 107 | 108 | -------------------------------------------------------------------------------- /PugMod/ReAPI.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | extern IRehldsApi* g_RehldsApi; 4 | extern const RehldsFuncs_t* g_RehldsFuncs; 5 | extern IRehldsServerData* g_RehldsData; 6 | extern IRehldsHookchains* g_RehldsHookchains; 7 | extern IRehldsServerStatic* g_RehldsSvs; 8 | 9 | extern bool ReAPI_Init(); 10 | extern bool ReAPI_Stop(); 11 | 12 | extern void ReAPI_ClientConnected(IRehldsHook_ClientConnected* chain,IGameClient* client); 13 | extern void ReAPI_SV_DropClient(IRehldsHook_SV_DropClient * chain, IGameClient * client, bool crash, const char* Reason); -------------------------------------------------------------------------------- /PugMod/Ready.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CReady 4 | { 5 | public: 6 | void Load(); 7 | void Unload(); 8 | void Toggle(CBasePlayer* Player); 9 | 10 | void ClientGetIntoGame(CBasePlayer* Player); 11 | void ClientDisconnected(int EntityIndex); 12 | 13 | static void List(); 14 | 15 | void Ready(CBasePlayer* pPlayer); 16 | void NotReady(CBasePlayer* pPlayer); 17 | bool GetReady(int EntityIndex); 18 | 19 | time_t GetSystemTime(); 20 | void SetSystemTime(time_t Time); 21 | 22 | private: 23 | bool m_Running = false; 24 | int m_Ready[MAX_CLIENTS + 1] = { 0 }; 25 | time_t m_SystemTime = 0; 26 | }; 27 | 28 | extern CReady gReady; -------------------------------------------------------------------------------- /PugMod/StatsCommand.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CStatsCommand 4 | { 5 | public: 6 | void RoundStart(); 7 | void TakeDamage(CBasePlayer* Player, entvars_t* pevInflictor, entvars_t* pevAttacker, float& flDamage, int bitsDamageType); 8 | 9 | bool HP(CBasePlayer* Player); 10 | bool Damage(CBasePlayer* Player); 11 | bool Received(CBasePlayer* Player); 12 | bool Summary(CBasePlayer* Player); 13 | 14 | private: 15 | int m_Hits[MAX_CLIENTS + 1][MAX_CLIENTS + 1] = { 0 }; 16 | int m_Damage[MAX_CLIENTS + 1][MAX_CLIENTS + 1] = { 0 }; 17 | }; 18 | 19 | extern CStatsCommand gStatsCommand; -------------------------------------------------------------------------------- /PugMod/Task.cpp: -------------------------------------------------------------------------------- 1 | #include "precompiled.h" 2 | 3 | CTask gTask; 4 | 5 | void CTask::Clear() 6 | { 7 | this->m_Data.clear(); 8 | } 9 | 10 | void CTask::Create(int Index, float Time, bool Loop, void* FunctionCallback) 11 | { 12 | this->Create(Index, Time, Loop, FunctionCallback, NULL); 13 | } 14 | 15 | void CTask::Create(int Index, float Time, bool Loop, void* FunctionCallback, const char* FunctionParameter) 16 | { 17 | if (FunctionCallback) 18 | { 19 | P_TASK_INFO Task = { 0 }; 20 | 21 | Task.Index = Index; 22 | Task.Time = Time; 23 | Task.EndTime = gpGlobals->time + Time; 24 | Task.Loop = Loop; 25 | Task.Remove = false; 26 | Task.FunctionCallback = FunctionCallback; 27 | 28 | if (FunctionParameter) 29 | { 30 | memcpy(Task.FunctionParameter, FunctionParameter, sizeof(Task.FunctionParameter)); 31 | } 32 | 33 | this->m_Data[Index] = Task; 34 | } 35 | } 36 | 37 | bool CTask::Exists(int Index) 38 | { 39 | auto it = this->m_Data.find(Index); 40 | 41 | if (it != this->m_Data.end()) 42 | { 43 | return it->second.Remove ? false : true; 44 | } 45 | 46 | return false; 47 | } 48 | 49 | void CTask::Remove(int Index) 50 | { 51 | if(this->m_Data.find(Index) != this->m_Data.end()) 52 | { 53 | this->m_Data[Index].Remove = true; 54 | } 55 | } 56 | 57 | float CTask::Timeleft(int Index) 58 | { 59 | auto it = this->m_Data.find(Index); 60 | 61 | if (it != this->m_Data.end()) 62 | { 63 | return (it->second.EndTime - gpGlobals->time); 64 | } 65 | 66 | return 0.0f; 67 | } 68 | 69 | P_TASK_INFO CTask::GetInfo(int Index) 70 | { 71 | auto it = this->m_Data.find(Index); 72 | 73 | if (it != this->m_Data.end()) 74 | { 75 | return it->second; 76 | } 77 | 78 | return P_TASK_INFO(); 79 | } 80 | 81 | void CTask::Think() 82 | { 83 | for (auto it = this->m_Data.begin(); it != this->m_Data.end(); ++it) 84 | { 85 | if (gpGlobals->time >= it->second.EndTime) 86 | { 87 | if (!it->second.Remove) 88 | { 89 | if (it->second.Loop) 90 | { 91 | it->second.EndTime = (gpGlobals->time + it->second.Time); 92 | } 93 | else 94 | { 95 | it->second.Remove = true; 96 | } 97 | 98 | if (it->second.FunctionCallback) 99 | { 100 | ((void(*)(const char*))it->second.FunctionCallback)(it->second.FunctionParameter); 101 | } 102 | } 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /PugMod/Task.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define PUG_TASK_EXEC 100 4 | #define PUG_TASK_VOTE 101 5 | #define PUG_TASK_LIST 102 6 | #define PUG_TASK_NEXT 103 7 | #define PUG_TASK_LO3R 104 8 | #define PUG_TASK_PAUS 105 9 | #define PUG_TASK_CMAP 106 10 | 11 | typedef struct 12 | { 13 | int Index; 14 | float Time; 15 | float EndTime; 16 | bool Loop; 17 | bool Remove; 18 | void* FunctionCallback; 19 | char FunctionParameter[128]; 20 | } P_TASK_INFO, * LP_TASK_INFO; 21 | 22 | class CTask 23 | { 24 | public: 25 | void Clear(); 26 | void Create(int Index, float Time, bool Loop, void* FunctionCallback); 27 | void Create(int Index, float Time, bool Loop, void* FunctionCallback, const char* FunctionParameter); 28 | bool Exists(int Index); 29 | void Remove(int Index); 30 | float Timeleft(int Index); 31 | P_TASK_INFO GetInfo(int Index); 32 | void Think(); 33 | 34 | private: 35 | std::map m_Data; 36 | }; 37 | 38 | extern CTask gTask; 39 | -------------------------------------------------------------------------------- /PugMod/TimeFormat.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | enum class TimeUnitType 4 | { 5 | TIMEUNIT_SECONDS = 0, 6 | TIMEUNIT_MINUTES = 1, 7 | TIMEUNIT_HOURS = 2, 8 | TIMEUNIT_DAYS = 3, 9 | TIMEUNIT_WEEKS = 4, 10 | TIMEUNIT_MONTHS = 5, 11 | TIMEUNIT_YEARS = 6 12 | }; 13 | 14 | #define SECONDS_IN_MINUTE 60 15 | #define SECONDS_IN_HOUR 3600 16 | #define SECONDS_IN_DAY 86400 17 | #define SECONDS_IN_WEEK 604800 18 | #define SECONDS_IN_MONTH 2592000 19 | #define SECONDS_IN_YEAR 31536000 20 | 21 | class CTimeFormat 22 | { 23 | public: 24 | std::string GetTimeLength(long unitCnt, TimeUnitType Type); 25 | }; 26 | 27 | extern CTimeFormat gTimeFormat; 28 | -------------------------------------------------------------------------------- /PugMod/Translate.cpp: -------------------------------------------------------------------------------- 1 | #include "precompiled.h" 2 | 3 | CTranslate gTranslate; 4 | 5 | void CTranslate::Load() 6 | { 7 | this->m_Data.clear(); 8 | 9 | std::ifstream File(TRANSLATE_FILE, std::ifstream::in); 10 | 11 | std::string Line, Key; 12 | 13 | std::string Language = "en"; 14 | 15 | if (gCvars.GetLanguage()->string) 16 | { 17 | SERVER_EXECUTE(); 18 | 19 | Language = gCvars.GetLanguage()->string; 20 | } 21 | 22 | while (std::getline(File, Line)) 23 | { 24 | if (Line.length() > 0) 25 | { 26 | this->ReplaceAll(Line, "\\1", "\1"); 27 | this->ReplaceAll(Line, "\\3", "\3"); 28 | this->ReplaceAll(Line, "\\4", "\4"); 29 | 30 | if (Line.at(0) == '"') 31 | { 32 | Line.erase(std::remove(Line.begin(), Line.end(), '\"'), Line.end()); 33 | 34 | Key = Line; 35 | } 36 | else if (Line.rfind(Language.c_str(), 0) == 0) 37 | { 38 | Line.erase(0, 3); 39 | 40 | Line.erase(std::remove(Line.begin(), Line.end(), '\"'), Line.end()); 41 | 42 | this->m_Data.insert(std::make_pair(Key, Line)); 43 | } 44 | } 45 | } 46 | 47 | File.close(); 48 | } 49 | 50 | void CTranslate::ReplaceAll(std::string& String, const std::string& From, const std::string& To) 51 | { 52 | size_t StartPos = 0; 53 | 54 | while ((StartPos = String.find(From, StartPos)) != std::string::npos) 55 | { 56 | String.replace(StartPos, From.length(), To); 57 | 58 | StartPos += To.length(); 59 | } 60 | } 61 | 62 | const char* CTranslate::Get(const char* Text) 63 | { 64 | if (Text) 65 | { 66 | auto it = this->m_Data.find(Text); 67 | 68 | if (it != this->m_Data.end()) 69 | { 70 | if (it->second.c_str()) 71 | { 72 | return it->second.c_str(); 73 | } 74 | } 75 | } 76 | 77 | return Text; 78 | } 79 | -------------------------------------------------------------------------------- /PugMod/Translate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define TRANSLATE_FILE "cstrike/addons/pugmod/lang.txt" 4 | 5 | #define _T(String) (gTranslate.Get(String)) 6 | 7 | class CTranslate 8 | { 9 | public: 10 | void Load(); 11 | 12 | void ReplaceAll(std::string& String, const std::string& From, const std::string& To); 13 | 14 | const char* Get(const char* Text); 15 | 16 | private: 17 | std::map m_Data; 18 | }; 19 | 20 | extern CTranslate gTranslate; -------------------------------------------------------------------------------- /PugMod/Util.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | enum UTIL_PRINT_DEST_TYPE 4 | { 5 | PRINT_NOTIFY = 1, 6 | PRINT_CONSOLE = 2, 7 | PRINT_CHAT = 3, 8 | PRINT_CENTER = 4, 9 | PRINT_RADIO = 5, 10 | }; 11 | 12 | enum UTIL_SAY_TEXT_COLOR 13 | { 14 | PRINT_TEAM_DEFAULT = 0, 15 | PRINT_TEAM_GREY = -1, 16 | PRINT_TEAM_RED = -2, 17 | PRINT_TEAM_BLUE = -3, 18 | }; 19 | 20 | class CUtil 21 | { 22 | public: 23 | char* VarArgs(const char* Format, ...); 24 | void ServerCommand(const char* Format, ...); 25 | void ClientCommand(edict_t* pEntity, const char* Format, ...); 26 | void ClientPrint(edict_t* pEntity, int msg_dest, const char* Format, ...); 27 | void SayText(edict_t* pEntity, int Sender, const char* Format, ...); 28 | hudtextparms_t HudParam(int red = 255, int green = 255, int blue = 255, float x = -1.0f, float y = 0.35f, int effects = 0, float fxtime = 6.0f, float holdtime = 12.0f, float fadeintime = 0.1f, float fadeouttime = 0.2f, int channel = 0); 29 | void HudMessage(edict_t* pEntity, const hudtextparms_t& textparms, const char* Format, ...); 30 | short FixedSigned16(float value, float scale); 31 | unsigned short FixedUnsigned16(float value, float scale); 32 | void ShowMotd(edict_t* pEntity, char* Motd, int MotdLength); 33 | std::vector LoadMapList(const char* Path, bool AllowCurrentMap); 34 | void SetRoundTime(int Time, bool FreezePeriod); 35 | void ChangelevelDelay(float Delay, const char* MapName); 36 | static void Changelevel(const char* MapName); 37 | void DropClient(int EntityIndex, const char* Format, ...); 38 | }; 39 | 40 | extern CUtil gUtil; -------------------------------------------------------------------------------- /PugMod/VoteKick.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CVoteKick 4 | { 5 | public: 6 | void ClientDisconnected(int EntityIndex); 7 | bool Check(CBasePlayer* Player); 8 | void Menu(CBasePlayer* Player); 9 | static void MenuHandle(int EntityIndex, P_MENU_ITEM Item); 10 | int GetVoteCount(int EntityIndex); 11 | void VoteKick(CBasePlayer* Player, CBasePlayer* Target); 12 | 13 | private: 14 | bool m_VoteKick[MAX_CLIENTS + 1][MAX_CLIENTS + 1] = { false }; 15 | }; 16 | 17 | extern CVoteKick gVoteKick; -------------------------------------------------------------------------------- /PugMod/VoteLevel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CVoteLevel 4 | { 5 | public: 6 | void ClientDisconnected(int EntityIndex); 7 | bool Check(CBasePlayer* Player); 8 | void Menu(CBasePlayer* Player); 9 | static void MenuHandle(int EntityIndex, P_MENU_ITEM Item); 10 | int GetVoteCount(int MapIndex); 11 | void VoteLevel(CBasePlayer* Player, int MapIndex, bool Disabled); 12 | 13 | private: 14 | bool m_Votes[MAX_CLIENTS + 1][33] = { false }; 15 | std::vector m_Maps; 16 | }; 17 | 18 | extern CVoteLevel gVoteLevel; -------------------------------------------------------------------------------- /PugMod/VoteMap.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define VOTE_MAP_FILE "cstrike/addons/pugmod/maps.txt" 4 | 5 | struct P_VOTE_MAP_ITEM 6 | { 7 | int Index; 8 | int Votes; 9 | std::string Name; 10 | 11 | P_VOTE_MAP_ITEM(int Index, int Votes, std::string Name) : Index(Index), Votes(Votes), Name(Name) {} 12 | }; 13 | 14 | class CVoteMap 15 | { 16 | public: 17 | void Load(); 18 | void Init(); 19 | 20 | void AddVote(int Item, int Vote); 21 | auto GetVote(); 22 | 23 | static void MenuHandle(int EntityIndex, P_MENU_ITEM Item); 24 | static void Stop(); 25 | static void Fail(); 26 | static void List(); 27 | 28 | int GetCount(); 29 | P_VOTE_MAP_ITEM GetWinner(); 30 | void RandomMap(); 31 | 32 | private: 33 | std::vector m_Maps; 34 | std::map m_Data; 35 | }; 36 | 37 | extern CVoteMap gVoteMap; -------------------------------------------------------------------------------- /PugMod/VoteMenu.cpp: -------------------------------------------------------------------------------- 1 | #include "precompiled.h" 2 | 3 | CVoteMenu gVoteMenu; 4 | 5 | void CVoteMenu::Menu(CBasePlayer* Player) 6 | { 7 | if (Player->m_iTeam == TERRORIST || Player->m_iTeam == CT) 8 | { 9 | auto EntityIndex = Player->entindex(); 10 | 11 | gMenu[EntityIndex].Create(_T("Vote Menu:"), true, (void*)this->MenuHandle); 12 | 13 | gMenu[EntityIndex].AddItem(0, _T("Vote Kick"), !gVoteKick.Check(Player)); 14 | 15 | gMenu[EntityIndex].AddItem(1, _T("Vote Map"), !gVoteLevel.Check(Player)); 16 | 17 | gMenu[EntityIndex].AddItem(2, _T("Vote Restart"), !gVoteRestart.Check(Player)); 18 | 19 | gMenu[EntityIndex].AddItem(3, _T("Vote Pause"), !gVotePause.Check(Player)); 20 | 21 | gMenu[EntityIndex].AddItem(4, _T("Vote Stop"), !gVoteStop.Check(Player)); 22 | 23 | gMenu[EntityIndex].Show(EntityIndex); 24 | } 25 | } 26 | 27 | void CVoteMenu::MenuHandle(int EntityIndex, P_MENU_ITEM Item) 28 | { 29 | auto Player = UTIL_PlayerByIndexSafe(EntityIndex); 30 | 31 | if (Player) 32 | { 33 | switch (Item.Info) 34 | { 35 | case 0: 36 | { 37 | gVoteKick.Menu(Player); 38 | break; 39 | } 40 | case 1: 41 | { 42 | gVoteLevel.Menu(Player); 43 | break; 44 | } 45 | case 2: 46 | { 47 | gVoteRestart.VoteRestart(Player); 48 | break; 49 | } 50 | case 3: 51 | { 52 | gVotePause.VotePause(Player); 53 | break; 54 | } 55 | case 4: 56 | { 57 | gVoteStop.VoteStop(Player); 58 | break; 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /PugMod/VoteMenu.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define VOTE_MENU_MAPS_FILE "cstrike/addons/pugmod/maps.txt" 4 | 5 | class CVoteMenu 6 | { 7 | public: 8 | void Menu(CBasePlayer* Player); 9 | static void MenuHandle(int EntityIndex, P_MENU_ITEM Item); 10 | }; 11 | 12 | extern CVoteMenu gVoteMenu; 13 | -------------------------------------------------------------------------------- /PugMod/VoteOvertime.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct P_VOTE_OT_ITEM 4 | { 5 | int Index; 6 | int Votes; 7 | std::string Name; 8 | 9 | P_VOTE_OT_ITEM(int Index, int Votes, std::string Name) : Index(Index), Votes(Votes), Name(Name) {} 10 | }; 11 | 12 | class CVoteOvertime 13 | { 14 | public: 15 | void Init(); 16 | 17 | void AddVote(int Item, int Vote); 18 | auto GetVote(); 19 | 20 | static void MenuHandle(int EntityIndex, P_MENU_ITEM Item); 21 | static void Stop(); 22 | static void List(); 23 | 24 | int GetCount(); 25 | P_VOTE_OT_ITEM GetWinner(); 26 | 27 | private: 28 | std::map m_Data; 29 | }; 30 | 31 | extern CVoteOvertime gVoteOvertime; -------------------------------------------------------------------------------- /PugMod/VotePause.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CVotePause 4 | { 5 | public: 6 | void Clear(); 7 | void ClientDisconnected(int EntityIndex); 8 | bool Check(CBasePlayer* Player); 9 | int GetVoteCount(TeamName Team); 10 | int GetPauseCount(); 11 | void VotePause(CBasePlayer* Player); 12 | TeamName GetPauseTeam(); 13 | void RoundRestart(); 14 | void RoundStart(); 15 | static void VotePauseTimer(); 16 | 17 | private: 18 | bool m_Votes[MAX_CLIENTS + 1][SPECTATOR + 1] = { false }; 19 | TeamName m_Pause = UNASSIGNED; 20 | int m_Count[SPECTATOR + 1][PUG_STATE_END+1] = { 0 }; 21 | }; 22 | 23 | extern CVotePause gVotePause; -------------------------------------------------------------------------------- /PugMod/VoteRestart.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CVoteRestart 4 | { 5 | public: 6 | void ClientDisconnected(int EntityIndex); 7 | bool Check(CBasePlayer* Player); 8 | int GetVoteCount(); 9 | void VoteRestart(CBasePlayer* Player); 10 | 11 | private: 12 | bool m_Votes[MAX_CLIENTS + 1] = { false }; 13 | int m_RestartCount[PUG_STATE_END + 1] = { 0 }; 14 | }; 15 | 16 | extern CVoteRestart gVoteRestart; 17 | 18 | -------------------------------------------------------------------------------- /PugMod/VoteStop.cpp: -------------------------------------------------------------------------------- 1 | #include "precompiled.h" 2 | 3 | CVoteStop gVoteStop; 4 | 5 | void CVoteStop::ClientDisconnected(int EntityIndex) 6 | { 7 | memset(this->m_VoteStop[EntityIndex], false, sizeof(this->m_VoteStop[EntityIndex])); 8 | } 9 | 10 | bool CVoteStop::Check(CBasePlayer* Player) 11 | { 12 | if (Player->m_iTeam == TERRORIST || Player->m_iTeam == CT) 13 | { 14 | if (gPugMod.IsLive()) 15 | { 16 | return !gTask.Exists(PUG_TASK_EXEC); 17 | } 18 | } 19 | 20 | return false; 21 | } 22 | 23 | int CVoteStop::GetVoteCount(TeamName Team) 24 | { 25 | int VoteCount = 0; 26 | 27 | for (int i = 1; i <= gpGlobals->maxClients; ++i) 28 | { 29 | if (this->m_VoteStop[i][Team]) 30 | { 31 | VoteCount++; 32 | } 33 | } 34 | 35 | return VoteCount; 36 | } 37 | 38 | void CVoteStop::VoteStop(CBasePlayer* Player) 39 | { 40 | if (this->Check(Player)) 41 | { 42 | if (gPugMod.IsLive()) 43 | { 44 | auto PlayerIndex = Player->entindex(); 45 | 46 | if (!this->m_VoteStop[PlayerIndex][Player->m_iTeam]) 47 | { 48 | this->m_VoteStop[PlayerIndex][Player->m_iTeam] = true; 49 | 50 | int VoteCount = this->GetVoteCount(Player->m_iTeam); 51 | int VotesNeed = (int)(gPlayer.GetNum(Player->m_iTeam) * gCvars.GetVotePercentage()->value); 52 | int VotesLack = (VotesNeed - VoteCount); 53 | 54 | if (VotesLack) 55 | { 56 | gUtil.SayText(nullptr, PlayerIndex, _T("\3%s\1 voted for surrender: \4%d\1 of \4%d\1 vote(s) to stop the match."), STRING(Player->edict()->v.netname), VoteCount, VotesNeed); 57 | gUtil.SayText(nullptr, PlayerIndex, _T("Say \3.vote\1 to vote for stop the match.")); 58 | } 59 | else 60 | { 61 | gUtil.SayText(nullptr, PlayerIndex, _T("Game Over! The \3%s\1 Surrendered!"), PUG_MOD_TEAM_STR[Player->m_iTeam]); 62 | 63 | gPugMod.EndGame(Player->m_iTeam == TERRORIST ? CT : TERRORIST); 64 | } 65 | } 66 | else 67 | { 68 | gUtil.SayText(Player->edict(), PlayerIndex, _T("You already voted to stop the match.")); 69 | } 70 | } 71 | else 72 | { 73 | gUtil.SayText(Player->edict(), PRINT_TEAM_DEFAULT, _T("Unable to use this command now.")); 74 | } 75 | } 76 | else 77 | { 78 | gUtil.SayText(Player->edict(), PRINT_TEAM_DEFAULT, _T("Unable to use this command now.")); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /PugMod/VoteStop.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class CVoteStop 4 | { 5 | public: 6 | void ClientDisconnected(int EntityIndex); 7 | bool Check(CBasePlayer* Player); 8 | int GetVoteCount(TeamName Team); 9 | void VoteStop(CBasePlayer* Player); 10 | 11 | private: 12 | bool m_VoteStop[MAX_CLIENTS + 1][SPECTATOR + 1] = { 0 }; 13 | }; 14 | 15 | extern CVoteStop gVoteStop; 16 | 17 | -------------------------------------------------------------------------------- /PugMod/VoteTeam.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct P_VOTE_TEAM_ITEM 4 | { 5 | int Index; 6 | int Votes; 7 | std::string Name; 8 | 9 | P_VOTE_TEAM_ITEM(int Index, int Votes, std::string Name) : Index(Index), Votes(Votes), Name(Name) {} 10 | }; 11 | 12 | class CVoteTeam 13 | { 14 | public: 15 | void Init(); 16 | 17 | void AddVote(int Item, int Vote); 18 | auto GetVote(); 19 | 20 | static void MenuHandle(int EntityIndex, P_MENU_ITEM Item); 21 | static void Stop(); 22 | static void List(); 23 | 24 | int GetCount(); 25 | P_VOTE_TEAM_ITEM GetWinner(); 26 | 27 | void SetMode(int GameMode); 28 | void TeamsRandomize(); 29 | void TeamsOptimize(); 30 | 31 | private: 32 | std::map m_Data; 33 | }; 34 | 35 | extern CVoteTeam gVoteTeam; -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/IGameServerData.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "maintypes.h" 4 | #include "interface.h" 5 | 6 | class IGameServerData : public IBaseInterface { 7 | public: 8 | virtual ~IGameServerData() { }; 9 | 10 | virtual void WriteDataRequest(const void *buffer, int bufferSize) = 0; 11 | 12 | virtual int ReadDataResponse(void *data, int len) = 0; 13 | }; 14 | 15 | #define GAMESERVERDATA_INTERFACE_VERSION "GameServerData001" 16 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/beamdef.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined ( BEAMDEFH ) 16 | #define BEAMDEFH 17 | #ifdef _WIN32 18 | #pragma once 19 | #endif 20 | 21 | #define FBEAM_STARTENTITY 0x00000001 22 | #define FBEAM_ENDENTITY 0x00000002 23 | #define FBEAM_FADEIN 0x00000004 24 | #define FBEAM_FADEOUT 0x00000008 25 | #define FBEAM_SINENOISE 0x00000010 26 | #define FBEAM_SOLID 0x00000020 27 | #define FBEAM_SHADEIN 0x00000040 28 | #define FBEAM_SHADEOUT 0x00000080 29 | #define FBEAM_STARTVISIBLE 0x10000000 // Has this client actually seen this beam's start entity yet? 30 | #define FBEAM_ENDVISIBLE 0x20000000 // Has this client actually seen this beam's end entity yet? 31 | #define FBEAM_ISACTIVE 0x40000000 32 | #define FBEAM_FOREVER 0x80000000 33 | 34 | typedef struct beam_s BEAM; 35 | struct beam_s 36 | { 37 | BEAM *next; 38 | int type; 39 | int flags; 40 | vec3_t source; 41 | vec3_t target; 42 | vec3_t delta; 43 | float t; // 0 .. 1 over lifetime of beam 44 | float freq; 45 | float die; 46 | float width; 47 | float amplitude; 48 | float r, g, b; 49 | float brightness; 50 | float speed; 51 | float frameRate; 52 | float frame; 53 | int segments; 54 | int startEntity; 55 | int endEntity; 56 | int modelIndex; 57 | int frameCount; 58 | struct model_s *pFollowModel; 59 | struct particle_s *particles; 60 | }; 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/com_model.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileYzn/RePugMod/f2d192cae9a784f57daf5021f2aedb99276fe084/PugMod/include/cssdk/common/com_model.h -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/con_nprint.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( CON_NPRINTH ) 16 | #define CON_NPRINTH 17 | #ifdef _WIN32 18 | #pragma once 19 | #endif 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | typedef struct con_nprint_s 26 | { 27 | int index; // Row # 28 | float time_to_live; // # of seconds before it dissappears 29 | float color[ 3 ]; // RGB colors ( 0.0 -> 1.0 scale ) 30 | } con_nprint_t; 31 | 32 | void Con_NPrintf( int idx, const char *fmt, ... ); 33 | void Con_NXPrintf( struct con_nprint_s *info, const char *fmt, ... ); 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/crc.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | /* crc.h */ 16 | #pragma once 17 | 18 | #include "quakedef.h" 19 | 20 | // MD5 Hash 21 | typedef struct 22 | { 23 | unsigned int buf[4]; 24 | unsigned int bits[2]; 25 | unsigned char in[64]; 26 | } MD5Context_t; 27 | 28 | typedef unsigned int CRC32_t; 29 | 30 | 31 | #ifdef __cplusplus 32 | extern "C" 33 | { 34 | #endif 35 | 36 | void CRC32_Init(CRC32_t *pulCRC); 37 | CRC32_t CRC32_Final(CRC32_t pulCRC); 38 | void CRC32_ProcessByte(CRC32_t *pulCRC, unsigned char ch); 39 | void CRC32_ProcessBuffer(CRC32_t *pulCRC, void *pBuffer, int nBuffer); 40 | BOOL CRC_File(CRC32_t *crcvalue, char *pszFileName); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | byte COM_BlockSequenceCRCByte(byte *base, int length, int sequence); 47 | int CRC_MapFile(CRC32_t *crcvalue, char *pszFileName); 48 | 49 | void MD5Init(MD5Context_t *ctx); 50 | void MD5Update(MD5Context_t *ctx, const unsigned char *buf, unsigned int len); 51 | void MD5Final(unsigned char digest[16], MD5Context_t *ctx); 52 | void MD5Transform(unsigned int buf[4], const unsigned int in[16]); 53 | 54 | BOOL MD5_Hash_File(unsigned char digest[16], char *pszFileName, BOOL bUsefopen, BOOL bSeed, unsigned int seed[4]); 55 | char *MD5_Print(unsigned char hash[16]); 56 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/cvardef.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #ifndef CVARDEF_H 17 | #define CVARDEF_H 18 | 19 | #define FCVAR_ARCHIVE (1<<0) // set to cause it to be saved to vars.rc 20 | #define FCVAR_USERINFO (1<<1) // changes the client's info string 21 | #define FCVAR_SERVER (1<<2) // notifies players when changed 22 | #define FCVAR_EXTDLL (1<<3) // defined by external DLL 23 | #define FCVAR_CLIENTDLL (1<<4) // defined by the client dll 24 | #define FCVAR_PROTECTED (1<<5) // It's a server cvar, but we don't send the data since it's a password, etc. Sends 1 if it's not bland/zero, 0 otherwise as value 25 | #define FCVAR_SPONLY (1<<6) // This cvar cannot be changed by clients connected to a multiplayer server. 26 | #define FCVAR_PRINTABLEONLY (1<<7) // This cvar's string cannot contain unprintable characters ( e.g., used for player name etc ). 27 | #define FCVAR_UNLOGGED (1<<8) // If this is a FCVAR_SERVER, don't log changes to the log file / console if we are creating a log 28 | #define FCVAR_NOEXTRAWHITEPACE (1<<9) // strip trailing/leading white space from this cvar 29 | 30 | typedef struct cvar_s 31 | { 32 | const char *name; 33 | char *string; 34 | int flags; 35 | float value; 36 | struct cvar_s *next; 37 | } cvar_t; 38 | 39 | #endif // CVARDEF_H 40 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/demo_api.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined ( DEMO_APIH ) 16 | #define DEMO_APIH 17 | #ifdef _WIN32 18 | #pragma once 19 | #endif 20 | 21 | typedef struct demo_api_s 22 | { 23 | int ( *IsRecording ) ( void ); 24 | int ( *IsPlayingback ) ( void ); 25 | int ( *IsTimeDemo ) ( void ); 26 | void ( *WriteBuffer ) ( int size, unsigned char *buffer ); 27 | } demo_api_t; 28 | 29 | extern demo_api_t demoapi; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/director_cmds.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileYzn/RePugMod/f2d192cae9a784f57daf5021f2aedb99276fe084/PugMod/include/cssdk/common/director_cmds.h -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/dlight.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined ( DLIGHTH ) 16 | #define DLIGHTH 17 | #ifdef _WIN32 18 | #pragma once 19 | #endif 20 | 21 | typedef struct dlight_s 22 | { 23 | vec3_t origin; 24 | float radius; 25 | color24 color; 26 | float die; // stop lighting after this time 27 | float decay; // drop this each second 28 | float minlight; // don't add when contributing less 29 | int key; 30 | qboolean dark; // subtracts light instead of adding 31 | } dlight_t; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/dll_state.h: -------------------------------------------------------------------------------- 1 | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============ 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | //DLL State Flags 9 | 10 | #define DLL_INACTIVE 0 // no dll 11 | #define DLL_ACTIVE 1 // dll is running 12 | #define DLL_PAUSED 2 // dll is paused 13 | #define DLL_CLOSE 3 // closing down dll 14 | #define DLL_TRANS 4 // Level Transition 15 | 16 | // DLL Pause reasons 17 | 18 | #define DLL_NORMAL 0 // User hit Esc or something. 19 | #define DLL_QUIT 4 // Quit now 20 | #define DLL_RESTART 5 // Switch to launcher for linux, does a quit but returns 1 21 | 22 | // DLL Substate info ( not relevant ) 23 | #define ENG_NORMAL (1<<0) 24 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/entity_types.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | // entity_types.h 16 | #if !defined( ENTITY_TYPESH ) 17 | #define ENTITY_TYPESH 18 | 19 | #define ET_NORMAL 0 20 | #define ET_PLAYER 1 21 | #define ET_TEMPENTITY 2 22 | #define ET_BEAM 3 23 | // BMODEL or SPRITE that was split across BSP nodes 24 | #define ET_FRAGMENTED 4 25 | 26 | #endif // !ENTITY_TYPESH 27 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/enums.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 2009, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #ifndef ENUMS_H 17 | #define ENUMS_H 18 | 19 | typedef enum netsrc_s 20 | { 21 | NS_CLIENT, 22 | NS_SERVER, 23 | NS_MULTICAST // xxxMO 24 | } netsrc_t; 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/event_api.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined ( EVENT_APIH ) 16 | #define EVENT_APIH 17 | #ifdef _WIN32 18 | #pragma once 19 | #endif 20 | 21 | #define EVENT_API_VERSION 1 22 | 23 | typedef struct event_api_s 24 | { 25 | int version; 26 | void ( *EV_PlaySound ) ( int ent, float *origin, int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch ); 27 | void ( *EV_StopSound ) ( int ent, int channel, const char *sample ); 28 | int ( *EV_FindModelIndex )( const char *pmodel ); 29 | int ( *EV_IsLocal ) ( int playernum ); 30 | int ( *EV_LocalPlayerDucking ) ( void ); 31 | void ( *EV_LocalPlayerViewheight ) ( float * ); 32 | void ( *EV_LocalPlayerBounds ) ( int hull, float *mins, float *maxs ); 33 | int ( *EV_IndexFromTrace) ( struct pmtrace_s *pTrace ); 34 | struct physent_s *( *EV_GetPhysent ) ( int idx ); 35 | void ( *EV_SetUpPlayerPrediction ) ( int dopred, int bIncludeLocalClient ); 36 | void ( *EV_PushPMStates ) ( void ); 37 | void ( *EV_PopPMStates ) ( void ); 38 | void ( *EV_SetSolidPlayers ) (int playernum); 39 | void ( *EV_SetTraceHull ) ( int hull ); 40 | void ( *EV_PlayerTrace ) ( float *start, float *end, int traceFlags, int ignore_pe, struct pmtrace_s *tr ); 41 | void ( *EV_WeaponAnimation ) ( int sequence, int body ); 42 | unsigned short ( *EV_PrecacheEvent ) ( int type, const char* psz ); 43 | void ( *EV_PlaybackEvent ) ( int flags, const struct edict_s *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 ); 44 | const char *( *EV_TraceTexture ) ( int ground, float *vstart, float *vend ); 45 | void ( *EV_StopAllSounds ) ( int entnum, int entchannel ); 46 | void ( *EV_KillEvents ) ( int entnum, const char *eventname ); 47 | } event_api_t; 48 | 49 | extern event_api_t eventapi; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/event_args.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( EVENT_ARGSH ) 16 | #define EVENT_ARGSH 17 | #ifdef _WIN32 18 | #pragma once 19 | #endif 20 | 21 | // Event was invoked with stated origin 22 | #define FEVENT_ORIGIN ( 1<<0 ) 23 | 24 | // Event was invoked with stated angles 25 | #define FEVENT_ANGLES ( 1<<1 ) 26 | 27 | typedef struct event_args_s 28 | { 29 | int flags; 30 | 31 | // Transmitted 32 | int entindex; 33 | 34 | float origin[3]; 35 | float angles[3]; 36 | float velocity[3]; 37 | 38 | int ducking; 39 | 40 | float fparam1; 41 | float fparam2; 42 | 43 | int iparam1; 44 | int iparam2; 45 | 46 | int bparam1; 47 | int bparam2; 48 | } event_args_t; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/event_flags.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( EVENT_FLAGSH ) 16 | #define EVENT_FLAGSH 17 | #ifdef _WIN32 18 | #pragma once 19 | #endif 20 | 21 | // Skip local host for event send. 22 | #define FEV_NOTHOST (1<<0) 23 | 24 | // Send the event reliably. You must specify the origin and angles and use 25 | // PLAYBACK_EVENT_FULL for this to work correctly on the server for anything 26 | // that depends on the event origin/angles. I.e., the origin/angles are not 27 | // taken from the invoking edict for reliable events. 28 | #define FEV_RELIABLE (1<<1) 29 | 30 | // Don't restrict to PAS/PVS, send this event to _everybody_ on the server ( useful for stopping CHAN_STATIC 31 | // sounds started by client event when client is not in PVS anymore ( hwguy in TFC e.g. ). 32 | #define FEV_GLOBAL (1<<2) 33 | 34 | // If this client already has one of these events in its queue, just update the event instead of sending it as a duplicate 35 | // 36 | #define FEV_UPDATE (1<<3) 37 | 38 | // Only send to entity specified as the invoker 39 | #define FEV_HOSTONLY (1<<4) 40 | 41 | // Only send if the event was created on the server. 42 | #define FEV_SERVER (1<<5) 43 | 44 | // Only issue event client side ( from shared code ) 45 | #define FEV_CLIENT (1<<6) 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/hltv.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileYzn/RePugMod/f2d192cae9a784f57daf5021f2aedb99276fe084/PugMod/include/cssdk/common/hltv.h -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/in_buttons.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef IN_BUTTONS_H 16 | #define IN_BUTTONS_H 17 | #ifdef _WIN32 18 | #pragma once 19 | #endif 20 | 21 | #define IN_ATTACK (1 << 0) 22 | #define IN_JUMP (1 << 1) 23 | #define IN_DUCK (1 << 2) 24 | #define IN_FORWARD (1 << 3) 25 | #define IN_BACK (1 << 4) 26 | #define IN_USE (1 << 5) 27 | #define IN_CANCEL (1 << 6) 28 | #define IN_LEFT (1 << 7) 29 | #define IN_RIGHT (1 << 8) 30 | #define IN_MOVELEFT (1 << 9) 31 | #define IN_MOVERIGHT (1 << 10) 32 | #define IN_ATTACK2 (1 << 11) 33 | #define IN_RUN (1 << 12) 34 | #define IN_RELOAD (1 << 13) 35 | #define IN_ALT1 (1 << 14) 36 | #define IN_SCORE (1 << 15) // Used by client.dll for when scoreboard is held down 37 | 38 | #endif // IN_BUTTONS_H 39 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/ivoicetweak.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileYzn/RePugMod/f2d192cae9a784f57daf5021f2aedb99276fe084/PugMod/include/cssdk/common/ivoicetweak.h -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/kbutton.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | 29 | #ifndef KBUTTON_H 30 | #define KBUTTON_H 31 | #ifdef _WIN32 32 | #pragma once 33 | #endif 34 | 35 | 36 | /* <31b2a> ../common/kbutton.h:7 */ 37 | typedef struct kbutton_s 38 | { 39 | int down[2]; 40 | int state; 41 | } kbutton_t; 42 | 43 | 44 | #endif // KBUTTON_H 45 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/net_api.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileYzn/RePugMod/f2d192cae9a784f57daf5021f2aedb99276fe084/PugMod/include/cssdk/common/net_api.h -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/netadr.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | // netadr.h 16 | #ifndef NETADR_H 17 | #define NETADR_H 18 | #ifdef _WIN32 19 | #pragma once 20 | #endif 21 | 22 | typedef enum 23 | { 24 | NA_UNUSED, 25 | NA_LOOPBACK, 26 | NA_BROADCAST, 27 | NA_IP, 28 | NA_IPX, 29 | NA_BROADCAST_IPX, 30 | } netadrtype_t; 31 | 32 | typedef struct netadr_s 33 | { 34 | netadrtype_t type; 35 | unsigned char ip[4]; 36 | unsigned char ipx[10]; 37 | unsigned short port; 38 | } netadr_t; 39 | 40 | #endif // NETADR_H 41 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/nowin.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileYzn/RePugMod/f2d192cae9a784f57daf5021f2aedb99276fe084/PugMod/include/cssdk/common/nowin.h -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/parsemsg.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1999, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | // 16 | // parsemsg.h 17 | // MDC - copying from cstrike\cl_dll so career-mode stuff can catch messages 18 | // in this dll. (and C++ifying it) 19 | // 20 | 21 | #ifndef PARSEMSG_H 22 | #define PARSEMSG_H 23 | 24 | #define ASSERT( x ) 25 | //-------------------------------------------------------------------------------------------------------------- 26 | void BEGIN_READ( void *buf, int size ); 27 | int READ_CHAR( void ); 28 | int READ_BYTE( void ); 29 | int READ_SHORT( void ); 30 | int READ_WORD( void ); 31 | int READ_LONG( void ); 32 | float READ_FLOAT( void ); 33 | char* READ_STRING( void ); 34 | float READ_COORD( void ); 35 | float READ_ANGLE( void ); 36 | float READ_HIRESANGLE( void ); 37 | int READ_OK( void ); 38 | 39 | //-------------------------------------------------------------------------------------------------------------- 40 | class BufferWriter 41 | { 42 | public: 43 | BufferWriter(); 44 | BufferWriter( unsigned char *buffer, int bufferLen ); 45 | void Init( unsigned char *buffer, int bufferLen ); 46 | 47 | void WriteByte( unsigned char data ); 48 | void WriteLong( int data ); 49 | void WriteString( const char *str ); 50 | 51 | bool HasOverflowed(); 52 | int GetSpaceUsed(); 53 | 54 | protected: 55 | unsigned char *m_buffer; 56 | int m_remaining; 57 | bool m_overflow; 58 | int m_overallLength; 59 | }; 60 | 61 | //-------------------------------------------------------------------------------------------------------------- 62 | 63 | #endif // PARSEMSG_H 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/particledef.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( PARTICLEDEFH ) 16 | #define PARTICLEDEFH 17 | #ifdef _WIN32 18 | #pragma once 19 | #endif 20 | 21 | typedef enum { 22 | pt_static, 23 | pt_grav, 24 | pt_slowgrav, 25 | pt_fire, 26 | pt_explode, 27 | pt_explode2, 28 | pt_blob, 29 | pt_blob2, 30 | pt_vox_slowgrav, 31 | pt_vox_grav, 32 | pt_clientcustom // Must have callback function specified 33 | } ptype_t; 34 | 35 | // !!! if this is changed, it must be changed in d_ifacea.h too !!! 36 | typedef struct particle_s 37 | { 38 | // driver-usable fields 39 | vec3_t org; 40 | short color; 41 | short packedColor; 42 | // drivers never touch the following fields 43 | struct particle_s *next; 44 | vec3_t vel; 45 | float ramp; 46 | float die; 47 | ptype_t type; 48 | void (*deathfunc)( struct particle_s *particle ); 49 | 50 | // for pt_clientcusttom, we'll call this function each frame 51 | void (*callback)( struct particle_s *particle, float frametime ); 52 | 53 | // For deathfunc, etc. 54 | unsigned char context; 55 | } particle_t; 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/pmtrace.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( PMTRACEH ) 16 | #define PMTRACEH 17 | #ifdef _WIN32 18 | #pragma once 19 | #endif 20 | 21 | typedef struct 22 | { 23 | vec3_t normal; 24 | float dist; 25 | } pmplane_t; 26 | 27 | typedef struct pmtrace_s pmtrace_t; 28 | 29 | struct pmtrace_s 30 | { 31 | qboolean allsolid; // if true, plane is not valid 32 | qboolean startsolid; // if true, the initial point was in a solid area 33 | qboolean inopen, inwater; // End point is in empty space or in water 34 | float fraction; // time completed, 1.0 = didn't hit anything 35 | vec3_t endpos; // final position 36 | pmplane_t plane; // surface normal at impact 37 | int ent; // entity at impact 38 | vec3_t deltavelocity; // Change in player's velocity caused by impact. 39 | // Only run on server. 40 | int hitgroup; 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/port.h: -------------------------------------------------------------------------------- 1 | // port.h: portability helper 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #pragma once 6 | 7 | #include "archtypes.h" // DAL 8 | 9 | #ifdef _WIN32 10 | 11 | // Insert your headers here 12 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 13 | #define WIN32_EXTRA_LEAN 14 | 15 | #include "winsani_in.h" 16 | #include 17 | #include "winsani_out.h" 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | #else // _WIN32 24 | 25 | #include 26 | #include 27 | #include // exit() 28 | #include // strncpy() 29 | #include // tolower() 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | typedef unsigned char BYTE; 36 | 37 | typedef int32 LONG; 38 | //typedef uint32 ULONG; 39 | 40 | #ifndef ARCHTYPES_H 41 | typedef uint32 ULONG; 42 | #endif 43 | 44 | typedef void *HANDLE; 45 | 46 | #ifndef HMODULE 47 | typedef void *HMODULE; 48 | #endif 49 | 50 | typedef char * LPSTR; 51 | 52 | #define __cdecl 53 | 54 | 55 | #ifdef __linux__ 56 | typedef struct POINT_s 57 | { 58 | int x; 59 | int y; 60 | } POINT; 61 | typedef void *HINSTANCE; 62 | typedef void *HWND; 63 | typedef void *HDC; 64 | typedef void *HGLRC; 65 | 66 | typedef struct RECT_s 67 | { 68 | int left; 69 | int right; 70 | int top; 71 | int bottom; 72 | } RECT; 73 | #endif 74 | 75 | 76 | #ifdef __cplusplus 77 | 78 | //#undef FALSE 79 | //#undef TRUE 80 | 81 | #ifdef OSX 82 | //#else 83 | //const bool FALSE = false; 84 | //const bool TRUE = true; 85 | #endif 86 | #endif 87 | 88 | #ifndef NULL 89 | #ifdef __cplusplus 90 | #define NULL 0 91 | #else 92 | #define NULL ((void *)0) 93 | #endif 94 | #endif 95 | 96 | #ifdef __cplusplus 97 | inline int ioctlsocket( int d, int cmd, uint32 *argp ) { return ioctl( d, cmd, argp ); } 98 | inline int closesocket( int fd ) { return close( fd ); } 99 | inline char * GetCurrentDirectory( size_t size, char * buf ) { return getcwd( buf, size ); } 100 | inline int WSAGetLastError() { return errno; } 101 | 102 | inline void DebugBreak( void ) { exit( 1 ); } 103 | #endif 104 | 105 | extern char g_szEXEName[ 4096 ]; 106 | 107 | #define _snprintf snprintf 108 | 109 | #if defined(OSX) 110 | #define SO_ARCH_SUFFIX ".dylib" 111 | #else 112 | #if defined ( __x86_64__ ) 113 | #define SO_ARCH_SUFFIX "_amd64.so" 114 | #else 115 | #define SO_ARCH_SUFFIX ".so" 116 | #endif 117 | #endif 118 | #endif 119 | 120 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/qfont.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( QFONTH ) 16 | #define QFONTH 17 | #ifdef _WIN32 18 | #pragma once 19 | #endif 20 | 21 | // Font stuff 22 | 23 | #define NUM_GLYPHS 256 24 | // does not exist: // #include "basetypes.h" 25 | 26 | typedef struct 27 | { 28 | short startoffset; 29 | short charwidth; 30 | } charinfo; 31 | 32 | typedef struct qfont_s 33 | { 34 | int width, height; 35 | int rowcount; 36 | int rowheight; 37 | charinfo fontinfo[ NUM_GLYPHS ]; 38 | unsigned char data[4]; 39 | } qfont_t; 40 | 41 | #endif // qfont.h 42 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/qlimits.h: -------------------------------------------------------------------------------- 1 | //========= Copyright (c) 1996-2002, Valve LLC, All rights reserved. ========== 2 | // 3 | // Purpose: 4 | // 5 | // $NoKeywords: $ 6 | //============================================================================= 7 | 8 | #ifndef QLIMITS_H 9 | #define QLIMITS_H 10 | 11 | #if defined( _WIN32 ) 12 | #pragma once 13 | #endif 14 | 15 | // DATA STRUCTURE INFO 16 | 17 | #define MAX_NUM_ARGVS 50 18 | 19 | // SYSTEM INFO 20 | #define MAX_QPATH 64 // max length of a game pathname 21 | #define MAX_OSPATH 260 // max length of a filesystem pathname 22 | 23 | #define ON_EPSILON 0.1 // point on plane side epsilon 24 | 25 | #define MAX_LIGHTSTYLE_INDEX_BITS 6 26 | #define MAX_LIGHTSTYLES (1< ../common/quakedef.h:29 */ 31 | typedef int BOOL; /* size: 4 */ 32 | 33 | // user message 34 | #define MAX_USER_MSG_DATA 192 35 | 36 | /* <627f> ../common/quakedef.h:137 */ 37 | //moved to com_model.h 38 | //typedef struct cache_user_s 39 | //{ 40 | // void *data; 41 | //} cache_user_t; 42 | 43 | /* <4313b> ../common/quakedef.h:162 */ 44 | typedef int (*pfnUserMsgHook)(const char *, int, void *); 45 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/r_studioint.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileYzn/RePugMod/f2d192cae9a784f57daf5021f2aedb99276fe084/PugMod/include/cssdk/common/r_studioint.h -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/ref_params.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( REF_PARAMSH ) 16 | #define REF_PARAMSH 17 | 18 | typedef struct ref_params_s 19 | { 20 | // Output 21 | float vieworg[3]; 22 | float viewangles[3]; 23 | 24 | float forward[3]; 25 | float right[3]; 26 | float up[3]; 27 | 28 | // Client frametime; 29 | float frametime; 30 | // Client time 31 | float time; 32 | 33 | // Misc 34 | int intermission; 35 | int paused; 36 | int spectator; 37 | int onground; 38 | int waterlevel; 39 | 40 | float simvel[3]; 41 | float simorg[3]; 42 | 43 | float viewheight[3]; 44 | float idealpitch; 45 | 46 | float cl_viewangles[3]; 47 | 48 | int health; 49 | float crosshairangle[3]; 50 | float viewsize; 51 | 52 | float punchangle[3]; 53 | int maxclients; 54 | int viewentity; 55 | int playernum; 56 | int max_entities; 57 | int demoplayback; 58 | int hardware; 59 | 60 | int smoothing; 61 | 62 | // Last issued usercmd 63 | struct usercmd_s *cmd; 64 | 65 | // Movevars 66 | struct movevars_s *movevars; 67 | 68 | int viewport[4]; // the viewport coordinates x ,y , width, height 69 | 70 | int nextView; // the renderer calls ClientDLL_CalcRefdef() and Renderview 71 | // so long in cycles until this value is 0 (multiple views) 72 | int onlyClientDraw; // if !=0 nothing is drawn by the engine except clientDraw functions 73 | } ref_params_t; 74 | 75 | #endif // !REF_PARAMSH 76 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/screenfade.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileYzn/RePugMod/f2d192cae9a784f57daf5021f2aedb99276fe084/PugMod/include/cssdk/common/screenfade.h -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/studio_event.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( STUDIO_EVENTH ) 16 | #define STUDIO_EVENTH 17 | #ifdef _WIN32 18 | #pragma once 19 | #endif 20 | 21 | typedef struct mstudioevent_s 22 | { 23 | int frame; 24 | int event; 25 | int type; 26 | char options[64]; 27 | } mstudioevent_t; 28 | 29 | #endif // STUDIO_EVENTH 30 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/triangleapi.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #if !defined( TRIANGLEAPIH ) 16 | #define TRIANGLEAPIH 17 | #ifdef _WIN32 18 | #pragma once 19 | #endif 20 | 21 | typedef enum 22 | { 23 | TRI_FRONT = 0, 24 | TRI_NONE = 1, 25 | } TRICULLSTYLE; 26 | 27 | #define TRI_API_VERSION 1 28 | 29 | #define TRI_TRIANGLES 0 30 | #define TRI_TRIANGLE_FAN 1 31 | #define TRI_QUADS 2 32 | #define TRI_POLYGON 3 33 | #define TRI_LINES 4 34 | #define TRI_TRIANGLE_STRIP 5 35 | #define TRI_QUAD_STRIP 6 36 | 37 | typedef struct triangleapi_s 38 | { 39 | int version; 40 | 41 | void ( *RenderMode )( int mode ); 42 | void ( *Begin )( int primitiveCode ); 43 | void ( *End ) ( void ); 44 | 45 | void ( *Color4f ) ( float r, float g, float b, float a ); 46 | void ( *Color4ub ) ( unsigned char r, unsigned char g, unsigned char b, unsigned char a ); 47 | void ( *TexCoord2f ) ( float u, float v ); 48 | void ( *Vertex3fv ) ( float *worldPnt ); 49 | void ( *Vertex3f ) ( float x, float y, float z ); 50 | void ( *Brightness ) ( float brightness ); 51 | void ( *CullFace ) ( TRICULLSTYLE style ); 52 | int ( *SpriteTexture ) ( struct model_s *pSpriteModel, int frame ); 53 | int ( *WorldToScreen ) ( float *world, float *screen ); // Returns 1 if it's z clipped 54 | void ( *Fog ) ( float flFogColor[3], float flStart, float flEnd, int bOn ); // Works just like GL_FOG, flFogColor is r/g/b. 55 | void ( *ScreenToWorld ) ( float *screen, float *world ); 56 | void ( *GetMatrix ) ( const int pname, float *matrix ); 57 | int ( *BoxInPVS ) ( float *mins, float *maxs ); 58 | void ( *LightAtPoint ) ( float *pos, float *value ); 59 | void ( *Color4fRendermode ) ( float r, float g, float b, float a, int rendermode ); 60 | void ( *FogParams ) ( float flDensity, int iFogSkybox ); // Used with Fog()...sets fog density and whether the fog should be applied to the skybox 61 | 62 | } triangleapi_t; 63 | 64 | #endif // !TRIANGLEAPIH 65 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/usercmd.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef USERCMD_H 16 | #define USERCMD_H 17 | #ifdef _WIN32 18 | #pragma once 19 | #endif 20 | 21 | typedef struct usercmd_s 22 | { 23 | short lerp_msec; // Interpolation time on client 24 | byte msec; // Duration in ms of command 25 | vec3_t viewangles; // Command view angles. 26 | 27 | // intended velocities 28 | float forwardmove; // Forward velocity. 29 | float sidemove; // Sideways velocity. 30 | float upmove; // Upward velocity. 31 | byte lightlevel; // Light level at spot where we are standing. 32 | unsigned short buttons; // Attack buttons 33 | byte impulse; // Impulse command issued. 34 | byte weaponselect; // Current weapon id 35 | 36 | // Experimental player impact stuff. 37 | int impact_index; 38 | vec3_t impact_position; 39 | } usercmd_t; 40 | 41 | #endif // USERCMD_H 42 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/vmodes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | 31 | /* <430ee> ../common/vmodes.h:40 */ 32 | typedef struct rect_s 33 | { 34 | int left, right, top, bottom; 35 | } wrect_t; 36 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/weaponinfo.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | 16 | #ifndef WEAPONINFO_H 17 | #define WEAPONINFO_H 18 | #ifdef _WIN32 19 | #pragma once 20 | #endif 21 | 22 | // Info about weapons player might have in his/her possession 23 | typedef struct weapon_data_s 24 | { 25 | int m_iId; 26 | int m_iClip; 27 | 28 | float m_flNextPrimaryAttack; 29 | float m_flNextSecondaryAttack; 30 | float m_flTimeWeaponIdle; 31 | 32 | int m_fInReload; 33 | int m_fInSpecialReload; 34 | float m_flNextReload; 35 | float m_flPumpTime; 36 | float m_fReloadTime; 37 | 38 | float m_fAimedDamage; 39 | float m_fNextAimBonus; 40 | int m_fInZoom; 41 | int m_iWeaponState; 42 | 43 | int iuser1; 44 | int iuser2; 45 | int iuser3; 46 | int iuser4; 47 | float fuser1; 48 | float fuser2; 49 | float fuser3; 50 | float fuser4; 51 | } weapon_data_t; 52 | 53 | #endif // WEAPONINFO_H 54 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/winsani_in.h: -------------------------------------------------------------------------------- 1 | #if _MSC_VER >= 1500 // MSVC++ 9.0 (Visual Studio 2008) 2 | #pragma push_macro("ARRAYSIZE") 3 | #ifdef ARRAYSIZE 4 | #undef ARRAYSIZE 5 | #endif 6 | #define HSPRITE WINDOWS_HSPRITE 7 | #endif 8 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/common/winsani_out.h: -------------------------------------------------------------------------------- 1 | #if _MSC_VER >= 1500 // MSVC++ 9.0 (Visual Studio 2008) 2 | #undef HSPRITE 3 | #pragma pop_macro("ARRAYSIZE") 4 | #endif 5 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/API/CSPlayerItem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | 29 | #pragma once 30 | 31 | class CBasePlayerItem; 32 | class CCSPlayerItem: public CCSAnimating 33 | { 34 | DECLARE_CLASS_TYPES(CCSPlayerItem, CCSAnimating); 35 | public: 36 | CCSPlayerItem() 37 | { 38 | Q_memset(&m_ItemInfo, 0, sizeof(m_ItemInfo)); 39 | } 40 | 41 | virtual void SetItemInfo(ItemInfo *pInfo) = 0; 42 | 43 | CBasePlayerItem *BasePlayerItem() const; 44 | 45 | public: 46 | ItemInfo m_ItemInfo; 47 | }; 48 | 49 | // Inlines 50 | inline CBasePlayerItem *CCSPlayerItem::BasePlayerItem() const 51 | { 52 | return reinterpret_cast(this->m_pContainingEntity); 53 | } 54 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/API/CSPlayerWeapon.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | 29 | #pragma once 30 | 31 | class CBasePlayerWeapon; 32 | class CCSPlayerWeapon: public CCSPlayerItem 33 | { 34 | public: 35 | CCSPlayerWeapon() : 36 | m_bHasSecondaryAttack(false) 37 | { 38 | } 39 | 40 | CBasePlayerWeapon *BasePlayerWeapon() const; 41 | 42 | public: 43 | bool m_bHasSecondaryAttack; 44 | float m_flBaseDamage; 45 | }; 46 | 47 | // Inlines 48 | inline CBasePlayerWeapon *CCSPlayerWeapon::BasePlayerWeapon() const 49 | { 50 | return reinterpret_cast(this->m_pContainingEntity); 51 | } 52 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/airtank.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | class CAirtank: public CGrenade 31 | { 32 | DECLARE_CLASS_TYPES(CAirtank, CGrenade); 33 | public: 34 | virtual void Spawn() = 0; 35 | virtual void Precache() = 0; 36 | virtual int Save(CSave &save) = 0; 37 | virtual int Restore(CRestore &restore) = 0; 38 | virtual void Killed(entvars_t *pevAttacker, int iGib) = 0; 39 | virtual int BloodColor() = 0; 40 | 41 | int GetState() const { return m_state; } 42 | private: 43 | int m_state; 44 | }; 45 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/csbot_dll.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | 29 | #pragma once 30 | 31 | #include "../game_shared/GameEvent.h" 32 | #include "../game_shared/bot/bot_util.h" 33 | #include "../game_shared/bot/simple_state_machine.h" 34 | #include "../game_shared/steam_util.h" 35 | #include "../game_shared/counter.h" 36 | #include "../game_shared/bot/bot_manager.h" 37 | #include "../game_shared/bot/bot_constants.h" 38 | #include "../game_shared/bot/bot.h" 39 | #include "../game_shared/shared_util.h" 40 | #include "../game_shared/bot/bot_profile.h" 41 | 42 | #include "../game_shared/bot/improv.h" 43 | #include "../game_shared/bot/nav.h" 44 | #include "../game_shared/bot/nav_node.h" 45 | #include "../game_shared/bot/nav_area.h" 46 | #include "../game_shared/bot/nav_path.h" 47 | 48 | #include "../dlls/hostage/hostage.h" 49 | #include "../dlls/hostage/hostage_localnav.h" 50 | 51 | #include "../dlls/bot/cs_bot.h" 52 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/decals.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | enum decal_e 31 | { 32 | DECAL_GUNSHOT1 = 0, 33 | DECAL_GUNSHOT2, 34 | DECAL_GUNSHOT3, 35 | DECAL_GUNSHOT4, 36 | DECAL_GUNSHOT5, 37 | DECAL_LAMBDA1, 38 | DECAL_LAMBDA2, 39 | DECAL_LAMBDA3, 40 | DECAL_LAMBDA4, 41 | DECAL_LAMBDA5, 42 | DECAL_LAMBDA6, 43 | DECAL_SCORCH1, 44 | DECAL_SCORCH2, 45 | DECAL_BLOOD1, 46 | DECAL_BLOOD2, 47 | DECAL_BLOOD3, 48 | DECAL_BLOOD4, 49 | DECAL_BLOOD5, 50 | DECAL_BLOOD6, 51 | DECAL_YBLOOD1, 52 | DECAL_YBLOOD2, 53 | DECAL_YBLOOD3, 54 | DECAL_YBLOOD4, 55 | DECAL_YBLOOD5, 56 | DECAL_YBLOOD6, 57 | DECAL_GLASSBREAK1, 58 | DECAL_GLASSBREAK2, 59 | DECAL_GLASSBREAK3, 60 | DECAL_BIGSHOT1, 61 | DECAL_BIGSHOT2, 62 | DECAL_BIGSHOT3, 63 | DECAL_BIGSHOT4, 64 | DECAL_BIGSHOT5, 65 | DECAL_SPIT1, 66 | DECAL_SPIT2, 67 | DECAL_BPROOF1, // Bulletproof glass decal 68 | DECAL_GARGSTOMP1, // Gargantua stomp crack 69 | DECAL_SMALLSCORCH1, // Small scorch mark 70 | DECAL_SMALLSCORCH2, // Small scorch mark 71 | DECAL_SMALLSCORCH3, // Small scorch mark 72 | DECAL_MOMMABIRTH, // Big momma birth splatter 73 | DECAL_MOMMASPLAT, 74 | }; 75 | 76 | typedef struct 77 | { 78 | char *name; 79 | int index; 80 | 81 | } DLL_DECALLIST; 82 | 83 | extern DLL_DECALLIST gDecals[42]; 84 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/explode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | #define SF_ENVEXPLOSION_NODAMAGE (1<<0) // when set, ENV_EXPLOSION will not actually inflict damage 31 | #define SF_ENVEXPLOSION_REPEATABLE (1<<1) // can this entity be refired? 32 | #define SF_ENVEXPLOSION_NOFIREBALL (1<<2) // don't draw the fireball 33 | #define SF_ENVEXPLOSION_NOSMOKE (1<<3) // don't draw the smoke 34 | #define SF_ENVEXPLOSION_NODECAL (1<<4) // don't make a scorch mark 35 | #define SF_ENVEXPLOSION_NOSPARKS (1<<5) // don't make a scorch mark 36 | 37 | class CShower: public CBaseEntity 38 | { 39 | DECLARE_CLASS_TYPES(CShower, CBaseEntity); 40 | public: 41 | virtual void Spawn() = 0; 42 | virtual int ObjectCaps() = 0; 43 | virtual void Think() = 0; 44 | virtual void Touch(CBaseEntity *pOther) = 0; 45 | }; 46 | 47 | class CEnvExplosion: public CBaseMonster 48 | { 49 | DECLARE_CLASS_TYPES(CEnvExplosion, CBaseMonster); 50 | public: 51 | virtual void Spawn() = 0; 52 | virtual void KeyValue(KeyValueData *pkvd) = 0; 53 | virtual int Save(CSave &save) = 0; 54 | virtual int Restore(CRestore &restore) = 0; 55 | virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) = 0; 56 | public: 57 | int m_iMagnitude; 58 | int m_spriteScale; 59 | }; 60 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/gib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | 29 | #pragma once 30 | 31 | class CGib: public CBaseEntity 32 | { 33 | DECLARE_CLASS_TYPES(CGib, CBaseEntity); 34 | public: 35 | virtual int ObjectCaps() = 0; 36 | 37 | public: 38 | int m_bloodColor; 39 | int m_cBloodDecals; 40 | int m_material; 41 | float m_lifeTime; 42 | }; 43 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/h_battery.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | class CRecharge: public CBaseToggle 31 | { 32 | DECLARE_CLASS_TYPES(CRecharge, CBaseToggle); 33 | public: 34 | virtual void Spawn() = 0; 35 | virtual void Precache() = 0; 36 | virtual void KeyValue(KeyValueData *pkvd) = 0; 37 | virtual int Save(CSave &save) = 0; 38 | virtual int Restore(CRestore &restore) = 0; 39 | virtual int ObjectCaps() = 0; 40 | virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) = 0; 41 | public: 42 | float m_flNextCharge; 43 | int m_iReactivate; 44 | int m_iJuice; 45 | int m_iOn; 46 | float m_flSoundTime; 47 | }; 48 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/healthkit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | class CHealthKit: public CItem 31 | { 32 | DECLARE_CLASS_TYPES(CHealthKit, CItem); 33 | public: 34 | virtual void Spawn() = 0; 35 | virtual void Precache() = 0; 36 | virtual BOOL MyTouch(CBasePlayer *pPlayer) = 0; 37 | }; 38 | 39 | class CWallHealth: public CBaseToggle 40 | { 41 | DECLARE_CLASS_TYPES(CWallHealth, CBaseToggle); 42 | public: 43 | virtual void Spawn() = 0; 44 | virtual void Precache() = 0; 45 | virtual void KeyValue(KeyValueData *pkvd) = 0; 46 | virtual int Save(CSave &save) = 0; 47 | virtual int Restore(CRestore &restore) = 0; 48 | virtual int ObjectCaps() = 0; 49 | virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) = 0; 50 | public: 51 | float m_flNextCharge; 52 | int m_iReactivate; 53 | int m_iJuice; 54 | int m_iOn; 55 | float m_flSoundTime; 56 | }; 57 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/hostage/hostage_localnav.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | #define NODE_INVALID_EMPTY -1 31 | 32 | #define PATH_TRAVERSABLE_EMPTY 0 33 | #define PATH_TRAVERSABLE_SLOPE 1 34 | #define PATH_TRAVERSABLE_STEP 2 35 | #define PATH_TRAVERSABLE_STEPJUMPABLE 3 36 | 37 | typedef int node_index_t; 38 | 39 | typedef struct localnode_s 40 | { 41 | Vector vecLoc; 42 | int offsetX; 43 | int offsetY; 44 | byte bDepth; 45 | BOOL fSearched; 46 | node_index_t nindexParent; 47 | 48 | } localnode_t; 49 | 50 | class CLocalNav { 51 | private: 52 | CHostage *m_pOwner; 53 | edict_t *m_pTargetEnt; 54 | BOOL m_fTargetEntHit; 55 | localnode_t *m_nodeArr; 56 | node_index_t m_nindexAvailableNode; 57 | Vector m_vecStartingLoc; 58 | }; 59 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/lights.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | #define SF_LIGHT_START_OFF 1 31 | 32 | class CLight: public CPointEntity 33 | { 34 | DECLARE_CLASS_TYPES(CLight, CPointEntity); 35 | public: 36 | virtual void Spawn() = 0; 37 | virtual void Restart() = 0; 38 | virtual void KeyValue(KeyValueData *pkvd) = 0; 39 | virtual int Save(CSave &save) = 0; 40 | virtual int Restore(CRestore &restore) = 0; 41 | virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) = 0; 42 | private: 43 | int m_iStyle; 44 | int m_iszPattern; 45 | BOOL m_iStartedOff; 46 | }; 47 | 48 | class CEnvLight: public CLight 49 | { 50 | DECLARE_CLASS_TYPES(CEnvLight, CLight); 51 | public: 52 | virtual void Spawn() = 0; 53 | virtual void KeyValue(KeyValueData *pkvd) = 0; 54 | }; 55 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/mapinfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | 29 | #pragma once 30 | 31 | class CMapInfo: public CPointEntity 32 | { 33 | DECLARE_CLASS_TYPES(CMapInfo, CPointEntity); 34 | public: 35 | virtual void Spawn() = 0; 36 | virtual void KeyValue(KeyValueData *pkvd) = 0; 37 | virtual void UpdateOnRemove() = 0; 38 | 39 | public: 40 | InfoMapBuyParam m_iBuyingStatus; 41 | float m_flBombRadius; 42 | }; 43 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/monsterevent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | typedef struct MonsterEvent_s 31 | { 32 | int event; 33 | char *options; 34 | 35 | } MonsterEvent_t; 36 | 37 | #define EVENT_SPECIFIC 0 38 | #define EVENT_SCRIPTED 1000 39 | #define EVENT_SHARED 2000 40 | #define EVENT_CLIENT 5000 41 | 42 | #define MONSTER_EVENT_BODYDROP_LIGHT 2001 43 | #define MONSTER_EVENT_BODYDROP_HEAVY 2002 44 | #define MONSTER_EVENT_SWISHSOUND 2010 45 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/mortar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | class CFuncMortarField: public CBaseToggle 31 | { 32 | DECLARE_CLASS_TYPES(CFuncMortarField, CBaseToggle); 33 | public: 34 | virtual void Spawn() = 0; 35 | virtual void Precache() = 0; 36 | virtual void KeyValue(KeyValueData *pkvd) = 0; 37 | virtual int Save(CSave &save) = 0; 38 | virtual int Restore(CRestore &restore) = 0; 39 | 40 | // Bmodels don't go across transitions 41 | virtual int ObjectCaps() = 0; 42 | public: 43 | int m_iszXController; 44 | int m_iszYController; 45 | float m_flSpread; 46 | float m_flDelay; 47 | int m_iCount; 48 | int m_fControl; 49 | }; 50 | 51 | class CMortar: public CGrenade 52 | { 53 | DECLARE_CLASS_TYPES(CMortar, CGrenade); 54 | public: 55 | virtual void Spawn() = 0; 56 | virtual void Precache() = 0; 57 | public: 58 | int m_spriteTexture; 59 | }; 60 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/observer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | #define CAMERA_MODE_SPEC_ANYONE 0 31 | #define CAMERA_MODE_SPEC_ONLY_TEAM 1 32 | #define CAMERA_MODE_SPEC_ONLY_FRIST_PERSON 2 33 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/pathcorner.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | class CPathCorner: public CPointEntity 31 | { 32 | DECLARE_CLASS_TYPES(CPathCorner, CPointEntity); 33 | public: 34 | virtual void Spawn() = 0; 35 | virtual void KeyValue(KeyValueData *pkvd) = 0; 36 | virtual int Save(CSave &save) = 0; 37 | virtual int Restore(CRestore &restore) = 0; 38 | virtual float GetDelay() = 0; 39 | private: 40 | float m_flWait; 41 | }; 42 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/revert_saved.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | class CRevertSaved: public CPointEntity { 31 | public: 32 | virtual void KeyValue(KeyValueData *pkvd) = 0; 33 | virtual int Save(CSave &save) = 0; 34 | virtual int Restore(CRestore &restore) = 0; 35 | virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) = 0; 36 | public: 37 | float Duration() const { return pev->dmg_take; } 38 | float HoldTime() const { return pev->dmg_save; } 39 | float MessageTime() const { return m_messageTime; } 40 | float LoadTime() const { return m_loadTime; } 41 | 42 | void SetDuration(float duration) { pev->dmg_take = duration; } 43 | void SetHoldTime(float hold) { pev->dmg_save = hold; } 44 | void SetMessageTime(float time) { m_messageTime = time; } 45 | void SetLoadTime(float time) { m_loadTime = time; } 46 | public: 47 | float m_messageTime; 48 | float m_loadTime; 49 | }; 50 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/skill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | #define SKILL_EASY 1 31 | #define SKILL_MEDIUM 2 32 | #define SKILL_HARD 3 33 | 34 | struct skilldata_t 35 | { 36 | int iSkillLevel; 37 | float plrDmg9MM; 38 | float plrDmg357; 39 | float plrDmgMP5; 40 | float plrDmgM203Grenade; 41 | float plrDmgBuckshot; 42 | float plrDmgCrossbowClient; 43 | float plrDmgRPG; 44 | float monDmg9MM; 45 | float monDmgMP5; 46 | float monDmg12MM; 47 | float suitchargerCapacity; 48 | float batteryCapacity; 49 | float healthchargerCapacity; 50 | float healthkitCapacity; 51 | }; 52 | 53 | extern skilldata_t gSkillData; 54 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/spectator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | class CBaseSpectator: public CBaseEntity { 31 | public: 32 | virtual void Spawn(); 33 | }; 34 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/subs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | 29 | #pragma once 30 | 31 | class CNullEntity: public CBaseEntity 32 | { 33 | DECLARE_CLASS_TYPES(CNullEntity, CBaseEntity); 34 | public: 35 | virtual void Spawn() = 0; 36 | }; 37 | 38 | class CBaseDMStart: public CPointEntity 39 | { 40 | DECLARE_CLASS_TYPES(CBaseDMStart, CPointEntity); 41 | public: 42 | virtual void KeyValue(KeyValueData *pkvd) = 0; 43 | virtual BOOL IsTriggered(CBaseEntity *pEntity) = 0; 44 | }; 45 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/unisignals.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | 29 | #ifndef UNISIGNALS_H 30 | #define UNISIGNALS_H 31 | #ifdef _WIN32 32 | #pragma once 33 | #endif 34 | 35 | class CUnifiedSignals 36 | { 37 | public: 38 | CUnifiedSignals() 39 | { 40 | m_flSignal = 0; 41 | m_flState = 0; 42 | } 43 | public: 44 | void Update() 45 | { 46 | m_flState = m_flSignal; 47 | m_flSignal = 0; 48 | } 49 | void Signal(int flags) { m_flSignal |= flags; } 50 | int GetSignal() const { return m_flSignal; } 51 | int GetState() const { return m_flState; } 52 | public: 53 | int m_flSignal; 54 | int m_flState; 55 | }; 56 | 57 | #endif // UNISIGNALS_H 58 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/dlls/vehicle.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | #define VEHICLE_SPEED0_ACCELERATION 0.005000000000000000 31 | #define VEHICLE_SPEED1_ACCELERATION 0.002142857142857143 32 | #define VEHICLE_SPEED2_ACCELERATION 0.003333333333333334 33 | #define VEHICLE_SPEED3_ACCELERATION 0.004166666666666667 34 | #define VEHICLE_SPEED4_ACCELERATION 0.004000000000000000 35 | #define VEHICLE_SPEED5_ACCELERATION 0.003800000000000000 36 | #define VEHICLE_SPEED6_ACCELERATION 0.004500000000000000 37 | #define VEHICLE_SPEED7_ACCELERATION 0.004250000000000000 38 | #define VEHICLE_SPEED8_ACCELERATION 0.002666666666666667 39 | #define VEHICLE_SPEED9_ACCELERATION 0.002285714285714286 40 | #define VEHICLE_SPEED10_ACCELERATION 0.001875000000000000 41 | #define VEHICLE_SPEED11_ACCELERATION 0.001444444444444444 42 | #define VEHICLE_SPEED12_ACCELERATION 0.001200000000000000 43 | #define VEHICLE_SPEED13_ACCELERATION 0.000916666666666666 44 | 45 | #define VEHICLE_STARTPITCH 60 46 | #define VEHICLE_MAXPITCH 200 47 | #define VEHICLE_MAXSPEED 1500 48 | 49 | class CFuncVehicleControls: public CBaseEntity 50 | { 51 | DECLARE_CLASS_TYPES(CFuncVehicleControls, CBaseEntity); 52 | public: 53 | virtual void Spawn() = 0; 54 | virtual int ObjectCaps() = 0; 55 | }; 56 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/engine/FlightRecorder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | #include "archtypes.h" 31 | 32 | class IRehldsFlightRecorder 33 | { 34 | public: 35 | virtual ~IRehldsFlightRecorder() { } 36 | 37 | virtual uint16 RegisterMessage(const char* module, const char *message, unsigned int version, bool inOut) = 0; 38 | 39 | virtual void StartMessage(uint16 msg, bool entrance) = 0; 40 | virtual void EndMessage(uint16 msg, bool entrance) = 0; 41 | 42 | virtual void WriteInt8(int8 v) = 0; 43 | virtual void WriteUInt8(uint8 v) = 0; 44 | 45 | virtual void WriteInt16(int16 v) = 0; 46 | virtual void WriteUInt16(uint16 v) = 0; 47 | 48 | virtual void WriteInt32(int32 v) = 0; 49 | virtual void WriteUInt32(uint32 v) = 0; 50 | 51 | virtual void WriteInt64(int64 v) = 0; 52 | virtual void WriteUInt64(uint64 v) = 0; 53 | 54 | virtual void WriteFloat(float v) = 0; 55 | virtual void WriteDouble(double v) = 0; 56 | 57 | virtual void WriteString(const char* s) = 0; 58 | 59 | virtual void WriteBuffer(const void* data ,unsigned int len) = 0; 60 | 61 | }; 62 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/engine/archtypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */#ifndef ARCHTYPES_H 28 | #define ARCHTYPES_H 29 | 30 | #ifdef __x86_64__ 31 | #define X64BITS 32 | #endif 33 | 34 | #if defined( _WIN32 ) && (! defined( __MINGW32__ )) 35 | 36 | typedef __int8 int8; 37 | typedef unsigned __int8 uint8; 38 | typedef __int16 int16; 39 | typedef unsigned __int16 uint16; 40 | typedef __int32 int32; 41 | typedef unsigned __int32 uint32; 42 | typedef __int64 int64; 43 | typedef unsigned __int64 uint64; 44 | typedef __int32 intp; // intp is an integer that can accomodate a pointer 45 | typedef unsigned __int32 uintp; // (ie, sizeof(intp) >= sizeof(int) && sizeof(intp) >= sizeof(void *) 46 | 47 | #else /* _WIN32 */ 48 | typedef char int8; 49 | typedef unsigned char uint8; 50 | typedef short int16; 51 | typedef unsigned short uint16; 52 | typedef int int32; 53 | typedef unsigned int uint32; 54 | typedef long long int64; 55 | typedef unsigned long long uint64; 56 | #ifdef X64BITS 57 | typedef long long intp; 58 | typedef unsigned long long uintp; 59 | #else 60 | typedef int intp; 61 | typedef unsigned int uintp; 62 | #endif 63 | 64 | #endif /* else _WIN32 */ 65 | 66 | #endif /* ARCHTYPES_H */ 67 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/engine/cmd_rehlds.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | #include "archtypes.h" 31 | 32 | typedef void(*xcommand_t)(void); 33 | typedef struct cmd_function_s 34 | { 35 | struct cmd_function_s *next; 36 | char *name; 37 | xcommand_t function; 38 | int flags; 39 | } cmd_function_t; 40 | 41 | typedef enum cmd_source_s 42 | { 43 | src_client = 0, // came in over a net connection as a clc_stringcmd. host_client will be valid during this state. 44 | src_command = 1, // from the command buffer. 45 | } cmd_source_t; 46 | 47 | #define FCMD_HUD_COMMAND BIT(0) 48 | #define FCMD_GAME_COMMAND BIT(1) 49 | #define FCMD_WRAPPER_COMMAND BIT(2) 50 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/engine/common_rehlds.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | #include "const.h" 31 | #include "qlimits.h" 32 | 33 | #ifdef REHLDS_FIXES 34 | #define COM_TOKEN_LEN 2048 35 | #else 36 | #define COM_TOKEN_LEN 1024 37 | #endif 38 | 39 | // Don't allow overflow 40 | #define SIZEBUF_CHECK_OVERFLOW 0 41 | #define SIZEBUF_ALLOW_OVERFLOW BIT(0) 42 | #define SIZEBUF_OVERFLOWED BIT(1) 43 | 44 | #define MAX_NUM_ARGVS 50 45 | #define NUM_SAFE_ARGVS 7 46 | 47 | #define COM_COPY_CHUNK_SIZE 1024 48 | #define COM_MAX_CMD_LINE 256 49 | 50 | typedef struct sizebuf_s 51 | { 52 | const char *buffername; 53 | uint16 flags; 54 | byte *data; 55 | int maxsize; 56 | int cursize; 57 | } sizebuf_t; 58 | 59 | typedef struct downloadtime_s 60 | { 61 | qboolean bUsed; 62 | float fTime; 63 | int nBytesRemaining; 64 | } downloadtime_t; 65 | 66 | typedef struct incomingtransfer_s 67 | { 68 | qboolean doneregistering; 69 | int percent; 70 | qboolean downloadrequested; 71 | downloadtime_t rgStats[8]; 72 | int nCurStat; 73 | int nTotalSize; 74 | int nTotalToTransfer; 75 | int nRemainingToTransfer; 76 | float fLastStatusUpdate; 77 | qboolean custom; 78 | } incomingtransfer_t; 79 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/engine/crc32c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2010 by Ronnie Sahlberg 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation; either version 2.1 of the License, or 6 | (at your option) any later version. 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public License 12 | along with this program; if not, see . 13 | */ 14 | #pragma once 15 | #include "archtypes.h" 16 | 17 | extern uint32 crc32c_t8_nosse(uint32 iCRC, uint8 u8); 18 | extern uint32 crc32c_t8_sse(uint32 iCRC, uint8 u8); 19 | extern uint32 crc32c_t_nosse(uint32 iCRC, const uint8 *buf, int len); 20 | extern uint32 crc32c_t_sse(uint32 iCRC, const uint8 *buf, unsigned int len); 21 | extern uint32 crc32c_t(uint32 iCRC, const uint8 *buf, unsigned int len); 22 | extern uint32 crc32c(const uint8 *buf, int len); 23 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/engine/customentity.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef CUSTOMENTITY_H 16 | #define CUSTOMENTITY_H 17 | 18 | // Custom Entities 19 | 20 | // Start/End Entity is encoded as 12 bits of entity index, and 4 bits of attachment (4:12) 21 | #define BEAMENT_ENTITY(x) ((x)&0xFFF) 22 | #define BEAMENT_ATTACHMENT(x) (((x)>>12)&0xF) 23 | 24 | // Beam types, encoded as a byte 25 | enum 26 | { 27 | BEAM_POINTS = 0, 28 | BEAM_ENTPOINT, 29 | BEAM_ENTS, 30 | BEAM_HOSE, 31 | }; 32 | 33 | #define BEAM_FSINE 0x10 34 | #define BEAM_FSOLID 0x20 35 | #define BEAM_FSHADEIN 0x40 36 | #define BEAM_FSHADEOUT 0x80 37 | 38 | #endif //CUSTOMENTITY_H 39 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/engine/d_local.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | 29 | #pragma once 30 | 31 | typedef struct surfcache_s 32 | { 33 | struct surfcache_s *next; 34 | struct surfcache_s **owner; 35 | int lightadj[4]; 36 | int dlight; 37 | int size; 38 | unsigned width; 39 | unsigned height; 40 | float mipscale; 41 | struct texture_s *texture; 42 | unsigned char data[4]; 43 | } surfcache_t; 44 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/engine/edict.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileYzn/RePugMod/f2d192cae9a784f57daf5021f2aedb99276fe084/PugMod/include/cssdk/engine/edict.h -------------------------------------------------------------------------------- /PugMod/include/cssdk/engine/keydefs.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileYzn/RePugMod/f2d192cae9a784f57daf5021f2aedb99276fe084/PugMod/include/cssdk/engine/keydefs.h -------------------------------------------------------------------------------- /PugMod/include/cssdk/engine/pr_dlls.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | 29 | #pragma once 30 | 31 | #include "maintypes.h" 32 | #include "eiface.h" 33 | 34 | const int MAX_EXTENSION_DLL = 50; 35 | 36 | typedef struct functiontable_s 37 | { 38 | uint32 pFunction; 39 | char *pFunctionName; 40 | } functiontable_t; 41 | 42 | typedef struct extensiondll_s 43 | { 44 | void *lDLLHandle; 45 | functiontable_t *functionTable; 46 | int functionCount; 47 | } extensiondll_t; 48 | 49 | typedef void(*ENTITYINIT)(struct entvars_s *); 50 | typedef void(*DISPATCHFUNCTION)(struct entvars_s *, void *); 51 | typedef void(*FIELDIOFUNCTION)(SAVERESTOREDATA *, const char *, void *, TYPEDESCRIPTION *, int); 52 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/engine/progs.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef PROGS_H 16 | #define PROGS_H 17 | 18 | #include "progdefs.h" 19 | 20 | // 16 simultaneous events, max 21 | #define MAX_EVENT_QUEUE 64 22 | 23 | #define DEFAULT_EVENT_RESENDS 1 24 | 25 | #include "event_flags.h" 26 | 27 | typedef struct event_info_s event_info_t; 28 | 29 | #include "event_args.h" 30 | 31 | struct event_info_s 32 | { 33 | unsigned short index; // 0 implies not in use 34 | 35 | short packet_index; // Use data from state info for entity in delta_packet . -1 implies separate info based on event 36 | // parameter signature 37 | short entity_index; // The edict this event is associated with 38 | 39 | float fire_time; // if non-zero, the time when the event should be fired ( fixed up on the client ) 40 | 41 | event_args_t args; 42 | 43 | // CLIENT ONLY 44 | int flags; // Reliable or not, etc. 45 | 46 | }; 47 | 48 | typedef struct event_state_s event_state_t; 49 | 50 | struct event_state_s 51 | { 52 | struct event_info_s ei[ MAX_EVENT_QUEUE ]; 53 | }; 54 | 55 | #if !defined( ENTITY_STATEH ) 56 | #include "entity_state.h" 57 | #endif 58 | 59 | #if !defined( EDICT_H ) 60 | #include "edict.h" 61 | #endif 62 | 63 | #define STRUCT_FROM_LINK(l,t,m) ((t *)((byte *)l - (int)&(((t *)0)->m))) 64 | #define EDICT_FROM_AREA(l) STRUCT_FROM_LINK(l,edict_t,area) 65 | 66 | //============================================================================ 67 | 68 | extern char *pr_strings; 69 | extern globalvars_t gGlobalVariables; 70 | 71 | //============================================================================ 72 | 73 | edict_t *ED_Alloc (void); 74 | void ED_Free (edict_t *ed); 75 | void ED_LoadFromFile (char *data); 76 | 77 | edict_t *EDICT_NUM(int n); 78 | int NUM_FOR_EDICT(const edict_t *e); 79 | 80 | #define PROG_TO_EDICT(e) ((edict_t *)((byte *)sv.edicts + e)) 81 | 82 | #endif // PROGS_H 83 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/engine/shake.h: -------------------------------------------------------------------------------- 1 | /*** 2 | * 3 | * Copyright (c) 1996-2002, Valve LLC. All rights reserved. 4 | * 5 | * This product contains software technology licensed from Id 6 | * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. 7 | * All Rights Reserved. 8 | * 9 | * Use, distribution, and modification of this source code and/or resulting 10 | * object code is restricted to non-commercial enhancements to products from 11 | * Valve LLC. All other use, distribution, or modification is prohibited 12 | * without written permission from Valve LLC. 13 | * 14 | ****/ 15 | #ifndef SHAKE_H 16 | #define SHAKE_H 17 | 18 | // Screen / View effects 19 | 20 | // screen shake 21 | extern int gmsgShake; 22 | 23 | // This structure is sent over the net to describe a screen shake event 24 | typedef struct 25 | { 26 | unsigned short amplitude; // FIXED 4.12 amount of shake 27 | unsigned short duration; // FIXED 4.12 seconds duration 28 | unsigned short frequency; // FIXED 8.8 noise frequency (low frequency is a jerk,high frequency is a rumble) 29 | } ScreenShake; 30 | 31 | extern void V_ApplyShake( float *origin, float *angles, float factor ); 32 | extern void V_CalcShake( void ); 33 | extern int V_ScreenShake( const char *pszName, int iSize, void *pbuf ); 34 | extern int V_ScreenFade( const char *pszName, int iSize, void *pbuf ); 35 | 36 | 37 | // Fade in/out 38 | extern int gmsgFade; 39 | 40 | #define FFADE_IN 0x0000 // Just here so we don't pass 0 into the function 41 | #define FFADE_OUT 0x0001 // Fade out (not in) 42 | #define FFADE_MODULATE 0x0002 // Modulate (don't blend) 43 | #define FFADE_STAYOUT 0x0004 // ignores the duration, stays faded out until new ScreenFade message received 44 | #define FFADE_LONGFADE 0x0008 // used to indicate the fade can be longer than 16 seconds (added for czero) 45 | 46 | 47 | // This structure is sent over the net to describe a screen fade event 48 | typedef struct 49 | { 50 | unsigned short duration; // FIXED 4.12 seconds duration 51 | unsigned short holdTime; // FIXED 4.12 seconds duration until reset (fade & hold) 52 | short fadeFlags; // flags 53 | byte r, g, b, a; // fade to color ( max alpha ) 54 | } ScreenFade; 55 | 56 | #endif // SHAKE_H 57 | 58 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/engine/spritegn.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | 29 | #ifndef SPRITEGN_H 30 | #define SPRITEGN_H 31 | #ifdef _WIN32 32 | #pragma once 33 | #endif 34 | 35 | #include "modelgen.h" 36 | #include "commonmacros.h" 37 | 38 | #define SPRITE_VERSION 2 // Half-Life sprites 39 | #define IDSPRITEHEADER MAKEID('I', 'D', 'S', 'P') // little-endian "IDSP" 40 | 41 | typedef enum spriteframetype_e 42 | { 43 | SPR_SINGLE = 0, 44 | SPR_GROUP, 45 | SPR_ANGLED 46 | } spriteframetype_t; 47 | 48 | typedef struct dsprite_s 49 | { 50 | int ident; 51 | int version; 52 | int type; 53 | int texFormat; 54 | float boundingradius; 55 | int width; 56 | int height; 57 | int numframes; 58 | float beamlength; 59 | synctype_t synctype; 60 | } dsprite_t; 61 | 62 | typedef struct dspriteframe_s 63 | { 64 | int origin[2]; 65 | int width; 66 | int height; 67 | } dspriteframe_t; 68 | 69 | typedef struct dspritegroup_s 70 | { 71 | int numframes; 72 | } dspritegroup_t; 73 | 74 | typedef struct dspriteinterval_s 75 | { 76 | float interval; 77 | } dspriteinterval_t; 78 | 79 | typedef struct dspriteframetype_s 80 | { 81 | spriteframetype_t type; 82 | } dspriteframetype_t; 83 | 84 | #endif // SPRITEGN_H 85 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/engine/sys_shared.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | #include 31 | 32 | typedef struct cpuinfo_s 33 | { 34 | uint8 sse3, ssse3, sse4_1, sse4_2, avx, avx2, popcnt; 35 | } cpuinfo_t; 36 | 37 | extern cpuinfo_t cpuinfo; 38 | 39 | void Sys_CheckCpuInstructionsSupport(void); 40 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/engine/userid_rehlds.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | #include "archtypes.h" 31 | 32 | // Authentication types 33 | enum AUTH_IDTYPE 34 | { 35 | AUTH_IDTYPE_UNKNOWN = 0, 36 | AUTH_IDTYPE_STEAM = 1, 37 | AUTH_IDTYPE_VALVE = 2, 38 | AUTH_IDTYPE_LOCAL = 3 39 | }; 40 | 41 | typedef struct USERID_s 42 | { 43 | int idtype; 44 | uint64 m_SteamID; 45 | unsigned int clientip; 46 | } USERID_t; 47 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/game_shared/bot/bot_constants.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | // We'll define our own version of this, because everyone else does. 31 | // This needs to stay in sync with MAX_CLIENTS, but there's no header with the #define. 32 | #define BOT_MAX_CLIENTS 32 33 | 34 | // version number is MAJOR.MINOR 35 | #define BOT_VERSION_MAJOR 1 36 | #define BOT_VERSION_MINOR 50 37 | 38 | // Difficulty levels 39 | enum BotDifficultyType 40 | { 41 | BOT_EASY = 0, 42 | BOT_NORMAL, 43 | BOT_HARD, 44 | BOT_EXPERT, 45 | 46 | NUM_DIFFICULTY_LEVELS 47 | }; 48 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/game_shared/shared_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | #ifndef _WIN32 31 | #include 32 | #include 33 | #endif 34 | 35 | // Simple utility function to allocate memory and duplicate a string 36 | inline char *CloneString(const char *str) 37 | { 38 | if (!str) 39 | { 40 | char *cloneStr = new char[1]; 41 | cloneStr[0] = '\0'; 42 | return cloneStr; 43 | } 44 | 45 | char *cloneStr = new char [strlen(str) + 1]; 46 | strcpy(cloneStr, str); 47 | return cloneStr; 48 | } 49 | 50 | // Simple utility function to allocate memory and duplicate a wide string 51 | inline wchar_t *CloneWString(const wchar_t *str) 52 | { 53 | if (!str) 54 | { 55 | wchar_t *cloneStr = new wchar_t[1]; 56 | cloneStr[0] = L'\0'; 57 | return cloneStr; 58 | } 59 | 60 | wchar_t *cloneStr = new wchar_t [wcslen(str) + 1]; 61 | wcscpy(cloneStr, str); 62 | return cloneStr; 63 | } 64 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/game_shared/simple_checksum.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | 29 | #ifndef SIMPLE_CHECKSUM_H 30 | #define SIMPLE_CHECKSUM_H 31 | #ifdef _WIN32 32 | #pragma once 33 | #endif 34 | 35 | // Compute a simple checksum for the given data. 36 | // Each byte in the data is multiplied by its position to track re-ordering changes 37 | inline unsigned int ComputeSimpleChecksum(const unsigned char *dataPointer, int dataLength) 38 | { 39 | unsigned int checksum = 0; 40 | for (int i = 1; i <= dataLength; i++) 41 | { 42 | checksum += (*dataPointer) * i; 43 | ++dataPointer; 44 | } 45 | 46 | return checksum; 47 | } 48 | 49 | #endif // SIMPLE_CHECKSUM_H 50 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/game_shared/steam_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | class SteamFile 31 | { 32 | public: 33 | SteamFile(const char *filename); 34 | ~SteamFile(); 35 | 36 | bool IsValid() const { return (m_fileData) ? true : false; } 37 | bool Read(void *data, int length); 38 | 39 | private: 40 | byte *m_fileData; 41 | int m_fileDataLength; 42 | 43 | byte *m_cursor; 44 | int m_bytesLeft; 45 | }; 46 | 47 | inline SteamFile::SteamFile(const char *filename) 48 | { 49 | m_fileData = (byte *)LOAD_FILE_FOR_ME(const_cast(filename), &m_fileDataLength); 50 | m_cursor = m_fileData; 51 | m_bytesLeft = m_fileDataLength; 52 | } 53 | 54 | inline SteamFile::~SteamFile() 55 | { 56 | if (m_fileData) 57 | { 58 | FREE_FILE(m_fileData); 59 | m_fileData = NULL; 60 | } 61 | } 62 | 63 | inline bool SteamFile::Read(void *data, int length) 64 | { 65 | if (length > m_bytesLeft || m_cursor == NULL || m_bytesLeft <= 0) 66 | return false; 67 | 68 | byte *readCursor = static_cast(data); 69 | for (int i = 0; i < length; ++i) 70 | { 71 | *readCursor++ = *m_cursor++; 72 | --m_bytesLeft; 73 | } 74 | 75 | return true; 76 | } 77 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/game_shared/voice_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | #include "bitvec.h" 31 | 32 | // TODO: this should just be set to MAX_CLIENTS 33 | #define VOICE_MAX_PLAYERS 32 34 | #define VOICE_MAX_PLAYERS_DW ((VOICE_MAX_PLAYERS / 32) + !!(VOICE_MAX_PLAYERS & 31)) 35 | 36 | typedef CBitVec< VOICE_MAX_PLAYERS > CPlayerBitVec; 37 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/game_shared/voice_gamemgr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | #define UPDATE_INTERVAL 0.3 31 | 32 | #include "voice_common.h" 33 | 34 | class CGameRules; 35 | class CBasePlayer; 36 | 37 | class IVoiceGameMgrHelper { 38 | public: 39 | virtual ~IVoiceGameMgrHelper() = 0; 40 | 41 | // Called each frame to determine which players are allowed to hear each other. This overrides 42 | // whatever squelch settings players have. 43 | virtual bool CanPlayerHearPlayer(CBasePlayer *pListener, CBasePlayer *pTalker) = 0; 44 | virtual void ResetCanHearPlayer(edict_t* pEdict) = 0; 45 | virtual void SetCanHearPlayer(CBasePlayer* pListener, CBasePlayer* pSender, bool bCanHear) = 0; 46 | virtual bool GetCanHearPlayer(CBasePlayer* pListener, CBasePlayer* pSender) = 0; 47 | }; 48 | 49 | // CVoiceGameMgr manages which clients can hear which other clients. 50 | class CVoiceGameMgr { 51 | public: 52 | virtual ~CVoiceGameMgr() {}; 53 | public: 54 | int m_msgPlayerVoiceMask; 55 | int m_msgRequestState; 56 | IVoiceGameMgrHelper *m_pHelper; 57 | int m_nMaxPlayers; 58 | double m_UpdateInterval; // How long since the last update. 59 | }; 60 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/pm_shared/pm_info.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | #define MAX_PHYSINFO_STRING 256 31 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/pm_shared/pm_materials.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | #define CTEXTURESMAX 1024 // max number of textures loaded 31 | #define CBTEXTURENAMEMAX 17 // only load first n chars of name 32 | 33 | #define CHAR_TEX_CONCRETE 'C' // texture types 34 | #define CHAR_TEX_METAL 'M' 35 | #define CHAR_TEX_DIRT 'D' 36 | #define CHAR_TEX_VENT 'V' 37 | #define CHAR_TEX_GRATE 'G' 38 | #define CHAR_TEX_TILE 'T' 39 | #define CHAR_TEX_SLOSH 'S' 40 | #define CHAR_TEX_WOOD 'W' 41 | #define CHAR_TEX_COMPUTER 'P' 42 | #define CHAR_TEX_GRASS 'X' 43 | #define CHAR_TEX_GLASS 'Y' 44 | #define CHAR_TEX_FLESH 'F' 45 | #define CHAR_TEX_SNOW 'N' 46 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/pm_shared/pm_movevars.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | #pragma once 29 | 30 | typedef struct movevars_s 31 | { 32 | float gravity; // Gravity for map 33 | float stopspeed; // Deceleration when not moving 34 | float maxspeed; // Max allowed speed 35 | float spectatormaxspeed; 36 | float accelerate; // Acceleration factor 37 | float airaccelerate; // Same for when in open air 38 | float wateraccelerate; // Same for when in water 39 | float friction; 40 | float edgefriction; // Extra friction near dropofs 41 | float waterfriction; // Less in water 42 | float entgravity; // 1.0 43 | float bounce; // Wall bounce value. 1.0 44 | float stepsize; // sv_stepsize; 45 | float maxvelocity; // maximum server velocity. 46 | float zmax; // Max z-buffer range (for GL) 47 | float waveHeight; // Water wave height (for GL) 48 | qboolean footsteps; // Play footstep sounds 49 | char skyName[32]; // Name of the sky map 50 | float rollangle; 51 | float rollspeed; 52 | float skycolor_r; // Sky color 53 | float skycolor_g; 54 | float skycolor_b; 55 | float skyvec_x; // Sky vector 56 | float skyvec_y; 57 | float skyvec_z; 58 | 59 | } movevars_t; 60 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/public/basetypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This program is free software; you can redistribute it and/or modify it 4 | * under the terms of the GNU General Public License as published by the 5 | * Free Software Foundation; either version 2 of the License, or (at 6 | * your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | * 17 | * In addition, as a special exception, the author gives permission to 18 | * link the code of this program with the Half-Life Game Engine ("HL 19 | * Engine") and Modified Game Libraries ("MODs") developed by Valve, 20 | * L.L.C ("Valve"). You must obey the GNU General Public License in all 21 | * respects for all of the code used other than the HL Engine and MODs 22 | * from Valve. If you modify this file, you may extend this exception 23 | * to your version of the file, but you are not obligated to do so. If 24 | * you do not wish to do so, delete this exception statement from your 25 | * version. 26 | * 27 | */ 28 | 29 | #ifndef BASETYPES_H 30 | #define BASETYPES_H 31 | #ifdef _WIN32 32 | #pragma once 33 | #endif 34 | 35 | #include "osconfig.h" 36 | #include "commonmacros.h" 37 | 38 | #include "mathlib.h" 39 | 40 | // For backward compatibilty only... 41 | #include "tier0/platform.h" 42 | 43 | // stdio.h 44 | #ifndef NULL 45 | #define NULL 0 46 | #endif 47 | 48 | // Pad a number so it lies on an N byte boundary. 49 | // So PAD_NUMBER(0,4) is 0 and PAD_NUMBER(1,4) is 4 50 | #define PAD_NUMBER(number, boundary) \ 51 | (((number) + ((boundary) - 1)) / (boundary)) * (boundary) 52 | 53 | #ifndef FALSE 54 | #define FALSE 0 55 | #define TRUE (!FALSE) 56 | #endif 57 | 58 | typedef int BOOL; 59 | typedef int qboolean; 60 | typedef unsigned long ULONG; 61 | typedef unsigned char BYTE; 62 | typedef unsigned char byte; 63 | typedef unsigned short word; 64 | 65 | typedef float vec_t; 66 | 67 | #ifndef UNUSED 68 | #define UNUSED(x) (x = x) // for pesky compiler / lint warnings 69 | #endif 70 | 71 | struct vrect_t 72 | { 73 | int x, y, width, height; 74 | vrect_t *pnext; 75 | }; 76 | 77 | #endif // BASETYPES_H 78 | -------------------------------------------------------------------------------- /PugMod/include/cssdk/public/commonmacros.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMONMACROS_H 2 | #define COMMONMACROS_H 3 | #pragma once 4 | 5 | 6 | // ------------------------------------------------------- 7 | // 8 | // commonmacros.h 9 | // 10 | // This should contain ONLY general purpose macros that are 11 | // appropriate for use in engine/launcher/all tools 12 | // 13 | // ------------------------------------------------------- 14 | 15 | #include "osconfig.h" 16 | // Makes a 4-byte "packed ID" int out of 4 characters 17 | #define MAKEID(d,c,b,a) ( ((int)(a) << 24) | ((int)(b) << 16) | ((int)(c) << 8) | ((int)(d)) ) 18 | 19 | // Compares a string with a 4-byte packed ID constant 20 | #define STRING_MATCHES_ID( p, id ) ( (*((int *)(p)) == (id) ) ? true : false ) 21 | #define ID_TO_STRING( id, p ) ( (p)[3] = (((id)>>24) & 0xFF), (p)[2] = (((id)>>16) & 0xFF), (p)[1] = (((id)>>8) & 0xFF), (p)[0] = (((id)>>0) & 0xFF) ) 22 | 23 | #define ARRAYSIZE(p) (sizeof(p)/sizeof(p[0])) 24 | 25 | // Keeps clutter down a bit, when using a float as a bit-vector 26 | #define SetBits(flBitVector, bits) ((flBitVector) = (int)(flBitVector) | (bits)) 27 | #define ClearBits(flBitVector, bits) ((flBitVector) = (int)(flBitVector) & ~(bits)) 28 | #define FBitSet(flBitVector, bit) ((int)(flBitVector) & (bit)) 29 | 30 | #endif // COMMONMACROS_H 31 | -------------------------------------------------------------------------------- /PugMod/include/curl/include/curl/mprintf.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_MPRINTF_H 2 | #define CURLINC_MPRINTF_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2022, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | #include 28 | #include /* needed for FILE */ 29 | #include "curl.h" /* for CURL_EXTERN */ 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | CURL_EXTERN int curl_mprintf(const char *format, ...); 36 | CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); 37 | CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); 38 | CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, 39 | const char *format, ...); 40 | CURL_EXTERN int curl_mvprintf(const char *format, va_list args); 41 | CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); 42 | CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); 43 | CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, 44 | const char *format, va_list args); 45 | CURL_EXTERN char *curl_maprintf(const char *format, ...); 46 | CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif /* CURLINC_MPRINTF_H */ 53 | -------------------------------------------------------------------------------- /PugMod/include/curl/include/curl/options.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_OPTIONS_H 2 | #define CURLINC_OPTIONS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2018 - 2022, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | typedef enum { 32 | CURLOT_LONG, /* long (a range of values) */ 33 | CURLOT_VALUES, /* (a defined set or bitmask) */ 34 | CURLOT_OFF_T, /* curl_off_t (a range of values) */ 35 | CURLOT_OBJECT, /* pointer (void *) */ 36 | CURLOT_STRING, /* (char * to null-terminated buffer) */ 37 | CURLOT_SLIST, /* (struct curl_slist *) */ 38 | CURLOT_CBPTR, /* (void * passed as-is to a callback) */ 39 | CURLOT_BLOB, /* blob (struct curl_blob *) */ 40 | CURLOT_FUNCTION /* function pointer */ 41 | } curl_easytype; 42 | 43 | /* Flag bits */ 44 | 45 | /* "alias" means it is provided for old programs to remain functional, 46 | we prefer another name */ 47 | #define CURLOT_FLAG_ALIAS (1<<0) 48 | 49 | /* The CURLOPTTYPE_* id ranges can still be used to figure out what type/size 50 | to use for curl_easy_setopt() for the given id */ 51 | struct curl_easyoption { 52 | const char *name; 53 | CURLoption id; 54 | curl_easytype type; 55 | unsigned int flags; 56 | }; 57 | 58 | CURL_EXTERN const struct curl_easyoption * 59 | curl_easy_option_by_name(const char *name); 60 | 61 | CURL_EXTERN const struct curl_easyoption * 62 | curl_easy_option_by_id(CURLoption id); 63 | 64 | CURL_EXTERN const struct curl_easyoption * 65 | curl_easy_option_next(const struct curl_easyoption *prev); 66 | 67 | #ifdef __cplusplus 68 | } /* end of extern "C" */ 69 | #endif 70 | #endif /* CURLINC_OPTIONS_H */ 71 | -------------------------------------------------------------------------------- /PugMod/include/curl/include/curl/stdcheaders.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_STDCHEADERS_H 2 | #define CURLINC_STDCHEADERS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2022, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | #include 28 | 29 | size_t fread(void *, size_t, size_t, FILE *); 30 | size_t fwrite(const void *, size_t, size_t, FILE *); 31 | 32 | int strcasecmp(const char *, const char *); 33 | int strncasecmp(const char *, const char *, size_t); 34 | 35 | #endif /* CURLINC_STDCHEADERS_H */ 36 | -------------------------------------------------------------------------------- /PugMod/include/curl/lib/libcurl_a.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileYzn/RePugMod/f2d192cae9a784f57daf5021f2aedb99276fe084/PugMod/include/curl/lib/libcurl_a.lib -------------------------------------------------------------------------------- /PugMod/include/curl/lib/libcurl_a_debug.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileYzn/RePugMod/f2d192cae9a784f57daf5021f2aedb99276fe084/PugMod/include/curl/lib/libcurl_a_debug.lib -------------------------------------------------------------------------------- /PugMod/include/metamod/dllapi.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | typedef void (*FN_GAMEINIT)(); 4 | 5 | // Typedefs for these are provided in SDK engine/eiface.h, but I didn't 6 | // like the names (APIFUNCTION, APIFUNCTION2, NEW_DLL_FUNCTIONS_FN). 7 | typedef int (*GETENTITYAPI_FN)(DLL_FUNCTIONS *pFunctionTable, int interfaceVersion); 8 | typedef int (*GETENTITYAPI2_FN)(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion); 9 | typedef int (*GETNEWDLLFUNCTIONS_FN)(NEW_DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion); 10 | 11 | C_DLLEXPORT int GetEntityAPI(DLL_FUNCTIONS *pFunctionTable, int interfaceVersion); 12 | C_DLLEXPORT int GetEntityAPI2(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion); 13 | C_DLLEXPORT int GetNewDLLFunctions(NEW_DLL_FUNCTIONS *pNewFunctionTable, int *interfaceVersion); 14 | 15 | #ifdef METAMOD_CORE 16 | void compile_gamedll_callbacks(); 17 | #endif 18 | -------------------------------------------------------------------------------- /PugMod/include/metamod/engine_api.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct enginefuncs_s; 4 | 5 | // Plugin's GetEngineFunctions, called by metamod. 6 | typedef int (*GET_ENGINE_FUNCTIONS_FN)(enginefuncs_s *pengfuncsFromEngine, int *interfaceVersion); 7 | 8 | // According to SDK engine/eiface.h: 9 | // ONLY ADD NEW FUNCTIONS TO THE END OF THIS STRUCT. INTERFACE VERSION IS FROZEN AT 138 10 | #define ENGINE_INTERFACE_VERSION 138 11 | 12 | // Protect against other projects which use this include file but use the 13 | // normal enginefuncs_t type for their meta_engfuncs. 14 | #ifdef METAMOD_CORE 15 | #include "meta_eiface.h" // meta_enginefuncs_t 16 | extern meta_enginefuncs_t g_meta_engfuncs; 17 | 18 | void compile_engine_callbacks(); 19 | #else 20 | extern enginefuncs_t meta_engfuncs; 21 | #endif 22 | -------------------------------------------------------------------------------- /PugMod/include/metamod/enginecallbacks.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // This file is a wrapper around the SDK's enginecallback.h file. We need 4 | // this because we use a different type for the global object g_engfuncs, 5 | // which is still compatible with the enginefuncs_t that the SDK 6 | // uses. 7 | // This is only done for files that belong to Metamod, not other projects 8 | // like plugins that use this file, or others that include it, too. 9 | // Since we don't have a clean seperation of include files right now we 10 | // "hack" our way around that by using a flag METAMOD_CORE which is set 11 | // when compiling Metamod proper. 12 | 13 | #ifdef METAMOD_CORE 14 | #include "meta_eiface.h" // HL_enginefuncs_t 15 | 16 | // Use a #define to bend the enginefuncs_t type to our HL_enginefuncs_t 17 | // type instead as we now use that for the global object g_engfuncs. 18 | #define enginefuncs_t HL_enginefuncs_t 19 | #endif 20 | 21 | #include // ALERT, etc 22 | 23 | #ifdef METAMOD_CORE 24 | #undef enginefuncs_t 25 | #endif 26 | 27 | // Also, create some additional macros for engine callback functions, which 28 | // weren't in SDK dlls/enginecallbacks.h but probably should have been. 29 | #define GET_INFOKEYBUFFER (*g_engfuncs.pfnGetInfoKeyBuffer) 30 | #define INFOKEY_VALUE (*g_engfuncs.pfnInfoKeyValue) 31 | #define SET_CLIENT_KEYVALUE (*g_engfuncs.pfnSetClientKeyValue) 32 | #define REG_SVR_COMMAND (*g_engfuncs.pfnAddServerCommand) 33 | #define SERVER_PRINT (*g_engfuncs.pfnServerPrint) 34 | #define SET_SERVER_KEYVALUE (*g_engfuncs.pfnSetKeyValue) 35 | #define QUERY_CLIENT_CVAR_VALUE (*g_engfuncs.pfnQueryClientCvarValue) 36 | #define QUERY_CLIENT_CVAR_VALUE2 (*g_engfuncs.pfnQueryClientCvarValue2) 37 | -------------------------------------------------------------------------------- /PugMod/include/metamod/h_export.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Our GiveFnptrsToDll, called by engine. 4 | typedef void (WINAPI *GIVE_ENGINE_FUNCTIONS_FN)(enginefuncs_t *pengfuncsFromEngine, globalvars_t *pGlobals); 5 | C_DLLEXPORT void WINAPI GiveFnptrsToDll(enginefuncs_t *pengfuncsFromEngine, globalvars_t *pGlobals); 6 | -------------------------------------------------------------------------------- /PugMod/include/metamod/plinfo.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Flags for plugin to indicate when it can be be loaded/unloaded. 4 | // NOTE: order is crucial, as greater/less comparisons are made. 5 | enum PLUG_LOADTIME 6 | { 7 | PT_NEVER = 0, 8 | PT_STARTUP, // should only be loaded/unloaded at initial hlds execution 9 | PT_CHANGELEVEL, // can be loaded/unloaded between maps 10 | PT_ANYTIME, // can be loaded/unloaded at any time 11 | PT_ANYPAUSE, // can be loaded/unloaded at any time, and can be "paused" during a map 12 | }; 13 | 14 | // Flags to indicate why the plugin is being unloaded. 15 | enum PL_UNLOAD_REASON 16 | { 17 | PNL_NULL = 0, 18 | PNL_INI_DELETED, // was deleted from plugins.ini 19 | PNL_FILE_NEWER, // file on disk is newer than last load 20 | PNL_COMMAND, // requested by server/console command 21 | PNL_CMD_FORCED, // forced by server/console command 22 | PNL_DELAYED, // delayed from previous request; can't tell origin 23 | 24 | // only used for 'real_reason' on MPlugin::unload() 25 | PNL_PLUGIN, // requested by plugin function call 26 | PNL_PLG_FORCED, // forced by plugin function call 27 | PNL_RELOAD, // forced unload by reload() 28 | }; 29 | 30 | // Information plugin provides about itself. 31 | struct plugin_info_t 32 | { 33 | const char *ifvers; // meta_interface version 34 | const char *name; // full name of plugin 35 | const char *version; // version 36 | const char *date; // date 37 | const char *author; // author name/email 38 | const char *url; // URL 39 | const char *logtag; // log message prefix (unused right now) 40 | PLUG_LOADTIME loadable; // when loadable 41 | PLUG_LOADTIME unloadable; // when unloadable 42 | }; 43 | 44 | extern plugin_info_t Plugin_info; 45 | 46 | // Plugin identifier, passed to all Meta Utility Functions. 47 | typedef plugin_info_t *plid_t; 48 | #define PLID &Plugin_info 49 | -------------------------------------------------------------------------------- /PugMod/precompiled.cpp: -------------------------------------------------------------------------------- 1 | #include "precompiled.h" -------------------------------------------------------------------------------- /PugMod/precompiled.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Disable security function warnings (MSVC) 4 | #define _CRT_SECURE_NO_WARNINGS 5 | 6 | // If is not MSVC build 7 | #ifndef _WIN32 8 | #define _GLIBCXX_USE_CXX11_ABI 0 9 | #define _stricmp strcasecmp 10 | #define _strnicmp strncasecmp 11 | #define _strdup strdup 12 | #define _unlink unlink 13 | #define _vsnprintf vsnprintf 14 | #define _write write 15 | #define _close close 16 | #define _acces access 17 | #define _vsnwprintf vswprintf 18 | #else 19 | // cURL Library windows library 20 | #pragma comment(lib,"ws2_32.lib") 21 | #pragma comment(lib,"wldap32.lib") 22 | #pragma comment(lib,"advapi32.lib") 23 | #pragma comment(lib,"crypt32.lib") 24 | #pragma comment(lib,"normaliz.lib") 25 | #endif 26 | 27 | // System Includes 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | // JSON 35 | #include "include/json.hpp" 36 | 37 | // cURL sources 38 | #ifndef CURL_STATICLIB 39 | #define CURL_STATICLIB 40 | #endif 41 | 42 | // cURL sources 43 | #include 44 | 45 | // CSSDK 46 | #include 47 | #include 48 | 49 | // MetaMod SDK 50 | #include 51 | 52 | // ReHLDS Api 53 | #include 54 | #include 55 | 56 | // ReGameDLL Api 57 | #include 58 | #include 59 | 60 | // Plugin Includes 61 | #include "MetaMod.h" 62 | #include "MetaDLL.h" 63 | #include "MetaEngine.h" 64 | #include "ReAPI.h" 65 | #include "ReGameDLL.h" 66 | 67 | // PugMod 68 | #include "Util.h" 69 | #include "Cvars.h" 70 | #include "Translate.h" 71 | #include "TimeFormat.h" 72 | #include "Commands.h" 73 | #include "AntiFlood.h" 74 | #include "AntiRetry.h" 75 | #include "Player.h" 76 | #include "Menu.h" 77 | #include "Task.h" 78 | #include "PugMod.h" 79 | #include "Ready.h" 80 | #include "Admin.h" 81 | #include "VoteMap.h" 82 | #include "VoteTeam.h" 83 | #include "VoteMenu.h" 84 | #include "VoteKick.h" 85 | #include "VoteLevel.h" 86 | #include "VotePause.h" 87 | #include "VoteRestart.h" 88 | #include "VoteStop.h" 89 | #include "VoteOvertime.h" 90 | #include "Captain.h" 91 | #include "KnifeRound.h" 92 | #include "Stats.h" 93 | #include "StatsCommand.h" 94 | #include "LibCurl.h" 95 | #include "Auth.h" -------------------------------------------------------------------------------- /cstrike/addons/metamod/config.ini: -------------------------------------------------------------------------------- 1 | clientmeta no -------------------------------------------------------------------------------- /cstrike/addons/metamod/plugins.ini: -------------------------------------------------------------------------------- 1 | win32 addons/pugmod/dlls/pugmod_mm.dll 2 | linux addons/pugmod/dlls/pugmod_mm.so 3 | -------------------------------------------------------------------------------- /cstrike/addons/pugmod/cfg/end.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileYzn/RePugMod/f2d192cae9a784f57daf5021f2aedb99276fe084/cstrike/addons/pugmod/cfg/end.cfg -------------------------------------------------------------------------------- /cstrike/addons/pugmod/cfg/esl-ot.cfg: -------------------------------------------------------------------------------- 1 | mp_freezetime "15" 2 | mp_fadetoblack "0" 3 | mp_roundtime "1.75" 4 | mp_c4timer "35" 5 | mp_forcechasecam "2" 6 | mp_forcecamera "2" 7 | mp_startmoney "10000" 8 | mp_buytime ".25" 9 | mp_friendlyfire "0" 10 | mp_autoteambalance "0" 11 | mp_limitteams "0" 12 | mp_playerid "0" 13 | mp_flashlight "1" 14 | sv_alltalk "0" 15 | 16 | // ReGameDLL CS 17 | mp_forcerespawn "0" 18 | mp_give_player_c4 "1" 19 | mp_infinite_ammo "0" 20 | mp_item_staytime "300" 21 | mp_round_infinite "0" 22 | mp_refill_bpammo_weapons "0" 23 | mp_respawn_immunitytime "0" 24 | mp_respawn_immunity_effects "0" 25 | mp_respawn_immunity_force_unset "0" 26 | mp_show_scenarioicon "1" -------------------------------------------------------------------------------- /cstrike/addons/pugmod/cfg/esl.cfg: -------------------------------------------------------------------------------- 1 | mp_freezetime "15" 2 | mp_fadetoblack "0" 3 | mp_roundtime "1.75" 4 | mp_c4timer "35" 5 | mp_forcechasecam "2" 6 | mp_forcecamera "2" 7 | mp_startmoney "800" 8 | mp_buytime ".25" 9 | mp_friendlyfire "0" 10 | mp_autoteambalance "0" 11 | mp_limitteams "0" 12 | mp_playerid "0" 13 | mp_flashlight "1" 14 | sv_alltalk "0" 15 | 16 | // ReGameDLL CS 17 | mp_forcerespawn "0" 18 | mp_give_player_c4 "1" 19 | mp_infinite_ammo "0" 20 | mp_item_staytime "300" 21 | mp_round_infinite "0" 22 | mp_refill_bpammo_weapons "0" 23 | mp_respawn_immunitytime "0" 24 | mp_respawn_immunity_effects "0" 25 | mp_respawn_immunity_force_unset "0" 26 | mp_show_scenarioicon "1" -------------------------------------------------------------------------------- /cstrike/addons/pugmod/cfg/halftime.cfg: -------------------------------------------------------------------------------- 1 | mp_freezetime "0" 2 | mp_fadetoblack "0" 3 | mp_roundtime "1.75" 4 | mp_c4timer "35" 5 | mp_forcechasecam "0" 6 | mp_forcecamera "0" 7 | mp_startmoney "16000" 8 | mp_buytime "99999" 9 | mp_friendlyfire "0" 10 | mp_autoteambalance "0" 11 | mp_limitteams "0" 12 | mp_playerid "0" 13 | mp_flashlight "1" 14 | sv_alltalk "1" 15 | 16 | // ReGameDLL CS 17 | mp_forcerespawn "0.75" 18 | mp_give_player_c4 "0" 19 | mp_infinite_ammo "2" 20 | mp_item_staytime "0" 21 | mp_round_infinite "1" 22 | mp_refill_bpammo_weapons "3" 23 | mp_respawn_immunitytime "6" 24 | mp_respawn_immunity_effects "0" 25 | mp_respawn_immunity_force_unset "1" 26 | mp_show_scenarioicon "0" 27 | -------------------------------------------------------------------------------- /cstrike/addons/pugmod/cfg/start.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileYzn/RePugMod/f2d192cae9a784f57daf5021f2aedb99276fe084/cstrike/addons/pugmod/cfg/start.cfg -------------------------------------------------------------------------------- /cstrike/addons/pugmod/cfg/warmup.cfg: -------------------------------------------------------------------------------- 1 | mp_freezetime "0" 2 | mp_fadetoblack "0" 3 | mp_roundtime "1.75" 4 | mp_c4timer "35" 5 | mp_forcechasecam "0" 6 | mp_forcecamera "0" 7 | mp_startmoney "16000" 8 | mp_buytime "99999" 9 | mp_friendlyfire "0" 10 | mp_autoteambalance "0" 11 | mp_limitteams "0" 12 | mp_playerid "0" 13 | mp_flashlight "1" 14 | sv_alltalk "1" 15 | 16 | // ReGameDLL CS 17 | mp_forcerespawn "0.75" 18 | mp_give_player_c4 "0" 19 | mp_infinite_ammo "2" 20 | mp_item_staytime "0" 21 | mp_round_infinite "1" 22 | mp_refill_bpammo_weapons "3" 23 | mp_respawn_immunitytime "6" 24 | mp_respawn_immunity_effects "0" 25 | mp_respawn_immunity_force_unset "1" 26 | mp_show_scenarioicon "0" 27 | 28 | // Server Restart 29 | sv_restart "1" -------------------------------------------------------------------------------- /cstrike/addons/pugmod/help_admin.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
!menu- Administrator menu
!msg <message>- Global chat message
!rcon <command>- Send server console command
-------------------------------------------------------------------------------- /cstrike/addons/pugmod/help_player.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
.status- Show the PUG status
.score- Show the PUG scores
.ready- Tells the server the Player is ready
.notready- Tells the server the Player is not ready
.vote- Open main vote menu
.hp- Health of other players
.dmg- Damage done to other players
.rdmg- Show recived damage
.sum- Round Summary
-------------------------------------------------------------------------------- /cstrike/addons/pugmod/maps.txt: -------------------------------------------------------------------------------- 1 | de_dust2 2 | de_tuscan 3 | de_nuke 4 | de_inferno 5 | de_mirage 6 | de_train 7 | de_lite 8 | de_cpl_fire 9 | de_aztec 10 | de_cpl_mill 11 | de_dust 12 | de_russka 13 | de_cbble 14 | de_hell 15 | de_blue 16 | de_storm 17 | de_cevo_concrete2 18 | de_torn 19 | de_comrade_3rdroute 20 | de_vertigo 21 | de_esl_autumn 22 | de_piranesi 23 | de_forge 24 | de_airstrip -------------------------------------------------------------------------------- /cstrike/addons/pugmod/users.txt: -------------------------------------------------------------------------------- 1 | "STEAM_0:1:20326844" "SmileY" -------------------------------------------------------------------------------- /cstrike/liblist.gam: -------------------------------------------------------------------------------- 1 | game "Counter-Strike" 2 | url_info "www.counter-strike.net" 3 | url_dl "" 4 | version "1.6" 5 | size "184000000" 6 | svonly "0" 7 | secure "1" 8 | type "multiplayer_only" 9 | cldll "1" 10 | hlversion "1111" 11 | nomodels "1" 12 | nohimodel "1" 13 | mpentity "info_player_start" 14 | gamedll "addons\metamod\dlls\metamod.dll" 15 | gamedll_linux "addons/metamod/dlls/metamod.so" 16 | gamedll_osx "dlls/cs.dylib" 17 | trainmap "tr_1" 18 | edicts "1800" 19 | 20 | -------------------------------------------------------------------------------- /cstrike/server.cfg: -------------------------------------------------------------------------------- 1 | hostname "ReGameDLL_CS - Pug Mod" 2 | rcon_password "" 3 | sv_password "" 4 | 5 | sv_maxrate "100000" 6 | sv_maxupdaterate "102" 7 | sv_minrate "25000" 8 | sv_minupdaterate "60" 9 | sv_lan_rate "100000" 10 | 11 | mp_autokick "0" 12 | mp_autokick_timeout "-1" 13 | mp_autoteambalance "0" 14 | mp_buytime ".25" 15 | mp_c4timer "35" 16 | mp_chattime "10" 17 | mp_consistency "1" 18 | mp_fadetoblack "0" 19 | mp_flashlight "1" 20 | mp_footsteps "1" 21 | mp_forcecamera "0" 22 | mp_forcechasecam "0" 23 | mp_fragsleft "0" 24 | mp_freezetime "0" 25 | mp_friendlyfire "0" 26 | mp_ghostfrequency "0.1" 27 | mp_hostagepenalty "0" 28 | mp_infinite_ammo "0" 29 | mp_kickpercent "0.660" 30 | mp_limitteams "0" 31 | mp_mapvoteratio "1" 32 | mp_maxrounds "0" 33 | mp_mirrordamage "0" 34 | mp_playerid "0" 35 | mp_roundtime "1.75" 36 | mp_startmoney "16000" 37 | mp_timeleft "0" 38 | mp_timelimit "0" 39 | mp_tkpunish "0" 40 | mp_windifference "1" 41 | mp_winlimit "0" 42 | 43 | sv_accelerate "5" 44 | sv_aim "0" 45 | sv_airaccelerate "10" 46 | sv_allow_dlfile "1" 47 | sv_allowdownload "1" 48 | sv_allowupload "1" 49 | sv_alltalk "1" 50 | sv_bounce "1" 51 | sv_cheats "0" 52 | sv_clienttrace "1" 53 | sv_contact "SmileYznl@gmail.com" 54 | sv_downloadurl "" 55 | sv_friction "4" 56 | sv_gravity "800" 57 | sv_lan "0" 58 | sv_maxspeed "320" 59 | sv_maxunlag "1" 60 | sv_newunit "0" 61 | sv_outofdatetime "1800" 62 | sv_proxies "1" 63 | sv_rcon_banpenalty "60" 64 | sv_rcon_maxfailures "5" 65 | sv_rcon_minfailures "2" 66 | sv_rcon_minfailuretime "30" 67 | sv_restart "1" 68 | sv_send_logos "1" 69 | sv_send_resources "1" 70 | sv_stats "1" 71 | sv_stepsize "18" 72 | sv_stopspeed "75" 73 | sv_timeout "15" 74 | sv_unlag "1" 75 | sv_unlagpush "0.0" 76 | sv_unlagsamples "1" 77 | sv_uploadmax "32" 78 | sv_voiceenable "1" 79 | sv_wateraccelerate "10" 80 | sv_waterfriction "1" 81 | 82 | allow_spectators "1" 83 | decalfrequency "30" 84 | edgefriction "2" 85 | humans_join_team "any" 86 | max_queries_sec "3.0" 87 | max_queries_sec_global "30" 88 | max_queries_window "60" 89 | pausable "0" 90 | log "off" 91 | sys_ticrate "1000" 92 | 93 | bannedcfgfile "banned.cfg" 94 | lservercfgfile "listenserver.cfg" 95 | mapchangecfgfile "server.cfg" 96 | mapcyclefile "mapcycle.txt" 97 | motdfile "" 98 | 99 | exec "banned.cfg" 100 | exec "listip.cfg" 101 | --------------------------------------------------------------------------------