ShootMe2 and IShoot2 mishap.
This commit is contained in:
parent
4e217b29e1
commit
f2e66c064e
1016
Faceball2030/assets/enemies/IShoot2.obj
Normal file
1016
Faceball2030/assets/enemies/IShoot2.obj
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Faceball2030/assets/enemies/IShoot2.png
Normal file
BIN
Faceball2030/assets/enemies/IShoot2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
BIN
Faceball2030/assets/enemies/IShoot2.wings
Normal file
BIN
Faceball2030/assets/enemies/IShoot2.wings
Normal file
Binary file not shown.
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 |
Binary file not shown.
@ -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…
x
Reference in New Issue
Block a user