Skip to content

Commit

Permalink
Fix disappearing cow bug. If an export is not allowed, we have to mak…
Browse files Browse the repository at this point in the history
…e sure the cows aren't removed from source herd still.
  • Loading branch information
thomrawson committed Aug 19, 2024
1 parent 0eb6fb0 commit fba96e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions inst/dust/cows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ class cows {
internal.import_E[i_dst] += internal.export_E[i_src];
internal.import_I[i_dst] += internal.export_I[i_src];
internal.import_R[i_dst] += internal.export_R[i_src];
} else {
internal.export_S[i_src] = 0;
internal.export_E[i_src] = 0;
internal.export_I[i_src] = 0;
internal.export_R[i_src] = 0;
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/cows.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fba96e4

Please sign in to comment.