[Linux] Hocus Doom Monster HP Bar script not working

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [Linux] Hocus Doom Monster HP Bar script not working

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

by 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.

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

by 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

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

by 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...

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

by 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.

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

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

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

Image

[Linux] Hocus Doom Monster HP Bar script not working

by 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 all

GZDoom g2.3pre-343-g49605bc - 2016-11-24 09:59:48 +0100 - SDL version
Compiled on Nov 26 2016

Top