|
|
@ -567,6 +567,13 @@ void AiL::UpdateCamera(float fElapsedTime){ |
|
|
|
worldShakeTime-=fElapsedTime; |
|
|
|
worldShakeTime-=fElapsedTime; |
|
|
|
if(worldShakeTime<=0){ |
|
|
|
if(worldShakeTime<=0){ |
|
|
|
camera.SetTarget(player->GetPos()); |
|
|
|
camera.SetTarget(player->GetPos()); |
|
|
|
|
|
|
|
#pragma region Gamepad Stop Vibration |
|
|
|
|
|
|
|
for(GamePad*gamepad:GamePad::getGamepads()){ |
|
|
|
|
|
|
|
if(gamepad->stillConnected){ |
|
|
|
|
|
|
|
gamepad->stopVibration(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#pragma endregion |
|
|
|
} |
|
|
|
} |
|
|
|
if(lastWorldShakeAdjust==0){ |
|
|
|
if(lastWorldShakeAdjust==0){ |
|
|
|
lastWorldShakeAdjust=0.02f; |
|
|
|
lastWorldShakeAdjust=0.02f; |
|
|
@ -1553,6 +1560,13 @@ void AiL::SetupWorldShake(float duration){ |
|
|
|
worldShakeTime=duration; |
|
|
|
worldShakeTime=duration; |
|
|
|
worldShake=vf2d{player->GetPos()}; |
|
|
|
worldShake=vf2d{player->GetPos()}; |
|
|
|
camera.SetTarget(worldShake); |
|
|
|
camera.SetTarget(worldShake); |
|
|
|
|
|
|
|
#pragma region Controller Vibration |
|
|
|
|
|
|
|
for(GamePad*gamepad:GamePad::getGamepads()){ |
|
|
|
|
|
|
|
if(gamepad->stillConnected){ |
|
|
|
|
|
|
|
gamepad->startVibration(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#pragma endregion |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2329,6 +2343,7 @@ void AiL::InitializeDefaultKeybinds(){ |
|
|
|
KEY_CONFIRM.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::FACE_D)}); |
|
|
|
KEY_CONFIRM.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::FACE_D)}); |
|
|
|
KEY_CONFIRM.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::FACE_R)}); |
|
|
|
KEY_CONFIRM.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::FACE_R)}); |
|
|
|
KEY_CONFIRM.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::START)}); |
|
|
|
KEY_CONFIRM.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::START)}); |
|
|
|
|
|
|
|
KEY_CONFIRM.AddKeybind({KEY,SPACE}); |
|
|
|
KEY_CONFIRM.AddKeybind({KEY,ENTER}); |
|
|
|
KEY_CONFIRM.AddKeybind({KEY,ENTER}); |
|
|
|
KEY_MENU.AddKeybind({KEY,ESCAPE}); |
|
|
|
KEY_MENU.AddKeybind({KEY,ESCAPE}); |
|
|
|
KEY_MENU.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::START)}); |
|
|
|
KEY_MENU.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::START)}); |
|
|
|