diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp index 6b06fe87..42a16a0a 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.cpp +++ b/Adventures in Lestoria/AdventuresInLestoria.cpp @@ -614,7 +614,7 @@ void AiL::UpdateBullets(float fElapsedTime){ return false; } } - b->hitList[&m]=true; + b->hitList.insert(&m); } } } diff --git a/Adventures in Lestoria/Bullet.h b/Adventures in Lestoria/Bullet.h index 49e7ba6b..f0080acd 100644 --- a/Adventures in Lestoria/Bullet.h +++ b/Adventures in Lestoria/Bullet.h @@ -67,7 +67,7 @@ private: public: Animate2D::Animationanimation; Animate2D::AnimationState internal_animState; - std::maphitList; + std::sethitList; virtual ~Bullet()=default; Bullet(vf2d pos,vf2d vel,float radius,int damage,bool upperLevel,bool friendly=false,Pixel col=WHITE,vf2d scale={1,1}); //Initializes a bullet with an animation. diff --git a/Adventures in Lestoria/FrogTongue.cpp b/Adventures in Lestoria/FrogTongue.cpp index 6b604594..a91285ad 100644 --- a/Adventures in Lestoria/FrogTongue.cpp +++ b/Adventures in Lestoria/FrogTongue.cpp @@ -63,20 +63,22 @@ void FrogTongue::Update(float fElapsedTime){ } if(friendly){ for(Monster&m:MONSTER_LIST){ - if(geom2d::overlaps(m.Hitbox(),tongueLine)){ + if(hitList.find(&m)==hitList.end()&&geom2d::overlaps(m.Hitbox(),tongueLine)){ MonsterHit(m); + hitList.insert(&m); } } } } bool FrogTongue::PlayerHit(Player*player){ - player->Hurt(damage,OnUpperLevel(),0); - deactivated=true; + if(!deactivated){ + player->Hurt(damage,OnUpperLevel(),0); + deactivated=true; + } return false; } bool FrogTongue::MonsterHit(Monster&monster){ monster.Hurt(damage,OnUpperLevel(),0); - deactivated=true; return false; } void FrogTongue::Draw(){ diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 702a2c09..619e30c4 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 0 #define VERSION_MINOR 2 #define VERSION_PATCH 1 -#define VERSION_BUILD 5740 +#define VERSION_BUILD 5743 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 95335108..65bbc28d 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ