The International Simutrans Forum

 

Author Topic: smoother behaviour of trapped ground_object  (Read 1693 times)

0 Members and 1 Guest are viewing this topic.

Offline Leartin at

  • Devotee
  • *
  • Posts: 1226
  • PAK-DEV P192C
  • Languages: DE, EN
smoother behaviour of trapped ground_object
« on: December 13, 2017, 07:35:55 PM »
Moving ground_objects can be trapped in cities, where they can't move properly anymore. If that happens, the object will attempt to move in a random direction. Once it reaches the end of the tile, since the tile in the direction it moved to is not appropriate/free, it will teleport back in it's initial position and try again.

I wonder if it would be much work to have it turn around instead of teleporting, so it would enter the tile where it would have left it. That way, even an object trapped on a single tile could move in 3 different directions from each position, allowing for smooth and varied paths even in confined space.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5505
  • Languages: EN, NO
Re: smoother behaviour of trapped ground_object
« Reply #1 on: December 13, 2017, 07:43:05 PM »
I haven't seen this much in cities, but it happens all the time in forests. In that case, I suggested that they just keep moving. If they get trapped in cities, I just remove them.

Offline Leartin at

  • Devotee
  • *
  • Posts: 1226
  • PAK-DEV P192C
  • Languages: DE, EN
Re: smoother behaviour of trapped ground_object
« Reply #2 on: December 13, 2017, 07:49:08 PM »
Removing trapped objects (and perhaps respawning them somewhere else) might be nice as well. Though I don't see an issue with them getting stucked and having to be removed manually, I just don't like their erratic movement/teleportation when it happens.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5505
  • Languages: EN, NO
Re: smoother behaviour of trapped ground_object
« Reply #3 on: December 13, 2017, 08:40:17 PM »
The sudden teleportation might be attracting my attention to them in the first place. In addition, it looks like the images from sheep in pak64 have been mixed up, so that they not only teleport, but seem to be walking sideways.