View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002884 | FSSCP | models | public | 2013-06-03 13:58 | 2013-07-09 05:16 |
Reporter | MjnMixael | Assigned To | m_m | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | PC | OS | Windows | OS Version | Win7 |
Product Version | 3.7.0 RC2 | ||||
Summary | 0002884: Team colors not displayed on player ship. | ||||
Description | If the player selects a ship that has Team Colors enabled in the ships.tbl, the team colors will not be displayed in-mission when externally viewing the player ship. They do display in the tech room, lab, ship select, and on AI-controlled ships. | ||||
Steps To Reproduce | Use the attached mod and play this Team Colors Test mission. Select the Loki as your ship (note in the ship select that it has green all over it). Start the mission and externally view your fighter. No Team Colors. | ||||
Tags | No tags attached. | ||||
|
|
|
The cause of this bug is that the team name of a ship wasn't updated when the ship type was changed. The attached patch fixes that but may introduce some new behavior. |
|
mantis2884.patch (1,414 bytes)
Index: code/ship/ship.cpp =================================================================== --- code/ship/ship.cpp (revision 9697) +++ code/ship/ship.cpp (working copy) @@ -9342,6 +9342,11 @@ } } } + + if (sip->uses_team_colors) + { + sp->team_name = sip->default_team_name; + } } #ifndef NDEBUG @@ -15218,12 +15223,12 @@ weapon_info *wip; int bank=swp->current_secondary_bank; if (swp->secondary_bank_weapons[bank] >= 0) { - wip = &Weapon_info[swp->secondary_bank_weapons[bank]]; - if ( swp->secondary_bank_ammo[bank] > 0 ) { - srange = wip->max_speed * wip->lifetime; - } + wip = &Weapon_info[swp->secondary_bank_weapons[bank]]; + if ( swp->secondary_bank_ammo[bank] > 0 ) { + srange = wip->max_speed * wip->lifetime; } } + } return srange; } @@ -15252,15 +15257,15 @@ int get_max_ammo_count_for_bank(int ship_class, int bank, int ammo_type) { float capacity, size; - + if (ship_class < 0 || bank < 0 || ammo_type < 0) { return 0; } else { - capacity = (float) Ship_info[ship_class].secondary_bank_ammo_capacity[bank]; - size = (float) Weapon_info[ammo_type].cargo_size; - return (int) (capacity / size); - } + capacity = (float) Ship_info[ship_class].secondary_bank_ammo_capacity[bank]; + size = (float) Weapon_info[ammo_type].cargo_size; + return (int) (capacity / size); } +} /** * Page in bitmaps for all the ships in this level |
|
This seems to fix the issue. |
|
Looks good to me |
|
Fix committed to trunk@9720. |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-06-03 13:58 | MjnMixael | New Issue | |
2013-06-03 14:01 | MjnMixael | File Added: 00 Mantis Sandbox.7z | |
2013-06-22 20:55 | m_m | Note Added: 0015140 | |
2013-06-22 20:55 | m_m | Assigned To | => m_m |
2013-06-22 20:55 | m_m | Status | new => code review |
2013-06-22 20:55 | m_m | File Added: mantis2884.patch | |
2013-06-22 20:56 | m_m | Note Edited: 0015140 | |
2013-07-07 20:04 | MjnMixael | Note Added: 0015168 | |
2013-07-08 17:14 | The_E | Note Added: 0015177 | |
2013-07-09 05:16 | m_m | Changeset attached | => fs2open trunk r9720 |
2013-07-09 05:16 | m_m | Note Added: 0015179 | |
2013-07-09 05:16 | m_m | Status | code review => resolved |
2013-07-09 05:16 | m_m | Resolution | open => fixed |