Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct {
- char filler[69]; // old one was 67
- unsigned char id;
- char filler2[71];
- } Tile;
- int renderInXray[255];
- static void(*hk_Tile_shouldRenderFace_real)(Tile*, void*, int, int, int, signed char, void*);
- void hk_Tile_shouldRenderFace_hook(Tile* tile, void* ts, int x, int y, int z, signed char side, void* aabb)
- {
- if (renderInXray[tile->id])
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- void* hk_Tile_shouldRenderFace = dlsym(handle, "_ZN4Tile16shouldRenderFaceEP10TileSourceiiiaRK4AABB");
- MSHookFunction(hk_Tile_shouldRenderFace, (void*)&hk_Tile_shouldRenderFace_hook, (void**)&hk_Tile_shouldRenderFace_real);
- for (int i = 0; i < 0x100; i++) {
- renderInXray[i] = false;
- }
- renderInXray[1] = true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement