View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003058 | FSSCP | camera code | public | 2014-06-13 03:11 | 2014-06-13 03:52 |
Reporter | Zacam | Assigned To | MageKing17 | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.7.2 RC3 | ||||
Target Version | 3.7.2 | ||||
Summary | 0003058: External Camera: On warp out, glowpoints still stay "on" and in mission space without a ship | ||||
Description | As per summary. | ||||
Steps To Reproduce | Stage any player ship with glowpoints into mission space. Switch to external view of any kind. Warp out. Observe the glowpoints maintaining their relation as if still attached to ship, even though the ship has now departed. | ||||
Tags | No tags attached. | ||||
|
modelinterp.cpp.patch (1,598 bytes)
Index: code/model/modelinterp.cpp =================================================================== --- code/model/modelinterp.cpp (revision 10798) +++ code/model/modelinterp.cpp (working copy) @@ -2545,10 +2545,33 @@ vm_vec_add2(&world_pnt, pos); vm_vec_unrotate(&world_norm, &loc_norm, orient); - - if ( (shipp != NULL) && (shipp->flags & (SF_ARRIVING | SF_DEPART_WARP) ) && (shipp->warpin_effect) && Ship_info[shipp->ship_info_index].warpin_type != WT_HYPERSPACE) { - if (g3_point_behind_user_plane(&world_pnt)) - continue; + + if ( shipp != NULL ) { + if ( (shipp->flags & (SF_ARRIVING) ) && (shipp->warpin_effect) && Ship_info[shipp->ship_info_index].warpin_type != WT_HYPERSPACE) { + 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 ) { + continue; + } + } + + if ( (shipp->flags & (SF_DEPART_WARP) ) && (shipp->warpout_effect) && Ship_info[shipp->ship_info_index].warpout_type != WT_HYPERSPACE) { + 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 ) { + continue; + } + } } switch (bank->type) |
|
I'm not sure the old code was actually doing anything; g3_point_behind_user_plane() doesn't seem like it would be doing anything to warp effects. Copied proper clipping behavior from thrusters; tested to work. |
|
Fix committed to trunk@10799. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-06-13 03:11 | Zacam | New Issue | |
2014-06-13 03:42 | MageKing17 | File Added: modelinterp.cpp.patch | |
2014-06-13 03:42 | MageKing17 | Assigned To | => MageKing17 |
2014-06-13 03:42 | MageKing17 | Status | new => assigned |
2014-06-13 03:45 | MageKing17 | Note Added: 0015851 | |
2014-06-13 03:45 | MageKing17 | Status | assigned => code review |
2014-06-13 03:45 | MageKing17 | Note Edited: 0015851 | |
2014-06-13 03:52 | Zacam | Changeset attached | => fs2open trunk r10799 |
2014-06-13 03:52 | Zacam | Note Added: 0015852 | |
2014-06-13 03:52 | Zacam | Status | code review => resolved |
2014-06-13 03:52 | Zacam | Resolution | open => fixed |