MCPcopy Create free account
hub / github.com/cuberite/cuberite / CreateProjectile

Method CreateProjectile

src/World.cpp:2984–2997  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2982
2983
2984int cWorld::CreateProjectile(double a_PosX, double a_PosY, double a_PosZ, cProjectileEntity::eKind a_Kind, cEntity * a_Creator, const cItem a_Item, const Vector3d * a_Speed)
2985{
2986 cProjectileEntity * Projectile = cProjectileEntity::Create(a_Kind, a_Creator, a_PosX, a_PosY, a_PosZ, a_Item, a_Speed);
2987 if (Projectile == NULL)
2988 {
2989 return -1;
2990 }
2991 if (!Projectile->Initialize(this))
2992 {
2993 delete Projectile;
2994 return -1;
2995 }
2996 return Projectile->GetUniqueID();
2997}
2998
2999
3000

Callers 2

OnItemUseMethod · 0.80
OnItemUseMethod · 0.80

Calls 2

InitializeMethod · 0.45
GetUniqueIDMethod · 0.45

Tested by

no test coverage detected