| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
In a virtual method, you can be quite certain we're of the correct type.
|
|
|
|
| |
Really, I'd like to make it nonexistant instead...
|
|
|
|
|
|
|
|
|
|
| |
The player position is (0,0) in this case, while vlos still uses the
location from the last level. This caused tile_draw_map_cell (called
from level load) to refer to locations far outside the show area.
Rather than forcing you.pos() and vlos to be in sync at this point
during level load (which could e.g. reveal the upper left corner of the
map), we take the easy way out and prevent a player at (0,0) from seeing
anything (outside arena of course).
|
|
|
|
|
|
| |
'you' seemed to be pointless in such context anyways, and lead to some
const correctness bugs since '*this' could have a different const-ness
from 'you'.
|
|
|
|
|
| |
This is incomplete, partially because of me getting bored, partially because
of doubts about the point of leaving simple addition/etc in parentheses.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Not so sure here as the latter is a bit faster (comparison with a constant
vs a virtual method call), but consistency is good. Perhaps we should use
the latter way after all? In any case, it should be the same everywhere
-- if someone has some insight, say a word so we can sed it again.
|
|
|
|
| |
It should never masquerade as a function call.
|
| |
|
|
|
|
|
|
|
| |
Smite-targetted spells shouldn't probably work through walls, they are not
blocked yet, though.
I dread the thousands places that assume vision to be reciprocal...
|
|
|
|
|
| |
It would be nice to expose the whole viewed area, but
LOS code assumes circular bounds in a few places.
|
| |
|
|
|
|
|
| |
This fixes crashes on player LOS checks while the player is off-level
during level load.
|
|
|
|
|
|
|
|
| |
For one, fix several crash bugs related to the player being outside
LOS. These are prevented by checking against actor->alive() to check
actor validity, and having you.alive() return false in the arena.
Then, make sure LOS is actually invalidated for the arena, since
that doesn't go through the usual level initialization path.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is all not very nice.
los_base is now an abstract base class for both los_def and
los_glob (global LOS-backed los_def variant), and interators
now take a *los_base.
actor::update_los is gone.
Arena LOS is quite probably broken again at the moment.
|
| |
|
|
|
|
|
|
|
|
| |
Previously we skipped this if the monster couldn't be seen, but
that may mean the monster thinks it can still see the player if say
a door has been closed or the player has read ?fog.
Fixes issue #1007.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's now only updated if the monster has moved or is in view of
the player. That means it will not necessarily be accurate if
terrain or clouds are LOS-affecting monsters change/move.
I'm not sure that this is much better than just not updating
LOS for sleeping monsters -- depends on to what extent monsters
just stay in place.
Previously, crawl spent a significant amount of time with the
monster LOS updates.
Other options:
- Calculate monster LOS on-demand (unlikely to help much)
- Reduce monster LOS range away from the player
(this might require some changes to LOS code to actually save
time)
- Track LOS globally: for each cell, which other cells are visible?
An estimated 200 kB of data.
This would then only be updated if terrain/clouds/LOS-affecting
monsters changed.
|
| |
|
|
|
|
|
|
| |
This should fix recent arena display problems.
Also fix los_def::in_bounds to translate coordinates.
|
| |
|
| |
|
| |
|
|
|
|
| |
Player now sees everything in the arena.
|
| |
|
|
Also collect actor/player LOS code in actor-los.cc.
|