diff options
Diffstat (limited to 'src/newgrf_spritegroup.h')
-rw-r--r-- | src/newgrf_spritegroup.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h index 6cc801a74..bf72e96ce 100644 --- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -381,6 +381,17 @@ struct ResolverObject { uint32 (*GetVariable)(const struct ResolverObject*, byte, byte, bool*); const SpriteGroup *(*ResolveReal)(const struct ResolverObject*, const RealSpriteGroup*); void (*StorePSA)(struct ResolverObject*, uint, int32); + + /** + * Resets the dynamic state of the resolver object. + * To be called before resolving an Action-1-2-3 chain. + */ + void ResetState() + { + this->last_value = 0; + this->trigger = 0; + this->reseed = 0; + } }; #endif /* NEWGRF_SPRITEGROUP_H */ |