mirror of
https://github.com/ConjureETS/DeathBook.git
synced 2026-03-25 13:00:59 +00:00
Merge branch 'master' of https://github.com/ConjureETS/DeathBook
This commit is contained in:
commit
c04fa49a39
@ -311,7 +311,7 @@ Light:
|
|||||||
m_SpotAngle: 30
|
m_SpotAngle: 30
|
||||||
m_CookieSize: 10
|
m_CookieSize: 10
|
||||||
m_Shadows:
|
m_Shadows:
|
||||||
m_Type: 2
|
m_Type: 0
|
||||||
m_Resolution: -1
|
m_Resolution: -1
|
||||||
m_Strength: 1
|
m_Strength: 1
|
||||||
m_Bias: .0500000007
|
m_Bias: .0500000007
|
||||||
|
|||||||
@ -79,7 +79,7 @@ namespace DeathBook.Model
|
|||||||
missing = avgConnections - p1.numFriends; // TODO Add randomness
|
missing = avgConnections - p1.numFriends; // TODO Add randomness
|
||||||
|
|
||||||
if (missing <= 0)
|
if (missing <= 0)
|
||||||
break;
|
continue;
|
||||||
|
|
||||||
list.Clear();
|
list.Clear();
|
||||||
|
|
||||||
@ -99,13 +99,16 @@ namespace DeathBook.Model
|
|||||||
float prob = Mathf.Lerp(probability, 1, missing / list.Count);
|
float prob = Mathf.Lerp(probability, 1, missing / list.Count);
|
||||||
foreach (DistanceNode node in list)
|
foreach (DistanceNode node in list)
|
||||||
{
|
{
|
||||||
if (node.dist < smallest.dist && Random.value < prob)
|
if (node.dist < smallest.dist)
|
||||||
smallest = node;
|
smallest = node;
|
||||||
}
|
}
|
||||||
//TODO Code/use a heap instead
|
//TODO Code/use a heap instead
|
||||||
|
|
||||||
|
if (Random.value < prob)
|
||||||
|
{
|
||||||
friendships.Add(CreateFriendship(p1, smallest.p));
|
friendships.Add(CreateFriendship(p1, smallest.p));
|
||||||
missing--;
|
missing--;
|
||||||
|
}
|
||||||
list.Remove(smallest);
|
list.Remove(smallest);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user