Handles the healing effects
| 5679 | |
| 5680 | // Handles the healing effects |
| 5681 | void AlienBoss::UpdateDamageEffect(int me) { |
| 5682 | // See if it's time to create the next energy effect |
| 5683 | if (memory->next_damage_effect_time <= Game_GetTime()) { |
| 5684 | memory->next_damage_effect_time = Game_GetTime() + AB_DAMAGE_EFFECT_INTERVAL; |
| 5685 | |
| 5686 | float curr_damage; |
| 5687 | curr_damage = memory->damage; |
| 5688 | if (curr_damage > memory->damage_threshold) |
| 5689 | curr_damage = memory->damage_threshold; |
| 5690 | |
| 5691 | if (curr_damage > 0.0f && memory->damage_threshold != 0.0f) { |
| 5692 | float spark_rate; |
| 5693 | |
| 5694 | spark_rate = (curr_damage / memory->damage_threshold) * AB_MAX_DAMAGE_SPARK_RATE; |
| 5695 | aObjSpark(me, spark_rate, AB_DAMAGE_EFFECT_INTERVAL); |
| 5696 | } |
| 5697 | |
| 5698 | // do the following for debugging purposes |
| 5699 | // Obj_Create(OBJ_WEAPON, teleport_effect_id, memory->dest_room, &memory->dest_pos, NULL, me); |
| 5700 | } |
| 5701 | } |
| 5702 | |
| 5703 | // Start healing fog protection |
| 5704 | void AlienBoss::StartHealing(int me) { |
nothing calls this directly
no test coverage detected