mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-08-03 16:42:16 -04:00
Discover chrIsUsingLift and if_using_lift AI command
This commit is contained in:
@@ -23829,7 +23829,7 @@ glabel func0f046648
|
||||
/* f046a2c: 00000000 */ sll $zero,$zero,0x0
|
||||
);
|
||||
|
||||
s32 func0f046a30(struct chrdata *chr)
|
||||
s32 chrIsUsingLift(struct chrdata *chr)
|
||||
{
|
||||
return (chr->actiontype == ACT_GOPOS || chr->actiontype == ACT_PATROL) && chr->liftaction > 0;
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ bool (*g_CommandPointers[])(void) = {
|
||||
/*0x01a2*/ aiSayCiStaffQuip,
|
||||
/*0x01a3*/ aiDoPresetAnimation,
|
||||
/*0x01a4*/ aiShowHudmsgMiddle,
|
||||
/*0x01a5*/ ai01a5,
|
||||
/*0x01a5*/ aiIfUsingLift,
|
||||
/*0x01a6*/ aiIfTargetYDifferenceLessThan,
|
||||
/*0x01a7*/ aiIfChrPropsoundcountZero,
|
||||
/*0x01a8*/ NULL,
|
||||
|
||||
@@ -10357,11 +10357,11 @@ bool aiDoPresetAnimation(void)
|
||||
/**
|
||||
* @cmd 01a5
|
||||
*/
|
||||
bool ai01a5(void)
|
||||
bool aiIfUsingLift(void)
|
||||
{
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
|
||||
if (func0f046a30(g_Vars.chrdata)) {
|
||||
if (chrIsUsingLift(g_Vars.chrdata)) {
|
||||
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]);
|
||||
} else {
|
||||
g_Vars.aioffset += 3;
|
||||
|
||||
@@ -3555,7 +3555,11 @@
|
||||
color, \
|
||||
mkshort(text),
|
||||
|
||||
#define cmd01a5(label) \
|
||||
/**
|
||||
* Checks if the current chr is using a lift (most likely from the moment they
|
||||
* call it until the moment the door opens at the end of the journey).
|
||||
*/
|
||||
#define if_using_lift(label) \
|
||||
mkshort(0x01a5), \
|
||||
label,
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ void unregisterDangerousProp(struct prop *prop);
|
||||
void registerDangerousProp(struct prop *prop);
|
||||
bool chrDetectDangerousObject(struct chrdata *chr, u8 flags);
|
||||
void chrTickBondDie(struct chrdata *chr);
|
||||
s32 func0f046a30(struct chrdata *chr);
|
||||
s32 chrIsUsingLift(struct chrdata *chr);
|
||||
bool chrTrySkJump(struct chrdata *chr, u8 arg1, u8 arg2, s32 arg3, u8 arg4);
|
||||
bool chrSawTargetRecently(struct chrdata *chr);
|
||||
bool chrHeardTargetRecently(struct chrdata *chr);
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
/*0x01a2*/ bool aiSayCiStaffQuip(void);
|
||||
/*0x01a3*/ bool aiDoPresetAnimation(void);
|
||||
/*0x01a4*/ bool aiShowHudmsgMiddle(void);
|
||||
/*0x01a5*/ bool ai01a5(void);
|
||||
/*0x01a5*/ bool aiIfUsingLift(void);
|
||||
/*0x01a6*/ bool aiIfTargetYDifferenceLessThan(void);
|
||||
/*0x01a7*/ bool aiIfChrPropsoundcountZero(void);
|
||||
/*0x01aa*/ bool ai01aa(void);
|
||||
|
||||
Reference in New Issue
Block a user