mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 21:51:09 +00:00
Fix uninitialized bot_goal_t fields
This commit is contained in:
parent
e9e11f1605
commit
a82a99f68d
1 changed files with 7 additions and 0 deletions
|
@ -897,6 +897,7 @@ int BotGetLevelItemGoal(int index, char *name, bot_goal_t *goal)
|
||||||
goal->number = li->number;
|
goal->number = li->number;
|
||||||
goal->flags = GFL_ITEM;
|
goal->flags = GFL_ITEM;
|
||||||
if (li->timeout) goal->flags |= GFL_DROPPED;
|
if (li->timeout) goal->flags |= GFL_DROPPED;
|
||||||
|
goal->iteminfo = li->iteminfo;
|
||||||
//botimport.Print(PRT_MESSAGE, "found li %s\n", itemconfig->iteminfo[li->iteminfo].name);
|
//botimport.Print(PRT_MESSAGE, "found li %s\n", itemconfig->iteminfo[li->iteminfo].name);
|
||||||
return li->number;
|
return li->number;
|
||||||
} //end if
|
} //end if
|
||||||
|
@ -923,6 +924,9 @@ int BotGetMapLocationGoal(char *name, bot_goal_t *goal)
|
||||||
goal->entitynum = 0;
|
goal->entitynum = 0;
|
||||||
VectorCopy(mins, goal->mins);
|
VectorCopy(mins, goal->mins);
|
||||||
VectorCopy(maxs, goal->maxs);
|
VectorCopy(maxs, goal->maxs);
|
||||||
|
goal->number = 0;
|
||||||
|
goal->flags = 0;
|
||||||
|
goal->iteminfo = 0;
|
||||||
return qtrue;
|
return qtrue;
|
||||||
} //end if
|
} //end if
|
||||||
} //end for
|
} //end for
|
||||||
|
@ -951,6 +955,9 @@ int BotGetNextCampSpotGoal(int num, bot_goal_t *goal)
|
||||||
goal->entitynum = 0;
|
goal->entitynum = 0;
|
||||||
VectorCopy(mins, goal->mins);
|
VectorCopy(mins, goal->mins);
|
||||||
VectorCopy(maxs, goal->maxs);
|
VectorCopy(maxs, goal->maxs);
|
||||||
|
goal->number = 0;
|
||||||
|
goal->flags = 0;
|
||||||
|
goal->iteminfo = 0;
|
||||||
return num+1;
|
return num+1;
|
||||||
} //end if
|
} //end if
|
||||||
} //end for
|
} //end for
|
||||||
|
|
Loading…
Reference in a new issue