mirror of
https://github.com/EricPlayZ/EGameTools.git
synced 2025-07-18 17:37:53 +08:00
fix a issue with new lines when saving player variables to file
This commit is contained in:
@ -12,7 +12,8 @@
|
||||
namespace Menu {
|
||||
namespace Player {
|
||||
#pragma region PlayerVarsSCRString
|
||||
static const char playerVarsSCR[] = { 0x73, 0x75, 0x62, 0x20, 0x6D, 0x61, 0x69, 0x6E, 0x28, 0x29, 0x0D, 0x0A, 0x7B, 0x0D, 0x0A, 0x09,
|
||||
extern const char playerVarsSCR[];
|
||||
const char playerVarsSCR[] = { 0x73, 0x75, 0x62, 0x20, 0x6D, 0x61, 0x69, 0x6E, 0x28, 0x29, 0x0D, 0x0A, 0x7B, 0x0D, 0x0A, 0x09,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6D, 0x28, 0x22, 0x41, 0x6E, 0x69, 0x6D, 0x47, 0x72, 0x61, 0x70, 0x68,
|
||||
0x5F, 0x42, 0x61, 0x6E, 0x6B, 0x4E, 0x61, 0x6D, 0x65, 0x22, 0x2C, 0x20, 0x22, 0x70, 0x6C, 0x61,
|
||||
0x79, 0x65, 0x72, 0x22, 0x29, 0x3B, 0x0D, 0x0A, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6D, 0x28, 0x22,
|
||||
@ -6084,7 +6085,7 @@ namespace Menu {
|
||||
Utils::str_replace(tempPlayerVarsSCR, origLine, line);
|
||||
}
|
||||
|
||||
std::ofstream outFile(std::string(saveSCRPath) + "\\player_variables.scr");
|
||||
std::ofstream outFile(std::string(saveSCRPath) + "\\player_variables.scr", std::ios::binary);
|
||||
if (!outFile.is_open()) {
|
||||
ImGui::OpenPopup("Failed saving.");
|
||||
return;
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
namespace Menu {
|
||||
namespace Player {
|
||||
extern const char playerVarsSCR[];
|
||||
extern SMART_BOOL godModeEnabled;
|
||||
extern SMART_BOOL freezePlayerEnabled;
|
||||
|
||||
|
Reference in New Issue
Block a user