Skip to content

Commit 4236d45

Browse files
nouverbeXottab-DUTY
authored andcommitted
for FC 2.5.1
1 parent eb1b637 commit 4236d45

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/xrGame/script_game_object_inventory_owner.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,12 @@ void CScriptGameObject::SetCommunityGoodwill_obj(LPCSTR community, int goodwill)
601601
int CScriptGameObject::GetAttitude(CScriptGameObject* pToWho)
602602
{
603603
CInventoryOwner* pInventoryOwner = smart_cast<CInventoryOwner*>(&object());
604-
VERIFY(pInventoryOwner);
604+
//VERIFY(pInventoryOwner);
605+
if (!pInventoryOwner)
606+
{
607+
GEnv.ScriptEngine->script_log(LuaMessageType::Error, "GetAttitude available only for InventoryOwner");
608+
return 0;
609+
}
605610
CInventoryOwner* pOthersInventoryOwner = smart_cast<CInventoryOwner*>(&pToWho->object());
606611
VERIFY(pOthersInventoryOwner);
607612
return RELATION_REGISTRY().GetAttitude(pInventoryOwner, pOthersInventoryOwner);

0 commit comments

Comments
 (0)