This commit is contained in:
Lwmte 2021-10-10 16:32:50 +03:00
parent 4e1dd2fe20
commit e55ea8033c
2 changed files with 11 additions and 5 deletions

View file

@ -145,17 +145,18 @@ void InitialiseSlot(short itemNum, short slot)
creature->LOT.fly = NO_FLYING;
creature->LOT.blockMask = BLOCKED;
creature->aiTargetNum = CreateItem();
if (creature->aiTargetNum != NO_ITEM) {
if (creature->aiTargetNum != NO_ITEM)
creature->aiTarget = &g_Level.Items[creature->aiTargetNum];
}
else {
else
creature->aiTarget = nullptr;
}
if (obj->intelligent)
{
// simple check to set hitEffect to blood or smoke by default if intelligent enabled and no value assigned to hitEffect and the entity have HP !
// simple check to set hitEffect to blood or smoke by default if intelligent enabled
// and no value assigned to hitEffect and the entity have HP !
// undead have smoke instead of blood !
if (obj->hitEffect == HIT_NONE)
{
if (obj->undead)