Correction pour pr20
This commit is contained in:
		| @@ -13,23 +13,13 @@ bool Bullet::Update(World* world, float elapsedtime, int perframe, std::map<uint | ||||
| 	for (int x = 0; x < max; ++x) { | ||||
| 		m_currentpos += m_velocity * elapsedtime; | ||||
|  | ||||
| 		 | ||||
| 		std::map<uint64_t, Player*>::iterator it = mapPlayer.begin(); | ||||
|  | ||||
| 		while (it != mapPlayer.end()) | ||||
| 		{ | ||||
| 			 | ||||
| 			Player* player = it->second; | ||||
| 			Vector3f playerPos = player->GetPosition(); | ||||
| 			if (playerPos == m_currentpos) | ||||
| 			{ | ||||
| 		for (auto& [key, player] : mapPlayer) { | ||||
| 			if ((m_currentpos - player->GetPosition()).Length() < .4f) { | ||||
| 				player->InflictDamage(damage); | ||||
| 				return true; | ||||
| 			} | ||||
| 			it++; | ||||
| 		} | ||||
|  | ||||
|  | ||||
| 		if (!world->ChunkAt(m_currentpos)) | ||||
| 			return true; | ||||
| 		else if (world->BlockAt(m_currentpos) != BTYPE_AIR) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user