Skip to content

Conversation

@Fusselwurm
Copy link
Contributor

@Fusselwurm Fusselwurm commented Jul 29, 2020

CBA state machines are very polite beasts: they each run a single tick on a single element each frame.
This is nice for performance considerations, but it makes them slooow to react if you have a lot of elements.

This PR creates an optional additional parameter for CBA_statemachines_fnc_create that allows users to specify how many ticks the given state machine should run on each frame, defaulting to 1.

To not add yet another indentation level to the clockwork function, I extract the tick logic into CBA_statemachine_fnc_tick.

* fastest
* prevents negative values. no going backwards in time for you! ;P
@Fusselwurm Fusselwurm requested a review from jonpas August 19, 2020 06:14
@PiZZAD0X
Copy link

@jonpas jonpas added the Feature label Jul 23, 2021
@jonpas
Copy link
Member

jonpas commented Jul 23, 2021

@BaerMitUmlaut

@jonpas jonpas changed the title state machines: configurable number of ticks per frame State Machines - Add configurable number of ticks per frame Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants