diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index 7959c08a9..1abb5f242 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -1031,6 +1031,41 @@ glabel ai001a /* f04f050: 00001025 */ or $v0,$zero,$zero ); +//bool ai001a(void) +//{ +// u8 *cmd = g_Vars.ailist + g_Vars.aioffset; +// struct chrdata *chr1 = chrFindById(g_Vars.chrdata, cmd[2]); +// struct chrdata *chr2 = chrFindById(g_Vars.chrdata, cmd[3]); +// +// if (chr1 && chr2 && chr1->pos && chr2->pos) { +// struct attachment *attachment = func0f028834(chr1, 0); +// struct coord coord; +// coord.x = var80068fec.x; +// coord.y = var80068fec.y; +// coord.z = var80068fec.z; +// +// if (!attachment) { +// attachment = func0f028834(chr1, 1); +// } +// +// if (attachment) { +// s32 weapon_id; +// s32 thing; +// coord.x = chr2->pos->coord.x - chr1->pos->coord.x; +// coord.y = chr2->pos->coord.y - chr1->pos->coord.y; +// coord.x = chr2->pos->coord.z - chr1->pos->coord.z; +// scaleTo1(&coord.x, &coord.y, &coord.z); +// weapon_id = attachment->weapon->weapon_id; +// thing = func0f0b1d28(weapon_id); +// func0f034330(chr2, thing, &coord, weapon_id); +// } +// } +// +// g_Vars.aioffset += 5; +// +// return false; +//} + /** * @cmd 001b */ diff --git a/src/include/game/chr/chr.h b/src/include/game/chr/chr.h index 0b38e5472..46f1191ef 100644 --- a/src/include/game/chr/chr.h +++ b/src/include/game/chr/chr.h @@ -530,7 +530,7 @@ u32 func0f028490(void); u32 func0f028498(void); u32 func0f028590(void); u32 func0f028824(void); -u32 func0f028834(void); +struct attachment *func0f028834(struct chrdata *chr, s32 hand); u32 func0f0288d0(void); u32 func0f0289dc(void); u32 func0f028a50(void); @@ -623,7 +623,7 @@ u32 func0f034080(void); u32 func0f034124(void); u32 func0f03417c(void); u32 func0f0341dc(void); -u32 func0f034330(void); +u32 func0f034330(struct chrdata *chr, s32 arg1, struct coord *coord, s32 arg3); u32 func0f034410(void); u32 func0f034480(void); u32 func0f034524(void); diff --git a/src/include/game/game_0b0420.h b/src/include/game/game_0b0420.h index 4cead392c..8a3c80b6b 100644 --- a/src/include/game/game_0b0420.h +++ b/src/include/game/game_0b0420.h @@ -40,7 +40,7 @@ u32 func0f0b1af0(void); u32 func0f0b1c24(void); u32 func0f0b1c78(void); u32 func0f0b1ce8(void); -u32 func0f0b1d28(void); +u32 func0f0b1d28(s32 weapon_id); u32 func0f0b1e28(void); u32 func0f0b1e68(void); u32 func0f0b1ea8(void); diff --git a/src/include/types.h b/src/include/types.h index 3ed654669..fd566cf52 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -187,8 +187,7 @@ struct chrdata { /*0x164*/ u32 aimendrshoulder; /*0x168*/ u32 aimendback; /*0x16c*/ u32 aimendsideback; - /*0x170*/ u32 unk170; - /*0x174*/ u32 unk174; + /*0x170*/ struct attachment *weapons_held[2]; /*0x178*/ u32 unk178; /*0x17c*/ u16 fireslot; /*0x17e*/ s16 target; // index into g_Vars.positions