| 372 | } |
| 373 | |
| 374 | void Map::SpawnBackpack( BackpackPtr backpack ) |
| 375 | { |
| 376 | const EntityId id= next_rocket_id_; |
| 377 | next_rocket_id_++; |
| 378 | |
| 379 | Backpack& inserted_backpack= |
| 380 | *backpacks_.emplace( id, std::move(backpack) ).first->second; |
| 381 | |
| 382 | inserted_backpack.min_z= GetFloorLevel( inserted_backpack.pos.xy(), 0.2f/* TODO - select correct radius*/ ); |
| 383 | |
| 384 | // Let backpacks jump up after spawn. |
| 385 | inserted_backpack.vertical_speed= GameConstants::vertical_acceleration * -0.2f; |
| 386 | |
| 387 | dynamic_items_birth_messages_.emplace_back(); |
| 388 | PrepareBackpackBirthMessage( inserted_backpack, id, dynamic_items_birth_messages_.back() ); |
| 389 | } |
| 390 | |
| 391 | void Map::SpawnMonsterBodyPart( |
| 392 | const unsigned char monster_type_id, const unsigned char body_part_id, |