/** * Set actor hidden status to true. * For a moving actor, actually hide it. * @param ano Actor Id */ void HideActor(CORO_PARAM, int ano) { PMOVER pMover; assert((ano > 0 && ano <= NumActors) || ano == LEAD_ACTOR); // illegal actor CORO_BEGIN_CONTEXT; CORO_END_CONTEXT(_ctx); CORO_BEGIN_CODE(_ctx); if (TinselV2) { actorInfo[ano - 1].bHidden = true; // Send event to tagged actors // (this is duplicated in HideMover()) if (IsTaggedActor(ano)) { CORO_INVOKE_ARGS(ActorEvent, (CORO_SUBCTX, ano, HIDEEVENT, true, 0)); // It may be pointed to SetActorPointedTo(ano, false); SetActorTagWanted(ano, false, false, 0); } } // Get moving actor involved pMover = GetMover(ano); if (pMover) HideMover(pMover, 0); else if (!TinselV2) actorInfo[ano - 1].bHidden = true; CORO_END_CODE; }
/** * If the actor's object exists, move it behind the background. * MultiHideObject() is deliberately not used, as StepAnimScript() calls * cause the object to re-appear. */ void HideMover(PMOVER pMover, int sf) { assert(pMover); // Hiding null moving actor pMover->bHidden = true; if (!TinselV2) { // sf is only passed in Tinsel v1 pMover->SlowFactor = sf; } else { // Tinsel 2 specific code if (IsTaggedActor(pMover->actorID)) { // It may be pointed to SetActorPointedTo(pMover->actorID, false); SetActorTagWanted(pMover->actorID, false, false, 0); } } if (pMover->actorObj) MultiSetZPosition(pMover->actorObj, -1); }