by Sir Robin » Sun Oct 22, 2023 8:16 am
I noticed this because I have an actor that is a rollsprite and is a standard billboard sprite out in the open but becomes a wallsprite near walls. Best I can tell, the "empty space" in a sprite is ignored for a billboard center but considered for a wallsprite center.
Reproduce:
Code: Select all
//TEXTURES: Create a sprite with some empty space:
sprite JGLRA0, 14, 36
{
offset 7,36
sprite BON1D0,0,18
}
//ZSCRIPT:
version "4.11.1"
class jiggler : actor
{
default {+RollSprite;}
states {spawn: JGLR A -1; stop;}
override void tick()
{
roll = sin(360. * (level.time % 35 / 34.)) * 45;
super.tick();
}
}
class JRC : jiggler {default {+RollCenter}}
class JWS : jiggler {default {+WallSprite}}
class JWSRC : JWS {default {+RollCenter}}
class JFS : jiggler {default {+FlatSprite}}
class JFSRC : JFS {default {+RollCenter}}
Summon these classes near each other. Jiggler, JWS, and JFS should all be similar and they are. JRC, JWSRC, and JFSRC should all be similar and they are not.
I noticed this because I have an actor that is a rollsprite and is a standard billboard sprite out in the open but becomes a wallsprite near walls. Best I can tell, the "empty space" in a sprite is ignored for a billboard center but considered for a wallsprite center.
Reproduce:
[code]
//TEXTURES: Create a sprite with some empty space:
sprite JGLRA0, 14, 36
{
offset 7,36
sprite BON1D0,0,18
}
//ZSCRIPT:
version "4.11.1"
class jiggler : actor
{
default {+RollSprite;}
states {spawn: JGLR A -1; stop;}
override void tick()
{
roll = sin(360. * (level.time % 35 / 34.)) * 45;
super.tick();
}
}
class JRC : jiggler {default {+RollCenter}}
class JWS : jiggler {default {+WallSprite}}
class JWSRC : JWS {default {+RollCenter}}
class JFS : jiggler {default {+FlatSprite}}
class JFSRC : JFS {default {+RollCenter}}
[/code]
Summon these classes near each other. Jiggler, JWS, and JFS should all be similar and they are. JRC, JWSRC, and JFSRC should all be similar and they are not.