Mojira Archive
MCM-1598

Dividing any value in MoLang by a negative variable results in a division by a positive value instead

Partner Rank: 2 (Important)

Verification Builds: latest preview 1.19.40.24, latest release 1.19.31, 1.19.30, 1.18.12

Regression Builds: Unknown

Summary: Dividing any value in MoLang by a negative variable results in a division by a positive value instead. It was confirmed with q.log, but also on publish builds, via indirect measurments (like entity scale), and in different contexts - particles, BP and RP entity.

Impact: Breaks certain expressions in a hard to debug way.

Repro Steps:

  1. Create a world with an attached pack and cheats enabled
  2. Run /particle example:bug
  3. Observe how particles behave

Observed Results: Particles fly upwards, despite molang used for Y acceleration being 10/v.foo, where v.foo is set to -1. That expression somehow evaluates to 10.

Expected Results: Particles would fly down, because 10/v.foo would result in -10 which would mean downwards acceleration.

Notes: N/A

Unresolved

Veka0

2022-10-13, 01:54 AM

2022-10-13, 09:15 PM

7

2

-

-