Skip to content
Snippets Groups Projects
Unverified Commit f4ad0309 authored by David Hermann's avatar David Hermann
Browse files

Fixing bug where the bullet is shown at `(0,0)` before spawning by calling...

Fixing bug where the bullet is shown at `(0,0)` before spawning by calling `update()` at the end of the Bullet constructor
parent 5a055784
Branches
No related tags found
No related merge requests found
...@@ -34,6 +34,8 @@ Bullet::Bullet(b2World& world, float startX, float startY, float velocityX, floa ...@@ -34,6 +34,8 @@ Bullet::Bullet(b2World& world, float startX, float startY, float velocityX, floa
bud->data = this; bud->data = this;
m_body->GetUserData().pointer = reinterpret_cast<uintptr_t>(bud); m_body->GetUserData().pointer = reinterpret_cast<uintptr_t>(bud);
this->update();
std::cout << "Bullet erstellt bei (" << startX << ", " << startY << ")" << std::endl; std::cout << "Bullet erstellt bei (" << startX << ", " << startY << ")" << std::endl;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment