From 837ccccf80ea3dedfd16b67e64a2528e468aa250 Mon Sep 17 00:00:00 2001 From: zicodxx Date: Sat, 2 Jul 2011 22:48:12 +0200 Subject: [PATCH] When initializing ai object correctly initialize Ai_local_info to prevent glitches like random submodel angles --- CHANGELOG.txt | 4 ++++ main/ai2.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4088ea783..8f83f4250 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D2X-Rebirth Changelog +20110702 +-------- +main/ai.c: When initializing ai object correctly initialize Ai_local_info to prevent glitches like random submodel angles + 20110701 -------- d2x.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/ai2.c b/main/ai2.c index 9ed33010e..e05c6a407 100644 --- a/main/ai2.c +++ b/main/ai2.c @@ -118,6 +118,8 @@ void init_ai_object(int objnum, int behavior, int hide_segment) ai_local *ailp = &Ai_local_info[objnum]; robot_info *robptr = &Robot_info[objp->id]; + memset(ailp, 0, sizeof(ai_local)); + if (behavior == 0) { behavior = AIB_NORMAL; aip->behavior = behavior;