diff --git a/Sources/CMakeLists.txt b/Sources/CMakeLists.txt index e0c8929..83d9fd5 100644 --- a/Sources/CMakeLists.txt +++ b/Sources/CMakeLists.txt @@ -119,13 +119,12 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang") add_compile_options(-Wno-unused-value) # same here (the Scripts generate tons of unused variables and values) add_compile_options(-Wno-missing-braces) add_compile_options(-Wno-overloaded-virtual) + add_compile_options(-Wno-invalid-offsetof) MESSAGE(WARNING, "re-enable some of the warnings some day!") if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") add_compile_options(-Wno-tautological-undefined-compare) # don't complain about if(this!=NULL) add_compile_options(-Wno-c++11-compat-deprecated-writable-strings) - else() # most probably GCC - add_compile_options(-Wno-unused-but-set-variable) # my clang doesn't know this FIXME: re-enable? endif() if(MACOSX) diff --git a/Sources/Engine/Base/Stream.cpp b/Sources/Engine/Base/Stream.cpp index 5e79967..d48f827 100755 --- a/Sources/Engine/Base/Stream.cpp +++ b/Sources/Engine/Base/Stream.cpp @@ -934,7 +934,7 @@ void CTFileStream::Create_t(const CTFileName &fnFileName, } CTFileName fnmFullFileName; - INDEX iFile = ExpandFilePath(EFP_WRITE, fnFileNameAbsolute, fnmFullFileName); + /* INDEX iFile = */ ExpandFilePath(EFP_WRITE, fnFileNameAbsolute, fnmFullFileName); // check parameters ASSERT(strlen(fnFileNameAbsolute)>0); @@ -1317,7 +1317,7 @@ BOOL FileExistsForWriting(const CTFileName &fnmFile) } // expand the filename to full path for writing CTFileName fnmFullFileName; - INDEX iFile = ExpandFilePath(EFP_WRITE, fnmFile, fnmFullFileName); + /* INDEX iFile = */ ExpandFilePath(EFP_WRITE, fnmFile, fnmFullFileName); // check if it exists FILE *f = fopen(fnmFullFileName, "rb"); diff --git a/Sources/Engine/Brushes/BrushTriangularize.cpp b/Sources/Engine/Brushes/BrushTriangularize.cpp index 51d16ad..ddb29c4 100644 --- a/Sources/Engine/Brushes/BrushTriangularize.cpp +++ b/Sources/Engine/Brushes/BrushTriangularize.cpp @@ -337,7 +337,7 @@ void CTriangularizer::MakeEdgesForTriangularization(void) // get number of edges in polygon INDEX ctEdges = tr_abpeOriginalEdges.Count(); // create that much edges in the array - CBrushEdge *pbedEdges = tr_abedEdges.New(ctEdges); + /* CBrushEdge *pbedEdges = */ tr_abedEdges.New(ctEdges); tr_abedEdges.Lock(); diff --git a/Sources/Engine/Classes/MovableEntity.es b/Sources/Engine/Classes/MovableEntity.es index 4a4a901..7bc441e 100644 --- a/Sources/Engine/Classes/MovableEntity.es +++ b/Sources/Engine/Classes/MovableEntity.es @@ -2863,7 +2863,7 @@ out:; _pfPhysicsProfile.IncrementCounter((INDEX) CPhysicsProfile::PCI_DOMOVING); - FLOAT fTickQuantum=_pTimer->TickQuantum; // used for normalizing from SI units to game ticks + //FLOAT fTickQuantum=_pTimer->TickQuantum; // used for normalizing from SI units to game ticks // if rotation and translation are synchronized if (en_ulPhysicsFlags&EPF_RT_SYNCHRONIZED) { @@ -2878,7 +2878,7 @@ out:; if ((en_ulPhysicsFlags&EPF_ONBLOCK_MASK)==EPF_ONBLOCK_PUSH) { penPusher = this; } - BOOL bMoveSuccessfull = TryToMove(penPusher, TRUE, TRUE); + /* BOOL bMoveSuccessfull = */ TryToMove(penPusher, TRUE, TRUE); // if rotation and translation are asynchronious } else { diff --git a/Sources/Engine/Graphics/DrawPort.cpp b/Sources/Engine/Graphics/DrawPort.cpp index 0722ce3..ce03348 100755 --- a/Sources/Engine/Graphics/DrawPort.cpp +++ b/Sources/Engine/Graphics/DrawPort.cpp @@ -799,7 +799,7 @@ void CDrawPort::Fill( PIX pixI, PIX pixJ, PIX pixWidth, PIX pixHeight, // thru OpenGL gfxResetArrays(); GFXVertex *pvtx = _avtxCommon.Push(4); - GFXTexCoord *ptex = _atexCommon.Push(4); + /* GFXTexCoord *ptex = */ _atexCommon.Push(4); GFXColor *pcol = _acolCommon.Push(4); const GFXColor glcolUL(colUL); const GFXColor glcolUR(colUR); const GFXColor glcolDL(colDL); const GFXColor glcolDR(colDR); @@ -1617,7 +1617,7 @@ void CDrawPort::AddTriangle( const FLOAT fI0, const FLOAT fJ0, const GFXColor glCol( AdjustColor( col, _slTexHueShift, _slTexSaturation)); const INDEX iStart = _avtxCommon.Count(); GFXVertex *pvtx = _avtxCommon.Push(3); - GFXTexCoord *ptex = _atexCommon.Push(3); + /* GFXTexCoord *ptex = */ _atexCommon.Push(3); GFXColor *pcol = _acolCommon.Push(3); INDEX *pelm = _aiCommonElements.Push(3); pvtx[0].x = fI0; pvtx[0].y = fJ0; pvtx[0].z = 0; @@ -1699,7 +1699,7 @@ void CDrawPort::BlendScreen(void) // set arrays gfxResetArrays(); GFXVertex *pvtx = _avtxCommon.Push(4); - GFXTexCoord *ptex = _atexCommon.Push(4); + /* GFXTexCoord *ptex = */ _atexCommon.Push(4); GFXColor *pcol = _acolCommon.Push(4); const INDEX iW = dp_Width; const INDEX iH = dp_Height; diff --git a/Sources/Engine/Graphics/DrawPort_RenderScene.cpp b/Sources/Engine/Graphics/DrawPort_RenderScene.cpp index 579c53e..18c0033 100644 --- a/Sources/Engine/Graphics/DrawPort_RenderScene.cpp +++ b/Sources/Engine/Graphics/DrawPort_RenderScene.cpp @@ -816,6 +816,7 @@ static void RSSetTextureCoords( ScenePolygon *pspoGroup, INDEX iLayer, INDEX iUn // generate tex coord for all scene polygons in list const FLOATmatrix3D &mViewer = _ppr->pr_ViewerRotationMatrix; const INDEX iMappingOffset = iLayer * sizeof(CMappingVectors); + (void)iMappingOffset; // shut up compiler, this is used if inline ASM is used for( ScenePolygon *pspo=pspoGroup; pspo!=NULL; pspo=pspo->spo_pspoSucc) { @@ -1979,7 +1980,7 @@ void RenderSceneBackground(CDrawPort *pDP, COLOR col) // set arrays gfxResetArrays(); GFXVertex *pvtx = _avtxCommon.Push(4); - GFXTexCoord *ptex = _atexCommon.Push(4); + /* GFXTexCoord *ptex = */ _atexCommon.Push(4); GFXColor *pcol = _acolCommon.Push(4); pvtx[0].x = 0; pvtx[0].y = 0; pvtx[0].z = 1; pvtx[1].x = 0; pvtx[1].y = iH; pvtx[1].z = 1; diff --git a/Sources/Engine/Graphics/Graphics.cpp b/Sources/Engine/Graphics/Graphics.cpp index 4f3dc06..440c27f 100644 --- a/Sources/Engine/Graphics/Graphics.cpp +++ b/Sources/Engine/Graphics/Graphics.cpp @@ -665,6 +665,7 @@ void DitherBitmap( INDEX iDitherType, ULONG *pulSrc, ULONG *pulDst, PIX pixWidth ASSERT( pixCanvasWidth>=pixWidth && pixCanvasHeight>=pixHeight); SLONG slModulo = (pixCanvasWidth-pixWidth) *BYTES_PER_TEXEL; SLONG slWidthModulo = pixWidth*BYTES_PER_TEXEL +slModulo; + (void)slWidthModulo; // shut up compiler, this is used if inline ASM is used // if bitmap is smaller than 4x2 pixels if( pixWidth<4 || pixHeight<2) diff --git a/Sources/Engine/Models/Model.cpp b/Sources/Engine/Models/Model.cpp index 198d809..e3847d2 100644 --- a/Sources/Engine/Models/Model.cpp +++ b/Sources/Engine/Models/Model.cpp @@ -1397,9 +1397,11 @@ void CModelData::Read_t( CTStream *pFile) // throw char * if( cidVerticesChunk == CChunkID("AV16")) { CChunkID cidDummy = pFile->GetID_t(); + (void)cidDummy; // shut up about unused variable, compiler. ULONG ulDummy; // skip chunk size *pFile >> ulDummy; + (void)ulDummy; // shut up about unused variable, compiler. for( INDEX iVtx=0; iVtx>md_FrameVertices16[iVtx]; @@ -2859,22 +2861,26 @@ void CModelObject::AutoSetTextures(void) if( id == CChunkID("WTEX")) { CChunkID idDummy = strmIni.GetID_t(); + (void)idDummy; // shut up about unused variable, compiler. strmIni >> ctDiffuseTextures; strmIni >> fnDiffuse; } else if( id == CChunkID("FXTR")) { CChunkID idDummy = strmIni.GetID_t(); + (void)idDummy; // shut up about unused variable, compiler. strmIni >> fnReflection; } else if( id == CChunkID("FXTS")) { CChunkID idDummy = strmIni.GetID_t(); + (void)idDummy; // shut up about unused variable, compiler. strmIni >> fnSpecular; } else if( id == CChunkID("FXTB")) { CChunkID idDummy = strmIni.GetID_t(); + (void)idDummy; // shut up about unused variable, compiler. strmIni >> fnBump; } else @@ -2914,6 +2920,7 @@ void CModelObject::AutoSetAttachments(void) if( id == CChunkID("ATTM")) { CChunkID idDummy = strmIni.GetID_t(); + (void)idDummy; // shut up about unused variable, compiler. // try to load attached models INDEX ctAttachedModels; strmIni >> ctAttachedModels; diff --git a/Sources/Engine/Rendering/RendASER.cpp b/Sources/Engine/Rendering/RendASER.cpp index 5a642cd..67fee4f 100644 --- a/Sources/Engine/Rendering/RendASER.cpp +++ b/Sources/Engine/Rendering/RendASER.cpp @@ -763,7 +763,7 @@ CScreenPolygon *CRenderer::ScanOneLine(void) } // remove all left-over polygons from stack do { - BOOL bWasTop = RemPolygonFromSurfaceStack(*pspoTop); + /* BOOL bWasTop = */ RemPolygonFromSurfaceStack(*pspoTop); pspoTop = LIST_HEAD(re_lhSurfaceStack, CScreenPolygon, spo_lnInStack); } while (&re_spoFarSentinel != pspoTop); // mark start of background span at right border diff --git a/Sources/Engine/Rendering/RenderBrushes.cpp b/Sources/Engine/Rendering/RenderBrushes.cpp index d8e8520..e9b45a9 100644 --- a/Sources/Engine/Rendering/RenderBrushes.cpp +++ b/Sources/Engine/Rendering/RenderBrushes.cpp @@ -154,7 +154,7 @@ void CRenderer::DrawBrushPolygonVerticesAndEdges(CBrushPolygon &bpo) */ void CRenderer::DrawBrushSectorVerticesAndEdges(CBrushSector &bscSector) { - CBrushMip *pbm = bscSector.bsc_pbmBrushMip; + //CBrushMip *pbm = bscSector.bsc_pbmBrushMip; //CBrush3D &br = *pbm->bm_pbrBrush; // clear all vertex drawn flags diff --git a/Sources/Engine/Terrain/TerrainArchive.cpp b/Sources/Engine/Terrain/TerrainArchive.cpp index c0e3fa8..ee0a137 100644 --- a/Sources/Engine/Terrain/TerrainArchive.cpp +++ b/Sources/Engine/Terrain/TerrainArchive.cpp @@ -44,7 +44,7 @@ void CTerrainArchive::Read_t( CTStream *istrFile) // throw char * // if there are some terrains if (ctTerrains!=0) { // create that much terrains - CTerrain *atrBrushes = ta_atrTerrains.New(ctTerrains); + /* CTerrain *atrBrushes = */ ta_atrTerrains.New(ctTerrains); // for each of the new terrains for (INDEX iTerrain=0; iTerrain>iEntityClass>>plPlacement; // create an entity of that class - CEntity *penNew = CreateEntity_t(plPlacement, cecClasses[iEntityClass]); + /* CEntity *penNew = */ CreateEntity_t(plPlacement, cecClasses[iEntityClass]); }} // for each entity @@ -498,7 +498,7 @@ void CWorld::ReadState_old_t( CTStream *istr) // throw char * // read entity class index and entity placement (*istr)>>iEntityClass>>plPlacement; // create an entity of that class - CEntity *penNew = CreateEntity_t(plPlacement, cecClasses[iEntityClass]); + /* CEntity *penNew = */ CreateEntity_t(plPlacement, cecClasses[iEntityClass]); }} // for each entity diff --git a/Sources/Entities/Common/HUD.cpp b/Sources/Entities/Common/HUD.cpp index 60598a5..a776e57 100644 --- a/Sources/Entities/Common/HUD.cpp +++ b/Sources/Entities/Common/HUD.cpp @@ -234,6 +234,7 @@ static int qsort_CompareDeaths( const void *ppPEN0, const void *ppPEN1) { else return 0; } +#if 0 // DG: unused static int qsort_CompareLatencies( const void *ppPEN0, const void *ppPEN1) { CPlayer &en0 = **(CPlayer**)ppPEN0; CPlayer &en1 = **(CPlayer**)ppPEN1; @@ -243,6 +244,7 @@ static int qsort_CompareLatencies( const void *ppPEN0, const void *ppPEN1) { else if( sl0>sl1) return -1; else return 0; } +#endif // 0 (unused) // prepare color transitions static void PrepareColorTransitions( COLOR colFine, COLOR colHigh, COLOR colMedium, COLOR colLow, @@ -690,7 +692,7 @@ extern void DrawHUD( const CPlayer *penPlayerCurrent, CDrawPort *pdpCurrent, BOO _fCustomScaling = ClampDn( _fCustomScaling*0.8f, 0.5f); const FLOAT fOneUnitS = fOneUnit *0.8f; const FLOAT fAdvUnitS = fAdvUnit *0.8f; - const FLOAT fNextUnitS = fNextUnit *0.8f; + //const FLOAT fNextUnitS = fNextUnit *0.8f; const FLOAT fHalfUnitS = fHalfUnit *0.8f; // prepare postition and ammo quantities @@ -868,7 +870,7 @@ extern void DrawHUD( const CPlayer *penPlayerCurrent, CDrawPort *pdpCurrent, BOO if( iHealth>25) colHealth = _colHUD; if( iArmor >25) colArmor = _colHUD; // eventually print it out - if( hud_iShowPlayers==1 || hud_iShowPlayers==-1 && !bSinglePlay) { + if( hud_iShowPlayers==1 || (hud_iShowPlayers==-1 && !bSinglePlay)) { // printout location and info aren't the same for deathmatch and coop play const FLOAT fCharWidth = (PIX)((_pfdDisplayFont->GetWidth()-2) *fTextScale); if( bCooperative) { diff --git a/Sources/Entities/Common/Particles.cpp b/Sources/Entities/Common/Particles.cpp index 204948b..a7a956c 100644 --- a/Sources/Entities/Common/Particles.cpp +++ b/Sources/Entities/Common/Particles.cpp @@ -276,7 +276,7 @@ void Particles_RomboidTrail(CEntity *pen) for(INDEX iPos = 0; iPoslp_ctUsed; iPos++) { FLOAT3D vPos = plp->GetPosition(iPos); - FLOAT fRand = rand()/FLOAT(RAND_MAX); + //FLOAT fRand = rand()/FLOAT(RAND_MAX); FLOAT fAngle = fSeconds*256+iPos*2.0f*PI/ROMBOID_TRAIL_POSITIONS; FLOAT fSin = FLOAT(sin(fAngle)); vPos(2) += fSin*iPos/ROMBOID_TRAIL_POSITIONS; @@ -437,7 +437,7 @@ void Particles_WhiteLineTrail(CEntity *pen) vPos(1) += fSin*iPos*1.0f/WHITE_LINE_TRAIL_POSITIONS; vPos(2) += fCos*iPos*1.0f/WHITE_LINE_TRAIL_POSITIONS; - UBYTE ub = 255-iPos*256/WHITE_LINE_TRAIL_POSITIONS; + //UBYTE ub = 255-iPos*256/WHITE_LINE_TRAIL_POSITIONS; FLOAT fLerpFactor = FLOAT(iPos)/WHITE_LINE_TRAIL_POSITIONS; COLOR colColor = LerpColor( C_YELLOW, C_dRED, fLerpFactor); Particle_RenderLine( vPos, vOldPos, 0.05f, colColor); @@ -533,7 +533,7 @@ void Particles_CannonBall_Prepare(CEntity *pen) void Particles_CannonBall(CEntity *pen, FLOAT fSpeedRatio) { CLastPositions *plp = pen->GetLastPositions(CANNON_TRAIL_POSITIONS); - FLOAT fSeconds = _pTimer->GetLerpedCurrentTick(); + // FLOAT fSeconds = _pTimer->GetLerpedCurrentTick(); Particle_PrepareTexture(&_toCannonBall, PBT_BLEND); Particle_SetTexturePart( 512, 512, 0, 0); @@ -718,9 +718,9 @@ void Particles_BeastProjectileTrail( CEntity *pen, FLOAT fSize, FLOAT fHeight, I fT *= 1/BEAST_PROJECTILE_TOTAL_TIME; // get fraction part fT = fT-int(fT); - FLOAT fFade; - if (fT>(1.0f-BEAST_PROJECTILE_FADE_OUT)) fFade=(1-fT)*(1/BEAST_PROJECTILE_FADE_OUT); - else fFade=1.0f; + //FLOAT fFade; + //if (fT>(1.0f-BEAST_PROJECTILE_FADE_OUT)) fFade=(1-fT)*(1/BEAST_PROJECTILE_FADE_OUT); + //else fFade=1.0f; #define GET_POS( time) vCenter + \ vX*(afStarsPositions[iStar][0]*time*fSize*1.5) +\ @@ -816,7 +816,7 @@ void Particles_RocketTrail_Prepare(CEntity *pen) void Particles_RocketTrail(CEntity *pen, FLOAT fStretch) { CLastPositions *plp = pen->GetLastPositions(ROCKET_TRAIL_POSITIONS); - FLOAT fSeconds = _pTimer->GetLerpedCurrentTick(); + //FLOAT fSeconds = _pTimer->GetLerpedCurrentTick(); Particle_PrepareTexture(&_toRocketTrail, PBT_ADD); Particle_SetTexturePart( 512, 512, 0, 0); @@ -835,7 +835,7 @@ void Particles_RocketTrail(CEntity *pen, FLOAT fStretch) } for (INDEX iInter=0; iInterGetPosition(iPos); - FLOAT fRand = rand()/FLOAT(RAND_MAX); + //FLOAT fRand = rand()/FLOAT(RAND_MAX); FLOAT fAngle = iPos*2.0f*PI/BLOOD01_TRAIL_POSITIONS; - FLOAT fSin = FLOAT(sin(fAngle)); + //FLOAT fSin = FLOAT(sin(fAngle)); FLOAT fT = iPos*_pTimer->TickQuantum; vPos += vGDir*fGA*fT*fT/8.0f; FLOAT fSize = 0.2f-iPos*0.15f/BLOOD01_TRAIL_POSITIONS; @@ -1709,7 +1709,7 @@ void Particles_Rain(CEntity *pen, FLOAT fGridSize, INDEX ctGrids, FLOAT fFactor, pixRainMapH = ptdRainMap->GetPixHeight(); } - INDEX ctDiscarded=0; + //INDEX ctDiscarded=0; for( INDEX iZ=0; iZAPPEAR_OUT_END)) { return; } - FLOAT fPowerTime = pow(fTime-SPIRIT_SPIRAL_START, 2.5f); + //FLOAT fPowerTime = pow(fTime-SPIRIT_SPIRAL_START, 2.5f); // fill array with absolute vertices of entity's model and its attached models pen->GetModelVerticesAbsolute(avVertices, 0.05f, fMipFactor); @@ -2505,7 +2505,7 @@ void Particles_Appearing(CEntity *pen, TIME tmStart) FLOAT3D vX( m(1,1), m(2,1), m(3,1)); FLOAT3D vY( m(1,2), m(2,2), m(3,2)); FLOAT3D vZ( m(1,3), m(2,3), m(3,3)); - FLOAT3D vCenter = pen->GetLerpedPlacement().pl_PositionVector; + //FLOAT3D vCenter = pen->GetLerpedPlacement().pl_PositionVector; SetupParticleTexture( PT_STAR07); @@ -2524,12 +2524,12 @@ void Particles_Appearing(CEntity *pen, TIME tmStart) COLOR col = RGBToColor(ubColor,ubColor,ubColor)|CT_OPAQUE; INDEX ctVtx = avVertices.Count(); - FLOAT fSpeedFactor = 1.0f/ctVtx; + //FLOAT fSpeedFactor = 1.0f/ctVtx; // get corp size FLOATaabbox3D box; pen->en_pmoModelObject->GetCurrentFrameBBox(box); - FLOAT fHeightStretch = box.Size()(2); + //FLOAT fHeightStretch = box.Size()(2); FLOAT fStep = ClampDn( fMipFactor, 1.0f); for( FLOAT fVtx=0.0f; fVtxCurrentTick()-m_tmStarted<1.0f) - ||(dmtType==DMT_CANNONBALL_EXPLOSION) && (_pTimer->CurrentTick()-m_tmStarted<5.0f)) { + ||((dmtType==DMT_CANNONBALL_EXPLOSION) && (_pTimer->CurrentTick()-m_tmStarted<5.0f))) { return; } CMovableModelEntity::ReceiveDamage(penInflictor, dmtType, fDamageAmmount, vHitPoint, vDirection); diff --git a/Sources/Entities/Dragonman.es b/Sources/Entities/Dragonman.es index 59d2301..a20680b 100644 --- a/Sources/Entities/Dragonman.es +++ b/Sources/Entities/Dragonman.es @@ -444,8 +444,8 @@ procedures: Hit(EVoid) : CEnemyBase::Hit { // burn enemy - if (m_EdtType == DT_SERGEANT && CalcDist(m_penEnemy) <= 6.0f || - m_EdtType == DT_MONSTER && CalcDist(m_penEnemy) <= 20.0f) { + if ((m_EdtType == DT_SERGEANT && CalcDist(m_penEnemy) <= 6.0f) || + (m_EdtType == DT_MONSTER && CalcDist(m_penEnemy) <= 20.0f)) { jump BurnEnemy(); } diff --git a/Sources/Entities/Effector.es b/Sources/Entities/Effector.es index 09bcd59..027d1d3 100644 --- a/Sources/Entities/Effector.es +++ b/Sources/Entities/Effector.es @@ -110,7 +110,7 @@ functions: void AdjustMipFactor(FLOAT &fMipFactor) { - if (m_eetType==ET_DISAPPEAR_MODEL || m_eetType==ET_DISAPPEAR_MODEL_NOW && m_penModel!=NULL) + if (m_eetType==ET_DISAPPEAR_MODEL || (m_eetType==ET_DISAPPEAR_MODEL_NOW && m_penModel!=NULL)) { CModelObject *pmo = m_penModel->GetModelObject(); TIME tmDelta = _pTimer->GetLerpedCurrentTick()-m_tmStarted; @@ -131,7 +131,7 @@ functions: COLOR col = C_WHITE|ubAlpha; pmo->mo_colBlendColor = col; } - if (m_eetType==ET_APPEAR_MODEL || m_eetType==ET_APPEAR_MODEL_NOW && m_penModel!=NULL) + if (m_eetType==ET_APPEAR_MODEL || (m_eetType==ET_APPEAR_MODEL_NOW && m_penModel!=NULL)) { CModelObject *pmo = m_penModel->GetModelObject(); TIME tmDelta = _pTimer->GetLerpedCurrentTick()-m_tmStarted; @@ -434,7 +434,7 @@ procedures: // setup light source if (m_bLightSource) { SetupLightSource(); } - while(_pTimer->CurrentTick()CurrentTick()GetPlacement().pl_PositionVector; - FLOAT3D vDirection = (vTarget-vSource).Normalize(); + //FLOAT3D vDirection = (vTarget-vSource).Normalize(); Particles_Ghostbuster(vSource, vTarget, 32, 1.0f); // random lightnings arround diff --git a/Sources/Entities/Item.es b/Sources/Entities/Item.es index fe88424..f0bc149 100644 --- a/Sources/Entities/Item.es +++ b/Sources/Entities/Item.es @@ -56,7 +56,7 @@ functions: return; } - BOOL bFlare = TRUE; + //BOOL bFlare = TRUE; // if current player has already picked this item if (_ulPlayerRenderingMask&m_ulPickedMask) { // if picked items are not rendered @@ -67,10 +67,10 @@ functions: } // if picked item particles are not rendered extern INDEX plr_bRenderPickedParticles; - if (!plr_bRenderPickedParticles) { + /*if (!plr_bRenderPickedParticles) { // kill flare - bFlare = FALSE; - } + bFlare = FALSE; // DG: bFlare is not otherwise used! + }*/ } // implement flare on/off ? diff --git a/Sources/Entities/ModelHolder2.es b/Sources/Entities/ModelHolder2.es index f07188a..f54bdfe 100644 --- a/Sources/Entities/ModelHolder2.es +++ b/Sources/Entities/ModelHolder2.es @@ -173,7 +173,7 @@ functions: } else { vDirectionFixed = FLOAT3D(0,1,0); } - FLOAT3D vDamageOld = m_vDamage; + //FLOAT3D vDamageOld = m_vDamage; m_vDamage += vDirectionFixed*fKickDamage; // NOTE: we don't receive damage here, but handle death differently diff --git a/Sources/Entities/Player.es b/Sources/Entities/Player.es index d02be99..b1f58ac 100644 --- a/Sources/Entities/Player.es +++ b/Sources/Entities/Player.es @@ -462,10 +462,10 @@ DECL_DLL void ctl_ComposeActionPacket(const CPlayerCharacter &pc, CPlayerAction } // add button movement/rotation/look actions to the axis actions - if(pctlCurrent.bMoveForward || pctlCurrent.bStrafeFB&&pctlCurrent.bTurnUp ) paAction.pa_vTranslation(3) -= plr_fSpeedForward; - if(pctlCurrent.bMoveBackward || pctlCurrent.bStrafeFB&&pctlCurrent.bTurnDown) paAction.pa_vTranslation(3) += plr_fSpeedBackward; - if(pctlCurrent.bMoveLeft || pctlCurrent.bStrafe&&pctlCurrent.bTurnLeft) paAction.pa_vTranslation(1) -= plr_fSpeedSide; - if(pctlCurrent.bMoveRight || pctlCurrent.bStrafe&&pctlCurrent.bTurnRight) paAction.pa_vTranslation(1) += plr_fSpeedSide; + if(pctlCurrent.bMoveForward || (pctlCurrent.bStrafeFB&&pctlCurrent.bTurnUp) ) paAction.pa_vTranslation(3) -= plr_fSpeedForward; + if(pctlCurrent.bMoveBackward || (pctlCurrent.bStrafeFB&&pctlCurrent.bTurnDown)) paAction.pa_vTranslation(3) += plr_fSpeedBackward; + if(pctlCurrent.bMoveLeft || (pctlCurrent.bStrafe&&pctlCurrent.bTurnLeft) ) paAction.pa_vTranslation(1) -= plr_fSpeedSide; + if(pctlCurrent.bMoveRight || (pctlCurrent.bStrafe&&pctlCurrent.bTurnRight)) paAction.pa_vTranslation(1) += plr_fSpeedSide; if(pctlCurrent.bMoveUp ) paAction.pa_vTranslation(2) += plr_fSpeedUp; if(pctlCurrent.bMoveDown ) paAction.pa_vTranslation(2) -= plr_fSpeedUp; @@ -3702,7 +3702,7 @@ functions: } // if just started swimming - if (m_pstState == PST_SWIM && _pTimer->CurrentTick()CurrentTick()CurrentTick()IsPredicted()||IsPredictor()&&m_penView->IsPredictor()||!IsPredicted()&&!m_penView->IsPredicted()&&!IsPredictor()&&!m_penView->IsPredictor()); + ASSERT((IsPredicted()&&m_penView->IsPredicted()) || (IsPredictor()&&m_penView->IsPredictor()) + || (!IsPredicted()&&!m_penView->IsPredicted()&&!IsPredictor()&&!m_penView->IsPredictor())); en_plViewpoint.pl_PositionVector = FLOAT3D(0, 1, 0); en_plViewpoint.pl_OrientationAngle += (ANGLE3D( (ANGLE)((FLOAT)paAction.pa_aRotation(1)*_pTimer->TickQuantum), diff --git a/Sources/Entities/PlayerAnimator.es b/Sources/Entities/PlayerAnimator.es index 1ec5529..919dfd0 100644 --- a/Sources/Entities/PlayerAnimator.es +++ b/Sources/Entities/PlayerAnimator.es @@ -981,7 +981,7 @@ functions: FLOAT3D vDesiredTranslation = pl.en_vDesiredTranslationRelative; FLOAT3D vCurrentTranslation = pl.en_vCurrentTranslationAbsolute * !pl.en_mRotation; ANGLE3D aDesiredRotation = pl.en_aDesiredRotationRelative; - ANGLE3D aCurrentRotation = pl.en_aCurrentRotationAbsolute; + //ANGLE3D aCurrentRotation = pl.en_aCurrentRotationAbsolute; // if player is moving if (vDesiredTranslation.ManhattanNorm()>0.01f diff --git a/Sources/Entities/PlayerWeapons.es b/Sources/Entities/PlayerWeapons.es index debfb7f..92266b9 100644 --- a/Sources/Entities/PlayerWeapons.es +++ b/Sources/Entities/PlayerWeapons.es @@ -908,7 +908,7 @@ functions: } } // apply cannon draw - else if( (m_iCurrentWeapon == WEAPON_IRONCANNON) /*|| + else if( m_iCurrentWeapon == WEAPON_IRONCANNON /*|| (m_iCurrentWeapon == WEAPON_NUKECANNON) */) { FLOAT fLerpedMovement = Lerp(m_fWeaponDrawPowerOld, m_fWeaponDrawPower, _pTimer->GetLerpFactor()); @@ -3385,7 +3385,7 @@ procedures: GetAnimator()->FireAnimation(BODY_ANIM_SHOTGUN_FIRESHORT, AOF_LOOPING); } else if (m_iCurrentWeapon==WEAPON_TOMMYGUN) { autocall TommyGunStart() EEnd; - } else if ((m_iCurrentWeapon==WEAPON_IRONCANNON) /*|| (m_iCurrentWeapon==WEAPON_NUKECANNON)*/) { + } else if (m_iCurrentWeapon==WEAPON_IRONCANNON /*|| (m_iCurrentWeapon==WEAPON_NUKECANNON)*/) { jump CannonFireStart(); } diff --git a/Sources/Entities/Projectile.es b/Sources/Entities/Projectile.es index 84de6f9..6ae1582 100644 --- a/Sources/Entities/Projectile.es +++ b/Sources/Entities/Projectile.es @@ -2281,7 +2281,7 @@ procedures: ANGLE aHeading = GetRotationSpeed( aWantedHeading, m_aRotateSpeed, fWaitFrequency); // factor used to decrease speed of projectiles oriented opposite of its target - FLOAT fSpeedDecreasingFactor = ((180-abs(aWantedHeading))/180.0f); + FLOAT fSpeedDecreasingFactor = ((180-fabsf(aWantedHeading))/180.0f); // factor used to increase speed when far away from target FLOAT fSpeedIncreasingFactor = (vDesiredPosition-GetPlacement().pl_PositionVector).Length()/100; fSpeedIncreasingFactor = ClampDn(fSpeedIncreasingFactor, 1.0f); @@ -2302,7 +2302,7 @@ procedures: FLOAT fRNDPitch = (FRnd()-0.5f)*90*fDistanceFactor; // if we are looking near direction of target - if( abs( aWantedHeading) < 30.0f) + if( fabsf( aWantedHeading) < 30.0f) { // calculate pitch speed ANGLE aWantedPitch = GetRelativePitch( vDesiredDirection); diff --git a/Sources/Entities/PyramidSpaceShip.es b/Sources/Entities/PyramidSpaceShip.es index 2573221..702b322 100644 --- a/Sources/Entities/PyramidSpaceShip.es +++ b/Sources/Entities/PyramidSpaceShip.es @@ -461,7 +461,7 @@ functions: void SpawnBeamMachineMainFlare(void) { // spawn main flare - CPlacement3D plSpaceShip = GetPlacement(); + //CPlacement3D plSpaceShip = GetPlacement(); CPlacement3D plFlare = CPlacement3D( FLOAT3D(0, BM_MASTER_Y+BM_FLARE_DY, 0), ANGLE3D(0,0,0)); plFlare.RelativeToAbsolute(GetPlacement()); CEntity *penFlare = CreateEntity( plFlare, CLASS_EFFECTOR);