10using namespace Tempest;
14 obj = wrld->physic()->bulletObj(
this);
25 setView(std::move(e));
28 material = uint8_t(itm.
handle().material);
36 vfx.setBullet(
nullptr,*wrld);
68 vfx.setBullet(
this,*wrld);
69 vfx.setPhysicsDisable();
122 if(matId != zenkit::MaterialGroup::NONE) {
129 vfx.setLooped(
false);
130 vfx.setPhysicsDisable();
148 vfx.setLooped(
false);
149 vfx.setPhysicsDisable();
155void Bullet::updateMatrix() {
162 vfx.setObjMatrix(mat);
void setTargetRange(float tgRange)
ItemMaterial itemMaterial() const
void setTarget(const Npc *n)
void onCollide(zenkit::MaterialGroup matId) override
void setPosition(const Tempest::Vec3 &p)
void setDirection(const Tempest::Vec3 &dir)
void setView(MeshObjects::Mesh &&m)
void deleteObj(BulletBody *obj)
static void onCollide(World &owner, const VisualFx *root, const Tempest::Vec3 &pos, Npc *npc, Npc *other, int32_t splId)
bool isFriendlyFire(const Npc &src, const Npc &dst) const
const VisualFx * spellVfx(int32_t splId)
bool isSpellOrRune() const
const zenkit::IItem & handle() const
void setObjMatrix(const Tempest::Matrix4x4 &mt)
void takeDamage(Npc &other, const Bullet *b)
void runEffect(Effect &&e)
DynamicWorld * physic() const
Sound addLandHitEffect(ItemMaterial src, zenkit::MaterialGroup reciver, const Tempest::Matrix4x4 &pos)
MeshObjects::Mesh addView(std::string_view visual) const
GameScript & script() const
void setPosition(const Tempest::Vec3 &pos)
void setTargetRange(float tgRange)
Tempest::Matrix4x4 matrix() const
Tempest::Vec3 position() const
void setDirection(const Tempest::Vec3 &dir)