Guest User

Untitled

a guest
Jun 24th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. double sdb2max_warp (int x)
  2. {
  3. double a = sdb[x].move.ratio;
  4. double p = (0.99 * sdb[x].power.main) + (0.01 * sdb[x].power.total * sdb[x].alloc.movement);
  5.  
  6. if (a <= 0.0)
  7. return 0.0;
  8. if (p <= 0.0)
  9. return 0.0;
  10. if (sdb[x].status.tractoring) {
  11. a *= (sdb[x].structure.displacement + sdb[sdb[x].status.tractoring].structure.displacement + 0.1) /
  12. (sdb[x].structure.displacement + 0.1);
  13. } else if (sdb[x].status.tractored)
  14. a *= (sdb[x].structure.displacement + sdb[sdb[x].status.tractored].structure.displacement + 0.1) /
  15. (sdb[x].structure.displacement + 0.1);
  16.  
  17. a = sqrt(10.0 * p / a);
  18. if (a < 1.0) {
  19. return 0.0;
  20. } else
  21. return a/2;
  22. }
Add Comment
Please, Sign In to add comment