mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Squashed commit of the following:
commit a7dcba12ce
Author: Lwmte <3331699+Lwmte@users.noreply.github.com>
Date: Sun Apr 21 19:39:05 2024 +0200
Fix directional flame emitters
This commit is contained in:
parent
cb3cd84f6d
commit
612e7de243
1 changed files with 9 additions and 6 deletions
|
@ -939,14 +939,17 @@ void TriggerSuperJetFlame(ItemInfo* item, int yvel, int deadly)
|
|||
|
||||
float xAngle = item->Pose.Orientation.x;
|
||||
float yAngle = item->Pose.Orientation.y;
|
||||
|
||||
Vector3 dir;
|
||||
dir.x = phd_cos(xAngle) * phd_sin(yAngle);
|
||||
dir.y = phd_sin(xAngle);
|
||||
dir.z = phd_cos(xAngle) * phd_cos(yAngle);
|
||||
|
||||
float xDir = phd_cos(yAngle) * phd_cos(xAngle);
|
||||
float zDir = phd_sin(yAngle) * phd_cos(xAngle);
|
||||
float yDir = phd_sin(xAngle);
|
||||
dir.Normalize();
|
||||
|
||||
sptr->xVel += xDir * (size - (size >> 2));
|
||||
sptr->yVel += yDir * (size - (size >> 2));
|
||||
sptr->zVel += zDir * (size - (size >> 2));
|
||||
sptr->xVel += dir.x * (size - (size >> 2));
|
||||
sptr->yVel -= dir.y * (size - (size >> 2));
|
||||
sptr->zVel += dir.z * (size - (size >> 2));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue