Merge branch 'main' of github.com:TheNoim/DarkflameServer

This commit is contained in:
Nils Bergmann 2021-12-07 14:51:54 +01:00
commit 6f2e306c7e
No known key found for this signature in database
GPG Key ID: 5FAEC08EE1DC2DF9
2 changed files with 5 additions and 9 deletions

View File

@ -46,6 +46,8 @@ If you're using a DLU client you'll have to go into the "CMakeVariables.txt" fil
### Linux builds
Make sure packages like `gcc`, `cmake`, and `zlib` are installed. Depending on the distribution, these packages might already be installed. Note that on systems like Ubuntu, you will need the `zlib1g-dev` package so that the header files are available.
cmake must be version 3.12 or higher!
**Build the repository**
```bash
# Create the build directory, preserving it if it already exists
@ -224,6 +226,7 @@ To connect to a server follow these steps:
* Open it in a text editor and locate where it says `AUTHSERVERIP=0:`
* Replace the contents after to `:` and the following `,` with what you configured as the server's public facing IP. For example `AUTHSERVERIP=0:localhost` for locally hosted servers
* Launch `legouniverse.exe`, through `wine` if on a Unix-like operating system
* Note that if you are on WSL2, you will need to configure the public IP in the server and client to be the IP of the WSL2 instance and not localhost, which can be found by running `ifconfig` in the terminal. Windows defaults to WSL1, so this will not apply to most users.
### Survival

View File

@ -42,15 +42,7 @@ void Zone::LoadZoneIntoMemory() {
m_ZonePath = m_ZoneFilePath.substr(0, m_ZoneFilePath.rfind('/') + 1);
if (m_ZoneFilePath == "ERR") return;
// try to open with regular cased path first
std::ifstream file(m_ZoneFilePath, std::ios::binary);
if (!file) {
// if that fails try the path in lowercase
std::transform(m_ZoneFilePath.begin(), m_ZoneFilePath.end(), m_ZoneFilePath.begin(), ::tolower);
file.open(m_ZoneFilePath, std::ios::binary);
}
if (file) {
BinaryIO::BinaryRead(file, m_ZoneFileFormatVersion);
@ -179,7 +171,8 @@ std::string Zone::GetFilePathForZoneID() {
CDZoneTableTable * zoneTable = CDClientManager::Instance()->GetTable<CDZoneTableTable>("ZoneTable");
const CDZoneTable* zone = zoneTable->Query(this->GetZoneID().GetMapID());
if (zone != nullptr) {
std::string toReturn = "./res/maps/" + zone->zoneName;
std::string toReturn = "./res/maps/" + zone->zoneName;
std::transform(toReturn.begin(), toReturn.end(), toReturn.begin(), ::tolower);
return toReturn;
}