summaryrefslogtreecommitdiff
path: root/src/challengeStar.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-06-02 23:32:09 +0200
committerTreeki <treeki@gmail.com>2013-06-02 23:32:09 +0200
commite33d76475bc5326d608e74421c8e3a40ae0f4e2e (patch)
tree2798b85a822f5fbe375fc1369b1fd7396647aa5c /src/challengeStar.cpp
parent330d88af1b6d8415bb6bfc27a3882686f2d9555f (diff)
parentf4526064654ad2ed884e63eb633babda523d73cd (diff)
downloadkamek-e33d76475bc5326d608e74421c8e3a40ae0f4e2e.tar.gz
kamek-e33d76475bc5326d608e74421c8e3a40ae0f4e2e.zip
FUCKING CRAP MERGES
Diffstat (limited to 'src/challengeStar.cpp')
-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; }