Jump to content

Thorek

Active+ Member
  • Posts

    50
  • Joined

  • Last visited

  • Feedback

    0%

About Thorek

Informations

  • Gender
    Male
  • Country
    Poland

Development

Recent Profile Visitors

2445 profile views

Thorek's Achievements

Community Regular

Community Regular (8/16)

  • Very Popular Rare
  • Collaborator Rare
  • Conversation Starter
  • Reacting Well
  • Dedicated

Recent Badges

374

Reputation

  1. Actually, it's very simple. Just restore MilesLib and restore 1 sound initializer inside the UserInterface I guess and should be ok.
  2. obsolete rapidjson from 2016... AND if you seriously want fast parsing, use simdjson
  3. He took this code from a leaked source, so he probably doesn't even know.
  4. Hi, good job! Some time ago we had some problems with porting code. For example, if you want to use statically library, you must specify some options for PyConfig before Py_Initialize (PyPreConfig is only for 3.13): I rewrote whole PythonLauncher so this function may differ from the original function so you need to adapt it for yourself! I guess running with isolated mode (just like in the screenshot above) should fix this issue also.
  5. If you like information about leaks in your programs, you can say so, but facts cannot be deceived.
  6. Yep, but what prevents us from freeing callocated memory (even once) and sticking to bad habits, that are already present in the game anyway?
  7. All data allocated by malloc/calloc should be freed using free, otherwise it will result in a memory leak: When you free memory: Of course my example caused a huge leak by using an infinite loop. King regards
  8. Hi, what's the problem? Heart uses LPHEART typedef which is a pointer to a structure. Let's take a look at the heart_new function: As you can see, this function calls calloc to allocate memory for LPHEART, but this operation causes a little issue - calloc is never released! - Wait... we have function to free memory (heart_delete) - Yes, never used anywhere... My potential solution Instead of calling heart_delete, I use a smart pointer to store LPHEART which will be automatically freed. libthecore -> heart.h: // We need to move the raw pointer to shared: typedef struct std::shared_ptr<HEART> LPHEART; libthecore -> heart.cpp: // From heart_new function remove this variable: LPHEART ht; // Then edit: CREATE(ht, HEART, 1); // In this way: auto ht = std::make_shared<HEART>(); Of course you can remove the heart_delete function from both files now. That's all!
  9. Well, if you want do this like YMIR, you can extend sockets count. What problems? I'll take a look.
  10. Take Niemiec, which forum is mine? Yes, I can't write in Python because Python is crap, and I don't like this language. Even if he started his adventure, he could have looked for this addition before he published it. I appreciate every work, but honestly - why would we need topics like this when we have tons of them? But yes - my first comment may be a little toxic, and I want to apologize for this.
  11. We have the answer to the question of why 90% of Metin2 „developers” won't ever do anything useful, sadge
  12. You can check if ifstream is open instead of using the filesystem library (which comes from C++17): std::ifstream file(LocaleService_GetBasePath() + "/fishing.json"); if (!file.is_open() return; // ... Also you should remove #include <fmt/core.h> to avoid compilation errors.
  13. Instead of using #define and (int)NEW_CHECK_VERSION (wtf?) you can use constexpr int.
  14. After every item in JSON array, you must put a comma (except for the last one). For example, if you have: [ 1800, 1800, 1800,180 1800 ] Server not booting because after 180 comma wasn't found.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.