Skip to content

Commit 68b5a99

Browse files
Merge pull request #165 from xr-lucy/lucy_stuff
Some fixes (cherry picked from commit a54028c)
1 parent 79992b4 commit 68b5a99

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

src/xrEngine/FDemoRecord.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,11 @@ void CDemoRecord::IR_OnMouseRelease(int btn)
505505
IR_OnKeyboardRelease(mouse_button_2_key[btn]);
506506
}
507507

508+
void CDemoRecord::IR_OnMouseWheel(int direction)
509+
{
510+
if (m_b_redirect_input_to_level) g_pGameLevel->IR_OnMouseWheel(direction);
511+
}
512+
508513
void CDemoRecord::IR_OnKeyboardPress(int dik)
509514
{
510515
if (isInputBlocked) {

src/xrEngine/FDemoRecord.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ class ENGINE_API CDemoRecord :
7878
virtual void IR_OnMouseHold(int btn);
7979
virtual void IR_OnMousePress(int btn);
8080
virtual void IR_OnMouseRelease(int btn);
81+
virtual void IR_OnMouseWheel(int direction);
8182
void StopDemo();
8283
void EnableReturnCtrlInputs();
8384
void SetCameraBoundary(float boundary);

src/xrGame/CharacterPhysicsSupport.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,9 +1294,15 @@ void CCharacterPhysicsSupport::in_ChangeVisual()
12941294

12951295
if (m_pPhysicsShell)
12961296
{
1297+
if (!m_EntityAlife.renderable.visual)
1298+
m_pPhysicsShell->set_Kinematics(nullptr);
1299+
12971300
VERIFY(m_eType!=etStalker);
12981301
if (m_physics_skeleton)
12991302
{
1303+
if (!m_EntityAlife.renderable.visual)
1304+
m_physics_skeleton->set_Kinematics(nullptr);
1305+
13001306
m_EntityAlife.processing_deactivate();
13011307
m_physics_skeleton->Deactivate();
13021308
xr_delete(m_physics_skeleton);

src/xrGame/PhysicsShellHolder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void CPhysicsShellHolder::net_Destroy()
8282
char_support->destroy_imotion();
8383
inherited::net_Destroy();
8484
b_sheduled = false;
85-
85+
if (!renderable.visual && m_pPhysicsShell) m_pPhysicsShell->set_Kinematics(nullptr);
8686
deactivate_physics_shell();
8787
xr_delete(m_pPhysicsShell);
8888
}

0 commit comments

Comments
 (0)