Skip to content

Fix #668: Chainsaw weapon not damaging light vehicles (e.g. Sultan) - #5392

Open
iManGaaX wants to merge 1 commit into
multitheftauto:masterfrom
iManGaaX:resolve/issue-668
Open

iManGaaX wants to merge 1 commit into
multitheftauto:masterfrom
iManGaaX:resolve/issue-668

Conversation

@iManGaaX

@iManGaaX iManGaaX commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

CAutomobile::VehicleDamage drops an explicitly passed damage intensity that doesn't exceed its minimum of 25.0 - a minimum which is only scaled by the vehicle's mass for collisions; CTaskSimpleFight::FightHitCar passes melee damage scaled by the vehicle's mass (chainsaw: mass * weapon damage * 0.00075), so vehicles lighter than about 1622 kg, such as the Sultan with its 1400 kg, were never damaged by a chainsaw/melee weapon; neither the panels nor the health

Minimum is now dropped for chainsaw/melee weapons, so their damage is always applied; collision damage is untouched (it computes its own, mass scaled minimum) and so is every other weapon (guns and explosions pass a weapon of 49/51)

Closes #668.

Before ->

2026-09-13.05-56-02.mp4

After ->

2026-09-13.06-34-43.mp4

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.

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.

Constant chainsawing does not take effect for vehicles with mass below 1622

1 participant