Skip to content

Commit 54d35bf

Browse files
committed
Minor cleaning
1 parent 2edff84 commit 54d35bf

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# ***P2SourceModPlusPlus*** (Formerly ***WorkshopStopper9000***)
22

3-
## ***A Source Engine Plugin for Portal 2 Source Mods that fixes and adds some QoL features for them!***
3+
## ***A Source Engine Plugin for Portal 2 SourceMods that fixes and adds some QoL features for them!***
44

55
> [!NOTE]
66
> I originally planned `WorkshopStopper9000` to fix the workshop downloading issue, but I hope to add more features and fixes, so now it has become `P2SourceModPlusPlus`. I hope to implement some good features the community will use until the fated day Portal 2: Community Edition (P2:CE) is released. This plugin will act as a temporary solution for mod makers. Once P2:CE's public beta and/or release occurs, I will probably not work on this anymore, as most of the stuff here is fixed over there.
77
88
> [!WARNING]
9-
> This plugin was designed in mind for SourceMods, meaning mods loaded through the `sourcemods` folder in Steam. Not for Portal 2 mods that are on Steam.
109
>
1110
> While this plugin should be ok for a Steam Portal 2 mod, note that:
1211
>
@@ -20,7 +19,7 @@
2019
2120
### Features Implemented/Plan to Implement:
2221

23-
* Stopped workshop maps from being downloaded by the game because the workshop folder isn't on path for Source Mods. Because of this, it tries to get ***ALL*** of them at once, which causes the game to be unstable and occasionally crash.
22+
* Stopped workshop maps from being downloaded by the game because the workshop folder isn't on path for SourceMods. Because of this, it tries to get ***ALL*** of them at once, which causes the game to be unstable and occasionally crash.
2423
* Fixed human NPC movement so they don't jitter when they move. `cl_localnetworkbackdoor` is automatically set to 0 without manual adjustment.
2524
* Made `r_screenoverlay` ConVar be enabled by default and not need cheats so `env_screenoverlay` entities can work correctly without `sv_cheats` being needed.
2625
* Added a ConVar to enable instant respawns for multiplayer.
@@ -29,7 +28,7 @@
2928
* **(NOT IMPLEMENTED)** Fixed linked portal doors causing crashes on multiplayer when players enter them.
3029
* **(NOT IMPLEMENTED)** Allow more than one env_projectedtexture to be on at once. Engine limit of eight is still enforced however!
3130
* **(NOT IMPLEMENTED)** Option to turn on or off puzzle maker functionality. Most mods don't use the puzzle maker, but it still loads in. The plugin will try to disable as much of it as possible so the console is not filled with any puzzle-maker-related errors, messages, or other additional bloat.
32-
* **(NOT IMPLEMENTED)** Custom Discord RPC for Portal 2 Source Mods.
31+
* **(NOT IMPLEMENTED)** Custom Discord RPC for Portal 2 SourceMods.
3332
* **(NOT IMPLEMENTED)** Additional achievement support and features. Like custom achievements that span multiple maps and have more parts than Door Prize and Smash TV.
3433
* **(NOT IMPLEMENTED)** As informed by MarvinG, `env_sun` disappears when over player crosshair. I have not been able to confirmed this, and have never noticed it in general.
3534
* **(NOT IMPLEMENTED)** When in water, the player is pushed to the world's origin.

globals.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// Purpose: Global functions & variables used repeatedly throughout the plugin
55
//
66
//===========================================================================//
7+
78
#pragma once
89

910
#include "eiface.h"
@@ -38,19 +39,19 @@ class CUGCFileRequestManager;
3839
// Thanks to Nanoman2525 for this.
3940
#define FOR_ALL_CONSOLE_COMMANDS(pCommandVarName) \
4041
ConCommandBase* m_pConCommandList = *reinterpret_cast<ConCommandBase**>((uintptr_t)g_pCVar + 0x30); /* CCvar::m_pConCommandList */ \
41-
for (ConCommandBase* pCommandVarName = m_pConCommandList; \
42-
pCommandVarName; pCommandVarName = *reinterpret_cast<ConCommandBase**>(reinterpret_cast<uintptr_t>(pCommandVarName) + 0x04)) /* ConCommandBase::m_pNext (private variable) */
42+
for (ConCommandBase* (pCommandVarName) = m_pConCommandList; \
43+
pCommandVarName; (pCommandVarName) = *reinterpret_cast<ConCommandBase**>(reinterpret_cast<uintptr_t>(pCommandVarName) + 0x04)) /* ConCommandBase::m_pNext (private variable) */
4344

4445
// Macro to iterate through all players on the server.
4546
#define FOR_ALL_PLAYERS(i) \
46-
for (int i = 1; i <= CURPLAYERCOUNT(); i++)
47+
for (int (i) = 1; (i) <= CURPLAYERCOUNT(); (i)++)
4748

4849
// Log levels for all log functions.
4950
typedef enum LogLevels : std::uint8_t
5051
{
5152
INFO = 0,
5253
WARNING,
53-
ERRORR // Have to use ERRORR because of include by Windows API. Yeah I know, I hate it too.
54+
ERRORR // Have to use ERRORR because of macro by the Windows API. Yeah I know, I hate it too.
5455
} LogLevel;
5556

5657

p2sm.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// Purpose: P2SourceModPlusPlus plugin
55
//
66
//===========================================================================//
7+
78
#pragma once
89

910
#include "engine/iserverplugin.h"

sdk.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// Purpose: Interfaced functions and hooks from the Portal 2 engine for the plugin to use.
55
//
66
//===========================================================================//
7+
78
#pragma once
89

910
#include "globals.hpp"

0 commit comments

Comments
 (0)