mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Fix zipline not following correct trajectory
This commit is contained in:
parent
1f4d9a042d
commit
1ecf28e691
2 changed files with 4 additions and 2 deletions
|
@ -6,6 +6,7 @@ Version 1.1.1
|
|||
* Fix projectiles flying through animating objects.
|
||||
* Fix harpoon gun doing enormous damage on enemies.
|
||||
* Fix train death animation.
|
||||
* Fix zipline not following correct trajectory.
|
||||
* Fix TR1 wolf damage value inflicted on a close bite attack.
|
||||
* Fix TR1 bear various original AI issues.
|
||||
* Fix TR2 knife thrower AI.
|
||||
|
|
|
@ -87,7 +87,6 @@ namespace TEN::Traps::TR5
|
|||
{
|
||||
constexpr auto VEL_ACCEL = 5.0f;
|
||||
constexpr auto VEL_MAX = 100.0f;
|
||||
constexpr auto SLOPE_ANGLE = -ANGLE(11.25f);
|
||||
|
||||
auto& zipLineItem = g_Level.Items[itemNumber];
|
||||
auto& laraItem = *LaraItem;
|
||||
|
@ -124,8 +123,10 @@ namespace TEN::Traps::TR5
|
|||
zipLineItem.Animation.Velocity.y += VEL_ACCEL;
|
||||
|
||||
// Translate.
|
||||
auto headingOrient = EulerAngles(SLOPE_ANGLE, zipLineItem.Pose.Orientation.y, 0);
|
||||
// TODO: Use proper calculation of the trajectory instead of bitwise operation.
|
||||
auto headingOrient = EulerAngles(0, zipLineItem.Pose.Orientation.y, 0);
|
||||
TranslateItem(&zipLineItem, headingOrient, zipLineItem.Animation.Velocity.y);
|
||||
zipLineItem.Pose.Position.y += ((int)zipLineItem.Animation.Velocity.y >> 2);
|
||||
|
||||
int vPos = zipLineItem.Pose.Position.y + CLICK(0.25f);
|
||||
auto pointColl = GetCollision(&zipLineItem, zipLineItem.Pose.Orientation.y, zipLineItem.Animation.Velocity.y);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue