Decompile aibotGetWeaponPad
This commit is contained in:
parent
057eb2e0a6
commit
13f4c1ec2b
|
|
@ -440,7 +440,7 @@ bool currentPlayerGiveWeapon(s32 weaponnum)
|
|||
if (item) {
|
||||
item->type = INVITEMTYPE_1;
|
||||
item->type1.weapon1 = weaponnum;
|
||||
item->type1.weapon2 = -1;
|
||||
item->type1.pickuppad = -1;
|
||||
currentPlayerInsertInvItem(item);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -567,7 +567,7 @@ u32 propobjHandlePickupByAibot(struct prop *prop, struct chrdata *chr)
|
|||
|
||||
if (hasweapon) {
|
||||
struct weapon *weapondef = weaponFindById(weapon->weapon_id);
|
||||
u32 originalpad = chrGetWeaponPad(chr, weapon->weapon_id);
|
||||
u32 originalpad = aibotGetWeaponPad(chr, weapon->weapon_id);
|
||||
u32 currentpad = obj->pad;
|
||||
|
||||
if (hasweapon == true
|
||||
|
|
|
|||
|
|
@ -668,26 +668,16 @@ void aibotGiveDualWeapon(struct chrdata *chr, u32 weaponnum)
|
|||
}
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel chrGetWeaponPad
|
||||
/* f197f30: 27bdffe8 */ addiu $sp,$sp,-24
|
||||
/* f197f34: afbf0014 */ sw $ra,0x14($sp)
|
||||
/* f197f38: 0fc65f3c */ jal aibotGetInvItem
|
||||
/* f197f3c: 00000000 */ sll $zero,$zero,0x0
|
||||
/* f197f40: 10400007 */ beqz $v0,.L0f197f60
|
||||
/* f197f44: 8fbf0014 */ lw $ra,0x14($sp)
|
||||
/* f197f48: 8c4e0000 */ lw $t6,0x0($v0)
|
||||
/* f197f4c: 24010001 */ addiu $at,$zero,0x1
|
||||
/* f197f50: 55c10004 */ bnel $t6,$at,.L0f197f64
|
||||
/* f197f54: 2402ffff */ addiu $v0,$zero,-1
|
||||
/* f197f58: 10000002 */ beqz $zero,.L0f197f64
|
||||
/* f197f5c: 84420006 */ lh $v0,0x6($v0)
|
||||
.L0f197f60:
|
||||
/* f197f60: 2402ffff */ addiu $v0,$zero,-1
|
||||
.L0f197f64:
|
||||
/* f197f64: 03e00008 */ jr $ra
|
||||
/* f197f68: 27bd0018 */ addiu $sp,$sp,0x18
|
||||
);
|
||||
s16 aibotGetWeaponPad(struct chrdata *chr, u32 weaponnum)
|
||||
{
|
||||
struct invitem *item = aibotGetInvItem(chr, weaponnum);
|
||||
|
||||
if (item && item->type == INVITEMTYPE_1) {
|
||||
return item->type1.pickuppad;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel chrGiveWeapon
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ u32 func0f197d94(void);
|
|||
bool chrHasWeapon(struct chrdata *chr, u32 weaponnum);
|
||||
u32 func0f197e8c(void);
|
||||
void aibotGiveDualWeapon(struct chrdata *chr, u32 weaponnum);
|
||||
u32 chrGetWeaponPad(struct chrdata *chr, u32 weaponnum);
|
||||
s16 aibotGetWeaponPad(struct chrdata *chr, u32 weaponnum);
|
||||
void chrGiveWeapon(struct chrdata *chr, struct prop *prop);
|
||||
u32 func0f198068(void);
|
||||
u32 func0f198278(void);
|
||||
|
|
|
|||
|
|
@ -5149,7 +5149,7 @@ struct memorypool {
|
|||
|
||||
struct invitem_type1 {
|
||||
s16 weapon1;
|
||||
s16 weapon2;
|
||||
s16 pickuppad;
|
||||
};
|
||||
|
||||
struct invitem_typeprop {
|
||||
|
|
|
|||
Loading…
Reference in New Issue