Issue 188 in starflighttlc: Ship's armor integrity is based on class, not damage %

8 views
Skip to first unread message

starfl...@googlecode.com

unread,
Sep 17, 2010, 2:12:08 PM9/17/10
to starfl...@googlegroups.com
Status: Accepted
Owner: jsharbour
Labels: Type-Defect Priority-High

New issue 188 by jsharbour: Ship's armor integrity is based on class, not
damage %
http://code.google.com/p/starflighttlc/issues/detail?id=188

There's a problem project-wide with the way armor is handled, and probably
shields as well. When you have a class 1 armor, it shows the armor
integrity as 1/6 rather than a % of damage. Meaning, if you have class 6
armor, then you have full 100% armor, but class 1 armor is only like 15%
integrity. This is screwed up.

Every class of armor should have a full range of integrity, 0-100%. How
that class info is displayed in the gui is another matter.

I noticed this first in the docking port where the armor is permanently
damaged, even after repairing it. This needs to be fixed across the entire
game, in every module that deals with armor. Integrity is 0-100 no matter
what the class is. If we want heavier armor to last longer in a battle,
then address it in the encounter module appropriately.


starfl...@googlecode.com

unread,
Oct 10, 2010, 11:13:42 PM10/10/10
to starfl...@googlegroups.com

Comment #1 on issue 188 by syntaxerror.unknown: Ship's armor integrity is

I went through the code and found all percentage calculation for armor:

percentage = g_game->gameState->getShip().getArmorIntegrity() /
g_game->gameState->getShip().getMaxArmorIntegrity();

I replace each one with the following code:

percentage = g_game->gameState->getShip().getArmorIntegrity()/100.0f;

This allowed the total armor remaining percentage to be displayed correctly
in all modules except for ModuleAuxiliaryDisplay.cpp. In this module it was
using a different algorithm because it needed to fit both the armor and
shield integrity onto a 48 pixel tall box. The original algorithm was using
the engine class value to fill the box. So if you had class 1 engines the
box would only fill 1 * 8 pixels. I replaced the original code with this:

int armor = ship.getArmorIntegrity() * 0.48f;

Now the shield and armor display correctly while in the Interplanetary
Travel Module too.

starfl...@googlecode.com

unread,
Oct 10, 2010, 11:22:47 PM10/10/10
to starfl...@googlegroups.com

Comment #2 on issue 188 by syntaxerror.unknown: Ship's armor integrity is

Robert

starfl...@googlecode.com

unread,
Oct 18, 2010, 7:44:35 PM10/18/10
to starfl...@googlegroups.com
Updates:
Status: Fixed

Comment #3 on issue 188 by syntaxerror.unknown: Ship's armor integrity is

Issue fixed in revision: r238

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages