7thbeatgames / rd

This repository is to track player feedback for a rhythm game 'Rhythm Doctor'.
https://7thbe.at
9 stars 0 forks source link

0 visual beat multiplier causes a divide by zero error every frame #11

Closed RandomGuyJCI closed 1 year ago

RandomGuyJCI commented 1 year ago

Is there an existing issue for this?

Contact Information

Random Guy JCI#7029

Summary

Setting the visual beat multiplier to 0 causes a divide by zero error for character animations. A simple fix for this would be to disallow setting the multiplier to 0 and/or defaulting the multiplier to 1 whenever it's set to 0.

Version

v0.11.6 (r26)

Operating System (OS)

Windows 10

Platform

Steam

Device Info

No response

Steps to Reproduce

  1. Open the editor
  2. Add a Set Crochets Per Bar Event with a Visual beat multiplier of 0
  3. Play the level
  4. Check logs for errors

Expected Behavior

The level should proceed without issue.

Observed Behavior

The following error appears every frame:

[Error  : Unity Log] IndexOutOfRangeException: Index was outside the bounds of the array.
Stack trace:
tk2dSpriteAnimator.SetFrameInternal (System.Int32 currFrame) (at <9a1ac7c43a444309ac29e8c3e10a3598>:0)
tk2dSpriteAnimator.UpdateAnimation (System.Single deltaTime) (at <9a1ac7c43a444309ac29e8c3e10a3598>:0)
tk2dSpriteAnimator.LateUpdate () (at <9a1ac7c43a444309ac29e8c3e10a3598>:0)

Reproduction Rate

100%

Anything else?

The video below shows a demonstration of the bug:

https://user-images.githubusercontent.com/22722393/181823113-d58e0e2f-f384-4492-83eb-d144e10627cc.mp4

RandomGuyJCI commented 1 year ago

Fixed in dev!