Skip to content

Commit

Permalink
More correct way of turning the camera in the direction of view when …
Browse files Browse the repository at this point in the history
…exiting demo_record

This reverts commit e5db3fa.
Reverts, because ForceTransform should only transform the entity position, not direction.
  • Loading branch information
Xottab-DUTY committed Nov 2, 2019
1 parent fdd46f3 commit 17ab70e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 7 additions & 2 deletions src/xrEngine/FDemoRecord.cpp
Expand Up @@ -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;
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/xrGame/Actor.cpp
Expand Up @@ -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())
Expand Down

0 comments on commit 17ab70e

Please sign in to comment.