Fixed synced crawling/climbing animation speed

This commit is contained in:
MysterD 2020-08-01 21:35:38 -07:00
parent 34b1ec76f6
commit 42a52ad936
3 changed files with 5 additions and 6 deletions

View File

@ -458,7 +458,7 @@ void read_controller_inputs(void) {
}
run_demo_inputs();
for (i = 0; i < 2; i++) {
for (i = 0; i < 1; i++) {
struct Controller *controller = &gControllers[i];
// if we're receiving inputs, update the controller struct

View File

@ -1321,9 +1321,6 @@ void update_mario_button_inputs(struct MarioState *m) {
* Updates the joystick intended magnitude.
*/
void update_mario_joystick_inputs(struct MarioState *m) {
// don't update Luigi inputs
if (m != &gMarioStates[0]) { return; }
struct Controller *controller = m->controller;
f32 mag = ((controller->stickMag / 64.0f) * (controller->stickMag / 64.0f)) * 64.0f;
@ -1333,6 +1330,9 @@ void update_mario_joystick_inputs(struct MarioState *m) {
m->intendedMag = mag / 8.0f;
}
// don't update Luigi inputs past this point
if (m != &gMarioStates[0]) { return; }
if (m->intendedMag > 0.0f) {
#ifndef BETTERCAMERA
m->intendedYaw = atan2s(-controller->stickY, controller->stickX) + m->area->camera->yaw;

View File

@ -118,8 +118,7 @@ void network_update(void) {
if (rc != 96 + 20 + 320) {
printf("%s received error: %s\n", NETWORKTYPESTR, rc);
break;
}
else if (marioStates != NULL) {
} else if (marioStates != NULL) {
int oldActionState = marioStates[1].actionState;
memcpy(&marioStates[1], &buffer[0], 96);
memcpy(marioStates[1].controller, &buffer[96], 20);