Fixed bosses being able to leave their arenas. (Issue#41) Fix Slime King not actually moving during the Phase 4 retreat jump (division by zero when jump lockon timers were implemented). Release Build 8652.
This commit is contained in:
@@ -349,10 +349,10 @@ void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,std::string strat
|
||||
}
|
||||
if(m.I(A::PHASE_REPEAT_COUNT)>=5){
|
||||
m.I(A::PHASE_REPEAT_COUNT)=0;
|
||||
float jumpAngle=util::angleTo(m.GetPos(),game->GetCurrentMapData().MapSize*game->GetCurrentMapData().tilewidth/2); //We jump towards the center to keep the player from constantly dealing with a stuck boss.
|
||||
float jumpAngle=util::angleTo(m.GetPos(),game->GetCurrentMapData().MapSize/2*game->GetCurrentMapData().tilewidth); //We jump towards the center to keep the player from constantly dealing with a stuck boss.
|
||||
float jumpDistance=ConfigFloat("Phase4.JumpDistance")/100*game->GetCurrentMapData().tilewidth;
|
||||
float jumpSpd=jumpDistance/ConfigFloat("Phase4.JumpDuration");
|
||||
float lockedInTargetTime=jumpDistance/ConfigFloat("Phase4.JumpLockinTargetTime");
|
||||
float lockedInTargetTime=ConfigFloat("Phase4.JumpLockinTargetTime");
|
||||
StartJump(ConfigFloat("Phase4.JumpDuration"),m.GetPos()+vf2d{cos(jumpAngle)*jumpDistance,sin(jumpAngle)*jumpDistance},0,jumpSpd,lockedInTargetTime);
|
||||
}else
|
||||
if(m.I(A::PATTERN_REPEAT_COUNT)<5&&m.F(A::SHOOT_TIMER)==0){
|
||||
|
||||
Reference in New Issue
Block a user