amethyst / amethyst/rustrogueliketutorial
Town buildings are populated in wrong order
- Ngôn ngữ chính
- Rust
- Star
- 970
- Fork
- 166
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
My Player got spawned in a building so small, that it didn't even fit _Barkeep_, so I started investigating.
Code in _town.rs/building_factory_ is incorrect. It iterates over original `buildings` array, and uses its index to pick `build_type` form `building_index` array, which was sorted and has different indexing:
```rust
for (i, building) in buildings.iter().enumerate() {
let build_type = &building_index[i].2;
match build_type {
```
It should be changed to something like this:
```rust
for (i, _size, build_type) in building_index.iter() {
let building = &buildings[*i];
match build_type {
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.