When initializing ai object correctly initialize Ai_local_info to prevent glitches like random submodel angles
This commit is contained in:
parent
a973da9432
commit
837ccccf80
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue