mirror of
https://github.com/overte-org/overte.git
synced 2025-07-28 22:20:25 +02:00
fix several uninitialized reads
This commit is contained in:
parent
c5ff72bd20
commit
ff2a47e7e6
4 changed files with 6 additions and 7 deletions
|
@ -996,7 +996,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
_enableProcessOctreeThread(true),
|
_enableProcessOctreeThread(true),
|
||||||
_lastNackTime(usecTimestampNow()),
|
_lastNackTime(usecTimestampNow()),
|
||||||
_lastSendDownstreamAudioStats(usecTimestampNow()),
|
_lastSendDownstreamAudioStats(usecTimestampNow()),
|
||||||
_aboutToQuit(false),
|
|
||||||
_notifiedPacketVersionMismatchThisDomain(false),
|
_notifiedPacketVersionMismatchThisDomain(false),
|
||||||
_maxOctreePPS(maxOctreePacketsPerSecond.get()),
|
_maxOctreePPS(maxOctreePacketsPerSecond.get()),
|
||||||
_lastFaceTrackerUpdate(0),
|
_lastFaceTrackerUpdate(0),
|
||||||
|
|
|
@ -560,6 +560,8 @@ private:
|
||||||
MainWindow* _window;
|
MainWindow* _window;
|
||||||
QElapsedTimer& _sessionRunTimer;
|
QElapsedTimer& _sessionRunTimer;
|
||||||
|
|
||||||
|
bool _aboutToQuit { false };
|
||||||
|
|
||||||
bool _previousSessionCrashed;
|
bool _previousSessionCrashed;
|
||||||
|
|
||||||
DisplayPluginPointer _displayPlugin;
|
DisplayPluginPointer _displayPlugin;
|
||||||
|
@ -651,8 +653,6 @@ private:
|
||||||
quint64 _lastNackTime;
|
quint64 _lastNackTime;
|
||||||
quint64 _lastSendDownstreamAudioStats;
|
quint64 _lastSendDownstreamAudioStats;
|
||||||
|
|
||||||
bool _aboutToQuit;
|
|
||||||
|
|
||||||
bool _notifiedPacketVersionMismatchThisDomain;
|
bool _notifiedPacketVersionMismatchThisDomain;
|
||||||
|
|
||||||
ConditionalGuard _settingsGuard;
|
ConditionalGuard _settingsGuard;
|
||||||
|
|
|
@ -145,7 +145,7 @@ EntityItemID EntityTreeElement::findRayIntersection(const glm::vec3& origin, con
|
||||||
bool visibleOnly, bool collidableOnly, QVariantMap& extraInfo, bool precisionPicking) {
|
bool visibleOnly, bool collidableOnly, QVariantMap& extraInfo, bool precisionPicking) {
|
||||||
|
|
||||||
EntityItemID result;
|
EntityItemID result;
|
||||||
BoxFace localFace;
|
BoxFace localFace { UNKNOWN_FACE };
|
||||||
glm::vec3 localSurfaceNormal;
|
glm::vec3 localSurfaceNormal;
|
||||||
|
|
||||||
if (!canPickIntersect()) {
|
if (!canPickIntersect()) {
|
||||||
|
@ -213,7 +213,7 @@ EntityItemID EntityTreeElement::findDetailedRayIntersection(const glm::vec3& ori
|
||||||
// we can use the AABox's ray intersection by mapping our origin and direction into the entity frame
|
// we can use the AABox's ray intersection by mapping our origin and direction into the entity frame
|
||||||
// and testing intersection there.
|
// and testing intersection there.
|
||||||
float localDistance;
|
float localDistance;
|
||||||
BoxFace localFace;
|
BoxFace localFace { UNKNOWN_FACE };
|
||||||
glm::vec3 localSurfaceNormal;
|
glm::vec3 localSurfaceNormal;
|
||||||
if (entityFrameBox.findRayIntersection(entityFrameOrigin, entityFrameDirection, 1.0f / entityFrameDirection, localDistance,
|
if (entityFrameBox.findRayIntersection(entityFrameOrigin, entityFrameDirection, 1.0f / entityFrameDirection, localDistance,
|
||||||
localFace, localSurfaceNormal)) {
|
localFace, localSurfaceNormal)) {
|
||||||
|
|
|
@ -248,7 +248,7 @@ bool TriangleSet::TriangleTreeCell::findRayIntersection(const glm::vec3& origin,
|
||||||
// The distance passed in here is the distance to our bounding box. If !precision, that distance is used
|
// The distance passed in here is the distance to our bounding box. If !precision, that distance is used
|
||||||
{
|
{
|
||||||
float internalDistance = distance;
|
float internalDistance = distance;
|
||||||
BoxFace internalFace;
|
BoxFace internalFace { UNKNOWN_FACE };
|
||||||
Triangle internalTriangle;
|
Triangle internalTriangle;
|
||||||
if (findRayIntersectionInternal(origin, direction, internalDistance, internalFace, internalTriangle, precision, trianglesTouched, allowBackface)) {
|
if (findRayIntersectionInternal(origin, direction, internalDistance, internalFace, internalTriangle, precision, trianglesTouched, allowBackface)) {
|
||||||
bestLocalDistance = internalDistance;
|
bestLocalDistance = internalDistance;
|
||||||
|
|
Loading…
Reference in a new issue