summaryrefslogtreecommitdiff
path: root/src/engine/editor/EditorMath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/editor/EditorMath.cpp')
-rw-r--r--src/engine/editor/EditorMath.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/engine/editor/EditorMath.cpp b/src/engine/editor/EditorMath.cpp
index 93d826ace..620aa2b48 100644
--- a/src/engine/editor/EditorMath.cpp
+++ b/src/engine/editor/EditorMath.cpp
@@ -42,7 +42,7 @@ bool IsInGameScreen() {
FVector ScreenRayTrace() {
auto wnd = GameEngine::Instance->context->GetWindow();
- Camera* camera = gEditor.eCamera;
+ Camera* camera = gScreenOneCtx->camera;
Ship::Coords mouse = wnd->GetMousePos();
auto gfx_current_game_window_viewport = GetInterpreter()->mGameWindowViewport;
@@ -62,7 +62,7 @@ FVector ScreenRayTrace() {
Mat4 perspMtx;
u16 perspNorm;
- guPerspectiveF(perspMtx, &perspNorm, gCameraFOV[0], OTRGetAspectRatio(), CM_GetProps()->NearPersp, CM_GetProps()->FarPersp, 1.0f);
+ guPerspectiveF(perspMtx, &perspNorm, 40, OTRGetAspectRatio(), CM_GetProps()->NearPersp, CM_GetProps()->FarPersp, 1.0f);
Mat4 inversePerspMtx;
if (InverseMatrix((float*)&perspMtx, (float*)&inversePerspMtx) != 2) {
@@ -412,7 +412,7 @@ void SetRotatorFromDirection(FVector direction, IRotator* rot) {
}
FVector GetPositionAheadOfCamera(f32 dist) {
- Camera* camera = gEditor.eCamera;
+ Camera* camera = gScreenOneCtx->camera;
FVector pos = FVector(camera->pos[0], camera->pos[1], camera->pos[2]);
f32 pitch = (camera->rot[2] / 65535.0f) * 360.0f;