by sapier » Sun Jan 08, 2012 04:25
no I'don't just look if there's a node i already had a discussion with celeron about what is best to look at ... my first implementation did use "sunlight_propagates" but celeron didn't like this as fences for example would be a los problem.
Using the light parameter was his suggestion and i do support it too.
I didn't know that getNodeNoEx() does have this effect but I don't think its bad too if asking for line of sight you do want to know if there's a line of sight. In regular case you won't have to load any blocks as all blocks between active entities and players will be already loaded.
Of course you may always ask "do i have a line of sight to something not within active area". I don't see any usecase for this atm ... if there really is none you might be right and we should avoid creating an additional error case. But of course this will have the effect that we do give wrong information in some cases telling there is no line of sight while there is one.
EDIT1: probably there is a line of sight check in client but only for player actions. There can't be a check if the acting object is a server active object e.g. a mob that need's to decide if it can se a player and therefor start an attack ... not like current dm's attacking player even if they can't see them
Last edited by
sapier on Sun Jan 08, 2012 04:31, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved