From 53fca9dd4401df2aa009e501d0a23856fa8a69bb Mon Sep 17 00:00:00 2001 From: zicodxx Date: Sat, 2 Jul 2011 22:48:10 +0200 Subject: [PATCH] When initializing ai object correctly initialize Ai_local_info to prevent glitches like random submodel angles --- CHANGELOG.txt | 4 ++++ main/ai.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1310dcb10..515ba998e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D1X-Rebirth Changelog +20110702 +-------- +main/ai.c: When initializing ai object correctly initialize Ai_local_info to prevent glitches like random submodel angles + 20110701 -------- d1x.ini, main/inferno.c, main/net_udp.h, misc/args.c: Made formatting for help text more consistent and prettier; Somewhat changed the code for help text so we can use variables in the help text. For example: If we change MAXIMUM_FPS, it will automatically be displayed in the help text without manual editing needed diff --git a/main/ai.c b/main/ai.c index fde235638..f73556973 100644 --- a/main/ai.c +++ b/main/ai.c @@ -310,6 +310,8 @@ void init_ai_object(int objnum, int behavior, int hide_segment) ai_static *aip = &objp->ctype.ai_info; ai_local *ailp = &Ai_local_info[objnum]; + memset(ailp, 0, sizeof(ai_local)); + #ifdef DEST_SAT if (!(Game_mode & GM_MULTI) && Robot_info[objp->id].boss_flag) { if (Current_level_num != Last_level) {