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

Fix a rare error when the GC, ML and Megalith make landfall #5924

Merged

Conversation

Basilisk3
Copy link
Contributor

@Basilisk3 Basilisk3 commented Feb 20, 2024

This is the same issue as fixed in #5829.

How to reproduce this 100% of the time:

  • Spawn a line of GCs via the Alt+F2 menu (the line must be both on land and in the water)
  • Give a movement order to the units you spawned in

This is a rare bug, but it does happen in real games.

@Basilisk3 Basilisk3 changed the title Fix a rare error when the GC and ML make landfall Fix a rare error when the GC, ML and Megalith make landfall Feb 20, 2024
@Garanas
Copy link
Member

Garanas commented Feb 21, 2024

Can you post the error/warning that shows in the log?

@Basilisk3
Copy link
Contributor Author

Can you post the error/warning that shows in the log?

WARNING: *WARNING: No movement effect groups defined for unit ual0401 , Effect groups with bone lists must be defined to play movement effects. Add these to the Display.MovementEffects Land .Effects table in unit blueprint.

@Garanas
Copy link
Member

Garanas commented Mar 1, 2024

I'm wondering what/when/how this happened. Was the blueprint always wrong, for example? Or did we change something that made this wrong?

@Basilisk3
Copy link
Contributor Author

These errors only started occurring semi-recently, I first noticed one case in #5829. As far as I can see, the blueprints have always been like this, but they did not error out.

@Garanas
Copy link
Member

Garanas commented Mar 14, 2024

That's strange, it would suggest that the way we interpret the blueprints has changed.

@Garanas Garanas merged commit 3e85f21 into FAForever:deploy/fafdevelop Mar 14, 2024
@Garanas Garanas added the area: graphics Anything Related to the Game Graphics label Mar 14, 2024
@Basilisk3 Basilisk3 deleted the GC_ML_movement_effect_groups branch March 14, 2024 15:01
@Garanas
Copy link
Member

Garanas commented Apr 27, 2024

There's an issue with this pull request: all the units processed no longer deal footfall damage and inverse kinematics no longer work!

The code expects footfalls next to the Effects table and not inside it. We'll need to move the footfall information outside of it again as that's how mods and everything work too.

Related code:

fa/lua/sim/Unit.lua

Lines 2413 to 2425 in 9db1b49

-- Initialize movement effects subsystems, idle effects, beam exhaust, and footfall manipulators
local movementEffects = blueprintDisplay.MovementEffects
if movementEffects.Land or movementEffects.Air or movementEffects.Water or movementEffects.Sub or movementEffects.BeamExhaust then
self.MovementEffectsExist = true
if movementEffects.BeamExhaust and (movementEffects.BeamExhaust.Idle ~= false) then
self:UpdateBeamExhaust('Idle')
end
if not self.Footfalls and movementEffects[layer].Footfall then
self.Footfalls = self:CreateFootFallManipulators(movementEffects[layer].Footfall)
end
else
self.MovementEffectsExist = false
end

The same potentially applies to: #5829

@Basilisk3
Copy link
Contributor Author

@Garanas I will revert it for the GC, ML and the Mega then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Anything Related to the Game Graphics type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants