Merge pull request #700 from TartanSpartan/acknowledge-npc-gifts

Acknowledge npc gifts and suppress spurious cutscene notifications
This commit is contained in:
fgsfds authored and GitHub committed 2026-03-23 10:31:40 +01:00
commit 27b2dcc27d
2 files changed
+14 -1

No files matched your search

+1 -1
View File
@@ -2330,7 +2330,7 @@ bool aiGiveObjectToChr(void)
} }
#endif #endif
something = propPickupByPlayer(obj->prop, 0); something = propPickupByPlayer(obj->prop, 1);
propExecuteTickOperation(obj->prop, something); propExecuteTickOperation(obj->prop, something);
playernum = playermgrGetPlayerNumByProp(chr->prop); playernum = playermgrGetPlayerNumByProp(chr->prop);
obj2->hidden = (playernum << 28) | (obj2->hidden & 0x0fffffff); obj2->hidden = (playernum << 28) | (obj2->hidden & 0x0fffffff);
+13
View File
@@ -17201,6 +17201,12 @@ void currentPlayerQueuePickupWeaponHudmsg(u32 weaponnum, bool dual)
{ {
char buffer[100] = ""; char buffer[100] = "";
// Suppress pickup HUD during cutscenes
if (g_Vars.in_cutscene)
{
return;
}
weaponGetPickupText(buffer, weaponnum, dual); weaponGetPickupText(buffer, weaponnum, dual);
hudmsgCreateWithFlags(buffer, HUDMSGTYPE_DEFAULT, HUDMSGFLAG_ONLYIFALIVE | HUDMSGFLAG_ALLOWDUPES); hudmsgCreateWithFlags(buffer, HUDMSGTYPE_DEFAULT, HUDMSGFLAG_ONLYIFALIVE | HUDMSGFLAG_ALLOWDUPES);
} }
@@ -17217,6 +17223,13 @@ s32 propPickupByPlayer(struct prop *prop, bool showhudmsg)
return TICKOP_NONE; return TICKOP_NONE;
} }
// Suppress HUD pickup messages during cutscenes (e.g. items given at
// mission start via aiGiveObjectToChr)
if (g_Vars.in_cutscene)
{
showhudmsg = false;
}
switch (obj->type) { switch (obj->type) {
case OBJTYPE_KEY: case OBJTYPE_KEY:
if (g_Vars.in_cutscene == false) { if (g_Vars.in_cutscene == false) {