Fix T39035: Cycles F-Modifier truncates end/beginning frame values for repetition
When the keyframes at either end of the source curve don't lie on exact frame boundaries, this casued problems with the Cycles F-Modifier, as part of the cycle would get chopped off. This was caused by float -> integer truncation that was occurring, since one variable was of the wrong type. The problem here wasn't discovered until now (thanks to gcc's invalid-type warnings on printf's) as in standard usage, we can safely assume that all keyframes are strictly on frame boundaries.
This commit is contained in:
@@ -605,7 +605,8 @@ static float fcm_cycles_time(FModifierStackStorage *storage, FCurve *fcu, FModif
|
||||
FMod_Cycles *data = (FMod_Cycles *)fcm->data;
|
||||
float prevkey[2], lastkey[2], cycyofs = 0.0f;
|
||||
short side = 0, mode = 0;
|
||||
int cycles = 0, ofs = 0;
|
||||
int cycles = 0;
|
||||
float ofs = 0;
|
||||
|
||||
/* check if modifier is first in stack, otherwise disable ourself... */
|
||||
/* FIXME... */
|
||||
|
||||
Reference in New Issue
Block a user