Skip to content

Commit 006fe68

Browse files
ApeLsiN4eGpatrikjuvonen
authored andcommitted
Fix dxDrawCircle segments argument (#1079)
modified: Client/core/Graphics/CGraphics.cpp
1 parent 5c648b2 commit 006fe68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Client/core/Graphics/CGraphics.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,13 +865,13 @@ void CGraphics::DrawCircleQueued(float fX, float fY, float fRadius, float fStart
865865
fStartAngle = D3DXToRadian(fStartAngle);
866866
fStopAngle = D3DXToRadian(fStopAngle);
867867
// Calculate each segment angle
868-
const float kfSegmentAngle = (fStopAngle - fStartAngle) / (siSegments - 1);
868+
const float kfSegmentAngle = (fStopAngle - fStartAngle) / siSegments;
869869

870870
// Add center point
871871
pVecVertices->push_back({fX, fY, 0.0f, ulColorCenter});
872872

873873
// And calculate all other vertices
874-
for (short siSeg = 0; siSeg < siSegments; siSeg++)
874+
for (short siSeg = 0; siSeg <= siSegments; siSeg++)
875875
{
876876
PrimitiveVertice vert;
877877
float curAngle = fStartAngle + siSeg * kfSegmentAngle;

0 commit comments

Comments
 (0)