Discover player ontank and intank properties

This commit is contained in:
Ryan Dwyer 2025-02-19 10:36:44 +10:00
parent cd14bab5fd
commit 8330c2ed3b
4 changed files with 15 additions and 15 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;