Skip to content

Commit

Permalink
Merge pull request #1072 from ikemen-engine/fix
Browse files Browse the repository at this point in the history
fix: hittime, hitshaketime reset if movetype != H (#1034)
  • Loading branch information
K4thos authored Mar 19, 2023
2 parents 63d412e + 63c0068 commit 667adaf
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/char.go
Original file line number Diff line number Diff line change
Expand Up @@ -5734,6 +5734,12 @@ func (c *Char) update(cvmin, cvmax,
if c.inGuardState() {
c.setSCF(SCF_guard)
}
if c.ghv.hitshaketime > 0 {
c.ghv.hitshaketime--
}
if c.ghv.hitshaketime <= 0 && c.ghv.hittime >= 0 {
c.ghv.hittime--
}
if c.ss.moveType == MT_H {
if c.ghv.guarded {
c.receivedHits = 0
Expand All @@ -5742,12 +5748,6 @@ func (c *Char) update(cvmin, cvmax,
c.fakeReceivedHits = 0
c.fakeComboDmg = 0
}
if c.ghv.hitshaketime > 0 {
c.ghv.hitshaketime--
}
if c.ghv.hitshaketime <= 0 && c.ghv.hittime >= 0 {
c.ghv.hittime--
}
if c.ghv.fallf {
c.fallTime++
}
Expand All @@ -5761,8 +5761,6 @@ func (c *Char) update(cvmin, cvmax,
}
c.superDefenseMul = 1
c.fallDefenseMul = 1
c.ghv.hittime = -1
c.ghv.hitshaketime = 0
c.ghv.fallf = false
c.ghv.fallcount = 0
c.ghv.hitid = c.ghv.hitid >> 31
Expand Down

0 comments on commit 667adaf

Please sign in to comment.