mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Merge pull request #1800 from Azaezel/andOrMaybe
clang reports: unclear || + && and &+| mixes.
This commit is contained in:
commit
55b7a8431c
16 changed files with 37 additions and 35 deletions
|
|
@ -1043,9 +1043,9 @@ NavMesh *AIPlayer::findNavMesh() const
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(getNavSize() == Small && !m->mSmallCharacters ||
|
if((getNavSize() == Small && !m->mSmallCharacters) ||
|
||||||
getNavSize() == Regular && !m->mRegularCharacters ||
|
(getNavSize() == Regular && !m->mRegularCharacters) ||
|
||||||
getNavSize() == Large && !m->mLargeCharacters)
|
(getNavSize() == Large && !m->mLargeCharacters))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(!mesh || m->getWorldBox().getVolume() < mesh->getWorldBox().getVolume())
|
if(!mesh || m->getWorldBox().getVolume() < mesh->getWorldBox().getVolume())
|
||||||
|
|
|
||||||
|
|
@ -572,7 +572,7 @@ void Camera::processTick(const Move* move)
|
||||||
// process input/determine rotation vector
|
// process input/determine rotation vector
|
||||||
if(virtualMode != StationaryMode &&
|
if(virtualMode != StationaryMode &&
|
||||||
virtualMode != TrackObjectMode &&
|
virtualMode != TrackObjectMode &&
|
||||||
(!mLocked || virtualMode != OrbitObjectMode && virtualMode != OrbitPointMode))
|
(!mLocked || ((virtualMode != OrbitObjectMode) && (virtualMode != OrbitPointMode))))
|
||||||
{
|
{
|
||||||
if(!strafeMode)
|
if(!strafeMode)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -632,9 +632,9 @@ DecalInstance* DecalManager::getClosestDecal( const Point3F &pos )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !collectedInsts.empty() &&
|
if ( (!collectedInsts.empty() &&
|
||||||
collectedInsts[closestIndex] &&
|
collectedInsts[closestIndex] &&
|
||||||
closestDistance < 1.0f ||
|
closestDistance < 1.0f) ||
|
||||||
worldInstSphere.isContained( pos ) )
|
worldInstSphere.isContained( pos ) )
|
||||||
return collectedInsts[closestIndex];
|
return collectedInsts[closestIndex];
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -440,7 +440,7 @@ void LightFlareData::prepRender(SceneRenderState *state, LightFlareState *flareS
|
||||||
// We can only skip rendering if the light is not
|
// We can only skip rendering if the light is not
|
||||||
// visible, and it has elapsed the fade out time.
|
// visible, and it has elapsed the fade out time.
|
||||||
if (mIsZero(occlusionFade) ||
|
if (mIsZero(occlusionFade) ||
|
||||||
!lightVisible && visDelta > FadeOutTime)
|
(!lightVisible && visDelta > FadeOutTime))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const RectI &viewport = GFX->getViewport();
|
const RectI &viewport = GFX->getViewport();
|
||||||
|
|
|
||||||
|
|
@ -3930,9 +3930,9 @@ void Player::updateActionThread()
|
||||||
if (mMountPending)
|
if (mMountPending)
|
||||||
mMountPending = (isMounted() ? 0 : (mMountPending - 1));
|
mMountPending = (isMounted() ? 0 : (mMountPending - 1));
|
||||||
|
|
||||||
if (mActionAnimation.action == PlayerData::NullAnimation ||
|
if ((mActionAnimation.action == PlayerData::NullAnimation) ||
|
||||||
((!mActionAnimation.waitForEnd || mActionAnimation.atEnd)) &&
|
((!mActionAnimation.waitForEnd || mActionAnimation.atEnd) &&
|
||||||
!mActionAnimation.holdAtEnd && (mActionAnimation.delayTicks -= !mMountPending) <= 0)
|
(!mActionAnimation.holdAtEnd && (mActionAnimation.delayTicks -= !mMountPending) <= 0)))
|
||||||
{
|
{
|
||||||
//The scripting language will get a call back when a script animation has finished...
|
//The scripting language will get a call back when a script animation has finished...
|
||||||
// example: When the chat menu animations are done playing...
|
// example: When the chat menu animations are done playing...
|
||||||
|
|
|
||||||
|
|
@ -2638,7 +2638,7 @@ void ShapeBase::setImageState(U32 imageSlot, U32 newState,bool force)
|
||||||
F32 randomPos = Platform::getRandom();
|
F32 randomPos = Platform::getRandom();
|
||||||
for (U32 i=0; i<ShapeBaseImageData::MaxShapes; ++i)
|
for (U32 i=0; i<ShapeBaseImageData::MaxShapes; ++i)
|
||||||
{
|
{
|
||||||
if (!image.dataBlock->shapeIsValid[i] || i != imageShapeIndex && !image.doAnimateAllShapes)
|
if (!image.dataBlock->shapeIsValid[i] || (i != imageShapeIndex && !image.doAnimateAllShapes))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (image.animThread[i] && image.state->sequence[i] != -1 && image.state->flashSequence[i]) {
|
if (image.animThread[i] && image.state->sequence[i] != -1 && image.state->flashSequence[i]) {
|
||||||
|
|
@ -2779,7 +2779,7 @@ void ShapeBase::setImageState(U32 imageSlot, U32 newState,bool force)
|
||||||
updateAnimThread(imageSlot, imageShapeIndex, lastState);
|
updateAnimThread(imageSlot, imageShapeIndex, lastState);
|
||||||
for (U32 i=0; i<ShapeBaseImageData::MaxShapes; ++i)
|
for (U32 i=0; i<ShapeBaseImageData::MaxShapes; ++i)
|
||||||
{
|
{
|
||||||
if (!image.dataBlock->shapeIsValid[i] || i != imageShapeIndex && !image.doAnimateAllShapes)
|
if (!image.dataBlock->shapeIsValid[i] || (i != imageShapeIndex && !image.doAnimateAllShapes))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Start spin thread
|
// Start spin thread
|
||||||
|
|
@ -2834,7 +2834,7 @@ void ShapeBase::updateAnimThread(U32 imageSlot, S32 imageShapeIndex, ShapeBaseIm
|
||||||
F32 randomPos = Platform::getRandom();
|
F32 randomPos = Platform::getRandom();
|
||||||
for (U32 i=0; i<ShapeBaseImageData::MaxShapes; ++i)
|
for (U32 i=0; i<ShapeBaseImageData::MaxShapes; ++i)
|
||||||
{
|
{
|
||||||
if (!image.dataBlock->shapeIsValid[i] || i != imageShapeIndex && !image.doAnimateAllShapes)
|
if (!image.dataBlock->shapeIsValid[i] || (i != imageShapeIndex && !image.doAnimateAllShapes))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (image.animThread[i] && stateData.sequence[i] != -1)
|
if (image.animThread[i] && stateData.sequence[i] != -1)
|
||||||
|
|
@ -3076,7 +3076,7 @@ TICKAGAIN:
|
||||||
U32 imageShapeIndex = getImageShapeIndex(image);
|
U32 imageShapeIndex = getImageShapeIndex(image);
|
||||||
for (U32 i=0; i<ShapeBaseImageData::MaxShapes; ++i)
|
for (U32 i=0; i<ShapeBaseImageData::MaxShapes; ++i)
|
||||||
{
|
{
|
||||||
if (!image.dataBlock->shapeIsValid[i] || i != imageShapeIndex && !image.doAnimateAllShapes)
|
if (!image.dataBlock->shapeIsValid[i] || (i != imageShapeIndex && !image.doAnimateAllShapes))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (image.spinThread[i])
|
if (image.spinThread[i])
|
||||||
|
|
@ -3131,7 +3131,7 @@ void ShapeBase::updateImageAnimation(U32 imageSlot, F32 dt)
|
||||||
// Advance animation threads
|
// Advance animation threads
|
||||||
for (U32 i=0; i<ShapeBaseImageData::MaxShapes; ++i)
|
for (U32 i=0; i<ShapeBaseImageData::MaxShapes; ++i)
|
||||||
{
|
{
|
||||||
if (!image.dataBlock->shapeIsValid[i] || i != imageShapeIndex && !image.doAnimateAllShapes)
|
if (!image.dataBlock->shapeIsValid[i] || (i != imageShapeIndex && !image.doAnimateAllShapes))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (image.ambientThread[i])
|
if (image.ambientThread[i])
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,7 @@ void StaticShape::setTransform(const MatrixF& mat)
|
||||||
setMaskBits(PositionMask);
|
setMaskBits(PositionMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StaticShape::onUnmount(SceneObject*,S32)
|
void StaticShape::onUnmount(ShapeBase*,S32)
|
||||||
{
|
{
|
||||||
// Make sure the client get's the final server pos.
|
// Make sure the client get's the final server pos.
|
||||||
setMaskBits(PositionMask);
|
setMaskBits(PositionMask);
|
||||||
|
|
@ -251,14 +251,14 @@ void StaticShape::onUnmount(SceneObject*,S32)
|
||||||
|
|
||||||
U32 StaticShape::packUpdate(NetConnection *connection, U32 mask, BitStream *bstream)
|
U32 StaticShape::packUpdate(NetConnection *connection, U32 mask, BitStream *bstream)
|
||||||
{
|
{
|
||||||
U32 retMask = Parent::packUpdate(connection, mask, bstream);
|
U32 retMask = Parent::packUpdate(connection,mask,bstream);
|
||||||
if (bstream->writeFlag(mask & PositionMask | ExtendedInfoMask))
|
if (bstream->writeFlag(mask & (PositionMask | ExtendedInfoMask)))
|
||||||
{
|
{
|
||||||
|
|
||||||
// Write the transform (do _not_ use writeAffineTransform. Since this is a static
|
// Write the transform (do _not_ use writeAffineTransform. Since this is a static
|
||||||
// object, the transform must be RIGHT THE *&)*$&^ ON or it will goof up the
|
// object, the transform must be RIGHT THE *&)*$&^ ON or it will goof up the
|
||||||
// synchronization between the client and the server.
|
// synchronization between the client and the server.
|
||||||
mathWrite(*bstream, mObjToWorld);
|
mathWrite(*bstream,mObjToWorld);
|
||||||
mathWrite(*bstream, mObjScale);
|
mathWrite(*bstream, mObjScale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -275,11 +275,11 @@ U32 StaticShape::packUpdate(NetConnection *connection, U32 mask, BitStream *bstr
|
||||||
|
|
||||||
void StaticShape::unpackUpdate(NetConnection *connection, BitStream *bstream)
|
void StaticShape::unpackUpdate(NetConnection *connection, BitStream *bstream)
|
||||||
{
|
{
|
||||||
Parent::unpackUpdate(connection, bstream);
|
Parent::unpackUpdate(connection,bstream);
|
||||||
if (bstream->readFlag())
|
if (bstream->readFlag())
|
||||||
{
|
{
|
||||||
MatrixF mat;
|
MatrixF mat;
|
||||||
mathRead(*bstream, &mat);
|
mathRead(*bstream,&mat);
|
||||||
Parent::setTransform(mat);
|
Parent::setTransform(mat);
|
||||||
Parent::setRenderTransform(mat);
|
Parent::setRenderTransform(mat);
|
||||||
|
|
||||||
|
|
@ -302,7 +302,7 @@ void StaticShape::unpackUpdate(NetConnection *connection, BitStream *bstream)
|
||||||
// This appears to be legacy T2 stuff
|
// This appears to be legacy T2 stuff
|
||||||
// Marked internal, as this is flagged to be deleted
|
// Marked internal, as this is flagged to be deleted
|
||||||
// [8/1/2010 mperry]
|
// [8/1/2010 mperry]
|
||||||
DefineConsoleMethod(StaticShape, setPoweredState, void, (bool isPowered), , "(bool isPowered)"
|
DefineConsoleMethod( StaticShape, setPoweredState, void, (bool isPowered), , "(bool isPowered)"
|
||||||
"@internal")
|
"@internal")
|
||||||
{
|
{
|
||||||
if(!object->isServerObject())
|
if(!object->isServerObject())
|
||||||
|
|
@ -310,7 +310,7 @@ DefineConsoleMethod(StaticShape, setPoweredState, void, (bool isPowered), , "(bo
|
||||||
object->setPowered(isPowered);
|
object->setPowered(isPowered);
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod(StaticShape, getPoweredState, bool, (), , "@internal")
|
DefineConsoleMethod( StaticShape, getPoweredState, bool, (), , "@internal")
|
||||||
{
|
{
|
||||||
if(!object->isServerObject())
|
if(!object->isServerObject())
|
||||||
return(false);
|
return(false);
|
||||||
|
|
|
||||||
|
|
@ -1157,7 +1157,7 @@ U32 AITurretShape::packUpdate(NetConnection *connection, U32 mask, BitStream *bs
|
||||||
U32 retMask = Parent::packUpdate(connection,mask,bstream);
|
U32 retMask = Parent::packUpdate(connection,mask,bstream);
|
||||||
|
|
||||||
// Indicate that the transform has changed to update the scan box
|
// Indicate that the transform has changed to update the scan box
|
||||||
bstream->writeFlag(mask & PositionMask | ExtendedInfoMask);
|
bstream->writeFlag(mask & (PositionMask | ExtendedInfoMask));
|
||||||
|
|
||||||
// Handle any state changes that need to be passed along
|
// Handle any state changes that need to be passed along
|
||||||
if (bstream->writeFlag(mask & TurretStateMask))
|
if (bstream->writeFlag(mask & TurretStateMask))
|
||||||
|
|
|
||||||
|
|
@ -481,7 +481,7 @@ U32 oneUTF32toUTF8(const UTF32 codepoint, UTF8 *threeByteCodeunitBuf)
|
||||||
// Process the 1st byte. filter based on the # of expected bytes.
|
// Process the 1st byte. filter based on the # of expected bytes.
|
||||||
mask = sgByteMask8LUT[bytecount];
|
mask = sgByteMask8LUT[bytecount];
|
||||||
marker = ( ~mask << 1 );
|
marker = ( ~mask << 1 );
|
||||||
threeByteCodeunitBuf[0] = marker | working & mask;
|
threeByteCodeunitBuf[0] = marker | (working & mask);
|
||||||
|
|
||||||
PROFILE_END();
|
PROFILE_END();
|
||||||
return bytecount;
|
return bytecount;
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,7 @@ bool TagDictionary::match(const char* pattern, const char* str)
|
||||||
return !*str;
|
return !*str;
|
||||||
|
|
||||||
case '*':
|
case '*':
|
||||||
return match(pattern+1, str) || *str && match(pattern, str+1);
|
return match(pattern+1, str) || (*str && match(pattern, str+1));
|
||||||
|
|
||||||
case '?':
|
case '?':
|
||||||
return *str && match(pattern+1, str+1);
|
return *str && match(pattern+1, str+1);
|
||||||
|
|
|
||||||
|
|
@ -2158,8 +2158,8 @@ void River::_makeRenderBatches( const Point3F &cameraPos )
|
||||||
|
|
||||||
F32 dist = getMin( dist0, dist1 );
|
F32 dist = getMin( dist0, dist1 );
|
||||||
highDetail = ( dist < lodDistSquared );
|
highDetail = ( dist < lodDistSquared );
|
||||||
if ( highDetail && lastDetail == 0 ||
|
if ( (highDetail && lastDetail == 0) ||
|
||||||
!highDetail && lastDetail == 1 )
|
(!highDetail && lastDetail == 1) )
|
||||||
{
|
{
|
||||||
// We hit a segment with a different lod than the previous.
|
// We hit a segment with a different lod than the previous.
|
||||||
// Save what we have so far...
|
// Save what we have so far...
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ void GFXGLStateBlock::activate(const GFXGLStateBlock* oldState)
|
||||||
|
|
||||||
#define STATE_CHANGE(state) (!oldState || oldState->mDesc.state != mDesc.state)
|
#define STATE_CHANGE(state) (!oldState || oldState->mDesc.state != mDesc.state)
|
||||||
#define TOGGLE_STATE(state, enum) if(mDesc.state) glEnable(enum); else glDisable(enum)
|
#define TOGGLE_STATE(state, enum) if(mDesc.state) glEnable(enum); else glDisable(enum)
|
||||||
#define CHECK_TOGGLE_STATE(state, enum) if(!oldState || oldState->mDesc.state != mDesc.state) if(mDesc.state) glEnable(enum); else glDisable(enum)
|
#define CHECK_TOGGLE_STATE(state, enum) if(!oldState || oldState->mDesc.state != mDesc.state) {if(mDesc.state) glEnable(enum); else glDisable(enum);}
|
||||||
|
|
||||||
// Blending
|
// Blending
|
||||||
CHECK_TOGGLE_STATE(blendEnable, GL_BLEND);
|
CHECK_TOGGLE_STATE(blendEnable, GL_BLEND);
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ bool GuiRolloutCtrl::_onMouseUp( const GuiEvent &event, bool lockedMouse )
|
||||||
{
|
{
|
||||||
// If Ctrl/Cmd-clicking a header, collapse all sibling GuiRolloutCtrls.
|
// If Ctrl/Cmd-clicking a header, collapse all sibling GuiRolloutCtrls.
|
||||||
|
|
||||||
if( ( mAutoCollapseSiblings && !mIsExpanded && !( event.modifier & SI_PRIMARY_CTRL )
|
if( (( mAutoCollapseSiblings && !mIsExpanded && !( event.modifier & SI_PRIMARY_CTRL ))
|
||||||
|| ( !mAutoCollapseSiblings && event.modifier & SI_PRIMARY_CTRL ) ) )
|
|| ( !mAutoCollapseSiblings && event.modifier & SI_PRIMARY_CTRL ) ) )
|
||||||
{
|
{
|
||||||
for( SimSet::iterator iter = getParent()->begin(); iter != getParent()->end(); ++ iter )
|
for( SimSet::iterator iter = getParent()->begin(); iter != getParent()->end(); ++ iter )
|
||||||
|
|
|
||||||
|
|
@ -1143,9 +1143,10 @@ void NavMesh::buildLinks()
|
||||||
// Iterate over links
|
// Iterate over links
|
||||||
for(U32 j = 0; j < mLinkIDs.size(); j++)
|
for(U32 j = 0; j < mLinkIDs.size(); j++)
|
||||||
{
|
{
|
||||||
|
if (mLinksUnsynced[j])
|
||||||
|
{
|
||||||
if(tile.box.isContained(getLinkStart(j)) ||
|
if(tile.box.isContained(getLinkStart(j)) ||
|
||||||
tile.box.isContained(getLinkEnd(j)) &&
|
tile.box.isContained(getLinkEnd(j)))
|
||||||
mLinksUnsynced[j])
|
|
||||||
{
|
{
|
||||||
// Mark tile for build.
|
// Mark tile for build.
|
||||||
mDirtyTiles.push_back_unique(i);
|
mDirtyTiles.push_back_unique(i);
|
||||||
|
|
@ -1160,6 +1161,7 @@ void NavMesh::buildLinks()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(mDirtyTiles.size())
|
if(mDirtyTiles.size())
|
||||||
ctx->startTimer(RC_TIMER_TOTAL);
|
ctx->startTimer(RC_TIMER_TOTAL);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -612,9 +612,9 @@ void ProcessedPrePassMaterial::_determineFeatures( U32 stageNum,
|
||||||
mIsLightmappedGeometry = ( fd.features.hasFeature( MFT_ToneMap ) ||
|
mIsLightmappedGeometry = ( fd.features.hasFeature( MFT_ToneMap ) ||
|
||||||
fd.features.hasFeature( MFT_LightMap ) ||
|
fd.features.hasFeature( MFT_LightMap ) ||
|
||||||
fd.features.hasFeature( MFT_VertLit ) ||
|
fd.features.hasFeature( MFT_VertLit ) ||
|
||||||
( bEnableMRTLightmap && fd.features.hasFeature( MFT_IsTranslucent ) ||
|
( bEnableMRTLightmap && (fd.features.hasFeature( MFT_IsTranslucent ) ||
|
||||||
fd.features.hasFeature( MFT_ForwardShading ) ||
|
fd.features.hasFeature( MFT_ForwardShading ) ||
|
||||||
fd.features.hasFeature( MFT_IsTranslucentZWrite ) ) );
|
fd.features.hasFeature( MFT_IsTranslucentZWrite) ) ) );
|
||||||
|
|
||||||
// Integrate proper opaque stencil write state
|
// Integrate proper opaque stencil write state
|
||||||
mUserDefined.addDesc( mPrePassMgr->getOpaqueStenciWriteDesc( mIsLightmappedGeometry ) );
|
mUserDefined.addDesc( mPrePassMgr->getOpaqueStenciWriteDesc( mIsLightmappedGeometry ) );
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,7 @@ void SceneContainer::insertIntoBins(SceneObject* obj,
|
||||||
// For huge objects, dump them into the overflow bin. Otherwise, everything
|
// For huge objects, dump them into the overflow bin. Otherwise, everything
|
||||||
// goes into the grid...
|
// goes into the grid...
|
||||||
//
|
//
|
||||||
if ((maxX - minX + 1) < csmNumBins || (maxY - minY + 1) < csmNumBins && !obj->isGlobalBounds())
|
if ((maxX - minX + 1) < csmNumBins || ((maxY - minY + 1) < csmNumBins && !obj->isGlobalBounds()))
|
||||||
{
|
{
|
||||||
SceneObjectRef** pCurrInsert = &obj->mBinRefHead;
|
SceneObjectRef** pCurrInsert = &obj->mBinRefHead;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue