Skip to content

Addendum to 762ca6f: fix health pickups still being consumed at full health - #5494

Open
Flashmyname wants to merge 1 commit into
multitheftauto:masterfrom
Flashmyname:fix/pickup-full-health
Open

Flashmyname wants to merge 1 commit into
multitheftauto:masterfrom
Flashmyname:fix/pickup-full-health

Conversation

@Flashmyname

Copy link
Copy Markdown
Contributor

Summary

At default stats the health cap is 569 * 0.176 = 100.144, while synced health is a whole number, so a player at full health still took the pickup.

Motivation

Follow-up to #5399.

Test plan

run p=getRandomPlayer() x,y,z=getElementPosition(p) pk=createPickup(x+3,y,z,0,50) addEventHandler("onPickupUse",pk,function(pl) outputChatBox("used at "..getElementHealth(pl)) end)

Walk into it at full health. Master prints used at 100.

Checklist

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

@Flashmyname Flashmyname changed the title Fix health pickups still being consumed at full health Addendum to 762ca6f: fix health pickups still being consumed at full health Oct 3, 2026
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.

1 participant