mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 12:05:11 +00:00
Synchronized sliding platform 2
This commit is contained in:
parent
398f5e8345
commit
cb5dcaa4f4
1 changed files with 14 additions and 0 deletions
|
@ -34,6 +34,20 @@ void bhv_sliding_plat_2_init(void) {
|
|||
}
|
||||
|
||||
void bhv_sliding_plat_2_loop(void) {
|
||||
if (network_sync_object_initialized(o)) {
|
||||
struct SyncObject* so = network_init_object(o, 1000.0f);
|
||||
so->maxUpdateRate = 5.0f;
|
||||
network_init_object_field(o, &o->oBackAndForthPlatformUnkFC);
|
||||
network_init_object_field(o, &o->oBackAndForthPlatformUnk100);
|
||||
network_init_object_field(o, &o->oPosX);
|
||||
network_init_object_field(o, &o->oPosY);
|
||||
network_init_object_field(o, &o->oPosZ);
|
||||
network_init_object_field(o, &o->oVelX);
|
||||
network_init_object_field(o, &o->oVelY);
|
||||
network_init_object_field(o, &o->oVelZ);
|
||||
network_init_object_field(o, &o->oTimer);
|
||||
}
|
||||
|
||||
if (o->oTimer > 10) {
|
||||
o->oBackAndForthPlatformUnkFC += o->oBackAndForthPlatformUnk100;
|
||||
if (clamp_f32(&o->oBackAndForthPlatformUnkFC, -o->oBackAndForthPlatformUnkF8, 0.0f)) {
|
||||
|
|
Loading…
Reference in a new issue