fluffytw is a base for Teeworlds hacking.
Before you start, make sure to clone the DDNet repository.
# do this inside DDNet main directory
cd src/game/client
git submodule add https://github.com/fluffysnaff/fluffytw.git
Add this to CMakeLists.txt
:
add_subdirectory(src/game/client/fluffytw)
It should be placed before:
set(CLIENT_SRC ${ENGINE_CLIENT} ${PLATFORM_CLIENT} ${GAME_CLIENT} ${GAME_EDITOR} ${GAME_GENERATED_CLIENT})
Inside gameclient.cpp
add this:
#include <memory.h>
#include "fluffytw/f_helper.h"
std::unique_ptr<FHelper> fHelper;
Now add this code to void CGameClient::OnConsoleInit()
:
void CGameClient::OnConsoleInit()
{
// ...
fHelper = std::make_unique<FHelper>(this);
// ...
}
Visuals
Inside players.cpp
include:
#include "game/client/fluffytw/f_helper.h"
Then in RenderPlayer()
add:
// ...
fHelper->m_pConfig_->espCfg.enabled = g_Config.m_ClEspEnable; // This is an example
fHelper->m_pVisuals->Run(ClientID, Angle, Position); // Make sure to call this
Helper
Add this in CColision
class:
// inside collision.h
public:
// ...
CTile *GetTiles() const { return m_pTiles; }
Bots
Inside controls.cpp
include:
#include "game/client/fluffytw/f_helper.h"
Then in SnapInput();
add:
// ...
fHelper->m_pConfig->aimbotCfg.enabled = false; // Set what variables you need using fConfig
fHelper->m_pBots->Run();
// ...
It should be placed after:
if(!m_aInputDirectionLeft[g_Config.m_ClDummy] && m_aInputDirectionRight[g_Config.m_ClDummy])
m_aInputData[g_Config.m_ClDummy].m_Direction = 1;
m_CanAim
always to true and see if it works.