Skip to content

Commit

Permalink
If cast failed then moving, try cast again but from sky
Browse files Browse the repository at this point in the history
  • Loading branch information
ziggi committed Jan 3, 2019
1 parent 0e48831 commit 840480e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ add_definitions (-DPLUGIN_VERSION="${PLUGIN_VERSION}" -DINCLUDE_VERSION=${INCLUD

set (CMAKE_SHARED_LIBRARY_PREFIX "")
set (CMAKE_DEBUG_POSTFIX "")
set (CMAKE_RELWITHDEBINFO_POSTFIX "")
set (CMAKE_MINSIZEREL_POSTFIX "")

set (LIBRARY_GROUP "lib\\")

Expand Down
6 changes: 6 additions & 0 deletions src/CPlayerData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,12 @@ void CPlayerData::UpdateHeightPos(CVector *pvecPosition)

if (CFunctions::RayCastLine(vecStart, vecEnd, vecResult)) {
fNewZ = vecResult->fZ + 1.0f;
} else {
vecStart.fZ = m_vecDestination.fZ + 1000.0f;

if (CFunctions::RayCastLine(vecStart, vecEnd, vecResult)) {
fNewZ = vecResult->fZ + 1.0f;
}
}
}

Expand Down

0 comments on commit 840480e

Please sign in to comment.