View Issue Details

IDProjectCategoryView StatusLast Update
0003058FSSCPcamera codepublic2014-06-13 03:52
ReporterZacam Assigned ToMageKing17  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.7.2 RC3 
Target Version3.7.2 
Summary0003058: External Camera: On warp out, glowpoints still stay "on" and in mission space without a ship
DescriptionAs per summary.
Steps To ReproduceStage 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.
TagsNo tags attached.

Activities

MageKing17

2014-06-13 03:42

developer  

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)
modelinterp.cpp.patch (1,598 bytes)   

MageKing17

2014-06-13 03:45

developer   ~0015851

Last edited: 2014-06-13 03:45

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.

Zacam

2014-06-13 03:52

administrator   ~0015852

Fix committed to trunk@10799.

Related Changesets

fs2open: trunk r10799

2014-06-12 23:10

Zacam


Ported: N/A

Details Diff
Fix for Mantis 3058: On warp out, glowpoints still stay "on" and in mission space without a ship; from MageKing17 Affected Issues
0003058
mod - /trunk/fs2_open/code/model/modelinterp.cpp Diff File

Issue History

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