Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Car given to the player even when it shouldn't #538

Open
blackpaulillyria opened this issue May 23, 2024 · 3 comments
Open

Car given to the player even when it shouldn't #538

blackpaulillyria opened this issue May 23, 2024 · 3 comments

Comments

@blackpaulillyria
Copy link

I discovered an odd bug regarding the car.

Let's say you remove the function car_give_to_party from the map_exit_p_proc that fires on a map script for a random encounter.

If you exit that map on a brown exit grid, you will continue traveling the world map on foot as expected.
However, if you do the exact same thing while the combat is initialized, you will continue traveling in the car even though car_give_to_party was never called.

This only happens in a random encounter while combat is initialized when you hit the brown exit grid.
I looked a little bit through the source code and believe that the issue is with wmGenData.isInCar not being set to false.

@Lexx2k
Copy link

Lexx2k commented May 23, 2024

Leaving an encounter map without the car would mean that it gets deleted. So the real question is, why would you even want to do that.

@blackpaulillyria
Copy link
Author

Leaving an encounter map without the car would mean that it gets deleted. So the real question is, why would you even want to do that.

I am developing a driving system for Fallout Yesterday where you can drive, abandon or switch between 7 different vehicles. This is the last bug that I have for the system to be finished and I can't find a proper workaround for it.

Also, I see now that the car is given to the player even if the combat has ended on a random encounter.

@blackpaulillyria
Copy link
Author

OK, I found some kind of a workaround, it's not perfect but it might do for now.
When the player abandons the car on a random encounter and exits, I set fuel to 0. This then makes the engine set wmGenData.isInCar to false as soon as I start to travel which fixes my issue and I continue traveling on foot.

Side effect is that "Car Outta Gas" area also gets displayed because of this, which I don't want, but I can handle that using global scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants