Adjust heating up from energy damage / cool-down
- NPCs now get heating from energy attacks too - heating is reduced significantly for ships larger than Cobra - cooling rate to space is reduced quite a bit - NPC hullHeatLevel uniform now clamped to 0..1 (fixes shader whiteout) Mostly cosmetic in normal space, but makes fighting near a star more dangerous. Cooling rate and NPC heating may need a bit of fine-tuning.
This commit is contained in:
parent
eb54db04c6
commit
0471fee208
@ -3931,13 +3931,6 @@ static GLfloat sBaseMass = 0.0;
|
||||
}
|
||||
|
||||
|
||||
- (GLfloat) hullHeatLevel
|
||||
{
|
||||
GLfloat result = (GLfloat)ship_temperature / (GLfloat)SHIP_MAX_CABIN_TEMP;
|
||||
return OOClamp_0_1_f(result);
|
||||
}
|
||||
|
||||
|
||||
- (GLfloat) laserHeatLevel
|
||||
{
|
||||
GLfloat result = (GLfloat)weapon_temp / (GLfloat)PLAYER_MAX_WEAPON_TEMP;
|
||||
@ -5466,7 +5459,7 @@ static GLfloat sBaseMass = 0.0;
|
||||
internal_damage = ((ranrot_rand() & PLAYER_INTERNAL_DAMAGE_FACTOR) < amount); // base chance of damage to systems
|
||||
energy -= amount;
|
||||
[self playDirectHit:relative];
|
||||
ship_temperature += (amount / [self heatInsulation]);
|
||||
ship_temperature += (amount * SHIP_ENERGY_DAMAGE_TO_HEAT_FACTOR / [self heatInsulation]);
|
||||
}
|
||||
[self noteTakingDamage:amount from:other type:damageType];
|
||||
if (cascading) energy = 0.0; // explicitly set energy to zero when cascading, in case an oxp raised the energy in noteTakingDamage.
|
||||
|
@ -58,7 +58,10 @@
|
||||
#define COMBAT_WEAPON_RANGE_FACTOR 1.200f
|
||||
#define COMBAT_JINK_OFFSET 500.0f
|
||||
|
||||
#define SHIP_COOLING_FACTOR 1.0f
|
||||
#define SHIP_COOLING_FACTOR 0.1f
|
||||
// heat taken from energy damage depends on mass
|
||||
// but limit heating at maximum to the rate of a Cobra III
|
||||
#define SHIP_ENERGY_DAMAGE_TO_HEAT_FACTOR (mass > 215000 ? 215000 / mass : 1.0)
|
||||
#define SHIP_INSULATION_FACTOR 0.00175f
|
||||
#define SHIP_MAX_CABIN_TEMP 256.0f
|
||||
#define SHIP_MIN_CABIN_TEMP 60.0f
|
||||
|
@ -8929,7 +8929,8 @@ Vector positionOffsetForShipInRotationToAlignment(ShipEntity* ship, Quaternion q
|
||||
|
||||
- (GLfloat)hullHeatLevel
|
||||
{
|
||||
return ship_temperature / (GLfloat)SHIP_MAX_CABIN_TEMP;
|
||||
GLfloat result = (GLfloat)ship_temperature / (GLfloat)SHIP_MAX_CABIN_TEMP;
|
||||
return OOClamp_0_1_f(result);
|
||||
}
|
||||
|
||||
|
||||
@ -12186,6 +12187,8 @@ Vector positionOffsetForShipInRotationToAlignment(ShipEntity* ship, Quaternion q
|
||||
}
|
||||
|
||||
energy -= amount;
|
||||
ship_temperature += amount * SHIP_ENERGY_DAMAGE_TO_HEAT_FACTOR / [self heatInsulation];
|
||||
|
||||
being_mined = NO;
|
||||
ShipEntity *hunter = nil;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user