Advertisement
en2my1234

Untitled

Aug 15th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. void Test(uint64_t entitylist)
  2. {
  3. if (entitylist)
  4. {
  5. FCameraCacheEntry CameraCache;
  6. Vector3 Position;
  7. uint64_t actor_list = mem->RPM<uint64_t>(entitylist);
  8. int actor_count = mem->RPM<uint32_t>(entitylist + 0x8);
  9. cout << dec << "actor count: " << actor_count << endl;
  10. for (int i = 0; i < actor_count; i++)
  11. {
  12. uint64_t entity = mem->RPM<uint64_t>(actor_list + (i * 0x8));
  13. if (entity > 0)
  14. {
  15. cout << "entity is ok: " << hex << entity << endl;
  16. int id = DecryptObjectId(entity + ACTORID);
  17. cout << dec << "i'M A NIGGA: " << id << endl;
  18. if (id == 115652 || id == 115655 || id == 145988 || id == 145990)
  19. {
  20. cout << hex << "Entity: 0x" << entity << endl;
  21. cout << "Correct ID: " << dec << id << endl;
  22. float health = mem->RPM<float>(entity + HEALTH);
  23. cout << dec << "Entity Health: " << to_string(health) << endl;
  24. if (health > 0.0f)
  25. {
  26. CameraCache.POV.FOV = mem->RPM<float>(playercameramanager + OFFSET_FOV);
  27. CameraCache.POV.Location = mem->RPM<Vector3>(playercameramanager + OFFSET_LOCATION);
  28. CameraCache.POV.Rotation = mem->RPM<Vector3>(playercameramanager + OFFSET_ROTATION);
  29. cout << "FOV: " << CameraCache.POV.FOV << endl;
  30. uint64_t rootcomp = DecryptGeneral(entity + ROOTCOMPONENT);
  31. Position = mem->RPM<Vector3>(rootcomp + 0x20C);
  32. cout << "Pos.x: " << to_string(Position.x) << " Pos.y: " << to_string(Position.y) << " Pos.z: " << to_string(Position.z) << endl;
  33. Vector3 Scr = WorldToScreen(Position, CameraCache);
  34. DrawLine(1600 / 2, 900 / 2, Scr.x, Scr.y, 255, 0, 0, 255); //I was too lazy to calculate center
  35. }
  36. }
  37. }
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement