[Won't change] [Linux] Hocus Doom Monster HP Bar script not working

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

[Linux] Hocus Doom Monster HP Bar script not working

Postby Talon1024 » Thu Dec 01, 2016 2:06 am

The Monster HP Bar script from Hocus Doom doesn't seem to be working on Linux builds of ZDoom. When I aim at a monster, the monster's health bar doesn't appear near the bottom of the screen, despite whether I set it to display hearts or numbers.

Here's the information about the GZDoom build I was using:
Code: Select allExpand view
GZDoom g2.3pre-343-g49605bc - 2016-11-24 09:59:48 +0100 - SDL version
Compiled on Nov 26 2016
Talon1024
 
 
 
Joined: 27 Jun 2016
Github ID: Talon1024
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
Graphics Processor: nVidia with Vulkan support

Re: [Linux] Hocus Doom Monster HP Bar script not working

Postby Talon1024 » Sat Dec 03, 2016 5:53 am

I think I found out why this bug was happening to me.

Image
Talon1024
 
 
 
Joined: 27 Jun 2016
Github ID: Talon1024
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
Graphics Processor: nVidia with Vulkan support

Re: [Linux] Hocus Doom Monster HP Bar script not working

Postby Graf Zahl » Sat Dec 03, 2016 5:58 am

Indeed. The MaxAmount value is stored as a signed int. 0xffffffff as a signed int is -1.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [Linux] Hocus Doom Monster HP Bar script not working

Postby Edward-san » Sat Dec 03, 2016 6:23 am

Sounds like Hocus Doom should be fixed. If it could be possible for zscript code to warn about it...
Edward-san
Mathematics is the language with which God has written the universe. (Galilei)
 
Joined: 17 Oct 2009

Re: [Linux] Hocus Doom Monster HP Bar script not working

Postby Graf Zahl » Sat Dec 03, 2016 6:26 am

Warn about it and clamp the value to its proper range. I'll see to it that this gets added to the property parser in general and that it can make a distinction between a signed and unsigned int while parsing. But yes, this is primarily a mod error
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [Linux] Hocus Doom Monster HP Bar script not working

Postby Graf Zahl » Sat Dec 03, 2016 6:54 am

Damnit. This isn't solvable at the high level. The entire parser from the bottom up and all code using it would have to be changed, it's a huge shitload of work I'm just not willing to do for such a minor thing. There's a good reason why the parser defined an implicit MAXINT constant for such cases that is guaranteed to produce a working value.

The problem here is that Linux longs are 64 bit om 64 bit platforms, but Windows longs are 32 bit, so the strtol function works differently on both platforms, but all the parsing code is blissfully unaware of this and stores everything in 32 bit. But since this goes down to the deepest bowels of ZDoom's inner workings - the parser is used everywhere - a change will not only be extremely extensive but may also subtly break other things.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests