summaryrefslogtreecommitdiff
path: root/src/object/crackingGround.c
blob: fe8488c0e64dccd430594bfcc89c49b5b36dabed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
 * @file crackingGround.c
 * @ingroup Objects
 *
 * @brief Cracking Ground object
 */
#include "functions.h"
#include "object.h"

void CrackingGround(Entity* this) {
    if (this->action == 0) {
        this->action = 1;
        this->timer = 20;
        SnapToTile(this);
    } else {
        if (this->timer-- == 0) {
            sub_0807B7D8(0x35, COORD_TO_TILE(this), this->collisionLayer);
            CreateFx(this, FX_FALL_DOWN, 0x40);
            SoundReq(SFX_126);
            DeleteThisEntity();
        }
    }
}