MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / MakeObjectVisible

Function MakeObjectVisible

Descent3/object_lighting.cpp:602–623  ·  view source on GitHub ↗

makes an object visbile

Source from the content-addressed store, hash-verified

600
601// makes an object visbile
602void 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
626void ObjSetLocalLighting(object *objp) {

Callers 5

ProcessTestKeysFunction · 0.85
msafe_CallFunctionFunction · 0.85
DemoCheatsFunction · 0.85
ObjDoEffectsFunction · 0.85
ThiefStealItemFunction · 0.85

Calls 3

FindSoundNameFunction · 0.85
AddHUDMessageFunction · 0.85
Play3dSoundMethod · 0.80

Tested by

no test coverage detected