Changeset 24940

Timestamp:
Feb 27, 2021, 10:01:20 AM (3 years ago)
Author:
Imarok
Message:

The SetCameraTarget script function should not change the orientation

Reviewed by: Freagarach
Differential Revision: https://code.wildfiregames.com/D3569

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/source/graphics/scripting/JSInterface_GameView.cpp

    r24187 r24940  
    104104void JSI_GameView::SetCameraTarget(ScriptInterface::CmptPrivate* UNUSED(pCmptPrivate), float x, float y, float z)
    105105{
    106     g_Game->GetView()->ResetCameraTarget(CVector3D(x, y, z));
     106    if (!g_Game || !g_Game->GetView())
     107        return;
     108    g_Game->GetView()->MoveCameraTarget(CVector3D(x, y, z));
    107109}
    108110
Note: See TracChangeset for help on using the changeset viewer.