Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1.     // step 3: get start/stop heights
  2.     float h1 = zs[MCOORD(p1->x,p1->y)];
  3.     float h2 = zs[MCOORD(p2->x,p2->y)];
  4.    
  5.     // step 4: set new heights of affected tiles
  6.     float rise = h1 - h2;
  7.     float dx = rise / (p1.x - p2.x);
  8.     float dy = rise / (p1.y - p2.y);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement