2018-12-10 07:16 EST


View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0002775FSSCPuser interfacepublic2013-01-12 18:29
ReporterFUBAR-BDHR 
Assigned ToFUBAR-BDHR 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version3.6.15 
Target VersionFixed in Version 
Summary0002775: Asteroid field icon briefing model rendering hardcoded to retail values. Results in clipping
DescriptionThe closeup model (the one you get when you click on the briefing icon) in briefings for asteroid field icons always uses the first large asteroid model in the table (something else that might want to be changed at some point). The problem is not everyone uses retail asteroid sizes but the values for the closeup and zoom are hardcoded in missionbrief.cpp. In the case of TBP the model is larger then that value resulting in the camera being inside the asteroid.
Additional InformationAttaching patch to work around this issue. It reads 2 new optional fields from asteroid.tbl and uses the values if specified.
TagsNo tags attached.
Attached Files
  • patch file icon field_icon_closeup.patch (2,389 bytes) 2013-01-09 18:13 -
    Index: asteroid/asteroid.cpp
    ===================================================================
    --- asteroid/asteroid.cpp	(revision 9490)
    +++ asteroid/asteroid.cpp	(working copy)
    @@ -64,6 +64,8 @@
     
     static int		Asteroid_impact_explosion_ani;
     static float	Asteroid_impact_explosion_radius;
    +vec3d	Asteroid_icon_closeup_position;
    +float	Asteroid_icon_closeup_zoom;	
     
     #define	ASTEROID_CHECK_WRAP_TIMESTAMP			2000	// how often an asteroid gets checked for wrapping
     #define	ASTEROID_UPDATE_COLLIDE_TIMESTAMP	2000	// how often asteroid is checked for impending collisions with escort ships
    @@ -2020,6 +2022,20 @@
     	required_string("$Impact Explosion Radius:");
     	stuff_float(&Asteroid_impact_explosion_radius);
     
    +	if(optional_string("$Field Icon Briefing Closeup:")) {
    +		stuff_vec3d(&Asteroid_icon_closeup_position);
    +	}
    +	else {
    +		vm_vec_make(&Asteroid_icon_closeup_position, 0.0f, 0.0f, -334.0f);  // magic numbers from retail
    +	}
    +
    +	if(optional_string("$Field Icon Briefing Zoom:")) {
    +		stuff_float(&Asteroid_icon_closeup_zoom);
    +	}
    +	else {
    +		Asteroid_icon_closeup_zoom = 0.5f;	// magic number from retail
    +	}
    +
     	// close localization
     	lcl_ext_close();
     }
    Index: asteroid/asteroid.h
    ===================================================================
    --- asteroid/asteroid.h	(revision 9490)
    +++ asteroid/asteroid.h	(working copy)
    @@ -136,7 +136,10 @@
     
     extern int	Num_asteroids;
     extern int	Asteroids_enabled;
    +extern vec3d	Asteroid_icon_closeup_position;  // closeup position for asteroid field briefing icon rendering
    +extern float	Asteroid_icon_closeup_zoom;		 // zoom position for asteroid field briefing icon rendering
     
    +
     void	asteroid_init();
     void	asteroid_level_init();
     void	asteroid_level_close();
    Index: missionui/missionbrief.cpp
    ===================================================================
    --- missionui/missionbrief.cpp	(revision 9490)
    +++ missionui/missionbrief.cpp	(working copy)
    @@ -1235,8 +1235,8 @@
     	case ICON_ASTEROID_FIELD:
     		strcpy_s(pof_filename, Asteroid_info[ASTEROID_TYPE_LARGE].pof_files[0]);
     		strcpy_s(Closeup_icon->closeup_label, XSTR( "asteroid", 431));
    -		vm_vec_make(&Closeup_cam_pos, 0.0f, 0.0f, -334.0f);
    -		Closeup_zoom = 0.5f;
    +		Closeup_cam_pos = Asteroid_icon_closeup_position;
    +		Closeup_zoom = Asteroid_icon_closeup_zoom;
     		break;
     	case ICON_JUMP_NODE:
     		strcpy_s(pof_filename, NOX("subspacenode.pof"));
    
    patch file icon field_icon_closeup.patch (2,389 bytes) 2013-01-09 18:13 +

-Relationships
+Relationships

-Notes

~0014642

Goober5000 (administrator)

Committed, along with a field for the asteroid model as well. Note that I changed the names a bit from the ones you specified.
+Notes

+Related Changesets

-Issue History
Date Modified Username Field Change
2013-01-09 18:13 FUBAR-BDHR New Issue
2013-01-09 18:13 FUBAR-BDHR Status new => assigned
2013-01-09 18:13 FUBAR-BDHR Assigned To => FUBAR-BDHR
2013-01-09 18:13 FUBAR-BDHR File Added: field_icon_closeup.patch
2013-01-09 18:13 FUBAR-BDHR Status assigned => code review
2013-01-12 18:28 Goober5000 Changeset attached => fs2open trunk r9499
2013-01-12 18:29 Goober5000 Note Added: 0014642
2013-01-12 18:29 Goober5000 Status code review => resolved
2013-01-12 18:29 Goober5000 Resolution open => fixed
+Issue History