PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

43M Downloads

Drone stuck waiting for teleport.

ruifung opened this issue ยท 13 comments

commented

Sometimes, when a TC6 Taint seed spawns on the exterior of the dome (underwater), the drone seems to try to teleport, with particles showing, red laser showing, but it just hangs there with the pre-teleportation sounds and particles playing.

Then after you kill the taint seed, the drone shortly appears... exactly where the taint seed was.
Does the drone perhaps, try to teleport to the position of the targeted entity, but only after it moves and is no longer occupying the space?

Also, despite me putting a hole in the dome along with signs / multiblock covers to stop the water flow, the drones does not seem to fly through it, instead favouring trying to teleport?

FYI, Taint Seeds are basically static unmoving entities.

commented

What program is the drone running (I assume you want it to kill the taint seeds) ? Using a melee weapon or minigun?

Regarding not leaving the dome, it's possible the drone isn't recognising those blocks as passable - I'll have to test that.

Also, might be worth trying the latest jenkins build, I've made a few changes on how drones view water (see the git commit messages and my update in your other issue)

commented

I am running build 217.

At that point, the drone is running an Attack Entity piece.
And it's using a minigun.

And yeah I want it to kill the taint seeds.

commented

Haven't been able to reproduce this so far, but drone pathfinding issues can be like that. Any chance of some screenshots of your setup (the simpler the example the better so I can try to reproduce it) ?

commented

@desht I have observed something that may lead you in the right direction of the problem (if there is one outside of pathfinding). Sometimes (cannot confirm 100%), when the drone teleports to a location, it will do so to the corner most part of the target block causing the drone's body to overlap adjacent blocks. I noticed this because, after having the drone teleport to a location then enter standby, it would do just that, but then, wake up and fly to recenter itself (I had a check in the program to prevent the drone from getting knocked off a charging station; that's what caused it to wake up). It would only do this one time per teleport then remain in standby until it had work. With this in mind, could it be possible the drone is trying to teleport to a location believing the space is already occupied? Below is a simple grid layout illustrating by what I mean with the overlap.

--Block #5 = target teleport block
--Green box = actual drone teleport location

tempgrid

commented

Sure, I'll try getting some screenshots later.

commented

@Tekstack yeah that's possible. That would be caused by teleport coords being rounded to the corresponding BlockPos (BlockPos using integer coordinates).

commented

Here, pictures.
In the first one, you can see the location of the giant taint seed on the exterior of the underwater dome.
In the second one, you can see the drone clearly having its laser pointed at it with teleport particles.
The area is chunkloaded, so while I've been staring at it for a minute, its probably been stuck that way for longer.

In case it isn't apparent, this dome is underwater. Also, there are 4 exit holes in the center top with chisel and bits thin thin covers(?) blocking the water.

2018-06-29_19 23 54
2018-06-29_19 24 09

commented

Thanks. I'll see what I can do. Could well be that C&B bits aren't considered passable by drones.

commented

Well, the C&B Bits used to be signs... until I found out they could get tainted.

commented

OK, some changes & notes:

  • C&B blocks are indeed not considered passable by drones, or indeed any entity (e.g. a zombie won't pass a 1-bit thick cover in a corridor). There's no easy fix for this, since the shape of a C&B block isn't necessarily easy to determine.
  • I've made Aphorism Tiles passable like signs; drones will now fly through a 1-block gap with an Aphorism Tile in it, and Aphorism Tiles will hold water back, and they should be Thaumcraft taint-resistant. So that's a solution.
  • I also made a fix to the teleportation code; the time-to-teleport counter was getting continually reset under certain circumstances (like trying to pathfind to a target entity when attacking). Now if the drone can't pathfind, it will teleport to right beside the target entity and attack it (either melee or with a minigun).

As a side note, I hoped trapdoors would be passable but I think there's a bug in vanilla or Forge where a closed trapdoor is marked as passable for pathfind, and an open one isn't. So a drone will refuse to pass an open trapdoor, but try to fly through a closed one and get stuck...

commented

You can find this fix in build 221 from Jenkins. Note this (as of build 220) also includes a lot of changes to the pneumatic helmet and add the 3 other armor pieces (if you want to test this pre-release go for it). This will be in the 0.7.0 major release.

commented

Huh. So the reason it was teleporting after the taint seed has been killed is because it stopped trying to pathfind and thus reseting the countdown?

commented

Yep, exactly.