CleverRaven/Cataclysm-DDA — pull request #4907 by atomicdryad (2013-12-06 05:32:12+00:00)
Title: Speedups round 2

map::has_flag*(...): optional usage of bitfield constants, for flags checked
heavily enough to create a noticable performance bottleneck ( ie "BASHABLE"
and most anything used in update_scent, monster movement, los & drawing,
vehicles, fire, etc)

map move_cost & flag functions: eliminate redundant inbound and nonant calcs
for ter + fun checks. still no clue what 'nonant' means

monmove sanity & speedup
* monster::sees_player( int & ): same as game::sees_u( x, y, int & ) but
eliminates expensive and silly logic of monster::plan passing position
to game::sees_u, which proceeds to do a keypair lookup in _active_monsters
for the monster's mem addr.
* Constify const functions required to make sees_player const
* game::sees_u: same as before, but defer to critter.sees_player which handles
the same checks via citter.vision and g->u.is_invisible
* monster::plan use in-class sees_player which bypasses the whole 'this = map[ this.pos() ]'
stuff partially responsible for it's 30% chunk of do_turn