CleverRaven / Cataclysm-DDA

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

Wheelbarrows batteries died. #5757

Closed Soyweiser closed 10 years ago

Soyweiser commented 10 years ago

When to sleep got the following message: "The Wheelbarrows battery dies" apparantly the same happens to shopping carts.

" happens to shopping carts too"

KA101 commented 10 years ago

Uh, yeah, that sounds Buggy.

ChunkOfMeat commented 10 years ago

I confirm.

kevingranade commented 10 years ago

Sounds like two bugs actually, one that wheelbarows and shopping carts are reporting battery messages, two that they are reporting messages when not nearby, and three that it's reporting the battery out of power instead of something you could actually notice, like headlights going off. So um, three bugs <_<

Soyweiser commented 10 years ago

Think I found one of the reasons. In vehicle.cpp bool vehicle::player_in_control (player *p) Returns: return part_with_feature(veh_part, VPFLAG_CONTROLS, false) >= 0 && p->controlling_vehicle; While part_with_feature returns an int and defaults to -1.

(There are two functions called part_with_feature, bit confusing).

Will investigate further.

Edit: disregard this. part_with_feature is checked for -1

Tried to reproduce. I spawned a few wheelbarrows, and slept around them, but didn't get the warning. (Nor did they use up any battery. I used some debug messages to check for them).

Soyweiser commented 10 years ago

Cannot reproduce it. Will try to get a save with it, so I can test it better later.

ClockworkZombie commented 10 years ago

I've encountered this in recent (last week or two) builds, and I believe the same happens with (pedal-powered) bicycles. Not often- my impression is that you have to leave and re-enter the submap for it to occur (potentially reloading or re-ordering the vehicle vector?)

ChunkOfMeat commented 10 years ago

Again recently got this effect. Unfortunately the game was saved before I saw your message. What unites these two cases:

  1. In "reality bubble" got absolutely fresh shopping cart.
  2. After that I read and drew attention to the message. Reading time 2-3 hours.
Rivet-the-Zombie commented 10 years ago

This has been fixed by #6216 so I'm going to close it.