From f3b2fcb95f0eb21d3b1e5977659c6447ccffeb82 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Fri, 14 Jan 2022 14:12:14 +0100 Subject: strange behavior... I WILL find out whats going on ! --- src/wp_enemyslingshot.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/wp_enemyslingshot.cpp') diff --git a/src/wp_enemyslingshot.cpp b/src/wp_enemyslingshot.cpp index 2a5b9fc..ad113e8 100644 --- a/src/wp_enemyslingshot.cpp +++ b/src/wp_enemyslingshot.cpp @@ -4,11 +4,11 @@ #include #include -#include "gameplay.hpp" #include "entity.hpp" +#include "gameplay.hpp" wp_enemysling::wp_enemysling(const char* s, const char* r) - : AWeapon(300.0f, 10, 2, 0.0, s, r) {} + : AWeapon(300.0f, 10, 1, 0.0, s, r, "sling") {} int wp_enemysling::bang(std::vector* enemies, Entity* baddie) { if (barrel == 0) { @@ -21,9 +21,9 @@ int wp_enemysling::bang(std::vector* enemies, Entity* baddie) { // it's a slingshot // Entity en(1); - en.posX = (baddie->posX += range); - en.posY = (baddie->posY += range); - en.direction = baddie->direction; + en.posX = 0; + en.posY = 0; + en.direction = (Vector2){1.0f, 1.0f}; en.radius = 20; en.currentWeapon = nullptr; en.idleTex = LoadTexture(SBIRE_TEX_IDLE); -- cgit v1.2.3