adjust sound trigger radius to mode radius

This commit is contained in:
milek7
2019-04-09 13:27:26 +02:00
parent a4bd25d47c
commit 7b2e6e94ed

View File

@@ -187,8 +187,9 @@ void state_manager::process_commands() {
std::getline(ss, name, ':');
std::getline(ss, data, ':');
simulation::State.create_model(data, name, commanddata.location);
simulation::State.create_eventlauncher("node -1 0 launcher eventlauncher 0 0 0 20 none -0.1 obstacle_collision end", name + "_snd", commanddata.location);
TAnimModel *model = simulation::State.create_model(data, name, commanddata.location);
simulation::State.create_eventlauncher("node -1 0 launcher eventlauncher 0 0 0 " + std::to_string(model->radius())
+ " none -0.1 obstacle_collision end", name + "_snd", commanddata.location);
}
if (commanddata.command == user_command::deletemodel) {