Water ripples now work when not underwater

Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com>
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
unknown 3 years ago
parent ed76345cc3
commit 0d5ccae00b
  1. 2
      src/sig/objects/LevelRenderer.java

@ -173,7 +173,7 @@ public class LevelRenderer extends Object{
for (int y=0;y<RabiClone.BASE_HEIGHT;y++) {
for (int x=0;x<RabiClone.BASE_WIDTH;x++) {
int index = y*RabiClone.BASE_WIDTH+x;
int camera_y = (int)RabiClone.level_renderer.getY();
int camera_y = (int)getY();
int Y = index/RabiClone.BASE_WIDTH;
if(!(Y<=RabiClone.CURRENT_MAP.getMap().getWaterLevel()-camera_y)){
p[index] = (byte)(targetBackground.getPixels()[

Loading…
Cancel
Save