Гайд How to MultiThread legendware to get 100+ fps for free(spoonfed)

get good get legendware
Участник
Статус
Оффлайн
Регистрация
22 Сен 2020
Сообщения
438
Реакции[?]
201
Поинты[?]
48K
hello ruskies
since i saw some people selling this shit i wanted to ruin their shitty scam and release this already public info but with spoonfed information

we will be using Oversee's multithreading library (
Пожалуйста, авторизуйтесь для просмотра ссылки.
) download it and include it in your project

now go to animation_system.cpp and find the "fsn" function
this is the function we will be multithreading to run animation system for every player
we need the struct first for the cached data
the struct for the cached data:
struct EntityJobDataStruct
{
    int index;
    ClientFrameStage_t stage;
};
now we need to write the multithreaded job function that uses the cahced data
threaded job function:
void ProcessEntityJob(EntityJobDataStruct* EntityJobData)
{
    int i = EntityJobData->index;
    ClientFrameStage_t stage = EntityJobData->stage;

    auto e = static_cast<player_t*>(m_entitylist()->GetClientEntity(i));

    if (e == g_ctx.local())
        return;

    if (!lagcompensation::get().valid(i, e))
        return;

    //use the rest of the original code here.....
}

now lets use our cool library to multithread the animation loop like so :3
very cool threaded p100 code:
void lagcompensation::fsn(ClientFrameStage_t stage)
{
    if (!g_cfg.ragebot.enable)
        return;

    
    std::vector<EntityJobDataStruct> jobDataVec(m_globals()->m_maxclients - 1);

    // Prepare the job data
    for (int i = 1; i < m_globals()->m_maxclients; i++)
    {
        EntityJobDataStruct jobData;
        jobData.index = i;
        jobData.stage = stage;
        jobDataVec[i - 1] = jobData;
    }

    // Enqueue the jobs
    for (auto& jobData : jobDataVec)
    {
        Threading::QueueJobRef(ProcessEntityJob, &jobData);
    }

    // Wait for all the jobs to finish
    Threading::FinishQueue();
}

and finally lets init our threads at runtime just like how Oversee does it
go to main.cpp and above auto player_hook add this...
C++:
    /* init multithread */
    Threading::InitThreads();
with this you should at least get a 100% fps increase without anything else
 
Эксперт
Статус
Оффлайн
Регистрация
29 Мар 2021
Сообщения
1,605
Реакции[?]
607
Поинты[?]
48K
hello ruskies
since i saw some people selling this shit i wanted to ruin their shitty scam and release this already public info but with spoonfed information

we will be using Oversee's multithreading library (
Пожалуйста, авторизуйтесь для просмотра ссылки.
) download it and include it in your project

now go to animation_system.cpp and find the "fsn" function
this is the function we will be multithreading to run animation system for every player
we need the struct first for the cached data
the struct for the cached data:
struct EntityJobDataStruct
{
    int index;
    ClientFrameStage_t stage;
};
now we need to write the multithreaded job function that uses the cahced data
threaded job function:
void ProcessEntityJob(EntityJobDataStruct* EntityJobData)
{
    int i = EntityJobData->index;
    ClientFrameStage_t stage = EntityJobData->stage;

    auto e = static_cast<player_t*>(m_entitylist()->GetClientEntity(i));

    if (e == g_ctx.local())
        return;

    if (!lagcompensation::get().valid(i, e))
        return;

    //use the rest of the original code here.....
}

now lets use our cool library to multithread the animation loop like so :3
very cool threaded p100 code:
void lagcompensation::fsn(ClientFrameStage_t stage)
{
    if (!g_cfg.ragebot.enable)
        return;

   
    std::vector<EntityJobDataStruct> jobDataVec(m_globals()->m_maxclients - 1);

    // Prepare the job data
    for (int i = 1; i < m_globals()->m_maxclients; i++)
    {
        EntityJobDataStruct jobData;
        jobData.index = i;
        jobData.stage = stage;
        jobDataVec[i - 1] = jobData;
    }

    // Enqueue the jobs
    for (auto& jobData : jobDataVec)
    {
        Threading::QueueJobRef(ProcessEntityJob, &jobData);
    }

    // Wait for all the jobs to finish
    Threading::FinishQueue();
}

and finally lets init our threads at runtime just like how Oversee does it
go to main.cpp and above auto player_hook add this...
C++:
    /* init multithread */
    Threading::InitThreads();
with this you should at least get a 100% fps increase without anything else
this aint a spoonfed this a terrorist attack on innocent civilians cuh

wtf are you even TRYING to accomplish? "lmao i dont know what im doing so ill make a basic queue to get hot data races when using a performance critical function :hearteyecat: :hearteyecat: :hearteyecat: "
 
get good get legendware
Участник
Статус
Оффлайн
Регистрация
22 Сен 2020
Сообщения
438
Реакции[?]
201
Поинты[?]
48K
this aint a spoonfed this a terrorist attack on innocent civilians cuh

wtf are you even TRYING to accomplish? "lmao i dont know what im doing so ill make a basic queue to get hot data races when using a performance critical function :hearteyecat: :hearteyecat: :hearteyecat: "
wtf you on about? lmao can’t you fucking read? it’s literally running for each player separately and it’s being directly called inside FrameStageNotify so “what hot data races” are you talking about?
 
Забаненный
Статус
Оффлайн
Регистрация
7 Июл 2023
Сообщения
4
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Пользователь
Статус
Оффлайн
Регистрация
3 Июл 2019
Сообщения
137
Реакции[?]
77
Поинты[?]
2K
wtf you on about? lmao can’t you fucking read? it’s literally running for each player separately and it’s being directly called inside FrameStageNotify so “what hot data races” are you talking about?
YOU, are a menace. "hot data" ??????, look at the name, it's self-explanatory, hot, like fresh in the oven. Hot, the food you just finish cooked. Anyway, hot data races is when threads access the same memory at the same time! When you system read the data! there will be what you call miscommunication! or whatever you call, incorrect, yes!, it can lead to your system reads incorrect data! it can overwrite your other queued job! yes!
 
get good get legendware
Участник
Статус
Оффлайн
Регистрация
22 Сен 2020
Сообщения
438
Реакции[?]
201
Поинты[?]
48K
YOU, are a menace. "hot data" ??????, look at the name, it's self-explanatory, hot, like fresh in the oven. Hot, the food you just finish cooked. Anyway, hot data races is when threads access the same memory at the same time! When you system read the data! there will be what you call miscommunication! or whatever you call, incorrect, yes!, it can lead to your system reads incorrect data! it can overwrite your other queued job! yes!
you think i don’t know about race conditions? are you by any chance familiar with something called mutex and shared mutex??

Пожалуйста, авторизуйтесь для просмотра ссылки.
 
Пользователь
Статус
Оффлайн
Регистрация
3 Июл 2019
Сообщения
137
Реакции[?]
77
Поинты[?]
2K
you think i don’t know about race conditions? are you by any chance familiar with something called mutex and shared mutex??

Пожалуйста, авторизуйтесь для просмотра ссылки.
о боже, мне так жаль :sweat::sweat::sweat::sweat:, legendware вообще использует многопоточность в первую очередь, они также используют мьютекс?
 
Сверху Снизу