CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.66k stars 4.18k forks source link

Display Part at mount x,x error #74129

Open Maleclypse opened 5 months ago

Maleclypse commented 5 months ago

Describe the bug

21:24:16.327 ERROR : C:\Users\colli\Documents\GitHub\Cataclysm-DDA\src\vehicle_display.cpp:64 [get_display_of_tile] no display part at mount (-3, 2)

Repeated hundreds of times

Attach save file

N/A

Steps to reproduce

Load a new character encounter a vehicle

Expected behavior

No error

Screenshots

No response

Versions and configuration

Additional context

No response

IdleSol commented 5 months ago

I can't reproduce it. But I'm pretty sure I've encountered a similar error. Once or twice, and both times while using the debug menu (so didn't make a report).

cdda-windows-tiles-x64-2024-05-28-0322

UPD. Managed to get an error. Again when using teleportation. I attach a save, but loading the save does not create a new error message.

 DEBUG    : no display part at mount (2, 3)
 DEBUG    : no display part at mount (-1, -2)

 FUNCTION : vpart_display vehicle::get_display_of_tile(const point&, bool, bool, bool, bool) const
 FILE     : src/vehicle_display.cpp
 LINE     : 64
 VERSION  : cdda-experimental-2024-05-28-0322 ec621a8

It's very similar to: https://github.com/CleverRaven/Cataclysm-DDA/issues/71451#issuecomment-1976634310

Мардела-trimmed.tar.gz

IdleSol commented 5 months ago

There are three cars next to the character. pict 1 pict 2

I'm assuming the problem is the latter.

IdleSol commented 5 months ago

Yep. Here's a way to reproduce it.

  1. Open the map.
  2. Find an intersection like this.

pict 3

  1. Teleport to it.
  2. Get an error message if there are cars there. If there are no cars, go to the other one.

The main point is that it is on it, cars spawn at an angle. In parking lots, or roads, they mostly appear oriented to the sides of the world. I hope I've made myself clear.

I tested it and got the combo:

DEBUG    : no display part at mount (-2, -2)
DEBUG    : no display part at mount (1, 2)
DEBUG    : no display part at mount (2, 3)

test

As you can see, the problem is that when spawning a car, the fake car parts don't appear. But when saving and loading, they are added. Therefore, it is not possible to reproduce the error from saving.

You may also notice that this applies to the extreme parts of the car, not all the fake parts. This may be important. Their coordinates may go beyond the limits specified in the function for adding fake parts.

@irwiss I apologize for the distraction. Perhaps you can tell me more precisely what the problem is, since you fixed a past similar problem.

UPD. Save: Мардела-trimmed.tar.gz

P.S. Were there any changes to the coordinates of the cars? Cause something doesn't match.

RenechCDDA commented 5 months ago

73747 resolved the same error caused by (a different?) issue, and may be worth considering.

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.