Cataclysm-BN icon indicating copy to clipboard operation
Cataclysm-BN copied to clipboard

negative armor resistances on windows mxe build

Open MisterWytt opened this issue 11 months ago • 4 comments

Describe the bug

After the 2024-03-03 update that fixed the Fire/Acid resistances, it made a nasty side effect of giving certain items negative resistances. Seems to be mainly with watches, but I don't know which other items are affected by this.

Steps To Reproduce

  1. Open Game.
  2. Find a Watch (Smart Watch and Diver's Watch is what I've seen)
  3. Be amazed that you are over negative 2 billion vulnerable to all the main resistances except Fire and Acid.

Screenshots

Resistance

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.4046 (22H2)
  • Game Version: 8bb6364 [64-bit]
  • Graphics Version: Tiles
  • LAPI Version: 2
  • Game Language: []
  • Mods loaded: [ Bright Nights [bn], Disable NPC Needs [no_npc_food], Simplified Nutrition [novitamins], No Rail Stations [No_Rail_Stations], Prevent Zombie Revivication [no_reviving_zombies], Limit Fungal Growth [limit_fungal_growth] ]

Additional context

No response

MisterWytt avatar Mar 05 '24 01:03 MisterWytt

Most notably, it seems to do this depending on build.

cbn-windows-tiles-x64-2024-03-04: image

cbn-windows-tiles-x64-msvc-2024-03-04: image

chaosvolt avatar Mar 05 '24 01:03 chaosvolt

After the 3-3-24 update

~~there's no 3-3-24 but 2024-03-03 release. please use the superior date format, YYYY-mm-dd~~


image

tested on linux 64bit, looks like an MXE issue.

scarf005 avatar Mar 05 '24 01:03 scarf005

Good news at least, tested making watches cover the full body in the affected version and I don't explode, so it's not literally negative protection.

chaosvolt avatar Mar 05 '24 02:03 chaosvolt

Windows v0.6.0 still effective. also for haipins, belts (and ammo belts for weapons), earrings, rings, stethoscope (and surely more)

Darigar avatar Mar 20 '24 08:03 Darigar

Made a fix for the calculation, will submit a PR for it. Long story short: Zero thickness items were return NaN for the armor values. Now they should return 0. PPS: Because of NaN some compilers would handle the result differently, hence why MSYS was impacted but others were not.

vitalyo7 avatar Jun 12 '24 16:06 vitalyo7