Skip to content

Commit cc2d226

Browse files
BelonitMetadorius
andauthored
Fix disabling MultiEngineer in multiplayer with Ares (#54)
* Fix disabling MultiEngineer in multiplayer with Ares * Fix comments --------- Co-authored-by: Metadorius <[email protected]>
1 parent ae83a8c commit cc2d226

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Spawner/Spawner.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,15 @@ bool Spawner::StartScenario(const char* pScenarioName)
331331
if (!pSession->CreateConnections())
332332
return false;
333333

334+
// Ares does not support MultiEngineer switching in multiplayer, however
335+
// we can disable it simply by setting EngineerCaptureLevel to 1 - Belonit
336+
337+
// https://ares-developers.github.io/Ares-docs/restored/multiengineer.html
338+
// https://github.com/Phobos-developers/Antares/blob/7241a5ff20f4dbf7153cc77e16edca5c9db473d4/src/Ext/Infantry/Body.cpp#L44-L46
339+
340+
if (!pGameModeOptions->MultiEngineer)
341+
RulesClass::Instance->EngineerCaptureLevel = 1.0;
342+
334343
if (Main::GetConfig()->AllowChat == false)
335344
{
336345
Game::ChatMask[0] = false;

0 commit comments

Comments
 (0)