|
|
|
@ -706,6 +706,10 @@ void AiL::UpdateCamera(float fElapsedTime){ |
|
|
|
|
worldShake=player->GetPos()+worldShakeVel; |
|
|
|
|
} |
|
|
|
|
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()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2354,7 +2358,8 @@ void AiL::_PrepareLevel(MapName map,MusicChange changeMusic){ |
|
|
|
|
Audio::muted=true; |
|
|
|
|
Audio::UpdateBGMVolume(); |
|
|
|
|
#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; |
|
|
|
|
worldColorFunc=[&](vi2d pos){return game->worldColor;}; |
|
|
|
|
levelTime=0; |
|
|
|
@ -2371,7 +2376,6 @@ void AiL::_PrepareLevel(MapName map,MusicChange changeMusic){ |
|
|
|
|
Inventory::ResetLoadoutItemsUsed(); |
|
|
|
|
Input::StopVibration(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Input::SetLightbar({255,0,255}); |
|
|
|
|
GetPlayer()->hp=GetPlayer()->GetMaxHealth(); |
|
|
|
|
GetPlayer()->mana=GetPlayer()->GetMaxMana(); |
|
|
|
|