• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Go で書き直した Ikemen


Commit MetaInfo

Revision525e7a53f411afc2c170ad718e9753718452a799 (tree)
Time2019-04-26 22:15:45
Authorneatunsou <sisiy4excite@gmai...>
Commiterneatunsou

Log Message

1フレーム以内に複数のダメージが入ると最後のダメージしか反映されない不具合を修正
Projectileが射出者のHelperに当たらない不具合を修正
360コントローラ判定を修正

Change Summary

Incremental Difference

--- a/src/char.go
+++ b/src/char.go
@@ -4893,9 +4893,10 @@ func (cl *CharList) clsn(getter *Char, proj bool) {
48934893 ghv := &getter.ghv
48944894 cmb := (getter.ss.moveType == MT_H || getter.sf(CSF_gethit)) &&
48954895 !ghv.guarded
4896- fall, hc, fc, by := ghv.fallf, ghv.hitcount, ghv.fallcount, ghv.hitBy
4896+ fall, hc, fc, by, dmg := ghv.fallf, ghv.hitcount, ghv.fallcount, ghv.hitBy, ghv.damage
48974897 ghv.clear()
48984898 ghv.hitBy = by
4899+ ghv.damage = dmg
48994900 ghv.attr = hd.attr
49004901 ghv.hitid = hd.id
49014902 ghv.playerNo = hd.playerNo
@@ -5252,7 +5253,7 @@ func (cl *CharList) clsn(getter *Char, proj bool) {
52525253 sys.envShake.time = hd.envshake_time
52535254 sys.envShake.freq = hd.envshake_freq * float32(math.Pi) / 180
52545255 sys.envShake.ampl = int32(float32(hd.envshake_ampl) * c.localscl)
5255- sys.envShake.phase = hd.envshake_phase * c.localscl
5256+ sys.envShake.phase = hd.envshake_phase
52565257 sys.envShake.setDefPhase()
52575258 }
52585259 getter.getcombo += hd.numhits * hits
@@ -5300,7 +5301,7 @@ func (cl *CharList) clsn(getter *Char, proj bool) {
53005301 }
53015302 if proj {
53025303 for i, pr := range sys.projs {
5303- if i == getter.playerNo || len(sys.projs[i]) == 0 {
5304+ if i == getter.playerNo && getter.helperIndex == 0 || len(sys.projs[i]) == 0 {
53045305 continue
53055306 }
53065307 c := sys.chars[i][0]
--- a/src/input.go
+++ b/src/input.go
@@ -625,7 +625,7 @@ func JoystickState(joy, button int) bool {
625625 if len(axes)*2 <= button {
626626 return false
627627 }
628- if (button == 8 || button == 10) && len(axes) == 6 && len(btns) == 14 { //XboxコントローラーのLRトリガー判定(glfwがバージョンアップすればもっとちゃんと判別できるようになるはず)
628+ if (button == 8 || button == 10) && glfw.GetJoystickName(joystick[joy]) == "Xbox 360 Controller" { //Xbox360コントローラーのLRトリガー判定
629629 return axes[button/2] > 0
630630 }
631631 switch button & 1 {
--- a/src/script.go
+++ b/src/script.go
@@ -324,14 +324,14 @@ func systemScriptInit(l *lua.LState) {
324324 ts.text = strArg(l, 2)
325325 return 0
326326 })
327- luaRegister(l, "textImgSetColor", func(*lua.LState) int {
328- ts, ok := toUserData(l, 1).(*TextSprite)
329- if !ok {
330- userDataError(l, 1, ts)
331- }
332- ts.SetColor(float32(numArg(l, 2)), float32(numArg(l, 3)), float32(numArg(l, 4)), 255, 0)
333- return 0
334- })
327+ luaRegister(l, "textImgSetColor", func(*lua.LState) int {
328+ ts, ok := toUserData(l, 1).(*TextSprite)
329+ if !ok {
330+ userDataError(l, 1, ts)
331+ }
332+ ts.SetColor(float32(numArg(l, 2)), float32(numArg(l, 3)), float32(numArg(l, 4)), 255, 0)
333+ return 0
334+ })
335335 luaRegister(l, "textImgSetPos", func(*lua.LState) int {
336336 ts, ok := toUserData(l, 1).(*TextSprite)
337337 if !ok {
@@ -1132,13 +1132,12 @@ func systemScriptInit(l *lua.LState) {
11321132 if sys.keyInput != glfw.KeyUnknown {
11331133 s = KeyToString(sys.keyInput)
11341134 }
1135-
11361135 for j := 0; j < 2; j++ {
11371136 if glfw.JoystickPresent(joystick[j]) {
11381137 axes := glfw.GetJoystickAxes(joystick[j])
11391138 btns := glfw.GetJoystickButtons(joystick[j])
11401139 for i := range axes {
1141- if i > 3 && len(axes) == 6 && len(btns) == 14 { //Xboxコントローラー判定(glfwがバージョンアップすればもっとちゃんと判別できるようになるはず)
1140+ if glfw.GetJoystickName(joystick[j]) == "Xbox 360 Controller" { //Xbox360コントローラー判定
11421141 if axes[i] > 0 {
11431142 s = strconv.Itoa(-i*2 - 1)
11441143 }