diff --git a/Sources/Engine/Entities/Entity.cpp b/Sources/Engine/Entities/Entity.cpp index 336b5ac..a31a646 100644 --- a/Sources/Engine/Entities/Entity.cpp +++ b/Sources/Engine/Entities/Entity.cpp @@ -3534,7 +3534,7 @@ void CEntity::DumpSync_t(CTStream &strm, INDEX iExtensiveSyncCheck) // throw ch (ULONG&)en_mRotation(3,1), (ULONG&)en_mRotation(3,2), (ULONG&)en_mRotation(3,3)); if( en_pciCollisionInfo == NULL) { strm.FPrintF_t("Collision info NULL\n"); - } else if (en_RenderType==RT_BRUSH && en_RenderType==RT_FIELDBRUSH) { + } else if (en_RenderType==RT_BRUSH || en_RenderType==RT_FIELDBRUSH) { strm.FPrintF_t("Collision info: Brush entity\n"); } else { strm.FPrintF_t("Collision info:\n"); diff --git a/Sources/Engine/Graphics/Gfx_wrapper.h b/Sources/Engine/Graphics/Gfx_wrapper.h index 065377d..b05b942 100644 --- a/Sources/Engine/Graphics/Gfx_wrapper.h +++ b/Sources/Engine/Graphics/Gfx_wrapper.h @@ -177,7 +177,7 @@ public: GfxWrap tp_eWrapU, tp_eWrapV; // wrapping states inline CTexParams(void) { Clear(); tp_bSingleMipmap = FALSE; }; inline void Clear(void) { tp_iFilter = 00; tp_iAnisotropy = 0; tp_eWrapU = tp_eWrapV = (GfxWrap)NONE; }; - inline BOOL IsEqual( CTexParams tp) { return tp_iFilter==tp.tp_iFilter && tp_iAnisotropy==tp_iAnisotropy && + inline BOOL IsEqual( CTexParams tp) { return tp_iFilter==tp.tp_iFilter && tp_iAnisotropy==tp.tp_iAnisotropy && tp_eWrapU==tp.tp_eWrapU && tp_eWrapV==tp.tp_eWrapV; }; }; diff --git a/Sources/Engine/Network/SessionState.cpp b/Sources/Engine/Network/SessionState.cpp index 4a2fe44..6f42d10 100644 --- a/Sources/Engine/Network/SessionState.cpp +++ b/Sources/Engine/Network/SessionState.cpp @@ -1188,7 +1188,7 @@ void CSessionState::ProcessGameStream(void) } // if it is not avaliable yet - } if (res==CNetworkStream::R_BLOCKNOTRECEIVEDYET) { + } else if (res==CNetworkStream::R_BLOCKNOTRECEIVEDYET) { // finish _pfNetworkProfile.StopTimer(CNetworkProfile::PTI_SESSIONSTATE_PROCESSGAMESTREAM); return; diff --git a/Sources/Engine/Terrain/Terrain.cpp b/Sources/Engine/Terrain/Terrain.cpp index 0b03022..fcc98d9 100644 --- a/Sources/Engine/Terrain/Terrain.cpp +++ b/Sources/Engine/Terrain/Terrain.cpp @@ -558,7 +558,7 @@ void CTerrain::SetShadowMapsSize(INDEX iShadowMapAspect, INDEX iShadingMapAspect tr_iShadowMapSizeAspect = -(FastLog2(tr_pixHeightMapWidth-1)-5); } - if(GetShadingMapWidth()<32 || GetShadingMapWidth()<32) { + if(GetShadingMapWidth()<32 || GetShadingMapHeight()<32) { tr_iShadingMapSizeAspect = 0; } diff --git a/Sources/SeriousSam/Menu.cpp b/Sources/SeriousSam/Menu.cpp index aa2f63e..5d5d7f9 100644 --- a/Sources/SeriousSam/Menu.cpp +++ b/Sources/SeriousSam/Menu.cpp @@ -1185,7 +1185,7 @@ void JoinNetworkGame(void) _pNetwork->ga_strRequiredMod.ScanF("%250[^\\]\\%s", &strModName, &strModURL); _fnmModSelected = CTString(strModName); _strModURLSelected = strModURL; - if (_strModURLSelected="") { + if (_strModURLSelected == "") { _strModURLSelected = "http://www.croteam.com/mods/Old"; } _strModServerSelected.PrintF("%s:%s", _pGame->gam_strJoinAddress, _pShell->GetValue("net_iPort")); diff --git a/Sources/WorldEditor/MainFrm.cpp b/Sources/WorldEditor/MainFrm.cpp index 740edb9..470a86e 100644 --- a/Sources/WorldEditor/MainFrm.cpp +++ b/Sources/WorldEditor/MainFrm.cpp @@ -694,7 +694,7 @@ void CMainFrame::OnCancelMode() { // switches out of eventual direct screen mode CWorldEditorView *pwndView = (CWorldEditorView *)GetActiveView(); - if (pwndView = NULL) { + if (pwndView != NULL) { // get the MDIChildFrame of active window CChildFrame *pfrChild = (CChildFrame *)pwndView->GetParentFrame(); ASSERT(pfrChild!=NULL); @@ -707,7 +707,7 @@ void CMainFrame::OnInitMenu(CMenu* pMenu) { // switches out of eventual direct screen mode CWorldEditorView *pwndView = (CWorldEditorView *)GetActiveView(); - if (pwndView = NULL) { + if (pwndView != NULL) { // get the MDIChildFrame of active window CChildFrame *pfrChild = (CChildFrame *)pwndView->GetParentFrame(); ASSERT(pfrChild!=NULL); diff --git a/Sources/WorldEditor/PropertyComboBar.cpp b/Sources/WorldEditor/PropertyComboBar.cpp index f6a3c7f..eb858c2 100644 --- a/Sources/WorldEditor/PropertyComboBar.cpp +++ b/Sources/WorldEditor/PropertyComboBar.cpp @@ -1851,8 +1851,8 @@ CEntity *CPropertyComboBar::GetSelectedEntityPtr(void) CPropertyID *ppidProperty = GetSelectedProperty(); // if there is valid property selected if( (ppidProperty == NULL) || - (ppidProperty->pid_eptType != CEntityProperty::EPT_ENTITYPTR) || - (ppidProperty->pid_eptType != CEntityProperty::EPT_PARENT) ) + ((ppidProperty->pid_eptType != CEntityProperty::EPT_ENTITYPTR) && + (ppidProperty->pid_eptType != CEntityProperty::EPT_PARENT)) ) { return NULL; } diff --git a/Sources/WorldEditor/WorldEditor.h b/Sources/WorldEditor/WorldEditor.h index 73f23bc..0d672d6 100644 --- a/Sources/WorldEditor/WorldEditor.h +++ b/Sources/WorldEditor/WorldEditor.h @@ -582,7 +582,6 @@ inline BOOL CValuesForPrimitive::operator==(const CValuesForPrimitive &vfpToComp (vfp_plPrimitive == vfpToCompare.vfp_plPrimitive) && (vfp_ttTriangularisationType == vfpToCompare.vfp_ttTriangularisationType) && (vfp_bDummy == vfpToCompare.vfp_bDummy) && - (vfp_ptPrimitiveType == vfpToCompare.vfp_ptPrimitiveType) && (vfp_bAutoCreateMipBrushes == vfpToCompare.vfp_bAutoCreateMipBrushes) && (vfp_colSectorsColor == vfpToCompare.vfp_colSectorsColor) && (vfp_colPolygonsColor == vfpToCompare.vfp_colPolygonsColor) &&