Today I was playing with the A_SpriteOffset action, designing some actors that slowly sink into the pool of liquid and disappear after some time. Decided to use this action as the most rational and efficient way of moving the graphic down instead of animating it, when I noticed something... Not entirely expected. The sprite slowly lowered as expected but up to a certain point. Then they... stopped, only to later resume to sink in, but chaining their offset dramatically in one big jump, instead gradually. Some even rose up instead of going down! Having hard time finding other examples or discussion about this action, so... any ideas or input on this odd behavior would be a godsend!
This is a minimal example of this odd bug, tested on GZDoom 4.8.0 / OpenGL / Hardware Renderer:
- Code: Select all • Expand view
class SinkyActor : Actor
{
double yOffset;
States
{
Spawn:
HEAD A 35;
HEAD A 0 A_SpriteOffset(0.0, yOffset);
HEAD A 0
{
invoker.yOffset += 1.0;
console.printf("OFFSET: %d", invoker.yOffset);
}
Loop;
}
}
Using an int, float or double as the offset doesn't really matter it seems. Thank you for any input and cheers (dev beer)!
Edit: formatting, more info.