| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This is not required anymore since we just store bools in
los_grid.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, it was holding on to pointers to objects it
didn't own, causing various bugs.
los_def now copies the opacity_func and bounds_func
parameters. Making them copyable required introducing
opacity_func::clone(). Also implement los_def
copy constructor and copy assignment operator.
Finally, update travel exclusions and monster
patrolling to these changes.
|
|
|
|
|
|
| |
This adds variants bounds_func::call(p) of
bounds_func::operator()(p) and similar which
I know how to call from gdb.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
There's now a spell-specific _lightning_los which may require
some fine-tuning -- I'm not quite sure of the intention of the
original check.
|
|
|
|
| |
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.
|
|
|
|
| |
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|