mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 03:15:32 +00:00
Avoid dead code
This commit is contained in:
parent
801e2d6ad0
commit
7fc4c9f3f6
6 changed files with 10 additions and 23 deletions
|
@ -325,12 +325,6 @@ std::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseNAry (const Token& keyw
|
|||
break;
|
||||
}
|
||||
|
||||
if (nodes.empty())
|
||||
{
|
||||
error();
|
||||
return std::shared_ptr<Node>();
|
||||
}
|
||||
|
||||
switch (keyword.mType)
|
||||
{
|
||||
case Token::Type_Keyword_And: return std::shared_ptr<CSMFilter::Node> (new AndNode (nodes));
|
||||
|
|
|
@ -429,12 +429,8 @@ void CSVRender::TerrainTextureMode::editTerrainTextureGrid(const WorldspaceHitRe
|
|||
{
|
||||
int distanceX(0);
|
||||
int distanceY(0);
|
||||
if (i_cell < cellX) distanceX = xHitInCell + landTextureSize * abs(i_cell-cellX) - i;
|
||||
if (j_cell < cellY) distanceY = yHitInCell + landTextureSize * abs(j_cell-cellY) - j;
|
||||
if (i_cell > cellX) distanceX = -xHitInCell + landTextureSize* abs(i_cell-cellX) + i;
|
||||
if (j_cell > cellY) distanceY = -yHitInCell + landTextureSize * abs(j_cell-cellY) + j;
|
||||
if (i_cell == cellX) distanceX = abs(i-xHitInCell);
|
||||
if (j_cell == cellY) distanceY = abs(j-yHitInCell);
|
||||
distanceX = abs(i-xHitInCell);
|
||||
distanceY = abs(j-yHitInCell);
|
||||
float distance = std::round(sqrt(pow(distanceX, 2)+pow(distanceY, 2)));
|
||||
float rf = static_cast<float>(mBrushSize) / 2;
|
||||
if (distance < rf) newTerrain[j*landTextureSize+i] = brushInt;
|
||||
|
|
|
@ -561,7 +561,7 @@ namespace
|
|||
if (mAllQuests)
|
||||
{
|
||||
SetNamesInactive setInactive(list);
|
||||
mModel->visitQuestNames(!mAllQuests, setInactive);
|
||||
mModel->visitQuestNames(false, setInactive);
|
||||
}
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->playSound("book page");
|
||||
|
|
|
@ -446,9 +446,9 @@ std::string CharacterController::fallbackShortWeaponGroup(const std::string& bas
|
|||
const ESM::WeaponType* weapInfo = getWeaponType(mWeaponType);
|
||||
|
||||
// For real two-handed melee weapons use 2h swords animations as fallback, otherwise use the 1h ones
|
||||
if (isRealWeapon && weapInfo->mFlags & ESM::WeaponType::TwoHanded && weapInfo->mWeaponClass == ESM::WeaponType::Melee)
|
||||
if (weapInfo->mFlags & ESM::WeaponType::TwoHanded && weapInfo->mWeaponClass == ESM::WeaponType::Melee)
|
||||
groupName += twoHandFallback;
|
||||
else if (isRealWeapon)
|
||||
else
|
||||
groupName += oneHandFallback;
|
||||
|
||||
// Special case for crossbows - we shouls apply 1h animations a fallback only for lower body
|
||||
|
|
|
@ -140,15 +140,12 @@ namespace Compiler
|
|||
|
||||
for (int i = 0; i <= length; i++)
|
||||
{
|
||||
if (length >= i)
|
||||
{
|
||||
in.get (ch);
|
||||
in.get (ch);
|
||||
|
||||
if (!in.good())
|
||||
return false;
|
||||
if (!in.good())
|
||||
return false;
|
||||
|
||||
mData[i] = ch;
|
||||
}
|
||||
mData[i] = ch;
|
||||
}
|
||||
|
||||
mLength = length;
|
||||
|
|
|
@ -286,7 +286,7 @@ namespace ICS
|
|||
//ControlAxisBinderItem joystickBinderItem = mControlsJoystickAxisBinderMap[ evt.which ][ axis ]; // joystic axis start at 0 index
|
||||
//Control* ctrl = joystickBinderItem.control;
|
||||
//if(ctrl && ctrl->isAxisBindable())
|
||||
if(mDetectingBindingControl && mDetectingBindingControl->isAxisBindable())
|
||||
if(mDetectingBindingControl->isAxisBindable())
|
||||
{
|
||||
if( abs( evt.value ) > ICS_JOYSTICK_AXIS_BINDING_MARGIN)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue