11 |
|
#include "radogl.h" |
12 |
|
#include "octree.h" |
13 |
|
|
14 |
+ |
#define MAXLEVEL 16 /* maximum instance hierarchy level */ |
15 |
+ |
|
16 |
|
typedef struct { |
17 |
|
int listid; /* our list id */ |
18 |
|
short localmatl; /* uses local material only */ |
103 |
|
int |
104 |
|
loadoctrees() /* load octrees we've saved up */ |
105 |
|
{ |
106 |
+ |
int levelsleft = MAXLEVEL; |
107 |
|
int nocts = 0; |
108 |
|
LUTAB looptab; |
109 |
|
/* loop through new octree references */ |
110 |
|
while (ottab.tsiz) { |
111 |
+ |
if (!levelsleft--) |
112 |
+ |
error(USER, "too many octree levels -- instance loop?"); |
113 |
|
copystruct(&looptab, &ottab); |
114 |
|
ottab.tsiz = 0; |
115 |
|
nocts += lu_doall(&looptab, buildoctlist); |