Skip to content

Commit

Permalink
So there won't be a Linux version for awhile :( Plus how did the P2:M…
Browse files Browse the repository at this point in the history
…M plugin repo not have the minhook license???
  • Loading branch information
OrsellGaming committed Nov 10, 2024
1 parent 5ef30a7 commit 5c0853f
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 13 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ One issue plaguing Source Mods for Portal 2 is the issue where the game sees tha

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.

**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.**
**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...**

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

Expand Down
13 changes: 3 additions & 10 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ void Log(int level, bool dev, const char* pMsgFormat, ...)
char completeMsg[1024];
V_snprintf(completeMsg, sizeof(completeMsg), "(WorkshopStopper9000 PLUGIN): %s\n", szFormattedText);

if (dev && !wss9000_developer.GetBool())
{
return;
}
if (dev && !wss9000_developer.GetBool()) { return; }

switch (level)
{
Expand Down Expand Up @@ -115,11 +112,7 @@ bool CWSS9000Plugin::Load(CreateInterfaceFn interfaceFactory, CreateInterfaceFn
Memory::Scanner::Scan(CLIENTDLL, "55 8B EC 81 EC 48 01 00 00 57"),
&CUGCFileRequestManager__Update_hook, (void**)&CUGCFileRequestManager__Update_orig
);
#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.
//MH_CreateHook(
// Memory::Scanner::Scan(CLIENTDLL, "55 89 E5 57 56 53 81 EC 5C 01 00 00 8B 5D"),
// &CUGCFileRequestManager__Update_hook, (void**)&CUGCFileRequestManager__Update_orig
//);
#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.
#endif // _WIN32

MH_EnableHook(MH_ALL_HOOKS);
Expand All @@ -140,7 +133,7 @@ bool CWSS9000Plugin::Load(CreateInterfaceFn interfaceFactory, CreateInterfaceFn
//---------------------------------------------------------------------------------
void CWSS9000Plugin::Unload(void)
{
// If the plugin errors for some reason, prevent it from unloading to get what the error was.
// If the plugin errors for some reason, prevent it from unloading.
if (m_bNoUnload)
{
m_bNoUnload = false;
Expand Down
81 changes: 81 additions & 0 deletions minhook/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
MinHook - The Minimalistic API Hooking Library for x64/x86
Copyright (C) 2009-2017 Tsuda Kageyu.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

================================================================================
Portions of this software are Copyright (c) 2008-2009, Vyacheslav Patkov.
================================================================================
Hacker Disassembler Engine 32 C
Copyright (c) 2008-2009, Vyacheslav Patkov.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-------------------------------------------------------------------------------
Hacker Disassembler Engine 64 C
Copyright (c) 2008-2009, Vyacheslav Patkov.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 comments on commit 5c0853f

Please sign in to comment.