/** * @brief Adds heat to an outfit slot over a period of time. * * @param p Pilot whose slot it is. * @param o The slot in question. * @param dt Delta tick. */ void pilot_heatAddSlotTime( Pilot *p, PilotOutfitSlot *o, double dt ) { (void) p; double hmod; /* @todo Handle beam modifiers for ships here. */ hmod = 1.; o->heat_T += (hmod * outfit_heat(o->outfit) / o->heat_C) * dt; /* Enforce a minimum value as a safety measure. */ o->heat_T = MAX( o->heat_T, CONST_SPACE_STAR_TEMP ); }
/** * @brief Adds heat to an outfit slot. * * @param o Outfit to heat. * @param energy Energy received by outfit (in MJ). */ void pilot_heatAddSlot( Pilot *p, PilotOutfitSlot *o ) { double hmod; /* We consider that only 1% of the energy is lost in the form of heat, * this keeps numbers sane. */ if (o->outfit->type == OUTFIT_TYPE_BOLT) hmod = p->stats.heat_forward; else if (o->outfit->type == OUTFIT_TYPE_TURRET_BOLT) hmod = p->stats.heat_turret; else hmod = 1.; o->heat_T += hmod * outfit_heat(o->outfit) / o->heat_C; }
/** * @brief Adds heat to an outfit slot. * * @param p Pilot whose slot it is. * @param o The slot in question. */ void pilot_heatAddSlot( Pilot *p, PilotOutfitSlot *o ) { double hmod; /* We consider that only 1% of the energy is lost in the form of heat, * this keeps numbers sane. */ if (o->outfit->type == OUTFIT_TYPE_BOLT) hmod = p->stats.fwd_heat; else if (o->outfit->type == OUTFIT_TYPE_TURRET_BOLT) hmod = p->stats.tur_heat; else hmod = 1.; o->heat_T += hmod * outfit_heat(o->outfit) / o->heat_C; /* Enforce a minimum value as a safety measure. */ o->heat_T = MAX( o->heat_T, CONST_SPACE_STAR_TEMP ); }