From 8330c2ed3b7185e56e7e1d439089e48495cb84d1 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 19 Feb 2025 10:36:44 +1000 Subject: [PATCH] Discover player ontank and intank properties --- src/game/bondwalk.c | 16 ++++++++-------- src/game/player.c | 6 +++--- src/game/playermgr.c | 4 ++-- src/include/types.h | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/game/bondwalk.c b/src/game/bondwalk.c index 762f87038..d42240098 100644 --- a/src/game/bondwalk.c +++ b/src/game/bondwalk.c @@ -37,8 +37,8 @@ void bwalk_init(void) g_Vars.currentplayer->bondmovemode = MOVEMODE_WALK; g_Vars.currentplayer->bondonground = 0; - g_Vars.currentplayer->tank = NULL; - g_Vars.currentplayer->unk1af0 = NULL; + g_Vars.currentplayer->ontank = NULL; + g_Vars.currentplayer->intank = NULL; g_Vars.currentplayer->bondonturret = false; g_Vars.currentplayer->swaypos = 0; @@ -260,8 +260,8 @@ bool bwalk_calculate_new_position(struct coord *vel, f32 rotateamount, bool appl dstpos.z = g_Vars.currentplayer->prop->pos.z; if (vel->x || vel->y || vel->z) { - if (g_Vars.currentplayer->tank) { - prop_set_perim_enabled(g_Vars.currentplayer->tank, false); + if (g_Vars.currentplayer->ontank) { + prop_set_perim_enabled(g_Vars.currentplayer->ontank, false); } prop_set_perim_enabled(g_Vars.currentplayer->prop, false); @@ -321,8 +321,8 @@ bool bwalk_calculate_new_position(struct coord *vel, f32 rotateamount, bool appl prop_set_perim_enabled(g_Vars.currentplayer->prop, true); - if (g_Vars.currentplayer->tank) { - prop_set_perim_enabled(g_Vars.currentplayer->tank, true); + if (g_Vars.currentplayer->ontank) { + prop_set_perim_enabled(g_Vars.currentplayer->ontank, true); } } @@ -459,8 +459,8 @@ bool bwalk_calculate_new_position_with_push(struct coord *delta, f32 rotateamoun bool dothething; if ((obj->hidden & OBJHFLAG_MOUNTED) == 0 && (obj->hidden & OBJHFLAG_GRABBED) == 0) { - if (g_Vars.currentplayer->unk1af0 == 0 && obj->type == OBJTYPE_TANK) { - g_Vars.currentplayer->tank = obstacle; + if (g_Vars.currentplayer->intank == NULL && obj->type == OBJTYPE_TANK) { + g_Vars.currentplayer->ontank = obstacle; } else if (obj->flags3 & OBJFLAG3_PUSHABLE) { g_Vars.currentplayer->speedmaxtime60 = 0; dothething = true; diff --git a/src/game/player.c b/src/game/player.c index bfd24790e..ef796ae81 100644 --- a/src/game/player.c +++ b/src/game/player.c @@ -4841,7 +4841,7 @@ void player_die_by_shooter(u32 shooter, bool force) g_Vars.currentplayer->posdie.z = g_Vars.currentplayer->prop->pos.z; if (g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK) { - if (g_Vars.currentplayer->unk1af0) { + if (g_Vars.currentplayer->intank) { g_Vars.currentplayer->bondtankexplode = true; } } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_BIKE) { @@ -5121,8 +5121,8 @@ void player_set_perim_enabled(struct prop *prop, bool enable) } if (g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK) { - if (g_Vars.currentplayer->unk1af0) { - obj_set_perim_enabled(g_Vars.currentplayer->unk1af0, enable); + if (g_Vars.currentplayer->intank) { + obj_set_perim_enabled(g_Vars.currentplayer->intank, enable); } } else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_BIKE) { obj_set_perim_enabled(g_Vars.currentplayer->hoverbike, enable); diff --git a/src/game/playermgr.c b/src/game/playermgr.c index 2eb3765ae..47f0dd4a5 100644 --- a/src/game/playermgr.c +++ b/src/game/playermgr.c @@ -584,8 +584,8 @@ void playermgr_allocate_player(s32 index) g_Vars.players[index]->hoverbike = NULL; g_Vars.players[index]->bondonground = false; - g_Vars.players[index]->tank = NULL; - g_Vars.players[index]->unk1af0 = NULL; + g_Vars.players[index]->ontank = NULL; + g_Vars.players[index]->intank = NULL; g_Vars.players[index]->bondonturret = 0; g_Vars.players[index]->grabbedprop = NULL; g_Vars.players[index]->bondtankexplode = false; diff --git a/src/include/types.h b/src/include/types.h index 6a791230b..872ed270e 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -2733,8 +2733,8 @@ struct player { /*0x1adc*/ struct coord bondenteraim; /*0x1ae8*/ f32 bondonground; - /*0x1aec*/ struct prop *tank; - /*0x1af0*/ struct prop *unk1af0; + /*0x1aec*/ struct prop *ontank; + /*0x1af0*/ struct prop *intank; /*0x1af4*/ u32 bondonturret; /*0x1af8*/ s32 walkinitmove; /*0x1afc*/ struct coord walkinitpos;