Skip to content

Instantly share code, notes, and snippets.

@Starwaster
Last active May 15, 2017 16:36
Show Gist options
  • Save Starwaster/02cc88fdf2baf685a027bdf1ef301119 to your computer and use it in GitHub Desktop.
Save Starwaster/02cc88fdf2baf685a027bdf1ef301119 to your computer and use it in GitHub Desktop.
Coming soon to Deadly Reentry: Hull burn through can let outside environment into the ship! Ohnoes!
// Now: If a hole got burned in our hull... start letting the fire in!
if (part.machNumber >= 1)
{
float damage = damageCube.GetCubeDamageFacing(part.partTransform.InverseTransformDirection(-this.vessel.upAxis));
if (damage > 0f)
{
double convectiveFluxLeak = part.thermalConvectionFlux * (double)damage;
part.AddThermalFlux(convectiveFluxLeak);
}
}
else
{
float damage = damageCube.averageDamage;
if (damage > 0f)
{
double convectiveFluxLeak = part.thermalConvectionFlux * (double)damage;
part.AddThermalFlux(convectiveFluxLeak); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment