Skip to content

Commit 5c0853f

Browse files
committed
So there won't be a Linux version for awhile :( Plus how did the P2:MM plugin repo not have the minhook license???
1 parent 5ef30a7 commit 5c0853f

3 files changed

Lines changed: 86 additions & 13 deletions

File tree

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ One issue plaguing Source Mods for Portal 2 is the issue where the game sees tha
66

77
Stick this plugin and its respective `.vdc` file into an `addons` folder in the Source Mod's game directory, and Portal 2 should automatically start the plugin up with the game and thus stop the game from downloading workshop maps. That's it. This took about 20 minutes to make, so please create an Issue post if there are any issues. I'll get to it within the next 20 years.
88

9-
**As of writing, 11/09/2024, the plugin is only compatible with Windows. The signature scanner it uses still needs to be compatible with Linux, and I have yet to get the right signature anyway. Apologies for any inconvenience.**
9+
**As of writing, 11/09/2024, the plugin is only compatible with Windows. The signature scanner it uses still needs to be compatible with Linux, plus overall the way the P2:MM plugin is structured (this plugin is built off of the P2:MM plugin as a base), it's not possible to compile for Linux anyway. Literally 1984, I know, but I don't have enough time or experience to figure it out by myself. Linux users should still be able to get away with using Proton or similar to be able to use the Windows `.dll`. Hopefully one day this can be fixed...**
1010

1111
```
1212
Please give credit to Orsell/OrsellGaming, Nanoman2525, and NULLderef,
13-
as well as the Portal 2: Multiplayer Mod Team (the plugin is built off some of the P2:MM plugin's code)
14-
if you use this plugin or its code in any way with your Source Mod.
13+
as well as the Portal 2: Multiplayer Mod Team if you use this plugin or its code in any way with your Source Mod.
1514
You must also include this repository and the P2:MM's License (see below).
1615
```
1716

main.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ void Log(int level, bool dev, const char* pMsgFormat, ...)
3535
char completeMsg[1024];
3636
V_snprintf(completeMsg, sizeof(completeMsg), "(WorkshopStopper9000 PLUGIN): %s\n", szFormattedText);
3737

38-
if (dev && !wss9000_developer.GetBool())
39-
{
40-
return;
41-
}
38+
if (dev && !wss9000_developer.GetBool()) { return; }
4239

4340
switch (level)
4441
{
@@ -115,11 +112,7 @@ bool CWSS9000Plugin::Load(CreateInterfaceFn interfaceFactory, CreateInterfaceFn
115112
Memory::Scanner::Scan(CLIENTDLL, "55 8B EC 81 EC 48 01 00 00 57"),
116113
&CUGCFileRequestManager__Update_hook, (void**)&CUGCFileRequestManager__Update_orig
117114
);
118-
#else // Linux. I believe the sig for linux is incorrect and I need to spend a bit more time to confirm its the right one.
119-
//MH_CreateHook(
120-
// Memory::Scanner::Scan(CLIENTDLL, "55 89 E5 57 56 53 81 EC 5C 01 00 00 8B 5D"),
121-
// &CUGCFileRequestManager__Update_hook, (void**)&CUGCFileRequestManager__Update_orig
122-
//);
115+
#else // Linux Hooking. Due to the way this plugin is structured, it's currently not possible to compile this for Linux. Literally 1984 I know, but I don't have enough time or experience to figure it out by myself.
123116
#endif // _WIN32
124117

125118
MH_EnableHook(MH_ALL_HOOKS);
@@ -140,7 +133,7 @@ bool CWSS9000Plugin::Load(CreateInterfaceFn interfaceFactory, CreateInterfaceFn
140133
//---------------------------------------------------------------------------------
141134
void CWSS9000Plugin::Unload(void)
142135
{
143-
// If the plugin errors for some reason, prevent it from unloading to get what the error was.
136+
// If the plugin errors for some reason, prevent it from unloading.
144137
if (m_bNoUnload)
145138
{
146139
m_bNoUnload = false;

minhook/LICENSE.txt

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
MinHook - The Minimalistic API Hooking Library for x64/x86
2+
Copyright (C) 2009-2017 Tsuda Kageyu.
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions
7+
are met:
8+
9+
1. Redistributions of source code must retain the above copyright
10+
notice, this list of conditions and the following disclaimer.
11+
2. Redistributions in binary form must reproduce the above copyright
12+
notice, this list of conditions and the following disclaimer in the
13+
documentation and/or other materials provided with the distribution.
14+
15+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17+
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
18+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
19+
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26+
27+
================================================================================
28+
Portions of this software are Copyright (c) 2008-2009, Vyacheslav Patkov.
29+
================================================================================
30+
Hacker Disassembler Engine 32 C
31+
Copyright (c) 2008-2009, Vyacheslav Patkov.
32+
All rights reserved.
33+
34+
Redistribution and use in source and binary forms, with or without
35+
modification, are permitted provided that the following conditions
36+
are met:
37+
38+
1. Redistributions of source code must retain the above copyright
39+
notice, this list of conditions and the following disclaimer.
40+
2. Redistributions in binary form must reproduce the above copyright
41+
notice, this list of conditions and the following disclaimer in the
42+
documentation and/or other materials provided with the distribution.
43+
44+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
45+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
46+
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
47+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
48+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
49+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
50+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
51+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
52+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
53+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
54+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55+
56+
-------------------------------------------------------------------------------
57+
Hacker Disassembler Engine 64 C
58+
Copyright (c) 2008-2009, Vyacheslav Patkov.
59+
All rights reserved.
60+
61+
Redistribution and use in source and binary forms, with or without
62+
modification, are permitted provided that the following conditions
63+
are met:
64+
65+
1. Redistributions of source code must retain the above copyright
66+
notice, this list of conditions and the following disclaimer.
67+
2. Redistributions in binary form must reproduce the above copyright
68+
notice, this list of conditions and the following disclaimer in the
69+
documentation and/or other materials provided with the distribution.
70+
71+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
72+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
73+
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
74+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
75+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
76+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
77+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
78+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
79+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
80+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
81+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)