mlangsdorf / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A fork/variant of Cataclysm Roguelike by Whales.
http://en.cataclysmdda.com/
Other
1 stars 1 forks source link

wip combined vehicle split code -- needs polishing, commit split #25

Closed mlangsdorf closed 6 years ago

mlangsdorf commented 6 years ago

Add code to split a vehicle at a location, splitting it into up to 4 other vehicles.

Needs general polishing, optimization, C++ code love, astyle, and a fix for labels. And more testing.

mlangsdorf commented 6 years ago

Feel free to point and mock.

mlangsdorf commented 6 years ago

splitting a vehicle with 190 parts into 4 new vehicles using a Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz: real 0m1.655s user 0m1.587s sys 0m0.061s Not too bad.

mlangsdorf commented 6 years ago

Preliminary play testing. Found some bugs:

  1. break_off doesn't get called in all the instances it seems it should be called, so the split code isn't being called.
  2. vehicle name isn't getting propagated. I don't think velocity is being propagated, but I can't get a vehicle to break into pieces at speed so it's hard to tell.
mlangsdorf commented 6 years ago

rebased. Added name and (hopefully) velocity propagation.

Works well enough to stop the initial invincible coil problem, but adds more problems.

mlangsdorf commented 6 years ago

Dead branch