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

Improve the behavior of death planes #257

Merged
merged 33 commits into from
Oct 1, 2021
Merged

Conversation

Frozenreflex
Copy link
Member

@Frozenreflex Frozenreflex commented Jul 20, 2021

Fixes #190 and #74

Copy link
Member

@TheNexusAvenger TheNexusAvenger left a comment

Choose a reason for hiding this comment

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

Glad to see this is finally a thing considering how long many people have looked into this. Got a few comments.

@Frozenreflex Frozenreflex marked this pull request as ready for review August 3, 2021 12:25
@TheNexusAvenger
Copy link
Member

TheNexusAvenger commented Aug 29, 2021

Played around with this for a bit. For the non-properties, this is what I noticed:

  • World 1000 (Venture Explorer) and part of World 1300 (Gnarled Forest): Works completely as expected.
    * Worlds 1100 (Avant Gardens), 1200 (Nimbus Station), 1604 (Portabello), and part of World 1300 (Gnarled Forest): Missing the script scripts\ai\AG\L_ACT_SHARK_PLAYER_DEATH_TRIGGER.lua. May be similar to the other script except for the achivements. (Edit: Didn't have that commit locally for some reason.)
  • Worlds 1400 (Forbidden Valley) and 1800 (Crux Prime): Couldn't find a script, but Object 5652 appears relevant.
  • World 2000 (Ninjago): Couldn't find a script, but Object 14510 appears relevant.

@Frozenreflex
Copy link
Member Author

* Worlds 1100 (Avant Gardens), 1200 (Nimbus Station), 1604 (Portabello), and part of World 1300 (Gnarled Forest): Missing the script `scripts\ai\AG\L_ACT_SHARK_PLAYER_DEATH_TRIGGER.lua`. May be similar to the other script except for the achivements.

The directory in the comment in the code is wrong, it's actually the one you mentioned, but that script should still run normally since it only cares about the name of the lua file... does it not run at all?

@TheNexusAvenger
Copy link
Member

TheNexusAvenger commented Aug 29, 2021

The directory in the comment in the code is wrong, it's actually the one you mentioned, but that script should still run normally since it only cares about the name of the lua file... does it not run at all?

Uh, oops. I didn't have that commit when testing for some reason. That can be ignored.

@TheNexusAvenger
Copy link
Member

Worlds 1400 (Forbidden Valley) and 1800 (Crux Prime): Couldn't find a script, but Object 5652 appears relevant.
World 2000 (Ninjago): Couldn't find a script, but Object 14510 appears relevant.

Did some more digging around. We currently check custom_script_server in LuaScriptComponent, but we don't check custom_script_client. If we add reading this and add the relevant script(s), this will either finish death planes for all non-properties, or everything if the teleport script is added for properties.

@TheNexusAvenger
Copy link
Member

TheNexusAvenger commented Aug 31, 2021

Additional changes that were made:

  • Tweaked object script loading to reduce duplicate code. Check for custom_script_server for the falling player scripts.
  • Add death planes for the remaining worlds.
  • Add teleport scripts for properties.
  • Fix player physics being too low, resulting in being killed on land in Portabello (1604).

Open problem:

  • The falling death plane is hard-coded to use 2 seconds as a delay before smashing. May have missed something, but I couldn't figure out a better option. 2 seconds doesn't work as expected in all cases, mainly in some cases of Crux Prime (too long) and Ninjago (too short).
  • The main Assembly teleporters in Nexus Tower no longer work because the physics object is underground.
    • Edit: Hacky workaround - In PrimitiveModelComponent, make the "Cylinder" (currently a sphere) of radius Math.Max(cylinderSize.X, cylinderSize.Y) instead of just cylinderSize.Y, which may be the smaller of the dimensions. Supporting proper Cylinder collisions is the better move though. No guarantee I will look at it.

@TheNexusAvenger
Copy link
Member

Tested the functionality of this. There are 2 outstanding issues currently:

  • The shark attack in Nimbus Station no longer works.
  • The fall death in Crux Prime no longer works.

The death planes in all other worlds seem to work, and the main Assembly teleporters work again.

Copy link
Member

@TheNexusAvenger TheNexusAvenger left a comment

Choose a reason for hiding this comment

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

Changes for the death plane code looks good. Got 2 questions about 2 other changes.

@Frozenreflex Frozenreflex merged commit b5f877a into dev Oct 1, 2021
@TheNexusAvenger TheNexusAvenger deleted the enhancement/death-planes branch October 1, 2021 22:34
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.

Kill planes
3 participants