Fixed uninitialized bytes in multi_do_create_robot_powerups() and two set but unused variables
This commit is contained in:
parent
387645f7c8
commit
8bc5fd54a1
|
@ -3,6 +3,7 @@ D1X-Rebirth Changelog
|
||||||
20110712
|
20110712
|
||||||
--------
|
--------
|
||||||
main/wall.c: Add fallback routine from D2 source in wall_frame_process() to automatically set open-flag if wall state is set to opened
|
main/wall.c: Add fallback routine from D2 source in wall_frame_process() to automatically set open-flag if wall state is set to opened
|
||||||
|
main/multibot.c: Fixed uninitialized bytes in multi_do_create_robot_powerups() and two set but unused variables
|
||||||
|
|
||||||
20110710
|
20110710
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -737,11 +737,11 @@ multi_do_robot_fire(char *buf)
|
||||||
int loc = 1;
|
int loc = 1;
|
||||||
int botnum;
|
int botnum;
|
||||||
short remote_botnum;
|
short remote_botnum;
|
||||||
int pnum, gun_num;
|
int gun_num;
|
||||||
vms_vector fire, gun_point;
|
vms_vector fire, gun_point;
|
||||||
robot_info *robptr;
|
robot_info *robptr;
|
||||||
|
|
||||||
pnum = buf[loc]; loc += 1;
|
loc += 1; // pnum
|
||||||
remote_botnum = GET_INTEL_SHORT(buf + loc);
|
remote_botnum = GET_INTEL_SHORT(buf + loc);
|
||||||
botnum = objnum_remote_to_local(remote_botnum, (sbyte)buf[loc+2]); loc += 3;
|
botnum = objnum_remote_to_local(remote_botnum, (sbyte)buf[loc+2]); loc += 3;
|
||||||
gun_num = (sbyte)buf[loc]; loc += 1;
|
gun_num = (sbyte)buf[loc]; loc += 1;
|
||||||
|
@ -833,10 +833,9 @@ multi_do_robot_explode(char *buf)
|
||||||
short remote_botnum;
|
short remote_botnum;
|
||||||
int loc = 1;
|
int loc = 1;
|
||||||
short killer, remote_killer;
|
short killer, remote_killer;
|
||||||
int pnum;
|
|
||||||
int rval;
|
int rval;
|
||||||
|
|
||||||
pnum = buf[loc]; loc += 1;
|
loc += 1; // pnum
|
||||||
remote_killer = GET_INTEL_SHORT(buf + loc);
|
remote_killer = GET_INTEL_SHORT(buf + loc);
|
||||||
killer = objnum_remote_to_local(remote_killer, (sbyte)buf[loc+2]); loc += 3;
|
killer = objnum_remote_to_local(remote_killer, (sbyte)buf[loc+2]); loc += 3;
|
||||||
remote_botnum = GET_INTEL_SHORT(buf + loc);
|
remote_botnum = GET_INTEL_SHORT(buf + loc);
|
||||||
|
@ -1021,10 +1020,13 @@ multi_do_create_robot_powerups(char *buf)
|
||||||
object del_obj;
|
object del_obj;
|
||||||
int pnum, egg_objnum, i;
|
int pnum, egg_objnum, i;
|
||||||
|
|
||||||
pnum = buf[loc]; loc += 1;
|
memset( &del_obj, 0, sizeof(object) );
|
||||||
del_obj.contains_count = buf[loc]; loc += 1;
|
del_obj.type = OBJ_ROBOT;
|
||||||
del_obj.contains_type = buf[loc]; loc += 1;
|
|
||||||
del_obj.contains_id = buf[loc]; loc += 1;
|
pnum = buf[loc]; loc += 1;
|
||||||
|
del_obj.contains_count = buf[loc]; loc += 1;
|
||||||
|
del_obj.contains_type = buf[loc]; loc += 1;
|
||||||
|
del_obj.contains_id = buf[loc]; loc += 1;
|
||||||
del_obj.segnum = GET_INTEL_SHORT(buf + loc); loc += 2;
|
del_obj.segnum = GET_INTEL_SHORT(buf + loc); loc += 2;
|
||||||
memcpy(&del_obj.pos, buf+loc, sizeof(vms_vector)); loc += 12;
|
memcpy(&del_obj.pos, buf+loc, sizeof(vms_vector)); loc += 12;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue