| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Previously, undetected secret doors in clear rock walls were
blocking LOS. Now they don't but do once you detect them...
|
|
|
|
| |
Also add a few previously indirect includes.
|
|
|
|
|
|
|
|
| |
Also not at actors' feet.
Might be even nicer to have them thrown as missiles:
You are hit by a piece of orc flesh. The giant bat is hit by
a chunk of yak flesh. The giant bat dies.
|
|
|
|
|
|
|
|
|
| |
The difference between no_trans and solid is whether granite statues are
considered opaque.
Granite statues are somewhat weird in that they behave completely differently
from other statues: You can't shoot missiles at or past them, no items can be
in their cell, etc.
|
|
|
|
|
|
|
| |
The various LOS objects and functions now accept a circle_def
instead of a bounds_func. This is a little less generic, but
should eventually help with iterating over coordinates in
any los_def.
|
| |
|
|
|
|
|
|
|
| |
Not all are changed yet, as there are several index checks still needed
for debugging purposes.
Also, make many checks for player/monster (non)existence use actor_at().
|
| |
|
|
|
|
| |
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
|
|
|
|
|
|
|
|
|
| |
los_param got a new opacity_monmove to help. The change compiles
and the game runs, but I'm unsure how to test monster pathfinding.
Please tell me if anything went wrong!
Removes mon-los.{cc,h}, so I'm afraid I may have broken the
non-Unix builds again.
|
|
|
|
|
|
| |
Setting LOS_RADIUS in defines.h now works. Fixed a couple of
things to allow this, including an apparent off-by-one error
in crawl_view -- not quite sure this doesn't break anything.
|
|
|
|
|
|
| |
The maximal boundary within which losight/find_ray will work is
now clearly defined at the start of los.cc. By default, it's
the circle with radius LOS_MAX_RADIUS == LOS_RADIUS.
|
|
|
|
|
| |
Mostly rename functions from terrain.h that accept features of typ
dgn_feature_type from grid_is_* to feat_is_*.
|
|
|
|
| |
For this, add new opacity_func that disregards half-opaque things.
|
|
|
|
|
|
|
|
|
|
|
| |
The nicer interface to losight is now
void losight(env_show_grid& sh, const coord_def& center,
const opacity_func &opc = opc_default,
const bounds_func &bds = bds_default);
bounds_func provides the LOS boundary (usually just a circle with
radius the current LOS radius). opacity_func is a mapping of grid
coordinates to opacity values.
|
|
|
|
|
|
|
|
|
|
| |
Added a function
void losight(env_show_grid& sh, const coord_def& center,
opacity_func opc, bounds_func bounds)
with sensible defaults for opc and bounds.
It's not necessary to abstract away the geometry as I initially
did with los_param.
|
|\
| |
| |
| |
| | |
There's still the issue of glyph choice, and cutting them down with an
axe is not coded yet.
|
| | |
|
| |
| |
| |
| | |
and are much easier to set on fire than trees.
|
| |
| |
| |
| |
| | |
Available as 't' for vault builders. Can be ignited using wands of fire,
but the fire can't be controlled.
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's now cell_see_cell which tests for visibility correctly,
albeit slowly. That's only used for placing features in the abyss
currently, but needs to be improved if it gets used more.
The second function used in monster movement was left as is, but
renamed to can_go_straight. This remains unreliable but probably
serves its purpose.
The grid_see_grid test is adapted to cell_see_cell; the
grid_see_grid lua binding is now actually useful.
Also reduce the number of tests in los_csc and los_symm.
|
|
|
|
| |
Also remove an obsoleted variant of grid_appearance.
|
| |
|
|
|
|
| |
This was intended for the arena; keeping as example or test case.
|
|
Parameters relevant to the LOS calculation are now passed as
an object los_param that takes care of coordinate translation,
bounds checking, opacity of cells and what is written to the
output array.
A check for in_bounds was changed to map_bounds for simlicity;
this should not have any effect.
Special casing for arena was removed from losight; instead
calc_show_los now calls the new losight_permissive.
|