Added complex error output if illegal segnum passed to get_seg_masks(); Fixed warning about set but unused variables
This commit is contained in:
parent
6f0567041a
commit
fbc6112d44
|
@ -1,5 +1,9 @@
|
||||||
D2X-Rebirth Changelog
|
D2X-Rebirth Changelog
|
||||||
|
|
||||||
|
20110710
|
||||||
|
--------
|
||||||
|
main/gameseg.c: Added complex error output if illegal segnum passed to get_seg_masks(); Fixed warning about set but unused variables
|
||||||
|
|
||||||
20110709
|
20110709
|
||||||
--------
|
--------
|
||||||
main/gamerend.c, main/gauges.h: In Multiplayer games show player names in big guided window as well
|
main/gamerend.c, main/gauges.h: In Multiplayer games show player names in big guided window as well
|
||||||
|
|
|
@ -311,8 +311,8 @@ segmasks get_seg_masks(vms_vector *checkp, int segnum, fix rad, char *calling_fi
|
||||||
int vertex_list[6];
|
int vertex_list[6];
|
||||||
segment *seg;
|
segment *seg;
|
||||||
|
|
||||||
if (segnum==-1)
|
if (segnum < 0 || segnum > Highest_segment_index)
|
||||||
Error("segnum == -1 in get_seg_masks()");
|
Error("segnum == %i (%i) in get_seg_masks()\ncheckp: %i,%i,%i, rad: %i\nfrom file: %s, line: %iPlease report this bug.\n",segnum,Highest_segment_index,checkp->x,checkp->y,checkp->z,rad,calling_file,calling_linenum);
|
||||||
|
|
||||||
Assert((segnum <= Highest_segment_index) && (segnum >= 0));
|
Assert((segnum <= Highest_segment_index) && (segnum >= 0));
|
||||||
|
|
||||||
|
@ -618,14 +618,10 @@ int check_segment_connections(void)
|
||||||
seg = &Segments[segnum];
|
seg = &Segments[segnum];
|
||||||
|
|
||||||
for (sidenum=0;sidenum<6;sidenum++) {
|
for (sidenum=0;sidenum<6;sidenum++) {
|
||||||
side *s;
|
|
||||||
segment *cseg;
|
segment *cseg;
|
||||||
side *cs;
|
|
||||||
int num_faces,csegnum,csidenum,con_num_faces;
|
int num_faces,csegnum,csidenum,con_num_faces;
|
||||||
int vertex_list[6],con_vertex_list[6];
|
int vertex_list[6],con_vertex_list[6];
|
||||||
|
|
||||||
s = &seg->sides[sidenum];
|
|
||||||
|
|
||||||
create_abs_vertex_lists(&num_faces, vertex_list, segnum, sidenum, __FILE__, __LINE__);
|
create_abs_vertex_lists(&num_faces, vertex_list, segnum, sidenum, __FILE__, __LINE__);
|
||||||
|
|
||||||
csegnum = seg->children[sidenum];
|
csegnum = seg->children[sidenum];
|
||||||
|
@ -639,8 +635,6 @@ int check_segment_connections(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
cs = &cseg->sides[csidenum];
|
|
||||||
|
|
||||||
create_abs_vertex_lists(&con_num_faces, con_vertex_list, csegnum, csidenum, __FILE__, __LINE__);
|
create_abs_vertex_lists(&con_num_faces, con_vertex_list, csegnum, csidenum, __FILE__, __LINE__);
|
||||||
|
|
||||||
if (con_num_faces != num_faces) {
|
if (con_num_faces != num_faces) {
|
||||||
|
|
Loading…
Reference in a new issue