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

[fixed] Spiker and Dispenser will work with away-facing Platforms at their exit #2026

Conversation

mugg91
Copy link
Contributor

@mugg91 mugg91 commented Apr 20, 2024

Status

  • IN DEVELOPMENT
  • Spiker will not work correctly as it shoots spike through any solid blobs.

Description

[fixed] Spiker will work when Platform is at its exit but only if it is not facing towards Spiker
[fixed] Dispenser will work when Platform is at its exit but only if it is not facing towards Dispenser
[changed] If Dispenser can't pop out items, don't make a Particle
[added] Dispenser will have a different sound effect if its exit was blocked

Fixes #1979

Previously, Spiker and Dispenser would not work if a Platform was placed at their exit. Since it looked odd that they wouldn't work even with away-facing platforms, I made this PR to make changes.

The CollidesWithPlatform() code from #1864 is used, this time separated in a new file PlatformCommon.as and added as an include in Spiker.as and Dispenser.as.
To make the ray correctly detect the platform, start position position + offset * map.tilesize/2; is used instead of position + offset * 5;

Previously, Dispenser would make a particle and sound without popping out item if its exit is blocked.
I changed it to not make the particle to better indicate that it is blocked.

Tested in offline. Should work the same in online.

screen-24-04-20-13-05-12
screen-24-04-20-13-31-16

Blocked by bridge
screen-24-04-20-13-07-59

but it works if it is opened (since it is non-solid)
screen-24-04-20-13-07-36

@Vam-Jam Vam-Jam self-assigned this Sep 3, 2024
@Vam-Jam
Copy link
Member

Vam-Jam commented Sep 3, 2024

This PR was marked as IN DEVELOPMENT, is it ready for me to test/are there any known issues? I noticed most of your PR's are marked as in development, so i'll ignore that for now

@Vam-Jam Vam-Jam added the fix Fixes a bug label Sep 3, 2024
Copy link
Member

@Vam-Jam Vam-Jam left a comment

Choose a reason for hiding this comment

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

Code looks sane and can confirm it works in dedi+client setup.

My one suggestion is you can place a platform on a spike that is active, either we should prevent platforms being placed or have the spike retract. This could for for another PR however.

@Vam-Jam Vam-Jam added the ready A pull request that functions correctly and is ready for testing label Sep 3, 2024
@Vam-Jam Vam-Jam added this to the Next Patch milestone Sep 6, 2024
@asumagic asumagic merged commit 19c1884 into transhumandesign:master Sep 6, 2024
@mugg91
Copy link
Contributor Author

mugg91 commented Oct 15, 2024

This didn't work in the "all in one" PR I made but since @Vam-Jam said they confirmed it works, all is good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fixes a bug ready A pull request that functions correctly and is ready for testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dispenser and Spiker don't work when platform is placed at their exit
3 participants