Don't fertilize from destroyed pawns

This commit is contained in:
lutepickle 2024-02-28 19:32:24 -08:00
parent 1cdb12fd3a
commit c6e4d81a20

View file

@ -1338,7 +1338,7 @@ namespace RJW_Menstruation
protected Pawn Fertilize()
{
if (cums.NullOrEmpty()) return null;
List<Cum> eligibleCum = cums.FindAll(cum => !cum.notcum && cum.FertVolume > 0 && cum.pawn != null && (RJWPregnancySettings.bestial_pregnancy_enabled || xxx.is_animal(Pawn) == xxx.is_animal(cum.pawn)));
List<Cum> eligibleCum = cums.FindAll(cum => !cum.notcum && cum.FertVolume > 0 && !(cum.pawn?.Destroyed ?? true) && (RJWPregnancySettings.bestial_pregnancy_enabled || xxx.is_animal(Pawn) == xxx.is_animal(cum.pawn)));
if (eligibleCum.Count == 0) return null;
float totalFertPower = eligibleCum.Sum(cum => cum.FertVolume);