1
0

Fixed splash potion color on toss

This commit is contained in:
archshift
2014-07-19 02:46:31 -07:00
parent c7b7938c04
commit 93c6520e1e
2 changed files with 16 additions and 0 deletions

View File

@@ -2,11 +2,15 @@
#include "SplashPotionEntity.h"
#include "Pawn.h"
#include "../ClientHandle.h"
/// Converts an angle in radians into a byte representation used by the network protocol
#define ANGLE_TO_PROTO(X) (Byte)(X * 255 / 360)
////////////////////////////////////////////////////////////////////////////////
// cSplashPotionEntityCallback:
@@ -118,3 +122,13 @@ void cSplashPotionEntity::Splash(const Vector3d & a_HitPos)
void cSplashPotionEntity::SpawnOn(cClientHandle & a_Client)
{
a_Client.SendSpawnObject(*this, 73, m_PotionParticleType, ANGLE_TO_PROTO(GetYaw()), ANGLE_TO_PROTO(GetPitch()));
a_Client.SendEntityMetadata(*this);
}