2019-12-10 11:10 EST


View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0002480FSSCPmodelspublic2012-01-23 14:55
ReporterMjnMixael 
Assigned Toniffiwan 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version3.6.13 
Target VersionFixed in Version3.6.14 
Summary0002480: Secondary bay animation not played.
DescriptionNoticed 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.
TagsNo tags attached.
Attached Files
  • 7z file icon TEST.7z (973,507 bytes) 2012-01-15 16:07
  • patch file icon mantis-0002480.patch (2,004 bytes) 2012-01-17 07:21 -
    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) {
    
    patch file icon mantis-0002480.patch (2,004 bytes) 2012-01-17 07:21 +

-Relationships
+Relationships

-Notes

~0013060

MjnMixael (manager)

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.

~0013073

niffiwan (developer)

MjnMixael - could you please test the attached patch? Let me know if you'd prefer a Windows binary.

~0013074

MjnMixael (manager)

Works as expected! Thanks!

~0013076

niffiwan (developer)

Fix committed to trunk@8260.

~0013118

chief1983 (administrator)

Fix committed to fs2_open_3_6_14@8332.
+Notes

+Related Changesets

-Issue History
Date Modified Username Field Change
2011-08-05 00:45 MjnMixael New Issue
2012-01-15 16:07 MjnMixael File Added: TEST.7z
2012-01-15 16:09 MjnMixael Note Added: 0013060
2012-01-17 07:21 niffiwan Assigned To => niffiwan
2012-01-17 07:21 niffiwan Status new => assigned
2012-01-17 07:21 niffiwan File Added: mantis-0002480.patch
2012-01-17 07:26 niffiwan Note Added: 0013073
2012-01-17 07:26 niffiwan Status assigned => feedback
2012-01-17 10:40 MjnMixael Note Added: 0013074
2012-01-17 10:40 MjnMixael Status feedback => assigned
2012-01-18 05:09 niffiwan Changeset attached => fs2open trunk r8260
2012-01-18 05:09 niffiwan Note Added: 0013076
2012-01-18 05:09 niffiwan Status assigned => resolved
2012-01-18 05:09 niffiwan Resolution open => fixed
2012-01-22 23:52 chief1983 Changeset attached => fs2open fs2_open_3_6_14 r8332
2012-01-22 23:52 chief1983 Note Added: 0013118
2012-01-22 23:52 chief1983 Assigned To niffiwan => chief1983
2012-01-23 14:55 chief1983 Assigned To chief1983 => niffiwan
2012-01-23 14:55 chief1983 Status resolved => assigned
2012-01-23 14:55 chief1983 Status assigned => resolved
2012-01-23 14:55 chief1983 Fixed in Version => 3.6.14
+Issue History