makes an object visbile
| 600 | |
| 601 | // makes an object visbile |
| 602 | void MakeObjectVisible(object *obj) { |
| 603 | if (obj->effect_info) { |
| 604 | // Play sound maybe. |
| 605 | obj->effect_info->type_flags &= ~EF_CLOAKED; |
| 606 | obj->effect_info->type_flags |= EF_FADING_IN; |
| 607 | obj->effect_info->fade_time = obj->effect_info->fade_max_time; |
| 608 | obj->effect_info->cloak_time = 0; |
| 609 | } |
| 610 | |
| 611 | if (obj->type == OBJ_PLAYER && obj->effect_info && obj->effect_info->type_flags & EF_CLOAK_WITH_MSG) { |
| 612 | static int cloak_sound_off_id = -2; |
| 613 | if (cloak_sound_off_id == -2) |
| 614 | cloak_sound_off_id = FindSoundName("Cloak off"); |
| 615 | |
| 616 | if (cloak_sound_off_id != -1) |
| 617 | Sound_system.Play3dSound(cloak_sound_off_id, SND_PRIORITY_HIGHEST, obj, MAX_GAME_VOLUME / 2); |
| 618 | |
| 619 | if (obj->id == Player_num) { |
| 620 | AddHUDMessage(TXT_MSG_CLOAKOFF); |
| 621 | } |
| 622 | } |
| 623 | } |
| 624 | |
| 625 | // Sets an object to have local lighting info |
| 626 | void ObjSetLocalLighting(object *objp) { |
no test coverage detected