|
25 | 25 | #include "sound_player.h" |
26 | 26 | #include "Inventory.h" |
27 | 27 | #include "object_handler_planner.h" |
| 28 | +#include "object_handler_planner_impl.h" |
28 | 29 | #include "stalker_movement_manager_smart_cover.h" |
29 | 30 | #include "movement_manager_space.h" |
30 | 31 | #include "patrol_path_manager.h" |
@@ -1275,9 +1276,9 @@ static void fill_bones(CAI_Stalker& self, Fmatrix const& transform, IKinematicsA |
1275 | 1276 | for (u16 i = 0; i < MAX_PARTS; ++i) |
1276 | 1277 | { |
1277 | 1278 | #if 0 |
1278 | | - CBlend* const blend = kinematics_animated->LL_PlayCycle(i, animation, 0, 0, 0, 1); |
1279 | | - if (blend) |
1280 | | - blend->timeCurrent = 0.f;//blend->timeTotal - (SAMPLE_SPF + EPS); |
| 1279 | + CBlend* const blend = kinematics_animated->LL_PlayCycle(i, animation, 0, 0, 0, 1); |
| 1280 | + if (blend) |
| 1281 | + blend->timeCurrent = 0.f;//blend->timeTotal - (SAMPLE_SPF + EPS); |
1281 | 1282 | #else // #if 0 |
1282 | 1283 | u32 const blend_count = kinematics_animated->LL_PartBlendsCount(i); |
1283 | 1284 | for (u32 j = 0; j < blend_count; ++j) |
@@ -1392,11 +1393,11 @@ static void draw_animation_bones( |
1392 | 1393 | self.animation().remove_bone_callbacks(); |
1393 | 1394 |
|
1394 | 1395 | #if 0 |
1395 | | - Fmatrix player_head; |
1396 | | - IKinematics* actor_kinematics = smart_cast<IKinematics*>(Actor()->Visual()); |
1397 | | - actor_kinematics->Bone_GetAnimPos (player_head, actor_kinematics->LL_BoneID("bip01_head"), 1, false); |
1398 | | - player_head.mulA_43 (Actor()->XFORM()); |
1399 | | - Fvector target = player_head.c; |
| 1396 | + Fmatrix player_head; |
| 1397 | + IKinematics* actor_kinematics = smart_cast<IKinematics*>(Actor()->Visual()); |
| 1398 | + actor_kinematics->Bone_GetAnimPos (player_head, actor_kinematics->LL_BoneID("bip01_head"), 1, false); |
| 1399 | + player_head.mulA_43 (Actor()->XFORM()); |
| 1400 | + Fvector target = player_head.c; |
1400 | 1401 | #else // #if 0 |
1401 | 1402 | Fvector target = self.sight().aiming_position(); |
1402 | 1403 | #endif // #if 0 |
@@ -1598,18 +1599,18 @@ Fvector g_debug_position_3 = Fvector().set(0.f, 0.f, 0.f); |
1598 | 1599 | void CAI_Stalker::OnRender() |
1599 | 1600 | { |
1600 | 1601 | #if 0 |
1601 | | - IKinematicsAnimated* kinematics = smart_cast<IKinematicsAnimated*>(Visual()); |
1602 | | - VERIFY (kinematics); |
| 1602 | + IKinematicsAnimated* kinematics = smart_cast<IKinematicsAnimated*>(Visual()); |
| 1603 | + VERIFY (kinematics); |
1603 | 1604 | // draw_animation_bones (*this, XFORM(), kinematics, "loophole_2_no_look_idle_0"); |
1604 | 1605 |
|
1605 | | - Fmatrix m_start_transform; |
1606 | | - animation_movement_controller const* controller = animation_movement(); |
1607 | | - if (!controller) |
1608 | | - m_start_transform = XFORM(); |
1609 | | - else |
1610 | | - m_start_transform = controller->start_transform(); |
| 1606 | + Fmatrix m_start_transform; |
| 1607 | + animation_movement_controller const* controller = animation_movement(); |
| 1608 | + if (!controller) |
| 1609 | + m_start_transform = XFORM(); |
| 1610 | + else |
| 1611 | + m_start_transform = controller->start_transform(); |
1611 | 1612 |
|
1612 | | - draw_animation_bones (*this, m_start_transform, kinematics, "loophole_3_attack_idle_0"); |
| 1613 | + draw_animation_bones (*this, m_start_transform, kinematics, "loophole_3_attack_idle_0"); |
1613 | 1614 | // draw_animation_bones (*this, XFORM(), kinematics, "loophole_3_attack_in_0"); |
1614 | 1615 | #else // #if 0 |
1615 | 1616 | if (inventory().ActiveItem()) |
@@ -1643,27 +1644,27 @@ void CAI_Stalker::OnRender() |
1643 | 1644 | } |
1644 | 1645 |
|
1645 | 1646 | #if 0 |
1646 | | - if (inventory().ActiveItem()) { |
1647 | | - Fvector position, direction; |
1648 | | - g_fireParams (0,position,direction); |
| 1647 | + if (inventory().ActiveItem()) { |
| 1648 | + Fvector position, direction; |
| 1649 | + g_fireParams (0,position,direction); |
1649 | 1650 |
|
1650 | | - float yaw, pitch, safety_fire_angle = 1.f*PI_DIV_8*.125f; |
1651 | | - direction.getHP (yaw,pitch); |
| 1651 | + float yaw, pitch, safety_fire_angle = 1.f*PI_DIV_8*.125f; |
| 1652 | + direction.getHP (yaw,pitch); |
1652 | 1653 |
|
1653 | | - Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), color_xrgb(0,255,0)); |
| 1654 | + Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), color_xrgb(0,255,0)); |
1654 | 1655 |
|
1655 | | - direction.setHP (yaw - safety_fire_angle,pitch); |
1656 | | - Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), color_xrgb(0,255,0)); |
| 1656 | + direction.setHP (yaw - safety_fire_angle,pitch); |
| 1657 | + Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), color_xrgb(0,255,0)); |
1657 | 1658 |
|
1658 | | - direction.setHP (yaw + safety_fire_angle,pitch); |
1659 | | - Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), color_xrgb(0,255,0)); |
| 1659 | + direction.setHP (yaw + safety_fire_angle,pitch); |
| 1660 | + Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), color_xrgb(0,255,0)); |
1660 | 1661 |
|
1661 | | - direction.setHP (yaw,pitch - safety_fire_angle); |
1662 | | - Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), color_xrgb(0,255,0)); |
| 1662 | + direction.setHP (yaw,pitch - safety_fire_angle); |
| 1663 | + Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), color_xrgb(0,255,0)); |
1663 | 1664 |
|
1664 | | - direction.setHP (yaw,pitch + safety_fire_angle); |
1665 | | - Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), color_xrgb(0,255,0)); |
1666 | | - } |
| 1665 | + direction.setHP (yaw,pitch + safety_fire_angle); |
| 1666 | + Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), color_xrgb(0,255,0)); |
| 1667 | + } |
1667 | 1668 | #endif // #if 0 |
1668 | 1669 |
|
1669 | 1670 | inherited::OnRender(); |
|
0 commit comments