From f28bca31400ce4bfbbd7da825a79412df06fbba3 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 22 Jan 2020 19:10:28 +1000 Subject: [PATCH] Rename func0f02f288 to chrThrowGrenade --- src/game/chr/chr.c | 12 ++++++------ src/include/game/chr/chr.h | 2 +- src/include/types.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/game/chr/chr.c b/src/game/chr/chr.c index 681cb023b..876b33484 100644 --- a/src/game/chr/chr.c +++ b/src/game/chr/chr.c @@ -19848,12 +19848,12 @@ glabel func0f02f070 /* f02f284: 00000000 */ sll $zero,$zero,0x0 ); -void func0f02f288(struct chrdata *chr, s32 arg1, s32 arg2) +void chrThrowGrenade(struct chrdata *chr, s32 hand, s32 needsequip) { chrStopFiring(chr); chr->actiontype = ACT_THROWGRENADE; - chr->act_throwgrenade.unk034 = arg1; - chr->act_throwgrenade.unk038 = arg2; + chr->act_throwgrenade.hand = hand; + chr->act_throwgrenade.needsequip = needsequip; chr->sleep = 0; if (func0001db94(chr->unk020)) { @@ -33254,7 +33254,7 @@ s32 chrConsiderGrenadeThrow(struct chrdata *chr, u32 entitytype, u32 entityid) weapon = rightprop->weapon; if (weapon->weapon_id == WEAPON_GRENADE || weapon->weapon_id == WEAPON_NBOMB) { - func0f02f288(chr, 0, false); + chrThrowGrenade(chr, 0, false); chr->act_throwgrenade.entitytype = entitytype; chr->act_throwgrenade.entityid = entityid; done = true; @@ -33265,7 +33265,7 @@ s32 chrConsiderGrenadeThrow(struct chrdata *chr, u32 entitytype, u32 entityid) weapon = leftprop->weapon; if (weapon->weapon_id == WEAPON_GRENADE || weapon->weapon_id == WEAPON_NBOMB) { - func0f02f288(chr, 1, false); + chrThrowGrenade(chr, 1, false); chr->act_throwgrenade.entitytype = entitytype; chr->act_throwgrenade.entityid = entityid; done = true; @@ -33292,7 +33292,7 @@ s32 chrConsiderGrenadeThrow(struct chrdata *chr, u32 entitytype, u32 entityid) if (prop) { weapon = prop->weapon; weapon->hidden |= 0x00000800; - func0f02f288(chr, rightprop == NULL ? 0 : 1, true); + chrThrowGrenade(chr, rightprop == NULL ? 0 : 1, true); chr->act_throwgrenade.entitytype = entitytype; chr->act_throwgrenade.entityid = entityid; done = true; diff --git a/src/include/game/chr/chr.h b/src/include/game/chr/chr.h index 1f414086d..27c538fd9 100644 --- a/src/include/game/chr/chr.h +++ b/src/include/game/chr/chr.h @@ -146,7 +146,7 @@ void chrKneel(struct chrdata *chr); void func0f02ef40(struct chrdata *chr); void func0f02effc(struct chrdata *chr); void func0f02f070(struct chrdata *chr); -void func0f02f288(struct chrdata *chr, s32 arg1, s32 arg2); +void chrThrowGrenade(struct chrdata *chr, s32 arg1, s32 arg2); void func0f02f314(struct chrdata *chr); void func0f02f530(struct chrdata *chr); void func0f02f60c(struct chrdata *chr); diff --git a/src/include/types.h b/src/include/types.h index 62daaaf68..d9c62d30a 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -395,8 +395,8 @@ struct act_surprised { struct act_throwgrenade { /*0x2c*/ u32 entitytype; /*0x30*/ u32 entityid; - /*0x34*/ u32 unk034; - /*0x38*/ u32 unk038; + /*0x34*/ u32 hand; + /*0x38*/ bool needsequip; }; struct act_attackamount {