Dehardcode number of glass gems

This commit is contained in:
Pasi Kallinen
2021-06-21 10:06:46 +03:00
parent 0bb77f455d
commit f84538aa8c
4 changed files with 20 additions and 4 deletions

View File

@@ -3956,7 +3956,7 @@ readobjnam_postparse2(struct _readobjnam_data *d)
s += 9;
if (!strcmpi(s, "glass")) { /* choose random color */
/* 9 different kinds */
d->typ = LAST_GEM + rnd(9);
d->typ = LAST_GEM + rnd(NUM_GLASS_GEMS);
if (objects[d->typ].oc_class == GEM_CLASS)
return 2; /*goto typfnd;*/
else