MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / UseBinoculars

Method UseBinoculars

TombEngine/Game/gui.cpp:3589–3605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3587 }
3588
3589 void GuiController::UseBinoculars(ItemInfo& item)
3590 {
3591 auto& player = GetLaraInfo(item);
3592
3593 if (((item.Animation.ActiveState == LS_IDLE && item.Animation.AnimNumber == LA_STAND_IDLE) ||
3594 (player.Control.IsLow && !IsHeld(In::Crouch))) &&
3595 !UseSpotCam && !TrackCameraInit)
3596 {
3597 SetScreenFadeIn(OPTICS_FADE_SPEED);
3598 BinocularOldCamera = Camera.oldType;
3599 player.Control.Look.OpticRange = OPTICS_RANGE_DEFAULT;
3600 player.Control.Look.IsUsingBinoculars = true;
3601 player.Inventory.OldBusy = true;
3602 }
3603
3604 InventoryItemChosen = NO_VALUE;
3605 }
3606}

Callers

nothing calls this directly

Calls 2

IsHeldFunction · 0.85
SetScreenFadeInFunction · 0.85

Tested by

no test coverage detected