whoooosh!
This commit is contained in:
		| @@ -7,8 +7,9 @@ Bullet::Bullet(Vector3f pos, Vector3f dir, uint64_t tid): m_startpos(pos), m_cur | ||||
|  | ||||
| Bullet::~Bullet() {} | ||||
|  | ||||
| bool Bullet::Update(World* world, float elapsedtime) { | ||||
| 	for (int x = 0; x < 1000; ++x) { | ||||
| bool Bullet::Update(World* world, float elapsedtime, int perframe) { | ||||
| 	int max = 100 / perframe; | ||||
| 	for (int x = 0; x < max; ++x) { | ||||
| 		m_currentpos += m_velocity * elapsedtime; | ||||
|  | ||||
| 		if (!world->ChunkAt(m_currentpos)) | ||||
| @@ -30,10 +31,14 @@ void Bullet::Transpose(int& x, int& z) { | ||||
| 	m_startpos.z -= z * CHUNK_SIZE_Z; | ||||
| } | ||||
|  | ||||
| Vector3f Bullet::getPos() { | ||||
| Vector3f Bullet::getPos() const { | ||||
| 	return m_currentpos; | ||||
| } | ||||
|  | ||||
| Vector3f Bullet::getVel() const { | ||||
| 	return m_velocity; | ||||
| } | ||||
|  | ||||
| uint64_t Bullet::getTeamID(){ | ||||
| 	return m_tid; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user