Cataclysm-BN icon indicating copy to clipboard operation
Cataclysm-BN copied to clipboard

vehicle::init_state uses wrong has_flag

Open Coolthulhu opened this issue 4 years ago • 2 comments

vehicle::init_state uses vehicle_part::has_flag for light activation code, but should use vpart_info::has_flag instead. It probably doesn't work, but I didn't test it since it's non-deterministic.

has_flag type functions shouldn't use raw integers, but enum class types. If they all did, this bug wouldn't be possible.

Simple fix, mostly noting so I don't forget it is a thing.

Coolthulhu avatar Jan 23 '21 15:01 Coolthulhu