daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: G:/fsopen_math/code/model/modelinterp.cpp
  2. ===================================================================
  3. --- G:/fsopen_math/code/model/modelinterp.cpp   (revision 8425)
  4. +++ G:/fsopen_math/code/model/modelinterp.cpp   (working copy)
  5. @@ -2246,20 +2246,29 @@
  6.  
  7.             if (shipp) {
  8.                 // if ship is warping out, check position of the engine glow to the warp plane
  9. -               if ( (shipp->flags & (SF_ARRIVING|SF_DEPART_WARP) ) && (shipp->warpout_effect) ) {
  10. +               if ( (shipp->flags & (SF_ARRIVING) ) && (shipp->warpin_effect) ) {
  11.                     vec3d warp_pnt, tmp;
  12.                     matrix warp_orient;
  13.  
  14. +                   shipp->warpin_effect->getWarpPosition(&warp_pnt);
  15. +                   shipp->warpin_effect->getWarpOrientation(&warp_orient);
  16. +                   vm_vec_sub( &tmp, &world_pnt, &warp_pnt );
  17. +
  18. +                   if ( vm_vec_dot( &tmp, &warp_orient.vec.fvec ) < 0.0f ) {
  19. +                       break;
  20. +                   }
  21. +               }
  22. +
  23. +               if ( (shipp->flags & (SF_DEPART_WARP) ) && (shipp->warpout_effect) ) {
  24. +                   vec3d warp_pnt, tmp;
  25. +                   matrix warp_orient;
  26. +
  27.                     shipp->warpout_effect->getWarpPosition(&warp_pnt);
  28.                     shipp->warpout_effect->getWarpOrientation(&warp_orient);
  29.                     vm_vec_sub( &tmp, &world_pnt, &warp_pnt );
  30.  
  31. -                   if ( vm_vec_dot( &tmp, &warp_orient.vec.fvec ) < 0.0f ) {
  32. -                       if (shipp->flags & SF_ARRIVING)// if in front of warp plane, don't create.
  33. -                           break;
  34. -                   } else {
  35. -                       if (shipp->flags & SF_DEPART_WARP)
  36. -                           break;
  37. +                   if ( vm_vec_dot( &tmp, &warp_orient.vec.fvec ) > 0.0f ) {
  38. +                       break;
  39.                     }
  40.                 }
  41.             }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top