This commit is contained in:
milek7
2017-10-31 20:25:17 +01:00
parent c62fca8b5a
commit 6d9e718a95
4 changed files with 8 additions and 7 deletions

View File

@@ -139,7 +139,3 @@ target_link_libraries(${PROJECT_NAME} ${LUAJIT_LIBRARIES})
find_package(libserialport REQUIRED)
include_directories(${libserialport_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME} ${libserialport_LIBRARY})
if (UNIX)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
endif()

View File

@@ -1018,6 +1018,8 @@ event_manager::CheckQuery() {
return false;
}
case tp_Sound: {
if (m_workevent->Params[ 9 ].tsTextSound == nullptr)
break;
switch( m_workevent->Params[ 0 ].asInt ) {
// trzy możliwe przypadki:
case 0: {

View File

@@ -846,7 +846,12 @@ state_manager::deserialize_sound( cParser &Input, scene::scratch_data &Scratchpa
auto const soundname { Input.getToken<std::string>() };
auto *sound = sound_man->create_text_sound(soundname);
sound->position((glm::vec3)location).dist(Nodedata.range_max);
sound->position((glm::vec3)location);
if (Nodedata.range_max != -1.0)
sound->dist(Nodedata.range_max);
else
sound->set_mode(sound::global);
skip_until( Input, "endsound" );
return sound;

View File

@@ -350,8 +350,6 @@ sound& sound::position(glm::vec3 p)
glm::vec3 sound::location()
{
if (mode == global)
throw std::runtime_error("sound: bad state, no position");
return pos;
}