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

New vehicle bug? #2926

Closed
minakitty opened this issue Sep 9, 2013 · 8 comments

Comments

Projects
None yet
5 participants
@minakitty
Copy link
Contributor

commented Sep 9, 2013

I was playing the new build (c613180) and got this debug message. I know a lot of vehicle updates were added today, and it almost sounds like what @kevingranade was talking about with vehicle wrecks.
screenshot from 2013-09-08 23 24 44

@ianestrachan

This comment has been minimized.

Copy link
Contributor

commented Sep 9, 2013

I had that happening at one point, but I (thought I) fixed it before the PR got merged. Does it cause an infinite loop that freezes the game?

@gbasood

This comment has been minimized.

Copy link

commented Sep 10, 2013

I have this problem as well after building 4ab0886, and it does freeze the game.

@ianestrachan

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2013

I have the sneaking suspicion that it's caused by vehicle spawn collisions on the boundaries of submaps. I was getting the message before when it was trying to remove the vehicle from the wrong submap, so some craziness along the edges might be what's going on.

EDIT: Drove around three big towns without getting this, it's hard to reproduce. Did you reset the world? Not that that should be causing it...

@1942rob

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2013

zombie density to 0, and town size to 20 should do the trick

Edit: The cause could be that destroy_vehicle() is called during map::shift()

@ianestrachan

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2013

Essentially, the reason it fails is that it the wreckage placement, in order to avoid nonsense regarding vehicle rotation and local->global->local coordinate conversions, creates a third vehicle, adds all parts from the two collided vehicles, then deletes the original vehicles and places the new vehicle where the original one was. To get rid of the old vehicle, destroy_vehicle() is called. But if it can't find the vehicle, it aborts with that debug message. However, the attempt to place the wreckage causes a collision with the original vehicle, and the process repeats until the game freezes.

@ianestrachan

This comment has been minimized.

Copy link
Contributor

commented Sep 11, 2013

Interesting: I improved the debug statement to say the name of the vehicle it couldn't find, and it would give back "Wreckage". Which is quite interesting because I only ever try to destroy the vehicle that the new one spawns on top of.

I'm probably setting the submap x/y wrong in the new vehicle, let me see if I can fix that.

EDIT: Maybe not. Easy steps to reproduce: Go onto an empty bit of road. Spawn a car with the debug command. Walk 2 square left, spawn again (causing wreckage to form). Repeat until the message appears. I'm pretty sure that it IS something to do with submap boundaries again.

@ianestrachan

This comment has been minimized.

Copy link
Contributor

commented Sep 11, 2013

Got it! The submap to place the vehicle in was being pre-calculated, but if wreckage was placed then the nonant (whatever that is supposed to be) was wrong. Moving the calculation of it to AFTER the vehicle was ready to be placed fixed the issue. PR going up soon.

@kevingranade

This comment has been minimized.

Copy link
Member

commented Sep 11, 2013

A nonant is a latin term for one ninth of a grid iirc
Evidently the map was originally 3x3
Technically we have dodecanants or something,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.