mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-07-01 05:43:33 +00:00
Fix CFlameWarp
Former-commit-id: 472e1538ab02a046bd39f7a2b3596737cb262db6
This commit is contained in:
parent
0d83ac87ee
commit
294f5eff70
@ -90,12 +90,12 @@ void CFlameWarp::ModifyParticles(int particleCount, int stripe, int*, CVector3f*
|
|||||||
CMaterialList(kMT_ProjectilePassthrough)));
|
CMaterialList(kMT_ProjectilePassthrough)));
|
||||||
|
|
||||||
if (result.IsValid()) {
|
if (result.IsValid()) {
|
||||||
const float dist = result.GetPlane().PointToPlaneDist(partPos);
|
const float dist = result.GetPlane().GetHeight(partPos);
|
||||||
if (dist <= 0.f) {
|
if (dist <= 0.f) {
|
||||||
partPos -= dist * result.GetPlane().GetNormal();
|
partPos -= dist * result.GetPlane().GetNormal();
|
||||||
if (CVector3f::Dot(result.GetPlane().GetNormal(), partVel) < 0.f) {
|
if (CVector3f::Dot(result.GetPlane().GetNormal(), partVel) < 0.f) {
|
||||||
const CVector3f prevStepPos = partPos - partVel;
|
const CVector3f prevStepPos = partPos - partVel;
|
||||||
partPos += (-result.GetPlane().PointToPlaneDist(prevStepPos) /
|
partPos += (-result.GetPlane().GetHeight(prevStepPos) /
|
||||||
CVector3f::Dot(partVel, result.GetPlane().GetNormal()) -
|
CVector3f::Dot(partVel, result.GetPlane().GetNormal()) -
|
||||||
1.f) *
|
1.f) *
|
||||||
partVel;
|
partVel;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user