Skip to content

Commit e83ae11

Browse files
committed
Added "Steam not running." patch for dedicated servers.
1 parent ff549aa commit e83ae11

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

p2mm.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,10 @@ bool CP2MMServerPlugin::Load(CreateInterfaceFn interfaceFactory, CreateInterface
342342
// Byte patches
343343
P2MMLog(0, true, "Patching Portal 2...");
344344

345+
// "Steam not running." error fix for dedicated servers. This only works for dedicated servrs when the plugin file is named "ghostinj" and server is run with -usegh.
346+
if (engineServer->IsDedicatedServer())
347+
Memory::ReplacePattern("engine", "75 ?? 68 ?? ?? ?? ?? FF 15 ?? ?? ?? ?? 83 C4 ?? 5F C3 56", "EB ?? 68 ?? ?? ?? ?? FF 15 ?? ?? ?? ?? 83 C4 ?? 5F C3 56");
348+
345349
// Linked portal doors event crash patch
346350
Memory::ReplacePattern("server", "0F B6 87 04 05 00 00 8B 16", "EB 14 87 04 05 00 00 8B 16");
347351

@@ -464,6 +468,10 @@ void CP2MMServerPlugin::Unload(void)
464468
{
465469
// Undo byte patches
466470
P2MMLog(0, true, "Un-patching Portal 2...");
471+
472+
// "Steam not running." error fix for dedicated servers. This only works for dedicated servrs when the plugin file is named "ghostinj" and server is run with -usegh.
473+
if (engineServer->IsDedicatedServer())
474+
Memory::ReplacePattern("engine", "EB ?? 68 ?? ?? ?? ?? FF 15 ?? ?? ?? ?? 83 C4 ?? 5F C3 56", "75 ?? 68 ?? ?? ?? ?? FF 15 ?? ?? ?? ?? 83 C4 ?? 5F C3 56");
467475

468476
// Linked portal doors event crash patch
469477
Memory::ReplacePattern("server", "EB 14 87 04 05 00 00 8B 16", "0F B6 87 04 05 00 00 8B 16");

0 commit comments

Comments
 (0)