View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002480 | FSSCP | models | public | 2011-08-05 04:45 | 2012-01-23 19:55 |
Reporter | MjnMixael | Assigned To | niffiwan | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.6.13 | ||||
Fixed in Version | 3.6.14 | ||||
Summary | 0002480: Secondary bay animation not played. | ||||
Description | Noticed this with Peterv's Hesat model. The 'claws' open when you switch to that specific weapon bank. However, if you run out of ammo in bank one the game automatically forces you to switch to bank 2. It is in this instance that the animation doesn't play and the 'claws' don't open. | ||||
Tags | No tags attached. | ||||
|
|
|
This is still broken on latest trunk. Turns out the opposite is true too. If you run out of ammo on the animated bay, when the game auto-switches to a new bay, the claws won't close/animation won't play correctly. I've uploaded a test 'modpack' to be used with MediaVPs 3612 with the Hesat and a test mission. |
|
mantis-0002480.patch (2,004 bytes)
Index: fs2_open/code/ship/ship.cpp =================================================================== --- fs2_open/code/ship/ship.cpp (revision 8256) +++ fs2_open/code/ship/ship.cpp (working copy) @@ -10395,6 +10395,8 @@ int ship_fire_secondary_detonate(object *obj, ship_weapon *swp) /** * Try to switch to a secondary bank that has ammo + * + * @note: not currently used - mark for removal? */ int ship_select_next_valid_secondary_bank(ship_weapon *swp) { @@ -10869,8 +10871,11 @@ done_secondary: //then it would have no firedelay. and then add 250 ms of delay. in effect, this way there is no penalty if there is any firedelay remaning in //the next valid bank. the delay is there to prevent things like Trible/Quad Fire Trebuchets. // - if ( (obj->flags & OF_PLAYER_SHIP) && (swp->secondary_bank_ammo[bank] <= 0) ) { - if ( ship_select_next_valid_secondary_bank(swp) ) { //DTP here we switch to the next valid bank, but we can't call weapon_info on next fire_wait + // niffiwan: only try to switch banks if object has multiple banks + if ( (obj->flags & OF_PLAYER_SHIP) && (swp->secondary_bank_ammo[bank] <= 0) && (swp->num_secondary_banks >= 2) ) { + // niffiwan: call ship_select_next_secondary instead of ship_select_next_valid_secondary_bank + // ensures all "extras" are dealt with, like animations, scripting hooks, etc + if (ship_select_next_secondary(obj) ) { //DTP here we switch to the next valid bank, but we can't call weapon_info on next fire_wait if ( timestamp_elapsed(shipp->weapons.next_secondary_fire_stamp[shipp->weapons.current_secondary_bank]) ) { //DTP, this is simply a copy of the manual cycle functions shipp->weapons.next_secondary_fire_stamp[shipp->weapons.current_secondary_bank] = timestamp(1000); //Bumped from 250 to 1000 because some people seem to be to triggerhappy :). @@ -10881,7 +10886,6 @@ done_secondary: snd_play( &Snds[ship_get_sound(Player_obj, SND_SECONDARY_CYCLE)] ); } } - } if (has_fired) { |
|
MjnMixael - could you please test the attached patch? Let me know if you'd prefer a Windows binary. |
|
Works as expected! Thanks! |
|
Fix committed to trunk@8260. |
|
Fix committed to fs2_open_3_6_14@8332. |
fs2open: trunk r8260 2012-01-18 05:12 Ported: N/A Details Diff |
Fix for mantis 0002480: when emptying secondary banks use the standard function to select the next bank |
Affected Issues 0002480 |
|
mod - /trunk/fs2_open/code/ship/ship.cpp | Diff File | ||
fs2open: fs2_open_3_6_14 r8332 2012-01-22 23:52 Ported: N/A Details Diff |
Backport: Trunk 8260; Fix for mantis 0002480: when emptying secondary banks use the standard function... |
Affected Issues 0002480 |
|
mod - /branches/fs2_open_3_6_14/code/ship/ship.cpp | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-08-05 04:45 | MjnMixael | New Issue | |
2012-01-15 21:07 | MjnMixael | File Added: TEST.7z | |
2012-01-15 21:09 | MjnMixael | Note Added: 0013060 | |
2012-01-17 12:21 | niffiwan | Assigned To | => niffiwan |
2012-01-17 12:21 | niffiwan | Status | new => assigned |
2012-01-17 12:21 | niffiwan | File Added: mantis-0002480.patch | |
2012-01-17 12:26 | niffiwan | Note Added: 0013073 | |
2012-01-17 12:26 | niffiwan | Status | assigned => feedback |
2012-01-17 15:40 | MjnMixael | Note Added: 0013074 | |
2012-01-17 15:40 | MjnMixael | Status | feedback => assigned |
2012-01-18 10:09 | niffiwan | Changeset attached | => fs2open trunk r8260 |
2012-01-18 10:09 | niffiwan | Note Added: 0013076 | |
2012-01-18 10:09 | niffiwan | Status | assigned => resolved |
2012-01-18 10:09 | niffiwan | Resolution | open => fixed |
2012-01-23 04:52 | chief1983 | Changeset attached | => fs2open fs2_open_3_6_14 r8332 |
2012-01-23 04:52 | chief1983 | Note Added: 0013118 | |
2012-01-23 04:52 | chief1983 | Assigned To | niffiwan => chief1983 |
2012-01-23 19:55 | chief1983 | Assigned To | chief1983 => niffiwan |
2012-01-23 19:55 | chief1983 | Status | resolved => assigned |
2012-01-23 19:55 | chief1983 | Status | assigned => resolved |
2012-01-23 19:55 | chief1983 | Fixed in Version | => 3.6.14 |