From 47d0e296a14ff08ddc53fceb453cd1a22c93766c Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Fri, 22 May 2020 18:08:31 +1000 Subject: [PATCH] Rename func0f19a2dc to aibotGetProjectileThrowInterval --- src/game/game_190260.c | 2 +- src/game/game_1999b0.c | 22 +++++++++++----------- src/include/game/game_1999b0.h | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/game/game_190260.c b/src/game/game_190260.c index a140b8eee..505b0a016 100644 --- a/src/game/game_190260.c +++ b/src/game/game_190260.c @@ -7634,7 +7634,7 @@ glabel var7f1b8fc8 /* f19715c: 00003025 */ or $a2,$zero,$zero /* f197160: 8e8902d4 */ lw $t1,0x2d4($s4) .L0f197164: -/* f197164: 0fc668b7 */ jal func0f19a2dc +/* f197164: 0fc668b7 */ jal aibotGetProjectileThrowInterval /* f197168: 8d240020 */ lw $a0,0x20($t1) /* f19716c: 100000d7 */ beqz $zero,.L0f1974cc /* f197170: ae420034 */ sw $v0,0x34($s2) diff --git a/src/game/game_1999b0.c b/src/game/game_1999b0.c index 98b05cbdb..2658697b5 100644 --- a/src/game/game_1999b0.c +++ b/src/game/game_1999b0.c @@ -402,20 +402,20 @@ bool func0f19a29c(u32 weaponnum, bool is_secondary) return false; } -u32 func0f19a2dc(u32 value) +u32 aibotGetProjectileThrowInterval(u32 weapon) { - switch (value) { - case 26: + switch (weapon) { + case WEAPON_COMBATKNIFE: return 120; - case 30: - case 31: + case WEAPON_GRENADE: + case WEAPON_NBOMB: return 90; - case 27: - case 28: - case 29: - case 32: - case 33: - case 34: + case WEAPON_CROSSBOW: + case WEAPON_TRANQUILIZER: + case WEAPON_LASER: + case WEAPON_TIMEDMINE: + case WEAPON_PROXIMITYMINE: + case WEAPON_REMOTEMINE: default: return 60; } diff --git a/src/include/game/game_1999b0.h b/src/include/game/game_1999b0.h index d9ee2e9ab..b173e43fd 100644 --- a/src/include/game/game_1999b0.h +++ b/src/include/game/game_1999b0.h @@ -13,7 +13,7 @@ void aibotGiveAmmoByWeapon(struct aibot *aibot, s32 weaponnum, s32 funcnum, s32 void aibotGiveAmmoByType(struct aibot *aibot, u32 ammotype, s32 quantity); bool aibotDoFarsightThing(struct chrdata *chr, u32 arg1, struct coord *arg2, struct coord *arg3); bool func0f19a29c(u32 weaponnum, bool is_secondary); -u32 func0f19a2dc(u32 value); +u32 aibotGetProjectileThrowInterval(u32 weapon); u32 ammotypeGetWeapon(u32 ammotype); void func0f19a37c(struct chrdata *chr); s32 func0f19a60c(s32 weaponnum, s32 funcnum);