diff --git a/src/xrEngine/FDemoRecord.cpp b/src/xrEngine/FDemoRecord.cpp index 804422bb43a..00532f7e6a3 100644 --- a/src/xrEngine/FDemoRecord.cpp +++ b/src/xrEngine/FDemoRecord.cpp @@ -426,9 +426,14 @@ void CDemoRecord::IR_OnKeyboardPress(int dik) #ifndef MASTER_GOLD if (dik == SDL_SCANCODE_RETURN) { - if (g_pGameLevel->CurrentEntity()) + IGameObject* entity = g_pGameLevel->CurrentEntity(); + if (entity) { - g_pGameLevel->CurrentEntity()->ForceTransform(m_Camera); + Fvector xyz; + m_Camera.getHPB(xyz); + + entity->ForceTransform(m_Camera); + entity->cam_Active()->Set(-xyz.x, -xyz.y, -xyz.z); fLifeTime = -1; } } diff --git a/src/xrGame/Actor.cpp b/src/xrGame/Actor.cpp index 8a6b8402102..37569222181 100644 --- a/src/xrGame/Actor.cpp +++ b/src/xrGame/Actor.cpp @@ -1599,9 +1599,6 @@ void CActor::ForceTransform(const Fmatrix& m) // character_physics_support()->set_movement_position( m.c ); // character_physics_support()->movement()->SetVelocity( 0, 0, 0 ); - Fvector xyz; - m.getHPB(xyz); - cam_Active()->Set(-xyz.x, -xyz.y, -xyz.z); character_physics_support()->ForceTransform(m); const float block_damage_time_seconds = 2.f; if (!IsGameTypeSingle())