Use switch in GetStepSound
This commit is contained in:
parent
27b98dec2b
commit
0274db0e14
@ -176,15 +176,13 @@ public:
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
BLOCKTYPE Block = GetSingleSlabType(m_BlockType);
|
||||
if (Block != m_BlockType)
|
||||
switch (m_BlockType)
|
||||
{
|
||||
return cBlockHandler::GetBlockHandler(Block)->GetStepSound();
|
||||
}
|
||||
else
|
||||
{
|
||||
return "step.stone";
|
||||
case E_BLOCK_DOUBLE_STONE_SLAB: return "step.stone";
|
||||
case E_BLOCK_DOUBLE_WOODEN_SLAB: return "step.wood";
|
||||
}
|
||||
ASSERT(!"Unhandled double slab type!");
|
||||
return "";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user