Skip to content
This repository has been archived by the owner on Nov 2, 2022. It is now read-only.

Commit

Permalink
* Fix Projectile Callback_OnCollide
Browse files Browse the repository at this point in the history
evento che non si verificava prima delle agginte delle dimenticanze
  • Loading branch information
jjak0b committed Feb 2, 2020
1 parent c975ceb commit 1e9fcf6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/entities/Projectile.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "Projectile.hpp"
#include "engine/GameEngine.hpp"
#include <cstring>

Projectile::Projectile( Level *world, Point2D origin, Vector direction, double damage, const char classname[], VECTOR_VALUE_TYPE speed, double _lifetime ) : DynamicEntity( world, origin, NULL , classname, speed){
this->direction = direction;
Expand Down Expand Up @@ -49,7 +50,8 @@ bool Projectile::Update( GameEngine *game ) {
}

void Projectile::Callback_OnCollide( GameEngine *game, Entity *collide_ent ) {
this->shouldDeleteOnUpdate = true;
if( strcmp( this->GetClassname(), collide_ent->GetClassname() ) )
this->shouldDeleteOnUpdate = true;
}


Expand Down

0 comments on commit 1e9fcf6

Please sign in to comment.