Fixed splash potion color on toss
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user