From 4fe1ffb348486ea6ce615161953edb6d9efd4836 Mon Sep 17 00:00:00 2001
From: prndev <prndev@users.noreply.github.com>
Date: Sun, 22 Apr 2018 20:31:14 +0200
Subject: [PATCH] Only scale the belly if there is a belly.

---
 src/art/vector/Belly.tw | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/art/vector/Belly.tw b/src/art/vector/Belly.tw
index fbbdd636994..cc550c7d50c 100644
--- a/src/art/vector/Belly.tw
+++ b/src/art/vector/Belly.tw
@@ -1,20 +1,25 @@
 :: Art_Vector_Belly_ [nobr]
 
-<<set _art_have_belly = true>>
-<<set _art_belly_scale_factor = 0.300*Math.log(0.011*_artSlave.belly) >>
-/* TODO: add check in penis control. do not draw penis atop belly if _art_belly_scale_factor > 1. */
-<<set _art_scale_factor = _art_belly_scale_factor >>
-<<set _art_translation_x = -262*(_art_scale_factor-1) >>
-<<set _art_translation_y = -284*(_art_scale_factor-1) >>
-<<set _art_belly_transform = "matrix(" + _art_scale_factor +",0,0," + _art_scale_factor + "," + _art_translation_x + "," + _art_translation_y + ")">>
-<<set _art_transform = _art_belly_transform>>
+/* default: do no scaling (for addons on flat bellies) */
+<<set _art_transform = "">>
+
+<<if _artSlave.belly >= 2000>>
+	/* add pregnancy belly, scale dynamically (clothing and addons can be scaled, too) */
+	<<set _art_belly_scale_factor = 0.300*Math.log(0.011*_artSlave.belly) >>
+	/* TODO: add check in penis control. do not draw penis atop belly if _art_belly_scale_factor > 1. */
+	<<set _art_scale_factor = _art_belly_scale_factor >>
+	<<set _art_translation_x = -262*(_art_scale_factor-1) >>
+	<<set _art_translation_y = -284*(_art_scale_factor-1) >>
+	<<set _art_belly_transform = "matrix(" + _art_scale_factor +",0,0," + _art_scale_factor + "," + _art_translation_x + "," + _art_translation_y + ")">>
+	<<set _art_transform = _art_belly_transform>>
+<</if>>
 <<if _artSlave.belly >= 2000>>
 	<<if _artSlave.navelPiercing == 1>>
 		<<include Art_Vector_Belly_Pregnant_Piercing>>
 	<<elseif _artSlave.navelPiercing == 2>>
 		<<include Art_Vector_Belly_Pregnant_Piercing_Heavy>>
 	<<else>>
-	<<include Art_Vector_Belly>>
+		<<include Art_Vector_Belly>>
 		<<if _artSlave.clothes == "a hijab and abaya">>
 			<<include Art_Vector_Belly_Outfit_Abaya>>
 		<</if>>
-- 
GitLab