View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003152 | FSSCP | graphics | public | 2015-03-26 20:38 | 2015-03-27 19:03 |
Reporter | DahBlount | Assigned To | z64555 | ||
Priority | normal | Severity | trivial | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Summary | 0003152: Trails render at end of laser bitmap | ||||
Description | Trails appear to render at the rear edge of all laser bitmaps. | ||||
Steps To Reproduce | Put trails on a laser and view them in a mission. | ||||
Tags | No tags attached. | ||||
|
m3152-git.patch (1,035 bytes)
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 ); } } |
|
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. |
|
Fix committed to trunk@11290. |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-03-26 20:38 | DahBlount | New Issue | |
2015-03-26 23:29 | z64555 | File Added: m3152-git.patch | |
2015-03-26 23:30 | z64555 | Note Added: 0016576 | |
2015-03-26 23:30 | z64555 | Assigned To | => z64555 |
2015-03-26 23:30 | z64555 | Status | new => code review |
2015-03-27 19:03 | z64555 | Changeset attached | => fs2open trunk r11290 |
2015-03-27 19:03 | z64555 | Note Added: 0016580 | |
2015-03-27 19:03 | z64555 | Status | code review => resolved |
2015-03-27 19:03 | z64555 | Resolution | open => fixed |