mirror of
https://github.com/quizhizhe/LiteLoaderBDS-1.16.40.git
synced 2025-06-03 04:23:39 +00:00
修复PropertiesSettings
This commit is contained in:
parent
5710878d29
commit
c8ac025ed9
@ -107,3 +107,21 @@ TInstanceHook(Scoreboard*, "??0ServerScoreboard@@QEAA@VCommandSoftEnumRegistry@@
|
||||
// }
|
||||
// PropertiesSettings
|
||||
// -> BuiltinBugFix.cpp
|
||||
#include "MC/PropertiesSettings.hpp"
|
||||
TInstanceHook(size_t, "??0PropertiesSettings@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z", PropertiesSettings, const std::string& file) {
|
||||
auto out = original(this, file);
|
||||
// if (LL::globalConfig.enableUnoccupyPort19132) {
|
||||
// // logger.warn("If you turn on this feature, your server will not be displayed on the LAN");
|
||||
// DWORD v4Flag, v6Flag;
|
||||
// VirtualProtect((void*)&SharedConstants::NetworkDefaultGamePort, 4, PAGE_READWRITE, &v4Flag);
|
||||
// *(unsigned short*)&SharedConstants::NetworkDefaultGamePort = getServerPort();
|
||||
// VirtualProtect((void*)&SharedConstants::NetworkDefaultGamePort, 4, v4Flag, NULL);
|
||||
//
|
||||
// VirtualProtect((void*)&SharedConstants::NetworkDefaultGamePortv6, 4, PAGE_READWRITE, &v6Flag);
|
||||
// *(unsigned short*)&SharedConstants::NetworkDefaultGamePortv6 = getServerPortv6();
|
||||
// VirtualProtect((void*)&SharedConstants::NetworkDefaultGamePortv6, 4, v6Flag, NULL);
|
||||
// }
|
||||
// Global service
|
||||
Global<PropertiesSettings> = this;
|
||||
return out;
|
||||
}
|
||||
|
@ -126,23 +126,6 @@
|
||||
// return original(this, netid, pk);
|
||||
//}
|
||||
//
|
||||
//TInstanceHook(size_t, "??0PropertiesSettings@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z", PropertiesSettings, const std::string& file) {
|
||||
// auto out = original(this, file);
|
||||
// if (LL::globalConfig.enableUnoccupyPort19132) {
|
||||
// // logger.warn("If you turn on this feature, your server will not be displayed on the LAN");
|
||||
// DWORD v4Flag, v6Flag;
|
||||
// VirtualProtect((void*)&SharedConstants::NetworkDefaultGamePort, 4, PAGE_READWRITE, &v4Flag);
|
||||
// *(unsigned short*)&SharedConstants::NetworkDefaultGamePort = getServerPort();
|
||||
// VirtualProtect((void*)&SharedConstants::NetworkDefaultGamePort, 4, v4Flag, NULL);
|
||||
//
|
||||
// VirtualProtect((void*)&SharedConstants::NetworkDefaultGamePortv6, 4, PAGE_READWRITE, &v6Flag);
|
||||
// *(unsigned short*)&SharedConstants::NetworkDefaultGamePortv6 = getServerPortv6();
|
||||
// VirtualProtect((void*)&SharedConstants::NetworkDefaultGamePortv6, 4, v6Flag, NULL);
|
||||
// }
|
||||
// // Global service
|
||||
// Global<PropertiesSettings> = this;
|
||||
// return out;
|
||||
//}
|
||||
//
|
||||
//// Fix move view crash (ref PlayerAuthInput[MoveView])
|
||||
//Player* movingViewPlayer = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user