Adjusted style of switch/case
This commit is contained in:
parent
72f9c8b069
commit
f74ee8fb51
@ -1378,21 +1378,11 @@ int cProtocol125::ParseEntityAction(void)
|
|||||||
|
|
||||||
switch (ActionID)
|
switch (ActionID)
|
||||||
{
|
{
|
||||||
case 1: // Crouch
|
case 1: m_Client->HandleEntityCrouch(EntityID, true); break; // Crouch
|
||||||
m_Client->HandleEntityCrouch(EntityID, true);
|
case 2: m_Client->HandleEntityCrouch(EntityID, false); break; // Uncrouch
|
||||||
break;
|
case 3: m_Client->HandleEntityLeaveBed(EntityID); break; // Leave Bed
|
||||||
case 2: // Uncrouch
|
case 4: m_Client->HandleEntitySprinting(EntityID, true); break; // Start sprinting
|
||||||
m_Client->HandleEntityCrouch(EntityID, false);
|
case 5: m_Client->HandleEntitySprinting(EntityID, false); break; // Stop sprinting
|
||||||
break;
|
|
||||||
case 3: // Leave Bed
|
|
||||||
m_Client->HandleEntityLeaveBed(EntityID);
|
|
||||||
break;
|
|
||||||
case 4: // Start sprinting
|
|
||||||
m_Client->HandleEntitySprinting(EntityID, true);
|
|
||||||
break;
|
|
||||||
case 5: // Stop sprinting
|
|
||||||
m_Client->HandleEntitySprinting(EntityID, false);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return PARSE_OK;
|
return PARSE_OK;
|
||||||
|
@ -187,21 +187,11 @@ int cProtocol161::ParseEntityAction(void)
|
|||||||
|
|
||||||
switch (ActionID)
|
switch (ActionID)
|
||||||
{
|
{
|
||||||
case 1: // Crouch
|
case 1: m_Client->HandleEntityCrouch(EntityID, true); break; // Crouch
|
||||||
m_Client->HandleEntityCrouch(EntityID, true);
|
case 2: m_Client->HandleEntityCrouch(EntityID, false); break; // Uncrouch
|
||||||
break;
|
case 3: m_Client->HandleEntityLeaveBed(EntityID); break; // Leave Bed
|
||||||
case 2: // Uncrouch
|
case 4: m_Client->HandleEntitySprinting(EntityID, true); break; // Start sprinting
|
||||||
m_Client->HandleEntityCrouch(EntityID, false);
|
case 5: m_Client->HandleEntitySprinting(EntityID, false); break; // Stop sprinting
|
||||||
break;
|
|
||||||
case 3: // Leave Bed
|
|
||||||
m_Client->HandleEntityLeaveBed(EntityID);
|
|
||||||
break;
|
|
||||||
case 4: // Start sprinting
|
|
||||||
m_Client->HandleEntitySprinting(EntityID, true);
|
|
||||||
break;
|
|
||||||
case 5: // Stop sprinting
|
|
||||||
m_Client->HandleEntitySprinting(EntityID, false);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return PARSE_OK;
|
return PARSE_OK;
|
||||||
|
@ -1735,21 +1735,11 @@ void cProtocol172::HandlePacketEntityAction(cByteBuffer & a_ByteBuffer)
|
|||||||
|
|
||||||
switch (Action)
|
switch (Action)
|
||||||
{
|
{
|
||||||
case 1: // Crouch
|
case 1: m_Client->HandleEntityCrouch(PlayerID, true); break; // Crouch
|
||||||
m_Client->HandleEntityCrouch(PlayerID, true);
|
case 2: m_Client->HandleEntityCrouch(PlayerID, false); break; // Uncrouch
|
||||||
break;
|
case 3: m_Client->HandleEntityLeaveBed(PlayerID); break; // Leave Bed
|
||||||
case 2: // Unchrouch
|
case 4: m_Client->HandleEntitySprinting(PlayerID, true); break; // Start sprinting
|
||||||
m_Client->HandleEntityCrouch(PlayerID, false);
|
case 5: m_Client->HandleEntitySprinting(PlayerID, false); break; // Stop sprinting
|
||||||
break;
|
|
||||||
case 3: // Leave Bed
|
|
||||||
m_Client->HandleEntityLeaveBed(PlayerID);
|
|
||||||
break;
|
|
||||||
case 4: // Start sprinting
|
|
||||||
m_Client->HandleEntitySprinting(PlayerID, true);
|
|
||||||
break;
|
|
||||||
case 5: // Stop sprinting
|
|
||||||
m_Client->HandleEntitySprinting(PlayerID, false);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user