by Graf Zahl » Fri Apr 02, 2010 1:08 am
Some people can't be helped doing stupid things regardless of any pressing need. 100 points to the one who can tell me what's wrong with this:
Code: Select all
Spawn("TeleportFog", GetActorX(-123), GetActorY(-123), GetActorZ(-123), 0, 64<<8);
Spawn("XTron_Boss", GetActorX(-123), GetActorY(-123), GetActorZ(-123), 0, GetActorAngle(-123)>>8);
Ok, I answer myself: The Thing ID is defined as an
unsigned short in the map data but for some reason until UDMF support was added all tids inside the Actor structure were stored as signed shorts (clearly an error on ZDoom's part as tids were signed in Hexen even in the map data) but UDMF necessitated expanding all tid variables to full ints. And now guess what happens:
All these unsigned short tids with values of 65500 or similar suddenly get stored as what they are supposed to be! And Kaiser managed to write his script in a way that not only did not play it safe by only using positive tids. No, he also felt the need to use a completely non-standard way of spawning his boss which in this case made it appear in the wrong place.
As much as this is an error in ZDoom I have to ask myself: Why on earth can't some people map cleanly?`Negative tids? Come on! That's really not something anyone should ever need. I wonder why Kaiser did. Just to complement his joke wad with joke scripts? Such things tend to break rather sooner than later.
Some people can't be helped doing stupid things regardless of any pressing need. 100 points to the one who can tell me what's wrong with this:
[code]
Spawn("TeleportFog", GetActorX(-123), GetActorY(-123), GetActorZ(-123), 0, 64<<8);
Spawn("XTron_Boss", GetActorX(-123), GetActorY(-123), GetActorZ(-123), 0, GetActorAngle(-123)>>8);
[/code]
Ok, I answer myself: The Thing ID is defined as an [u]unsigned short[/u] in the map data but for some reason until UDMF support was added all tids inside the Actor structure were stored as signed shorts (clearly an error on ZDoom's part as tids were signed in Hexen even in the map data) but UDMF necessitated expanding all tid variables to full ints. And now guess what happens:
All these unsigned short tids with values of 65500 or similar suddenly get stored as what they are supposed to be! And Kaiser managed to write his script in a way that not only did not play it safe by only using positive tids. No, he also felt the need to use a completely non-standard way of spawning his boss which in this case made it appear in the wrong place.
As much as this is an error in ZDoom I have to ask myself: Why on earth can't some people map cleanly?`Negative tids? Come on! That's really not something anyone should ever need. I wonder why Kaiser did. Just to complement his joke wad with joke scripts? Such things tend to break rather sooner than later.