• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags

Frequently used words (click to add to your profile)

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

Go で書き直した Ikemen


Commit MetaInfo

Revisiondbe7fc85d244ff0dea00a8a1189fe2fd69ad4bad (tree)
Time2017-05-02 20:25:12
AuthorSUEHIRO <supersuehiro@user...>
CommiterSUEHIRO

Log Message

mindist, maxdist に Z 座標があるとエラーになるのを修正

Change Summary

Incremental Difference

--- a/src/bytecode.go
+++ b/src/bytecode.go
@@ -3069,11 +3069,17 @@ func (sc hitDef) runSub(c *Char, hd *HitDef, id byte, exp []BytecodeExp) bool {
30693069 hd.mindist[0] = exp[0].evalF(c)
30703070 if len(exp) > 1 {
30713071 hd.mindist[1] = exp[1].evalF(c)
3072+ if len(exp) > 2 {
3073+ exp[2].run(c)
3074+ }
30723075 }
30733076 case hitDef_maxdist:
30743077 hd.maxdist[0] = exp[0].evalF(c)
30753078 if len(exp) > 1 {
30763079 hd.maxdist[1] = exp[1].evalF(c)
3080+ if len(exp) > 2 {
3081+ exp[2].run(c)
3082+ }
30773083 }
30783084 case hitDef_snap:
30793085 hd.snap[0] = exp[0].evalF(c)
--- a/src/compiler.go
+++ b/src/compiler.go
@@ -4152,11 +4152,11 @@ func (c *Compiler) hitDefSub(is IniSection,
41524152 return err
41534153 }
41544154 if err := c.paramValue(is, sc, "mindist",
4155- hitDef_mindist, VT_Float, 2, false); err != nil {
4155+ hitDef_mindist, VT_Float, 3, false); err != nil {
41564156 return err
41574157 }
41584158 if err := c.paramValue(is, sc, "maxdist",
4159- hitDef_maxdist, VT_Float, 2, false); err != nil {
4159+ hitDef_maxdist, VT_Float, 3, false); err != nil {
41604160 return err
41614161 }
41624162 if err := c.paramValue(is, sc, "snap",