Skip to content

Commit 80d8e63

Browse files
committed
Fixed: /ApplySpawnFlat/ Using the origin angle instead modifying the spawn angle by domain
1 parent 09f38fd commit 80d8e63

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lua/autorun/gearassembly_init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ local asmlib = gearasmlib
2525

2626
------ CONFIGURE ASMLIB ------
2727
asmlib.InitBase("gear","assembly")
28-
asmlib.SetOpVar("TOOL_VERSION","5.176")
28+
asmlib.SetOpVar("TOOL_VERSION","5.177")
2929
asmlib.SetIndexes("V",1,2,3)
3030
asmlib.SetIndexes("A",1,2,3)
3131
asmlib.SetIndexes("S",4,5,6,7)

lua/gearassembly/gearasmlib.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2599,8 +2599,8 @@ function ApplySpawnFlat(oEnt,stSpawn,vNorm)
25992599
vOBB:Rotate(stSpawn.HAng)
26002600
DecomposeByAngle(vOBB,GetOpVar("ANG_ZERO"))
26012601
local zOffs = mathAbs(vOBB[cvZ])
2602-
SetVector(stSpawn.HMas, hPOA.O)
2603-
stSpawn.SAng:Set(stSpawn.OAng)
2602+
SetVector(stSpawn.HMas, hPOA.O) -- Apply negative rake to the angle to flatten it
2603+
stSpawn.SAng:RotateAroundAxis(stSpawn.DAng:Right(), -stSpawn.HRec.Rake)
26042604
stSpawn.SPos:Set(stSpawn.HMas); NegVector(stSpawn.SPos)
26052605
stSpawn.SPos:Rotate(stSpawn.SAng) -- Make world space mass-center vector
26062606
stSpawn.HMas:Set(stSpawn.OPos) -- Calculate mass-center position vector

0 commit comments

Comments
 (0)