2018-10-20 14:23 EDT


View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0003152FSSCPgraphicspublic2015-03-27 15:03
ReporterDahBlount 
Assigned Toz64555 
PrioritynormalSeveritytrivialReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0003152: Trails render at end of laser bitmap
DescriptionTrails appear to render at the rear edge of all laser bitmaps.
Steps To ReproducePut trails on a laser and view them in a mission.
TagsNo tags attached.
Attached Files
  • patch file icon m3152-git.patch (1,035 bytes) 2015-03-26 19:29 -
     code/weapon/weapons.cpp | 13 +++++++++++--
     1 file changed, 11 insertions(+), 2 deletions(-)
    
    diff --git a/code/weapon/weapons.cpp b/code/weapon/weapons.cpp
    index e91eda5..f431b5e 100644
    --- a/code/weapon/weapons.cpp
    +++ b/code/weapon/weapons.cpp
    @@ -4672,13 +4672,22 @@ void weapon_process_post(object * obj, float frame_time)
     	// trail missiles
     	if ((wip->wi_flags & WIF_TRAIL) && !(wip->wi_flags & WIF_CORKSCREW)) {
     		if ( (wp->trail_ptr != NULL ) && (wp->lssm_stage!=3))	{
    +			vec3d pos;
    +			
    +			if (wip->render_type == WRT_LASER) {
    +				// place tail origin in center of the bolt
    +				vm_vec_scale_add(&pos, &obj->pos, &obj->orient.vec.fvec, (wip->laser_length / 2));
    +			} else {
    +				pos = obj->pos;
    +			}
    +
     			if (trail_stamp_elapsed(wp->trail_ptr)) {
     
    -				trail_add_segment( wp->trail_ptr, &obj->pos );
    +				trail_add_segment( wp->trail_ptr, &pos );
     				
     				trail_set_stamp(wp->trail_ptr);
     			} else {
    -				trail_set_segment( wp->trail_ptr, &obj->pos );
    +				trail_set_segment( wp->trail_ptr, &pos );
     			}
     
     		}
    
    patch file icon m3152-git.patch (1,035 bytes) 2015-03-26 19:29 +

-Relationships
+Relationships

-Notes

~0016576

z64555 (developer)

Attached a patch that moves the $Trail origin to the mathematical center of the laser bolt when the weapon's render type is a laser.

~0016580

z64555 (developer)

Fix committed to trunk@11290.
+Notes

+Related Changesets

-Issue History
Date Modified Username Field Change
2015-03-26 16:38 DahBlount New Issue
2015-03-26 19:29 z64555 File Added: m3152-git.patch
2015-03-26 19:30 z64555 Note Added: 0016576
2015-03-26 19:30 z64555 Assigned To => z64555
2015-03-26 19:30 z64555 Status new => code review
2015-03-27 15:03 z64555 Changeset attached => fs2open trunk r11290
2015-03-27 15:03 z64555 Note Added: 0016580
2015-03-27 15:03 z64555 Status code review => resolved
2015-03-27 15:03 z64555 Resolution open => fixed
+Issue History