+ if (IS_DEAD(this.goalcurrent))
+ {
+ IL_EACH(g_items, it.enemy == this.goalcurrent && Item_IsLoot(it),
+ {
+ if (vdist(it.origin - this.goalcurrent.death_origin, <, 50))
+ {
+ navigation_clearroute(this);
+ navigation_pushroute(this, it);
+ // loot can't be immediately rated since it isn't on ground yet
+ // it will be rated after a second when on ground, meanwhile head to it
+ navigation_goalrating_timeout_expire(this, 1);
+ return;
+ }
+ });
+ }
+ if (!Item_IsLoot(this.goalcurrent))
+ {
+ navigation_goalrating_timeout_force(this);
+ return;
+ }