Skip to content

Commit

Permalink
remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
gajop committed May 10, 2020
1 parent ba93bc9 commit 96491ad
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 9 deletions.
2 changes: 2 additions & 0 deletions rts/Game/Camera.cpp
Expand Up @@ -249,7 +249,9 @@ void CCamera::UpdateViewRange()
const float3 blPixelDir = CalcPixelDir( 0, globalRendering->viewSizeY);
#endif

#if 0
constexpr float SQ_MAX_VIEW_RANGE = Square(CGlobalRendering::MAX_VIEW_RANGE);
#endif
constexpr float ZFAR_ZNEAR_FACTOR = 0.001f;

const float maxEdgeDistX = std::max(pos.x, float3::maxxpos - pos.x);
Expand Down
1 change: 0 additions & 1 deletion rts/Map/Generation/SimpleMapGenerator.cpp
Expand Up @@ -54,7 +54,6 @@ void CSimpleMapGenerator::GenerateMap()

mapDescription = "Simple Random Map";

const int2 gs = GetGridSize();
std::vector<float>& map = GetHeightMap();
std::fill(map.begin(), map.end(), 50.0f);
}
3 changes: 2 additions & 1 deletion rts/Map/SMF/ROAM/RoamMeshDrawer.cpp
Expand Up @@ -182,8 +182,9 @@ void CRoamMeshDrawer::Update()
CCamera* cam = CCameraHandler::GetActiveCamera();

bool shadowPass = (cam->GetCamType() == CCamera::CAMTYPE_SHADOW);
#if TESSELATION_DEBUG
bool tesselMesh = forceNextTesselation[shadowPass];
bool fullRetesselate = false;
#endif

auto& patches = patchMeshGrid[shadowPass];
auto& pvflags = patchVisFlags[shadowPass];
Expand Down
2 changes: 0 additions & 2 deletions rts/Net/NetCommands.cpp
Expand Up @@ -745,7 +745,6 @@ void CGame::ClientReadNet()

uint8_t playerID;
uint8_t aiInstID;
uint8_t aiTeamID;
uint8_t pairwise;
uint32_t sameCmdID;
uint8_t sameCmdOpt;
Expand All @@ -760,7 +759,6 @@ void CGame::ClientReadNet()
throw netcode::UnpackPacketException("Invalid player number");

pckt >> aiInstID;
// pckt >> aiTeamID;
pckt >> pairwise;
pckt >> sameCmdID;
pckt >> sameCmdOpt;
Expand Down
3 changes: 0 additions & 3 deletions rts/Sim/Misc/CollisionHandler.cpp
Expand Up @@ -512,9 +512,6 @@ bool CCollisionHandler::IntersectCylinder(const CollisionVolume* v, const float3
return true;
}

// ray direction in volume-space
const float3 dir = (pi1 - pi0).SafeNormalize();

// ray direction in (unit) cylinder-space
float3 udir;

Expand Down
2 changes: 1 addition & 1 deletion rts/Sim/Objects/SolidObject.cpp
Expand Up @@ -215,10 +215,10 @@ void CSolidObject::Block()
}

bool CSolidObject::FootPrintOnGround() const {
constexpr float scale = SQUARE_SIZE * 0.5f;
const float sdist = std::max(radius, CalcFootPrintMinExteriorRadius());

#if 0
constexpr float scale = SQUARE_SIZE * 0.5f;
float3 p = pos;

{
Expand Down
2 changes: 1 addition & 1 deletion rts/Sim/Weapons/Rifle.cpp
Expand Up @@ -28,7 +28,7 @@ void CRifle::FireImpl(const bool scriptCall)
CUnit* hitUnit;
CFeature* hitFeature;

const float length = TraceRay::TraceRay(weaponMuzzlePos, dir, range, collisionFlags, owner, hitUnit, hitFeature);
TraceRay::TraceRay(weaponMuzzlePos, dir, range, collisionFlags, owner, hitUnit, hitFeature);
const float impulse = CGameHelper::CalcImpulseScale(*damages, 1.0f);

if (hitUnit != nullptr)
Expand Down

0 comments on commit 96491ad

Please sign in to comment.