sm64pc/src/game/behaviors/unused_poundable_platform.i...

29 lines
912 B
C
Raw Permalink Normal View History

2019-08-25 04:46:40 +00:00
/**
* Behavior for bhvUnusedPoundablePlatform.
*
* This unused behavior controls a platform that shatters into small triangles
* if Mario ground pounds it.
*
* Its collision model perfectly aligns with the hole leading to In the
* Deep Freeze in Snowman's Land. It is likely that players early in development
* would have to ground pound this platform before being able to access the star.
*
* Curiously, the triangles spawned when the platform breaks use a model that
* is not used anywhere else.
*/
void bhv_unused_poundable_platform(void) {
2020-03-02 03:42:52 +00:00
cur_obj_scale(1.02f);
2019-08-25 04:46:40 +00:00
if (o->oAction == 0) {
2020-03-02 03:42:52 +00:00
if (cur_obj_is_mario_ground_pounding_platform()) {
spawn_mist_particles();
2019-08-25 04:46:40 +00:00
spawn_triangle_break_particles(20, 56, 3.0f, 0);
o->oAction++;
}
} else if (o->oTimer > 7) {
2020-03-02 03:42:52 +00:00
obj_mark_for_deletion(o);
2019-08-25 04:46:40 +00:00
}
load_object_collision_model();
}