PyWeaponWheel not working properly with ZScript 4.11 and later

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
Doomguy 2000
Posts: 178
Joined: Tue Oct 12, 2010 3:30 pm
Location: Undisclosed Location, United States

PyWeaponWheel not working properly with ZScript 4.11 and later

Post by Doomguy 2000 »

What I've noticed was when I updated my ZScript version to 4.12, the Weaponwheel doesn't seem to work properly based on the screenshot below. It only shows two weapons in the wheel with the lowest and highest weapon selection order but does not show the fist despite having the lowest selection order (probably because it doesn't have a pickup sprite).
https://imgur.com/a/EX1tS5b
User avatar
_yomli
Posts: 2
Joined: Mon Sep 16, 2024 8:35 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Linux Mint, Windows
Graphics Processor: nVidia with Vulkan support
Location: France

Re: PyWeaponWheel not working properly with ZScript 4.11 and later

Post by _yomli »

I know it's a bit late, but I stumbled accross the same issue, and found why. In the file zscript/pyw/ev_core.zsc, the wheelShow array have the wrong type (bool, so it's either 1 or 0, hence the plasma rifle and bfg). So, the line 9 should be:

Code: Select all

array<int > wheelShow;
User avatar
Doomguy 2000
Posts: 178
Joined: Tue Oct 12, 2010 3:30 pm
Location: Undisclosed Location, United States

Re: PyWeaponWheel not working properly with ZScript 4.11 and later

Post by Doomguy 2000 »

I figured that one shortly after looking into Project Brutality's special wheel and changed the bool to int and fixed this problem. I also fixed issues where the weapon wheel itself would about the VM when you opened it and shows one weapon (it needs to be loaded with a wad that has lots of weapons more than 20 according to the code). I changed the currentSelection from line 590 to what I show below.

Code: Select all

currentSelection = 0;

Return to “Closed Bugs [GZDoom]”