CleverRaven / CleverRaven/Cataclysm-DDA

unboard_vehicle:: vehicle not found message pops up when npc walks

Open
#79,231 2 comments 0 reactions 0 assignees View on GitHub
(S2 - Confirmed)
Dominant language
C++
Stars
13.2k
Forks
4.6k
Avg merge
2d 1h
Merged PRs (30d)
205

Description

### Describe the bug

I get this debug message when one of my npcs starts moving. ": map::unboard_vehicle:: vehicle not found"
The npc was teaching another npc and they were both on one vehicle, and when the teaching finished the tutor starts wandering around her seat. When I left the vehicle and the tutor followed me out of the vehicle, said message popped up every tile she moved.

### Attach save file

[新夏洛茨维尔7-trimmed.tar.gz](https://github.com/user-attachments/files/18465918/7-trimmed.tar.gz)

### Steps to reproduce

I'm not sure how to reproduce this bug with a new save, so here's how to reproduce it with my uploaded save file:
1.Wait 10 minutes and the message will automatically pop up as the tutor npc "玛丽亚·'巨蜥'·凯莉" (the one with lizard mutations) finishes teaching and steps out of the vehicle to follower the player.
2.Head back into the vehicle, the message will stop showing up as the npc enters the vehicle. However, she will not just head back to her seat (which although previously assigned to her, somehow doesn't show that it's assigned to her in the vehicle menu now) and sit there. Instead, she will wander 1 tile around the seat. This would still happen if the player takes her seat and she is automatically assigned to another seat.

### Expected behavior

No debug message, npcs shouldn't be registered as boarded to a vehicle after they've left vehicles.

### Screenshots

_No response_

### Versions and configuration

- OS: Windows
- OS Version: 10.0.19045.5247 (22H2)
- Game Version: 78fd6e3 [64-bit]
- Graphics Version: Tiles
- Game Language: 中文 (天朝)(99.1%) [zh_CN]
- Mods loaded: [
浩劫余生 [dda],
NPC无基本需求 [no_npc_food],
NPC不受空间风暴影响 [personal_portal_storms],
减缓真菌增殖 [no_fungal_growth]
]

### Additional context

https://www.reddit.com/r/cataclysmdda/comments/oqlu1v/vehicle_disappeared/
One old CDDA subreddit post mentions that this could happen if the player "save the game while driving, keep driving and then savescum (either intentionally or accidentally if the game crashes". Not sure if it's the case.

Contributor guide

Open the contributing guide

Research direction

Start by searching the codebase for the `map::unboard_vehicle:: vehicle not found` debug message and trace the NPC vehicle boarding state around unboarding. Load the attached save file and follow the listed steps, then confirm that the tutor can leave and re-enter the vehicle without repeated messages or incorrect seat behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.