Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FXInfo branch port #1171

Draft
wants to merge 13 commits into
base: develop
Choose a base branch
from
Draft

FXInfo branch port #1171

wants to merge 13 commits into from

Conversation

Sezzary
Copy link
Collaborator

@Sezzary Sezzary commented Jul 26, 2023

Ports Raildex's unfinished PR (#342) to the current codebase.

To test:

  • Sophia Leigh projectiles.
  • TR3 Tinnos mutant projectiles.
  • Natla projectiles
  • Saving and loading with effect objects around. Note these are distinct from regular particles.

@Sezzary Sezzary requested a review from Lwmte July 26, 2023 07:05
TombEngine/Game/missile.cpp Outdated Show resolved Hide resolved
TombEngine/Game/missile.cpp Outdated Show resolved Hide resolved
TombEngine/Objects/TR3/Entity/tr3_claw_mutant.cpp Outdated Show resolved Hide resolved
TombEngine/Objects/TR3/Entity/SophiaLeigh.cpp Outdated Show resolved Hide resolved
TombEngine/Objects/TR3/Entity/tr3_tony.cpp Outdated Show resolved Hide resolved
fx.RoomNumber = roomNumber;
fx.ObjectNumber = ID_BUBBLES;
fx.Animation.Velocity.z = (GetRandomControl() & 0x1F) + 64;
fx.Animation.FrameNumber = Objects[ID_BUBBLES].meshIndex + 8;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Model.MeshIndex here

fx.Animation.Velocity.y = 0;
fx.ObjectNumber = ID_BODY_PART;
fx.Model.Color = Vector4::One;
fx.Animation.FrameNumber = Objects[ID_BUBBLES].meshIndex + (GetRandomControl() & 7);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what's generally wrong here is that mesh index is stored in Animation.FrameNumber. We now have explicitly stated mesh indices in Model.MeshIndex, this should be used instead.

fx.Pose.Orientation.y = pose.Orientation.y;
fx.Pose.Orientation.z = 0;
fx.RoomNumber = roomNumber;
fx.ObjectNumber = ID_BUBBLES;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redefinition ID_ENERGY_BUBBLES to ID_BUBBLES

fx.RoomNumber = roomNumber;
fx.ObjectNumber = ID_BUBBLES;
fx.Animation.Velocity.z = (GetRandomControl() & 0x1F) + 64;
fx.Animation.FrameNumber = Objects[ID_BUBBLES].meshIndex + 8;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Model.MeshIndex

const auto& fxInfo = GetFXInfo(fx);

ShatterItem.yRot = fx.Pose.Orientation.y;
ShatterItem.meshIndex = fx.Animation.FrameNumber;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Model.MeshIndex

@Sezzary Sezzary closed this Nov 25, 2023
@Sezzary Sezzary reopened this Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants