From 2de82823454c7bed3d0b531af8ea10071f85f6b1 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Fri, 1 Jan 2021 02:54:45 +0100 Subject: [PATCH] [hellfire] pfile_encode_hero --- Source/pfile.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/pfile.cpp b/Source/pfile.cpp index 4f1d46a4c..9de225df6 100644 --- a/Source/pfile.cpp +++ b/Source/pfile.cpp @@ -192,8 +192,14 @@ static void pfile_encode_hero(const PkPlayerStruct *pPack) DWORD packed_len; char password[16] = PASSWORD_SINGLE; +#ifdef HELLFIRE + DWORD size = 161; + if (gbMaxPlayers > 1) + GetComputerName(password, &size); +#else if (gbMaxPlayers > 1) strcpy(password, PASSWORD_MULTI); +#endif packed_len = codec_get_encoded_len(sizeof(*pPack)); packed = (BYTE *)DiabloAllocPtr(packed_len);