Skip to content

Commit

Permalink
Skip ingame cutscenes on long press of the menu button
Browse files Browse the repository at this point in the history
  • Loading branch information
fholger committed Aug 20, 2023
1 parent c39d8e0 commit e0cf1f6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Sources/CryGame C++/Solution1/CryGame/VRInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,14 @@ void VRInput::ProcessInput()
if (!m_pGame->GetClient())
return;

HandleDoubleBindAction(m_defaultMenu, &CXClient::TriggerMenu, &CXClient::TriggerScoreBoard);
if (m_pGame->IsCutSceneActive())
{
HandleDoubleBindAction(m_defaultMenu, &CXClient::TriggerMenu, &CXClient::StopCutScene);
}
else
{
HandleDoubleBindAction(m_defaultMenu, &CXClient::TriggerMenu, &CXClient::TriggerScoreBoard);
}
if (gVR->vr_snap_turn_amount == 0)
{
HandleAnalogAction(m_moveTurn, 0, &CXClient::TriggerTurnLR);
Expand Down
5 changes: 5 additions & 0 deletions Sources/CryGame C++/Solution1/CryGame/XClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1830,6 +1830,11 @@ void CXClient::TriggerAimToggle(float fValue,XActivationEvent ae)
}
}

void CXClient::StopCutScene(float fValue, XActivationEvent ae)
{
m_pGame->StopCurrentCutscene();
}

//////////////////////////////////////////////////////////////////////
// move mode double click
void CXClient::TriggerMoveMode2(float fValue,XActivationEvent ae)
Expand Down
1 change: 1 addition & 0 deletions Sources/CryGame C++/Solution1/CryGame/XClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ public IEntitySystemSink
void TriggerAimToggle(float fValue, XActivationEvent ae);

void NoOp(float fValue, XActivationEvent ae) {}
void StopCutScene(float fValue, XActivationEvent ae);

BEGIN_INPUTACTIONMAP()
REGISTER_INPUTACTIONMAP(ACTION_MOVE_LEFT, TriggerMoveLeft)
Expand Down

0 comments on commit e0cf1f6

Please sign in to comment.