Cleanup de l'objet Bullet

This commit is contained in:
MarcEricMartel
2023-09-29 17:02:57 -04:00
parent 954b976f27
commit 6bea176979
9 changed files with 23 additions and 84 deletions

View File

@@ -1,10 +1,9 @@
#include "bullet.h"
#include "world.h"
Bullet::Bullet(Player& player) {
m_startpos = m_currentpos = player.GetPOV() + player.GetDirection();
m_velocity = player.GetDirection();
}
Bullet::Bullet(Vector3f pos, Vector3f dir) : m_startpos(pos), m_currentpos(pos), m_velocity(dir) {}
Bullet::Bullet(Vector3f pos, Vector3f dir, uint64_t tid): m_startpos(pos), m_currentpos(pos), m_velocity(dir), m_tid(tid) {}
Bullet::~Bullet() {}
@@ -31,6 +30,10 @@ void Bullet::Transpose(int& x, int& z) {
m_startpos.z -= z * CHUNK_SIZE_Z;
}
Vector3f& Bullet::getPos() {
Vector3f Bullet::getPos() {
return m_currentpos;
}
uint64_t Bullet::getTeamID(){
return m_tid;
}