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

[changed] Mounted Bow can be detached from other vehicles #2267

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mugg91
Copy link
Contributor

@mugg91 mugg91 commented Dec 24, 2024

Status

  • READY: this PR is (to the best of your knowledge) ready to be incorporated into the game.

Description

Fixes #2207

You are allowed to detach mounted bow that is attached to other vehicles (longboat, warboat, airship, bomber).
The button offset was misplaced for longboat and bomber and I fixed it by dividing the ap.offset by 2.
The mounted bow on warboat still cannot be detached after this change.

Tested in offline.

@@ -25,10 +25,12 @@ void GetButtonsFor(CBlob@ this, CBlob@ caller)
CBlob@ occBlob = ap.getOccupied();
if (occBlob !is null) //detach button
{
if (this.isOnGround() && occBlob.getName() != "mounted_bow") // HACK:
if (this.isOnGround() || occBlob.getName() == "mounted_bow") // HACK:
Copy link
Member

Choose a reason for hiding this comment

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

Pr works fine, but IMO just remove the getName check, does not make sense to have the bow as the only thing you can drop while flying/moving.

@@ -60,7 +62,7 @@ void onCommand(CBlob@ this, u8 cmd, CBitStream @params)
// range check
if (this.getDistanceTo(b) > 64.0f) return;

if (this.isOnGround() && occBlob.getName() != "mounted_bow")
if (this.isOnGround() || occBlob.getName() == "mounted_bow")
Copy link
Member

Choose a reason for hiding this comment

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

(same here)

@Vam-Jam Vam-Jam added change A change to an existing feature or mechanic Sandbox PR that is focused towards Sandbox labels Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change A change to an existing feature or mechanic Sandbox PR that is focused towards Sandbox
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mounted Bow should be possible to detach from vehicles
2 participants