Prevent monster facing directions from changing so rapidly and only allow directional changes when enough directional change has been reached for less choppy facing animations. Release Build 9176.
if(abs(facingAngle-prevFacingDirectionAngle)<(7*PI)/16.f||lastFacingDirectionChange<0.25f)return;//We don't want to change facing angle until a more drastic angle of change has occurred. About 1/4 circle should be acceptable.
//Spawns the drops a monster would drop as if they were defeated. Returns what items were dropped and their amounts.
//Spawns the drops a monster would drop as if they were defeated. Returns what items were dropped and their amounts.
std::map<ItemInfo*,uint16_t>SpawnDrops();
std::map<ItemInfo*,uint16_t>SpawnDrops();
floatprevFacingDirectionAngle=0.f;//Keeps track of the angle of the previous target to ensure four-way sprite facing changes don't happen too early or spastically.
floatlastFacingDirectionChange=0.f;//How much time has passed since the last facing direction change. Used to ensure another facing direction change doesn't happen too quickly. Probably allowing one every quarter second is good enough.