|
|
@ -706,6 +706,10 @@ void AiL::UpdateCamera(float fElapsedTime){ |
|
|
|
worldShake=player->GetPos()+worldShakeVel; |
|
|
|
worldShake=player->GetPos()+worldShakeVel; |
|
|
|
} |
|
|
|
} |
|
|
|
camera.Update(fElapsedTime); |
|
|
|
camera.Update(fElapsedTime); |
|
|
|
|
|
|
|
if(view.GetZoom().x!=targetZoom){ |
|
|
|
|
|
|
|
if(view.GetZoom().x<targetZoom)view.SetZoom(std::min(view.GetZoom().x+zoomAdjustSpeed*fElapsedTime,targetZoom),camera.GetTarget()); |
|
|
|
|
|
|
|
else view.SetZoom(std::max(view.GetZoom().x-zoomAdjustSpeed*fElapsedTime,targetZoom),camera.GetTarget()); |
|
|
|
|
|
|
|
} |
|
|
|
view.SetWorldOffset(camera.GetViewPosition()); |
|
|
|
view.SetWorldOffset(camera.GetViewPosition()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2354,7 +2358,8 @@ void AiL::_PrepareLevel(MapName map,MusicChange changeMusic){ |
|
|
|
Audio::muted=true; |
|
|
|
Audio::muted=true; |
|
|
|
Audio::UpdateBGMVolume(); |
|
|
|
Audio::UpdateBGMVolume(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
game->view.SetZoom(1.f,game->view.WorldToScreen(game->camera.GetViewPosition())); |
|
|
|
targetZoom=1.f; |
|
|
|
|
|
|
|
game->view.SetZoom(1.2f,game->view.WorldToScreen(game->camera.GetViewPosition())); |
|
|
|
worldColor=WHITE; |
|
|
|
worldColor=WHITE; |
|
|
|
worldColorFunc=[&](vi2d pos){return game->worldColor;}; |
|
|
|
worldColorFunc=[&](vi2d pos){return game->worldColor;}; |
|
|
|
levelTime=0; |
|
|
|
levelTime=0; |
|
|
@ -2371,7 +2376,6 @@ void AiL::_PrepareLevel(MapName map,MusicChange changeMusic){ |
|
|
|
Inventory::ResetLoadoutItemsUsed(); |
|
|
|
Inventory::ResetLoadoutItemsUsed(); |
|
|
|
Input::StopVibration(); |
|
|
|
Input::StopVibration(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Input::SetLightbar({255,0,255}); |
|
|
|
Input::SetLightbar({255,0,255}); |
|
|
|
GetPlayer()->hp=GetPlayer()->GetMaxHealth(); |
|
|
|
GetPlayer()->hp=GetPlayer()->GetMaxHealth(); |
|
|
|
GetPlayer()->mana=GetPlayer()->GetMaxMana(); |
|
|
|
GetPlayer()->mana=GetPlayer()->GetMaxMana(); |
|
|
|