Skip to content

Commit

Permalink
Fixed: /ApplySpawnFlat/ Using the origin angle instead modifying the …
Browse files Browse the repository at this point in the history
…spawn angle by domain
  • Loading branch information
dvdvideo1234 committed Sep 25, 2017
1 parent 09f38fd commit 80d8e63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lua/autorun/gearassembly_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ local asmlib = gearasmlib

------ CONFIGURE ASMLIB ------
asmlib.InitBase("gear","assembly")
asmlib.SetOpVar("TOOL_VERSION","5.176")
asmlib.SetOpVar("TOOL_VERSION","5.177")
asmlib.SetIndexes("V",1,2,3)
asmlib.SetIndexes("A",1,2,3)
asmlib.SetIndexes("S",4,5,6,7)
Expand Down
4 changes: 2 additions & 2 deletions lua/gearassembly/gearasmlib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2599,8 +2599,8 @@ function ApplySpawnFlat(oEnt,stSpawn,vNorm)
vOBB:Rotate(stSpawn.HAng)
DecomposeByAngle(vOBB,GetOpVar("ANG_ZERO"))
local zOffs = mathAbs(vOBB[cvZ])
SetVector(stSpawn.HMas, hPOA.O)
stSpawn.SAng:Set(stSpawn.OAng)
SetVector(stSpawn.HMas, hPOA.O) -- Apply negative rake to the angle to flatten it
stSpawn.SAng:RotateAroundAxis(stSpawn.DAng:Right(), -stSpawn.HRec.Rake)
stSpawn.SPos:Set(stSpawn.HMas); NegVector(stSpawn.SPos)
stSpawn.SPos:Rotate(stSpawn.SAng) -- Make world space mass-center vector
stSpawn.HMas:Set(stSpawn.OPos) -- Calculate mass-center position vector
Expand Down

0 comments on commit 80d8e63

Please sign in to comment.