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] Bike racks #26

Closed mlangsdorf closed 6 years ago

mlangsdorf commented 6 years ago

C++ is hard.

mlangsdorf commented 6 years ago

Todo:

  1. Use coord_translate( x_part.mount + delta ) instead of global_part_pos3
  2. simplify target vehicle logic - do all the checks at the end.
mlangsdorf commented 6 years ago

figure out merge co-ordinates.

mlangsdorf commented 6 years ago

mathematically reversing tileray operations is way huge pain in the ass. but we know the bike rack part mounts and global pos3 and the target vehicle global pos3. the merge vehicle has to be cardinally adjacent to the bike rack. calculate global pos3 for cardinally adjacent mount points, use the mount point that has the same global pos3 as the target vehicle.

mlangsdorf commented 6 years ago

Current status:

  1. Merge works. Sometimes.
  2. Merged vehicles aren't 100% correctly disabled (needs support in pickup for ignoring disabled parts)
  3. Need to add split code.
  4. Bike racks aren't detecting that they're full correctly.
mlangsdorf commented 6 years ago

New vague plan: store carried vehicle X or Y offset (it's one or the other, by definition) and just call the pivot point X0 or Y0 for vehicles with an X axis or Y axis. Then don't recalculate positions, just pull them off.