Skip to content

Commit

Permalink
Minor tweak pressed chances
Browse files Browse the repository at this point in the history
  • Loading branch information
Ealrann committed Jun 19, 2019
1 parent 77c0999 commit 65a4355
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion org.sheepy.vsand/src/main/resources/board_update.comp
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,10 @@ bool chooseTo(ivec2 loc, ivec2 localLoc)

bool wantToFallDown = materials[valueDown].isStatic == 0
&& density > materials[valueDown].density;
bool luck = gold_noise(loc, pushConstants.random) < 0.95;
bool luck = false;
if (wantToFallDown)
{
luck = gold_noise(loc, pushConstants.random) < 0.95;
if (luck)
{
decision[localLoc.x][localLoc.y] |= TO_DOWN | (valueDown << TARGET_VALUE_POSITION);
Expand All @@ -332,6 +333,7 @@ bool chooseTo(ivec2 loc, ivec2 localLoc)
int runoff = materials[currentValue].runoff;
int distLeft = runoff;
int distRight = runoff;
luck = pushConstants.random < 0.3;

if (materials[valueLeft].density < density && materials[valueLeft].isStatic == 0)
{
Expand Down
Binary file modified org.sheepy.vsand/src/main/resources/board_update.comp.spv
Binary file not shown.

0 comments on commit 65a4355

Please sign in to comment.