Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

Commit

Permalink
Player can now be killed and fixed crazy runtime delete error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jibran Syed committed Apr 28, 2014
1 parent 6f57ea8 commit 0312f56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion HedronSpace/BulletLifetime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ namespace sfew
// Runs at destruction of component
void BulletLifetime::Cleanup()
{
_lifeTimer._Get()->Destroy();
if(!_lifeTimer.expired())
{
_lifeTimer._Get()->Destroy();
}
}

// Run if there is a collision with an object of a different group
Expand Down
5 changes: 4 additions & 1 deletion HedronSpace/ControlEnemy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ namespace sfew
}

// Mark timer for deletion
_shootTimer._Get()->Destroy();
if(!_shootTimer.expired())
{
_shootTimer._Get()->Destroy();
}
}

// Run if there is a collision with an object of a different group
Expand Down

0 comments on commit 0312f56

Please sign in to comment.