Plagman, on Jun 26 2009, 09:32 AM, said:
Can't you check if the wall/sprite hitscan hits is translucent and breakable? (or just translucent, depending on how miserable you want your enemies to act). If it is, start a new hitscan from the previous hitcoords until you find something that's not. Or would that be too much work because of the way your code is designed?
That's all possible, but doing lots of hitscans takes a lot of cpu (imagine 30 monsters all doing it in a level with complex geometry). For this particular problem I think what I'll do is have the hitscan on breakable glass count as target confirmation (the hitscans are always straight at the target, so chances are the glass is the only thing blocking it). This will cause the monster to shoot, destroying the glass. On the next check, the glass will be gone.
EDIT: My code has already been doing exactly what I suggested above, so I have no idea what is going on

It might be something else, like an ifcanshoottarget in the monster's original code acting as an extra check and coming up negative...unless I have the map and can do some tests I won't worry about it further.