This commit is contained in:
ineedhelpbad 2023-12-19 11:39:28 -06:00 committed by GitHub
commit 8a2ba08ac8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -17,6 +17,11 @@
#include "level_table.h"
#include "thread6.h"
#ifdef BETTERCAMERA
#include "pc/controller/controller_mouse.h"
extern u8 newcam_mouse;
#endif
#define POLE_NONE 0
#define POLE_TOUCHED_FLOOR 1
#define POLE_FELL_OFF 2
@ -25,6 +30,8 @@
#define HANG_HIT_CEIL_OR_OOB 1
#define HANG_LEFT_CEIL 2
void add_tree_leaf_particles(struct MarioState *m) {
f32 leafHeight;
@ -703,6 +710,12 @@ s32 act_in_cannon(struct MarioState *m) {
case 2:
m->faceAngle[0] -= (s16)(m->controller->stickY * 10.0f);
marioObj->oMarioCannonInputYaw -= (s16)(m->controller->stickX * 10.0f);
#ifdef BETTERCAMERA
if (newcam_mouse) {
m->faceAngle[0] -= (s16)(mouse_y * 10.0f);
marioObj->oMarioCannonInputYaw -= (s16)(mouse_x * 10.0f);
}
#endif
if (m->faceAngle[0] > 0x38E3) {
m->faceAngle[0] = 0x38E3;