aboutsummaryrefslogtreecommitdiffstats
path: root/src/wp_enemyslingshot.cpp
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2022-01-14 14:12:14 +0100
committersalaaad2 <arthurdurant263@gmail.com>2022-01-14 14:12:14 +0100
commitf3b2fcb95f0eb21d3b1e5977659c6447ccffeb82 (patch)
tree6899f16faabe3210989792de92c8b021f112d78a /src/wp_enemyslingshot.cpp
parentboss has the correct textures (diff)
downloadthreshold-f3b2fcb95f0eb21d3b1e5977659c6447ccffeb82.tar.gz
threshold-f3b2fcb95f0eb21d3b1e5977659c6447ccffeb82.tar.bz2
threshold-f3b2fcb95f0eb21d3b1e5977659c6447ccffeb82.tar.xz
threshold-f3b2fcb95f0eb21d3b1e5977659c6447ccffeb82.tar.zst
threshold-f3b2fcb95f0eb21d3b1e5977659c6447ccffeb82.zip
strange behavior... I WILL find out whats going on !
Diffstat (limited to 'src/wp_enemyslingshot.cpp')
-rw-r--r--src/wp_enemyslingshot.cpp10
1 files changed, 5 insertions, 5 deletions
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 <raymath.h>
#include <iostream>
-#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<Entity>* enemies, Entity* baddie) {
if (barrel == 0) {
@@ -21,9 +21,9 @@ int wp_enemysling::bang(std::vector<Entity>* 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);