Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: G:/fsopen_math/code/model/modelinterp.cpp
- ===================================================================
- --- G:/fsopen_math/code/model/modelinterp.cpp (revision 8425)
- +++ G:/fsopen_math/code/model/modelinterp.cpp (working copy)
- @@ -2246,20 +2246,29 @@
- if (shipp) {
- // if ship is warping out, check position of the engine glow to the warp plane
- - if ( (shipp->flags & (SF_ARRIVING|SF_DEPART_WARP) ) && (shipp->warpout_effect) ) {
- + if ( (shipp->flags & (SF_ARRIVING) ) && (shipp->warpin_effect) ) {
- vec3d warp_pnt, tmp;
- matrix warp_orient;
- + shipp->warpin_effect->getWarpPosition(&warp_pnt);
- + shipp->warpin_effect->getWarpOrientation(&warp_orient);
- + vm_vec_sub( &tmp, &world_pnt, &warp_pnt );
- +
- + if ( vm_vec_dot( &tmp, &warp_orient.vec.fvec ) < 0.0f ) {
- + break;
- + }
- + }
- +
- + if ( (shipp->flags & (SF_DEPART_WARP) ) && (shipp->warpout_effect) ) {
- + vec3d warp_pnt, tmp;
- + matrix warp_orient;
- +
- shipp->warpout_effect->getWarpPosition(&warp_pnt);
- shipp->warpout_effect->getWarpOrientation(&warp_orient);
- vm_vec_sub( &tmp, &world_pnt, &warp_pnt );
- - if ( vm_vec_dot( &tmp, &warp_orient.vec.fvec ) < 0.0f ) {
- - if (shipp->flags & SF_ARRIVING)// if in front of warp plane, don't create.
- - break;
- - } else {
- - if (shipp->flags & SF_DEPART_WARP)
- - break;
- + if ( vm_vec_dot( &tmp, &warp_orient.vec.fvec ) > 0.0f ) {
- + break;
- }
- }
- }
Add Comment
Please, Sign In to add comment