Lua: Allow creating gas clouds
Use the gas clouds in the Clouds themeroom. Use the existing visible_region_at() in the vision code.
This commit is contained in:
11
src/vision.c
11
src/vision.c
@@ -141,7 +141,6 @@ does_block(int x, int y, struct rm *lev)
|
||||
{
|
||||
struct obj *obj;
|
||||
struct monst *mon;
|
||||
int i;
|
||||
|
||||
#ifdef DEBUG
|
||||
/* set DEBUGFILES=seethru in environment to see through bubbles */
|
||||
@@ -181,14 +180,8 @@ does_block(int x, int y, struct rm *lev)
|
||||
if (gs.seethru != 1) {
|
||||
#endif
|
||||
/* Clouds (poisonous or not) block light. */
|
||||
for (i = 0; i < gn.n_regions; i++) {
|
||||
/* Ignore regions with ttl == 0 - expire_gas_cloud must unblock its
|
||||
* points prior to being removed itself. */
|
||||
if (gr.regions[i]->ttl > 0 && gr.regions[i]->visible
|
||||
&& inside_region(gr.regions[i], x, y)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (visible_region_at(x, y))
|
||||
return 1;
|
||||
#ifdef DEBUG
|
||||
} /* gs.seethru */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user