ShootMe2 and IShoot2 mishap.

pull/1/head
sigonasr2 2 years ago
parent 4e217b29e1
commit f2e66c064e
  1. 0
      Faceball2030/assets/enemies/IShoot2.mtl
  2. 1016
      Faceball2030/assets/enemies/IShoot2.obj
  3. BIN
      Faceball2030/assets/enemies/IShoot2.png
  4. BIN
      Faceball2030/assets/enemies/IShoot2.wings
  5. 0
      Faceball2030/assets/enemies/IShoot2.xcf
  6. 1605
      Faceball2030/assets/enemies/ShootMe2.obj
  7. BIN
      Faceball2030/assets/enemies/ShootMe2.png
  8. BIN
      Faceball2030/assets/enemies/ShootMe2.wings
  9. 4
      Faceball2030/main.cpp

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

@ -2398,13 +2398,13 @@ bool FaceBall::OnUserUpdate(float fElapsedTime)
while (true) {
if (checkPos.x<0 || checkPos.y<0 || checkPos.x>MAP_SIZE.x || checkPos.y>MAP_SIZE.y) break;
vf2d checkVec = { std::cosf(fYaw) * 0.1f,std::sinf(fYaw) * 0.1f };
if (CheckCollision({ checkVec.x,0,checkVec.y }, checkPos, 0.1f)) break;
if (CheckCollision({ checkVec.x,0,checkVec.y }, checkPos, 0.05f)) break;
checkPos.x += checkVec.x;
checkPos.y += checkVec.y;
for (Enemy&e : enemies) {
if (!e.isDead()) {
float dist = std::sqrtf(std::powf(checkPos.x - e.pos.x, 2) + std::powf(checkPos.y - e.pos.z, 2));
if (dist <= e.radius) {
if (dist <= e.radius*2) {
lookingAtText = enemyData[e.GetID()].name;
goto afterPositionCheck;
}

Loading…
Cancel
Save