Cleanup Vector3 constructors and Abs
This commit is contained in:
@@ -2995,7 +2995,7 @@ static int tolua_cLineBlockTracer_FirstSolidHitTrace(lua_State * tolua_S)
|
||||
Vector3d hitCoords;
|
||||
Vector3i hitBlockCoords;
|
||||
eBlockFace hitBlockFace;
|
||||
auto isHit = cLineBlockTracer::FirstSolidHitTrace(*world, start, end, hitCoords, hitBlockCoords, hitBlockFace);
|
||||
auto isHit = cLineBlockTracer::FirstSolidHitTrace(*world, *start, *end, hitCoords, hitBlockCoords, hitBlockFace);
|
||||
L.Push(isHit);
|
||||
if (!isHit)
|
||||
{
|
||||
@@ -3093,7 +3093,7 @@ static int tolua_cLineBlockTracer_LineOfSightTrace(lua_State * tolua_S)
|
||||
}
|
||||
int lineOfSight = cLineBlockTracer::losAirWater;
|
||||
L.GetStackValue(idx + 7, lineOfSight);
|
||||
L.Push(cLineBlockTracer::LineOfSightTrace(*world, start, end, lineOfSight));
|
||||
L.Push(cLineBlockTracer::LineOfSightTrace(*world, *start, *end, lineOfSight));
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -3532,7 +3532,7 @@ static int tolua_cBoundingBox_CalcLineIntersection(lua_State * a_LuaState)
|
||||
bool res;
|
||||
if (L.GetStackValues(2, min, max, pt1, pt2)) // Try the static signature first
|
||||
{
|
||||
res = cBoundingBox::CalcLineIntersection(min, max, pt1, pt2, lineCoeff, blockFace);
|
||||
res = cBoundingBox::CalcLineIntersection(*min, *max, *pt1, *pt2, lineCoeff, blockFace);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3543,7 +3543,7 @@ static int tolua_cBoundingBox_CalcLineIntersection(lua_State * a_LuaState)
|
||||
tolua_error(a_LuaState, "Invalid function params. Expected either bbox:CalcLineIntersection(pt1, pt2) or cBoundingBox:CalcLineIntersection(min, max, pt1, pt2).", nullptr);
|
||||
return 0;
|
||||
}
|
||||
res = bbox->CalcLineIntersection(pt1, pt2, lineCoeff, blockFace);
|
||||
res = bbox->CalcLineIntersection(*pt1, *pt2, lineCoeff, blockFace);
|
||||
}
|
||||
L.Push(res);
|
||||
if (res)
|
||||
|
||||
Reference in New Issue
Block a user