WinMUGEN/MUGEN 1.0 common1.cns bug.

In WinMUGEN/MUGEN 1.0 there is a bug in the common1.cns file.

Whenever there's a change state in the [air] gethits (logical progression, 5030 => 5035 => 5050, etc) the [veladd] parameter is applied 2 times during the [changestate] frame.

Download: fixed common1.cns [06292012] for MUGEN 1.0

Download: fixed common1.cns [06292012] for WinMUGEN

Allow me to demonstrate with this sample:

air.velocity = -4.5,-7 ; yaccel = 0.5

Frame Normal common1.cns

Fixed common1.cns

Frame 1
Frame2
Frame 3
Frame 4
Frame 5

Frame 6

Frame 7
Frame 8
Frame 9
Frame 10
Frame 11
Frame 12
Frame 13
Frame 14
Frame 15  
Frame 16  

Example in video form:

Fixing the bug:

The bug occurs in states where a [VelAdd] controller appears with a trigger in the form of [trigger1 = 1]. The [common1-fix.cns] I provide already has the fixes applied.

Here's an [example] of how to fix it:

Normal Fix

;---------------------------------------------------------------------------
; Air get-hit (knocked away)
[Statedef 5030]
type = A
movetype= H
physics = N
ctrl = 0

[State 5030, 1]
type = ChangeAnim
trigger1 = Anim != [5000, 5199]
trigger1 = SelfAnimExist(5030)
value = 5030

[State 5030, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5030, 3]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5030, 4]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0 ;Hit ground
trigger2 = Pos Y >= Const(movement.air.gethit.groundlevel)
value = 5040 ;HITA_RECOV

[State 5030, 5]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0 ;Hit ground
trigger2 = Pos Y >= Const(movement.air.gethit.groundlevel)
value = 5050 ;HITA_FALL

[State 5030, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 5035 ;Air get-hit (transition)

;---------------------------------------------------------------------------
; Air get-hit (knocked away)
[Statedef 5030]
type = A
movetype= H
physics = N
ctrl = 0

[State 5030, 1]
type = ChangeAnim
trigger1 = Anim != [5000, 5199]
trigger1 = SelfAnimExist(5030)
value = 5030

[State 5030, 2]
type = VelAdd
trigger1 = time > 0
y = GetHitVar(yaccel)

[State 5030, 3]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5030, 4]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0 ;Hit ground
trigger2 = Pos Y >= Const(movement.air.gethit.groundlevel)
value = 5040 ;HITA_RECOV

[State 5030, 5]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0 ;Hit ground
trigger2 = Pos Y >= Const(movement.air.gethit.groundlevel)
value = 5050 ;HITA_FALL

[State 5030, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 5035 ;Air get-hit (transition)

Please keep this important bug in mind.

Thank you so much for your time!

~ Vans