Go で書き直した Ikemen
Revision | dbe7fc85d244ff0dea00a8a1189fe2fd69ad4bad (tree) |
---|---|
Time | 2017-05-02 20:25:12 |
Author | SUEHIRO <supersuehiro@user...> |
Commiter | SUEHIRO |
mindist, maxdist に Z 座標があるとエラーになるのを修正
@@ -3069,11 +3069,17 @@ func (sc hitDef) runSub(c *Char, hd *HitDef, id byte, exp []BytecodeExp) bool { | ||
3069 | 3069 | hd.mindist[0] = exp[0].evalF(c) |
3070 | 3070 | if len(exp) > 1 { |
3071 | 3071 | hd.mindist[1] = exp[1].evalF(c) |
3072 | + if len(exp) > 2 { | |
3073 | + exp[2].run(c) | |
3074 | + } | |
3072 | 3075 | } |
3073 | 3076 | case hitDef_maxdist: |
3074 | 3077 | hd.maxdist[0] = exp[0].evalF(c) |
3075 | 3078 | if len(exp) > 1 { |
3076 | 3079 | hd.maxdist[1] = exp[1].evalF(c) |
3080 | + if len(exp) > 2 { | |
3081 | + exp[2].run(c) | |
3082 | + } | |
3077 | 3083 | } |
3078 | 3084 | case hitDef_snap: |
3079 | 3085 | hd.snap[0] = exp[0].evalF(c) |
@@ -4152,11 +4152,11 @@ func (c *Compiler) hitDefSub(is IniSection, | ||
4152 | 4152 | return err |
4153 | 4153 | } |
4154 | 4154 | 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 { | |
4156 | 4156 | return err |
4157 | 4157 | } |
4158 | 4158 | 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 { | |
4160 | 4160 | return err |
4161 | 4161 | } |
4162 | 4162 | if err := c.paramValue(is, sc, "snap", |