mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-10-20 04:02:39 +00:00
8c650a5b7d
This allows clients to spawn a new sync object after the level loads and synchronize it. Changed how un-initialized sync objects are detected Koopa shells are the first thing to use this new system Removed network_object_settings() command, instead explicitly setting the sync object parameters
42 lines
1.1 KiB
C
42 lines
1.1 KiB
C
// koopa_shell_underwater.c.inc
|
|
|
|
struct ObjectHitbox sKoopaShellUnderwaterHitbox = {
|
|
/* interactType: */ INTERACT_GRABBABLE,
|
|
/* downOffset: */ 0,
|
|
/* damageOrCoinValue: */ 0,
|
|
/* health: */ 1,
|
|
/* numLootCoins: */ 0,
|
|
/* radius: */ 80,
|
|
/* height: */ 50,
|
|
/* hurtboxRadius: */ 0,
|
|
/* hurtboxHeight: */ 0,
|
|
};
|
|
|
|
void set_koopa_shell_underwater_hitbox(void) {
|
|
obj_set_hitbox(o, &sKoopaShellUnderwaterHitbox);
|
|
}
|
|
|
|
void bhv_koopa_shell_underwater_loop(void) {
|
|
if (!network_sync_object_initialized(o)) {
|
|
network_init_object(o, 500.0f);
|
|
}
|
|
switch (o->oHeldState) {
|
|
case HELD_FREE:
|
|
set_koopa_shell_underwater_hitbox();
|
|
break;
|
|
case HELD_HELD:
|
|
cur_obj_unrender_and_reset_state(-1, 0);
|
|
break;
|
|
case HELD_THROWN:
|
|
case HELD_DROPPED:
|
|
o->heldByPlayerIndex = 0;
|
|
obj_mark_for_deletion(o);
|
|
spawn_mist_particles();
|
|
break;
|
|
}
|
|
if (o->oInteractStatus & INT_STATUS_STOP_RIDING) {
|
|
obj_mark_for_deletion(o);
|
|
spawn_mist_particles();
|
|
}
|
|
o->oInteractStatus = 0;
|
|
}
|