This commit is contained in:
Christoph Oelckers 2015-06-18 10:20:28 +02:00
commit ffa77ff7a6
2 changed files with 17 additions and 15 deletions

View file

@ -1242,18 +1242,20 @@ if( APPLE )
LINK_FLAGS "-framework Carbon -framework Cocoa -framework IOKit -framework OpenGL" LINK_FLAGS "-framework Carbon -framework Cocoa -framework IOKit -framework OpenGL"
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/posix/osx/zdoom-info.plist" ) MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/posix/osx/zdoom-info.plist" )
# Fix fmod link so that it can be found in the app bundle. if( NOT NO_FMOD )
find_program( OTOOL otool HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT}/usr/bin" ) # Fix fmod link so that it can be found in the app bundle.
find_program( INSTALL_NAME_TOOL install_name_tool HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT}/usr/bin" ) find_program( OTOOL otool HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT}/usr/bin" )
execute_process( COMMAND "${OTOOL}" -L "${FMOD_LIBRARY}" find_program( INSTALL_NAME_TOOL install_name_tool HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT}/usr/bin" )
COMMAND grep "libfmodex.dylib (compat" execute_process( COMMAND "${OTOOL}" -L "${FMOD_LIBRARY}"
COMMAND head -n1 COMMAND grep "libfmodex.dylib (compat"
COMMAND awk "{print $1}" COMMAND head -n1
OUTPUT_VARIABLE FMOD_LINK COMMAND awk "{print $1}"
OUTPUT_STRIP_TRAILING_WHITESPACE ) OUTPUT_VARIABLE FMOD_LINK
add_custom_command( TARGET zdoom POST_BUILD OUTPUT_STRIP_TRAILING_WHITESPACE )
COMMAND "${INSTALL_NAME_TOOL}" -change "${FMOD_LINK}" @executable_path/../Frameworks/libfmodex.dylib "$<TARGET_FILE:zdoom>" add_custom_command( TARGET zdoom POST_BUILD
COMMENT "Relinking FMOD Ex" ) COMMAND "${INSTALL_NAME_TOOL}" -change "${FMOD_LINK}" @executable_path/../Frameworks/libfmodex.dylib "$<TARGET_FILE:zdoom>"
COMMENT "Relinking FMOD Ex" )
endif( NOT NO_FMOD )
endif( APPLE ) endif( APPLE )
source_group("Assembly Files\\ia32" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/asm_ia32/.+") source_group("Assembly Files\\ia32" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/asm_ia32/.+")

View file

@ -177,11 +177,11 @@ bool P_CheckSwitchRange(AActor *user, line_t *line, int sideno)
if ((TexMan.FindSwitch(side->GetTexture(side_t::top))) != NULL) if ((TexMan.FindSwitch(side->GetTexture(side_t::top))) != NULL)
{ {
return (user->z + user->height >= open.top); return (user->z + user->height > open.top);
} }
else if ((TexMan.FindSwitch(side->GetTexture(side_t::bottom))) != NULL) else if ((TexMan.FindSwitch(side->GetTexture(side_t::bottom))) != NULL)
{ {
return (user->z <= open.bottom); return (user->z < open.bottom);
} }
else if ((flags & ML_3DMIDTEX) || (TexMan.FindSwitch(side->GetTexture(side_t::mid))) != NULL) else if ((flags & ML_3DMIDTEX) || (TexMan.FindSwitch(side->GetTexture(side_t::mid))) != NULL)
{ {
@ -194,7 +194,7 @@ bool P_CheckSwitchRange(AActor *user, line_t *line, int sideno)
else else
{ {
// no switch found. Check whether the player can touch either top or bottom texture // no switch found. Check whether the player can touch either top or bottom texture
return (user->z + user->height >= open.top) || (user->z <= open.bottom); return (user->z + user->height > open.top) || (user->z < open.bottom);
} }
} }