From 5a646f71d632b0cd07ca98ed504620aaafb1133a Mon Sep 17 00:00:00 2001
From: Svornost <11434-svornost@users.noreply.gitgud.io>
Date: Sun, 26 Jan 2020 14:24:44 -0800
Subject: [PATCH] fixes

---
 src/endWeek/saPorn.js | 6 ++++--
 src/js/porn.js        | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/endWeek/saPorn.js b/src/endWeek/saPorn.js
index b92b83ce404..8e4adfa98e1 100644
--- a/src/endWeek/saPorn.js
+++ b/src/endWeek/saPorn.js
@@ -5,6 +5,7 @@ window.saPorn = (function saPorn() {
 	let he, him, his, hers, himself, girl, loli, He, His;
 	let decayRate;
 	let viewership;
+	let viewerSoaking;
 
 	return saPorn;
 
@@ -18,6 +19,8 @@ window.saPorn = (function saPorn() {
 		let oldFame = slave.porn.viewerCount;
 
 		if (V.studio === 1 && slave.porn.feed === 1) {
+			viewerSoaking = 0;
+
 			calcBaseViewership(slave);
 
 			r += `The studio regularly releases clips of ${his} daily affairs. `;
@@ -85,7 +88,7 @@ window.saPorn = (function saPorn() {
 	}
 
 	function updateViewerCount(slave) {
-		slave.porn.viewerCount = Math.trunc(App.Porn.getAllGenres().reduce((acc, cur) => acc + slave.porn.fame[cur.fameVar]));
+		slave.porn.viewerCount = Math.trunc(App.Porn.getAllGenres().reduce((acc, cur) => acc + slave.porn.fame[cur.fameVar], 0.0));
 	}
 
 	function prestigeDecay(slave) {
@@ -222,7 +225,6 @@ window.saPorn = (function saPorn() {
 	}
 
 	function allGenreViews(slave) {
-		let viewerSoaking = 0;
 		let adjustedViewership = viewership;
 
 		function genreViews(slave, genre) {
diff --git a/src/js/porn.js b/src/js/porn.js
index 4c767e1639f..7a4cf1597ae 100644
--- a/src/js/porn.js
+++ b/src/js/porn.js
@@ -74,7 +74,7 @@ App.Porn.Genre.analAddict = {
 	prestigeDesc3: "Millions are intimately familiar with the sight of $his well-versed anus.",
 	hitText: function(slave) { return `${getPronouns(slave).His} complete obsession with taking things up ${getPronouns(slave).his} ass makes ${getPronouns(slave).him} a hit with viewers that enjoy hardcore anal.`; },
 	trinketShotDesc: function(slave) { return `showing ${getPronouns(slave).him} TEMPLATE`; },
-	valid: function(slave) { return slave.sexualFlaw === "anal addict" && canDoAnal($slaves[$i]); },
+	valid: function(slave) { return slave.sexualFlaw === "anal addict" && canDoAnal(slave); },
 	uiName: function() { return capFirstChar(this.fameName); }
 };
 
-- 
GitLab