Skip to content

Commit

Permalink
Merge pull request #2325 from RakieI/newstuff
Browse files Browse the repository at this point in the history
fix: helper pos param z value
  • Loading branch information
K4thos authored Feb 16, 2025
2 parents afdf84e + 5ac10f7 commit 233982f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/char.go
Original file line number Diff line number Diff line change
Expand Up @@ -5106,23 +5106,24 @@ func (c *Char) helperPos(pt PosType, pos [3]float32, facing int32,
p[0] -= pos[0]
}
p[1] = pos[1]
p[2] = c.pos[2]
p[2] = pos[2]
*dstFacing *= c.facing
case PT_Left:
p[0] = c.leftEdge()*(c.localscl/localscl) + pos[0]
p[1] = pos[1]
if isProj {
*dstFacing *= c.facing
}
p[2] = pos[2]
case PT_Right:
p[0] = c.rightEdge()*(c.localscl/localscl) + pos[0]
p[1] = pos[1]
if isProj {
*dstFacing *= c.facing
}
p[2] = c.pos[2]
p[2] = pos[2]
case PT_None:
p = [3]float32{pos[0], pos[1], c.pos[2]}
p = [3]float32{pos[0], pos[1], pos[2]}
if isProj {
*dstFacing *= c.facing
}
Expand Down
6 changes: 3 additions & 3 deletions src/compiler_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ func (c *Compiler) helper(is IniSection, sc *StateControllerBase, _ int8) (State
return err
}
if err := c.paramValue(is, sc, "pos",
helper_pos, VT_Float, 2, false); err != nil {
helper_pos, VT_Float, 3, false); err != nil {
return err
}
if err := c.paramValue(is, sc, "facing",
Expand Down Expand Up @@ -5323,8 +5323,8 @@ func (c *Compiler) depth(is IniSection, sc *StateControllerBase, _ int8) (StateC
}
if !b {
if err := c.paramValue(is, sc, "value",
depth_value, VT_Float, 2, true); err != nil {
return err
depth_value, VT_Float, 2, true); err != nil {
return err
}
}
return nil
Expand Down

0 comments on commit 233982f

Please sign in to comment.