Skip to content

Commit 508a36a

Browse files
chore: removes uneeded null check (AscensionGameDev#2234)
1 parent cbf67c4 commit 508a36a

File tree

1 file changed

+10
-26
lines changed

1 file changed

+10
-26
lines changed

Intersect.Editor/Core/Graphics.cs

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2227,32 +2227,16 @@ public static void DrawTexture(
22272227
blendMode = BlendState.NonPremultiplied;
22282228
}
22292229

2230-
if (renderTarget == null)
2231-
{
2232-
StartSpritebatch(blendMode, shader, null, false, null);
2233-
sSpriteBatch.Draw(
2234-
tex,
2235-
new Microsoft.Xna.Framework.Rectangle(
2236-
(int) targetRect.X, (int) targetRect.Y, (int) targetRect.Width, (int) targetRect.Height
2237-
),
2238-
new Microsoft.Xna.Framework.Rectangle(
2239-
(int) srcRectangle.X, (int) srcRectangle.Y, (int) srcRectangle.Width, (int) srcRectangle.Height
2240-
), ConvertColor(renderColor), rotationDegrees, Vector2.Zero, SpriteEffects.None, 0
2241-
);
2242-
}
2243-
else
2244-
{
2245-
StartSpritebatch(blendMode, shader, renderTarget, false, null);
2246-
sSpriteBatch.Draw(
2247-
tex,
2248-
new Microsoft.Xna.Framework.Rectangle(
2249-
(int) targetRect.X, (int) targetRect.Y, (int) targetRect.Width, (int) targetRect.Height
2250-
),
2251-
new Microsoft.Xna.Framework.Rectangle(
2252-
(int) srcRectangle.X, (int) srcRectangle.Y, (int) srcRectangle.Width, (int) srcRectangle.Height
2253-
), ConvertColor(renderColor), rotationDegrees, Vector2.Zero, SpriteEffects.None, 0
2254-
);
2255-
}
2230+
StartSpritebatch(blendMode, shader, renderTarget, false, null);
2231+
sSpriteBatch.Draw(
2232+
tex,
2233+
new Microsoft.Xna.Framework.Rectangle(
2234+
(int) targetRect.X, (int) targetRect.Y, (int) targetRect.Width, (int) targetRect.Height
2235+
),
2236+
new Microsoft.Xna.Framework.Rectangle(
2237+
(int) srcRectangle.X, (int) srcRectangle.Y, (int) srcRectangle.Width, (int) srcRectangle.Height
2238+
), ConvertColor(renderColor), rotationDegrees, Vector2.Zero, SpriteEffects.None, 0
2239+
);
22562240
}
22572241

22582242
//Extra MonoGame Stuff

0 commit comments

Comments
 (0)