diff --git a/code/nel/include/nel/sound/clustered_sound.h b/code/nel/include/nel/sound/clustered_sound.h index ed674f879..d9d2c47f2 100644 --- a/code/nel/include/nel/sound/clustered_sound.h +++ b/code/nel/include/nel/sound/clustered_sound.h @@ -50,6 +50,7 @@ class CClusteredSound { public: /// This structure contain data about sound status in a cluster + NL_ALIGN_SSE2(16) struct CClusterSoundStatus { /// The relative gain of sound in the cluster @@ -78,6 +79,7 @@ public: typedef std::map TClusterStatusMap; /// This structure is used when we traverse the cluster/portal graph. + NL_ALIGN_SSE2(16) struct CSoundTravContext { /// The current gain. diff --git a/code/nel/src/3d/ps_mesh.cpp b/code/nel/src/3d/ps_mesh.cpp index ddbf024fb..a8c057497 100644 --- a/code/nel/src/3d/ps_mesh.cpp +++ b/code/nel/src/3d/ps_mesh.cpp @@ -660,9 +660,9 @@ public: CHECK_VERTEX_BUFFER(outVb, outVertex + outNormalOff); // translate and resize the vertex (relatively to the mesh origin) - *(CVectorPacked *) outVertex = *posIt + sM * *(CVector *) inVertex; + *(CVectorPacked *) outVertex = *posIt + sM * CVector(*(CVectorPacked *) inVertex); // copy the normal - *(CVectorPacked *) (outVertex + outNormalOff) = M * *(CVector *) (inVertex + inNormalOff); + *(CVectorPacked *) (outVertex + outNormalOff) = M * CVector(*(CVectorPacked *) (inVertex + inNormalOff)); inVertex += inVSize; @@ -683,7 +683,7 @@ public: CHECK_VERTEX_BUFFER(outVb, outVertex); // translate and resize the vertex (relatively to the mesh origin) - *(CVectorPacked *) outVertex = *posIt + sM * *(CVector *) inVertex; + *(CVectorPacked *) outVertex = *posIt + sM * CVector(*(CVectorPacked *) inVertex); inVertex += inVSize; outVertex += outVSize; @@ -774,10 +774,10 @@ public: CHECK_VERTEX_BUFFER(outVb, outVertex + outNormalOff); // morph, and transform the vertex - *(CVectorPacked *) outVertex = *posIt + sM * (opLambda * *(CVector *) m0 + lambda * *(CVector *) m1); + *(CVectorPacked *) outVertex = *posIt + sM * (opLambda * CVector(*(CVectorPacked *) m0) + lambda * CVector(*(CVectorPacked *) m1)); // morph, and transform the normal - *(CVectorPacked *) (outVertex + outNormalOff) = M * (opLambda * *(CVector *) (m0 + inNormalOff) - + lambda * *(CVector *) (m1 + inNormalOff)).normed(); + *(CVectorPacked *) (outVertex + outNormalOff) = M * (opLambda * CVector(*(CVectorPacked *) (m0 + inNormalOff)) + + lambda * CVector(*(CVectorPacked *) (m1 + inNormalOff))).normed(); m0 += inVSize; @@ -799,7 +799,7 @@ public: CHECK_VERTEX_BUFFER((*inVB1), m1); CHECK_VERTEX_BUFFER(outVb, outVertex); // morph, and transform the vertex - *(CVectorPacked *) outVertex = *posIt + sM * (opLambda * *(CVector *) m0 + opLambda * *(CVector *) m1); + *(CVectorPacked *) outVertex = *posIt + sM * (opLambda * CVector(*(CVectorPacked *) m0) + opLambda * CVector(*(CVectorPacked *) m1)); m0 += inVSize; m1 += inVSize; @@ -948,9 +948,9 @@ public: // translate and resize the vertex (relatively to the mesh origin) - *(CVector *) outVertex = *posIt + *ptCurrSize * *(CVector *) inVertex; + *(CVectorPacked *) outVertex = *posIt + *ptCurrSize * CVector(*(CVectorPacked *) inVertex); // copy the normal - *(CVector *) (outVertex + normalOff ) = *(CVector *) (inVertex + pNormalOff); + *(CVectorPacked *) (outVertex + normalOff ) = *(CVectorPacked *) (inVertex + pNormalOff); inVertex += inVSize; outVertex += outVSize; } @@ -963,7 +963,7 @@ public: // translate and resize the vertex (relatively to the mesh origin) CHECK_VERTEX_BUFFER(outVb, outVertex); CHECK_VERTEX_BUFFER(prerotVb, inVertex); - *(CVector *) outVertex = *posIt + *ptCurrSize * *(CVector *) inVertex; + *(CVectorPacked *) outVertex = *posIt + *ptCurrSize * CVector(*(CVectorPacked *) inVertex); inVertex += inVSize; outVertex += outVSize; } @@ -1684,8 +1684,8 @@ CVertexBuffer &CPSConstraintMesh::makePrerotatedVb(const CVertexBuffer &inVb) CHECK_VERTEX_BUFFER(prerotatedVb, outVertex); CHECK_VERTEX_BUFFER(prerotatedVb, outVertex + pNormalOff); - * (CVectorPacked *) outVertex = mat.mulVector(* (CVector *) inVertex); - * (CVectorPacked *) (outVertex + normalOff) = mat.mulVector(* (CVector *) (inVertex + pNormalOff) ); + * (CVectorPacked *) outVertex = mat.mulVector(* (CVectorPacked *) inVertex); + * (CVectorPacked *) (outVertex + normalOff) = mat.mulVector(* (CVectorPacked *) (inVertex + pNormalOff) ); outVertex += vpSize; inVertex += vSize; @@ -1701,7 +1701,7 @@ CVertexBuffer &CPSConstraintMesh::makePrerotatedVb(const CVertexBuffer &inVb) CHECK_VERTEX_BUFFER(prerotatedVb, outVertex); CHECK_VERTEX_BUFFER(inVb, inVertex); - * (CVectorPacked *) outVertex = mat.mulVector(* (CVector *) inVertex); + * (CVectorPacked *) outVertex = mat.mulVector(* (CVectorPacked *) inVertex); outVertex += vpSize; inVertex += vSize; } diff --git a/code/nel/src/sound/clustered_sound.cpp b/code/nel/src/sound/clustered_sound.cpp index 25f0e5b64..0ccfd0d59 100644 --- a/code/nel/src/sound/clustered_sound.cpp +++ b/code/nel/src/sound/clustered_sound.cpp @@ -881,7 +881,8 @@ bool CClusteredSound::addAudibleCluster(CCluster *cluster, CClusterSoundStatus & } else { - _AudibleClusters.insert(make_pair(cluster, soundStatus)); + //_AudibleClusters.insert(make_pair(cluster, soundStatus)); + _AudibleClusters[cluster] = soundStatus; return true; }