Skip to content

Commit

Permalink
> Fixed: terrain mesh
Browse files Browse the repository at this point in the history
> Fixed: -1 gob remove
+Update
  • Loading branch information
Cediner committed Mar 25, 2024
1 parent 8e31452 commit 76dd6cd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/haven/OCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void remove(Gob ob) {
Collection<ChangeCallback> cbs;
synchronized (this) {
old = objs.remove(ob.id, ob);
if ((old != null) && (old != ob))
if (ob.id != -1 && (old != null) && (old != ob))
throw (new RuntimeException(String.format("object %d removed wrong object", ob.id)));
cbs = new ArrayList<>(this.cbs);
}
Expand Down
2 changes: 1 addition & 1 deletion src/haven/Tileset.java
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ private void packtiles(Collection<Tile> tiles, Coord tsz) {

@Override
public BufferedImage fill() {
BufferedImage buf = TexI.mkbuf(sz());
BufferedImage buf = TexI.mkbuf(dim);
Graphics g = buf.createGraphics();
for (int i = 0; i < nt; i++)
g.drawImage(order[i].img, place[i].x, place[i].y, null);
Expand Down
5 changes: 1 addition & 4 deletions src/haven/resutil/TerrainTile.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@
import java.util.Random;
import java.util.WeakHashMap;

import static haven.resutil.GroundTile.tcx;
import static haven.resutil.GroundTile.tcy;

public class TerrainTile extends Tiler implements Tiler.MCons, Tiler.CTrans {
public final GLState base;
public final SNoise3 noise;
Expand Down Expand Up @@ -354,7 +351,7 @@ public void faces(MapMesh m, MPart d) {
* distinction. */
public void _faces(MapMesh m, int z, Tile trans, MPart d) {
Tex ttex = trans.tex();
float tl = tcx(ttex, 0), tt = tcy(ttex, 0), tw = tcx(ttex, ttex.sz().x) - tl, th = tcy(ttex, ttex.sz().y) - tt;
float tl = ttex.tcx(0), tt = ttex.tcy(0), tw = ttex.tcx(ttex.sz().x) - tl, th = ttex.tcy(ttex.sz().y) - tt;
TexGL gt;
if (ttex instanceof TexGL)
gt = (TexGL) ttex;
Expand Down
Binary file modified update/build/hafen.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions update/ver
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
029183de40b1a3b64b81b78d5d5197252de700ec
8e31452bfccd010527bbb6e5324bf1bee99ab84d
bin/python/libcrypto-1_1.dll=594303e2ce6a4a02439054c84592791bf4ab0b7c12e9bbdb4b040e27251521f1
bin/python/libssl-1_1.dll=9d4cf1c03629f92662fc8d7e3f1094a7fc93cb41634994464b853df8036af843
bin/python/LICENSE.txt=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Expand Down Expand Up @@ -42,7 +42,7 @@ build/gluegen-rt-natives-windows-i586.jar=c0b6af64fbc1676e30d8598284eda4c617c31f
build/gluegen-rt.jar=29a325957f01cf5b1a44e5662455185010886805f215d5a8f122a8b5eb877bfb
build/graal-sdk.jar=9d7b7e390cc13551c4c040ea8147da02d02434d441c14636e8d9a495d97625bd
build/graaljs.jar=4cef00a4af23bb514209e590822ecc7b0e792ccddb0725f8f30168772202fd20
build/hafen.jar=f7d58512fedb88210c670a91ceb6e1c99a7c7ab91bf09114d2d0c161e484fd6c
build/hafen.jar=a5698f541d301cf436cbfa5ec209023e5846b4719954e6bc4b31d822185f93e0
build/haven-config.properties=7d59e55c83a9fd7f0205863e888671267d75cb858414410899edd43006145380
build/HavenDiscord.jar=6b0afde896b7a81e0892fc1685f8b2119ea22a26773fb1f1a3c09e036f0efa33
build/jackson-core.jar=256ff34118ab292d1b4f3ee4d2c3e5e5f0f609d8e07c57e8ad1f51c46d4fbb46
Expand Down

0 comments on commit 76dd6cd

Please sign in to comment.