Advertisement
Guest User

Untitled

a guest
Jul 29th, 2014
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. typedef struct {
  2. char filler[69]; // old one was 67
  3. unsigned char id;
  4. char filler2[71];
  5. } Tile;
  6.  
  7. int renderInXray[255];
  8.  
  9. static void(*hk_Tile_shouldRenderFace_real)(Tile*, void*, int, int, int, signed char, void*);
  10.  
  11. void hk_Tile_shouldRenderFace_hook(Tile* tile, void* ts, int x, int y, int z, signed char side, void* aabb)
  12. {
  13. if (renderInXray[tile->id])
  14. {
  15. return true;
  16. }
  17. else
  18. {
  19. return false;
  20. }
  21. }
  22.  
  23. void* hk_Tile_shouldRenderFace = dlsym(handle, "_ZN4Tile16shouldRenderFaceEP10TileSourceiiiaRK4AABB");
  24. MSHookFunction(hk_Tile_shouldRenderFace, (void*)&hk_Tile_shouldRenderFace_hook, (void**)&hk_Tile_shouldRenderFace_real);
  25.  
  26. for (int i = 0; i < 0x100; i++) {
  27. renderInXray[i] = false;
  28. }
  29. renderInXray[1] = true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement