Added arrow simulation for bow goblins. Added perception levels which increase the accuracy of the shooting monster over time. Refactor bullet update code to be inside the bullet class itself. Release Build 9169.
if(/*World size in PIXELS!*/vi2dworldSize=GetCurrentMap().MapData.MapSize*GetCurrentMap().MapData.TileSize;b->pos.x+b->radius<-WINDOW_SIZE.x||b->pos.x-b->radius>worldSize.x+WINDOW_SIZE.x||b->pos.y+b->radius<-WINDOW_SIZE.y||b->pos.y-b->radius>worldSize.y+WINDOW_SIZE.y){
if(/*World size in PIXELS!*/vi2dworldSize=game->GetCurrentMapData().MapSize*game->GetCurrentMapData().TileSize;pos.x+radius<-WINDOW_SIZE.x||pos.x-radius>worldSize.x+WINDOW_SIZE.x||pos.y+radius<-WINDOW_SIZE.y||pos.y-radius>worldSize.y+WINDOW_SIZE.y){
booldead=false;//When marked as dead it wil be removed by the next frame.
boolsimulated=false;//A simulated bullet cannot interact / damage things in the world. It's simply used for simulating the trajectory and potential path of the bullet
//Used by special bullets to control custom despawning behavior! Return true when the bullet should be destroyed. Return false to handle it otherwise (like deactivating it instead). You become responsible for getting rid of the bullet.
virtualboolPlayerHit(Player*player);
//Used by special bullets to control custom despawning behavior! Return true when the bullet should be destroyed. Return false to handle it otherwise (like deactivating it instead). You become responsible for getting rid of the bullet.
# How long it takes to prepare the attack once an attack is queued.
Attack Windup Time = 1.0s
Arrow Spd = 250
Arrow Spd = 350
Arrow Hitbox Radius = 8
@ -606,5 +606,11 @@ MonsterStrategy
# Does not move and shoots from anywhere in these ranges.
Stand Still and Shoot Range = 700,1000
# Anything outside the max "Stand Still and Shoot Range" will cause the monster to move towards the target instead.
# The perception level indicates how accurate the bow user's shots become over time. Perception can be between 0-90. A perception level of 90 should never miss. This doesn't necessarily mean lower numbers will miss, just that it doesn't auto-correct for error as much.
Starting Perception Level = 0
# Every shot taken, the bow user's perception level will increase by this amount.