summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2013-06-02 10:54:54 -0500
committerColin Noga <Tempus@chronometry.ca>2013-06-02 10:54:54 -0500
commitf4526064654ad2ed884e63eb633babda523d73cd (patch)
tree5f48c992c3247ef6444a6743875c979e6925453f
parentb88f46245671234de40dbab625d28a965d0470d7 (diff)
downloadkamek-f4526064654ad2ed884e63eb633babda523d73cd.tar.gz
kamek-f4526064654ad2ed884e63eb633babda523d73cd.zip
challenge star
-rw-r--r--src/challengeStar.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/challengeStar.cpp b/src/challengeStar.cpp
index ec80661..f754188 100644
--- a/src/challengeStar.cpp
+++ b/src/challengeStar.cpp
@@ -22,6 +22,7 @@ class dChallengeStar : public dEn_c {
u64 eventFlag;
s32 timer;
+ bool collected;
static dChallengeStar *build();
@@ -39,6 +40,12 @@ class dChallengeStar : public dEn_c {
void dChallengeStar::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) {
+
+ if (collected) {
+ this->Delete(1);
+ return; }
+
+
PlaySoundAsync(this, SE_OBJ_BROOM_KEY_SHOW);
SpawnEffect("Wm_ob_greencoinkira_a", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){0.8, 0.8, 0.8});
@@ -46,6 +53,8 @@ void dChallengeStar::playerCollision(ActivePhysics *apThis, ActivePhysics *apOth
if (GlobalStarsCollected == 0) {
dFlagMgr_c::instance->flags |= this->eventFlag;
}
+
+ collected = true;
this->Delete(1);
}
@@ -81,6 +90,7 @@ dChallengeStar *dChallengeStar::build() {
int dChallengeStar::onCreate() {
+ collected = false;
char die = this->settings & 0xF;
if (GetSpecificPlayerActor(die) == 0) { this->Delete(1); return 2; }