Guest User

Untitled

a guest
Feb 3rd, 2012
5,434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. public void TracerLine(boolean flag) {
  2. try {
  3. GL11.glBlendFunc(770, 771);
  4. GL11.glLineWidth(3.0F);
  5. GL11.glDisable(2929 /*GL_DEPTH_TEST*/);
  6. GL11.glDepthMask(false);
  7.  
  8. double size = 0.45;
  9. double ytSize = 0.35;
  10. GL11.glBegin(GL11.GL_LINES);
  11. GL11.glColor3f(0, 5, 0);
  12. for(int x = 0; x < mc.theWorld.playerEntities.size(); x ++) {
  13. Entity entity = (Entity) mc.theWorld.playerEntities.get(x);
  14. double X = entity.posX;
  15. double Y = entity.posY;
  16. double Z = entity.posZ;
  17. double mX = mc.thePlayer.posX;
  18. double mY = mc.thePlayer.posY;
  19. double mZ = mc.thePlayer.posZ;
  20. double dX = (mX - X);
  21. double dY = (mY - Y);
  22. double dZ = (mZ - Z);
  23.  
  24. if(X != mX && Y != mY && Z != mZ) {
  25. GL11.glVertex3d(0, 0, 0);
  26. GL11.glVertex3d((-dX + size) - 0.5, (ytSize - dY) + 1.0, (-dZ - size) + 0.5);
  27. }
  28. }
  29.  
  30. GL11.glEnd();
  31. GL11.glDepthMask(true);
  32. GL11.glEnable(2929 /*GL_DEPTH_TEST*/);
  33. } catch (Exception e) {}
  34. }
Advertisement
Add Comment
Please, Sign In to add comment