mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-09-08 11:15:57 -04:00
Move some scenario props and identify scenarioCtcIsChrsTokenHeld
This commit is contained in:
@@ -11234,14 +11234,14 @@ s32 scenarioCtcRadar(s32 value)
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < scenarioCallback30(); i++) {
|
||||
if (g_ScenarioData.htm.props[i] &&
|
||||
g_ScenarioData.htm.props[i]->type != PROPTYPE_CHR &&
|
||||
g_ScenarioData.htm.props[i]->type != PROPTYPE_PLAYER) {
|
||||
if (g_ScenarioData.ctc.tokens[i] &&
|
||||
g_ScenarioData.ctc.tokens[i]->type != PROPTYPE_CHR &&
|
||||
g_ScenarioData.ctc.tokens[i]->type != PROPTYPE_PLAYER) {
|
||||
struct coord dist;
|
||||
dist.x = g_ScenarioData.htm.props[i]->pos.x - g_Vars.currentplayer->prop->pos.x;
|
||||
dist.y = g_ScenarioData.htm.props[i]->pos.y - g_Vars.currentplayer->prop->pos.y;
|
||||
dist.z = g_ScenarioData.htm.props[i]->pos.z - g_Vars.currentplayer->prop->pos.z;
|
||||
value = func0f18e9ec(value, g_ScenarioData.htm.props[i], &dist, g_TeamColours[i], 0, 1);
|
||||
dist.x = g_ScenarioData.ctc.tokens[i]->pos.x - g_Vars.currentplayer->prop->pos.x;
|
||||
dist.y = g_ScenarioData.ctc.tokens[i]->pos.y - g_Vars.currentplayer->prop->pos.y;
|
||||
dist.z = g_ScenarioData.ctc.tokens[i]->pos.z - g_Vars.currentplayer->prop->pos.z;
|
||||
value = func0f18e9ec(value, g_ScenarioData.ctc.tokens[i], &dist, g_TeamColours[i], 0, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15143,10 +15143,10 @@ s32 func0f194724(struct chrdata *self, s32 arg1, bool includeself)
|
||||
return count;
|
||||
}
|
||||
|
||||
s32 func0f194834(struct chrdata *chr)
|
||||
s32 scenarioCtcIsChrsTokenHeld(struct chrdata *chr)
|
||||
{
|
||||
struct mpchr *mpchr = var800ac500[mpPlayerGetIndex(chr)];
|
||||
struct prop *prop = g_ScenarioData.htm.props[mpchr->team];
|
||||
struct prop *prop = g_ScenarioData.ctc.tokens[mpchr->team];
|
||||
|
||||
return prop && (prop->type == PROPTYPE_CHR || prop->type == PROPTYPE_PLAYER);
|
||||
}
|
||||
@@ -15154,7 +15154,7 @@ s32 func0f194834(struct chrdata *chr)
|
||||
bool func0f19489c(struct chrdata *chr)
|
||||
{
|
||||
if (chr->unk2d4->unk9c_01) {
|
||||
if (chr->unk2d4->unk4f_00 == 0 || mpGetNumPlayerTeammates(chr) >= 2 || !func0f194834(chr)) {
|
||||
if (chr->unk2d4->unk4f_00 == 0 || mpGetNumPlayerTeammates(chr) >= 2 || !scenarioCtcIsChrsTokenHeld(chr)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -15859,7 +15859,7 @@ glabel func0f194b40
|
||||
/* f195318: 10000083 */ beqz $zero,.L0f195528
|
||||
/* f19531c: 00000000 */ sll $zero,$zero,0x0
|
||||
.L0f195320:
|
||||
/* f195320: 0fc6520d */ jal func0f194834
|
||||
/* f195320: 0fc6520d */ jal scenarioCtcIsChrsTokenHeld
|
||||
/* f195324: 02802025 */ or $a0,$s4,$zero
|
||||
/* f195328: 10400012 */ beqz $v0,.L0f195374
|
||||
/* f19532c: 00000000 */ sll $zero,$zero,0x0
|
||||
@@ -15921,7 +15921,7 @@ glabel func0f194b40
|
||||
/* f1953f8: 1000004b */ beqz $zero,.L0f195528
|
||||
/* f1953fc: 00000000 */ sll $zero,$zero,0x0
|
||||
.L0f195400:
|
||||
/* f195400: 0fc6520d */ jal func0f194834
|
||||
/* f195400: 0fc6520d */ jal scenarioCtcIsChrsTokenHeld
|
||||
/* f195404: 02802025 */ or $a0,$s4,$zero
|
||||
/* f195408: 10400014 */ beqz $v0,.L0f19545c
|
||||
/* f19540c: 00000000 */ sll $zero,$zero,0x0
|
||||
|
||||
@@ -162,7 +162,7 @@ s32 func0f194694(struct chrdata *chr);
|
||||
s32 func0f1946b4(struct chrdata *chr);
|
||||
s32 mpGetNumPlayerTeammates(struct chrdata *chr);
|
||||
s32 func0f194724(struct chrdata *self, s32 arg1, bool includeself);
|
||||
s32 func0f194834(struct chrdata *chr);
|
||||
s32 scenarioCtcIsChrsTokenHeld(struct chrdata *chr);
|
||||
bool func0f19489c(struct chrdata *chr);
|
||||
s32 mpGetNumTeammatesInRoomDoingSomething(struct chrdata *bot);
|
||||
u32 func0f194990(void);
|
||||
|
||||
+5
-1
@@ -4374,7 +4374,10 @@ struct scenariodata_htm {
|
||||
/*0x800ac15c*/ u32 unk04c;
|
||||
/*0x800ac160*/ u32 unk050;
|
||||
/*0x800ac164*/ u32 unk054;
|
||||
/*0x800ac168*/ struct prop *props[4]; // probably a team list, not props
|
||||
/*0x800ac168*/ s32 unk058;
|
||||
/*0x800ac16c*/ s32 unk05c;
|
||||
/*0x800ac170*/ s32 unk060;
|
||||
/*0x800ac174*/ s32 unk064;
|
||||
/*0x800ac178*/ u32 unk068;
|
||||
/*0x800ac17c*/ u32 unk06c;
|
||||
/*0x800ac180*/ u32 unk070;
|
||||
@@ -4468,6 +4471,7 @@ struct scenariodata_ctc {
|
||||
s32 unk10;
|
||||
s32 unk14;
|
||||
struct ctcthing unk18[4];
|
||||
struct prop *tokens[4];
|
||||
};
|
||||
|
||||
struct scenariodata {
|
||||
|
||||
Reference in New Issue
Block a user