mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Synchronized breakable wall
This commit is contained in:
parent
3b00aa9e42
commit
697670b519
2 changed files with 15 additions and 2 deletions
|
|
@ -1162,4 +1162,7 @@
|
||||||
#define /*0x0FC*/ oYoshiChosenHome OBJECT_FIELD_S32(0x1D)
|
#define /*0x0FC*/ oYoshiChosenHome OBJECT_FIELD_S32(0x1D)
|
||||||
#define /*0x100*/ oYoshiTargetYaw OBJECT_FIELD_S32(0x1E)
|
#define /*0x100*/ oYoshiTargetYaw OBJECT_FIELD_S32(0x1E)
|
||||||
|
|
||||||
|
/* Breakable Wall */
|
||||||
|
#define /*0x104*/ oBreakableWallForce OBJECT_FIELD_S32(0x1F)
|
||||||
|
|
||||||
#endif // OBJECT_FIELDS_H
|
#endif // OBJECT_FIELDS_H
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,19 @@
|
||||||
// breakable_wall.c.inc
|
// breakable_wall.c.inc
|
||||||
|
|
||||||
void bhv_wf_breakable_wall_loop(void) {
|
void bhv_wf_breakable_wall_loop(void) {
|
||||||
if (gMarioStates->action == ACT_SHOT_FROM_CANNON) {
|
if (o->oSyncID == 0) {
|
||||||
|
network_init_object(o, SYNC_DISTANCE_ONLY_EVENTS);
|
||||||
|
network_init_object_field(o, &o->oBreakableWallForce);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (o->oBreakableWallForce || gMarioStates->action == ACT_SHOT_FROM_CANNON) {
|
||||||
cur_obj_become_tangible();
|
cur_obj_become_tangible();
|
||||||
if (obj_check_if_collided_with_object(o, gMarioObject)) {
|
if (o->oBreakableWallForce || obj_check_if_collided_with_object(o, gMarioObject)) {
|
||||||
|
if (!o->oBreakableWallForce) {
|
||||||
|
o->oBreakableWallForce = TRUE;
|
||||||
|
network_send_object(o);
|
||||||
|
syncObjects[o->oSyncID].syncDeathEvent = FALSE;
|
||||||
|
}
|
||||||
if (cur_obj_has_behavior(bhvWfBreakableWallRight))
|
if (cur_obj_has_behavior(bhvWfBreakableWallRight))
|
||||||
play_puzzle_jingle();
|
play_puzzle_jingle();
|
||||||
create_sound_spawner(SOUND_GENERAL_WALL_EXPLOSION);
|
create_sound_spawner(SOUND_GENERAL_WALL_EXPLOSION);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue