Apply Knockback and Slime King Knockback fix to demo branch. Release Build 8955.

demo
sigonasr2 1 month ago
parent 330608667a
commit 1395adf8e6
  1. 4
      Adventures in Lestoria/Player.cpp
  2. 6
      Adventures in Lestoria/SlimeKing.cpp
  3. 2
      Adventures in Lestoria/Version.h
  4. BIN
      x64/Release/Adventures in Lestoria.exe

@ -305,7 +305,9 @@ State::State Player::GetState(){
}
void Player::Knockback(vf2d vel){
this->vel+=vel;
if(!HasIframes()){
this->vel+=vel;
}
}
void Player::Update(float fElapsedTime){

@ -211,8 +211,10 @@ void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,std::string strat
lineToPlayer={m.GetPos(),m.GetPos()+vf2d{cos(randomDir),sin(randomDir)}*1};
}
game->GetPlayer()->Knockback(lineToPlayer.vector().norm()*float(ConfigInt("JumpKnockbackFactor")));
if(m.phase!=2){ //In phase 2, the player can get slammed multiple times. No iframes for messing up.
game->GetPlayer()->SetIframes(1);
if(m.phase!=2){
game->GetPlayer()->SetIframes(1.f);
}else{ //In phase 2 you can get hit by multiple knockbacks, so the iframe time is a lot shorter.
game->GetPlayer()->SetIframes(0.2f);
}
}
m.SetZ(0);

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
#define VERSION_PATCH 2
#define VERSION_BUILD 8953
#define VERSION_BUILD 8955
#define stringify(a) stringify_(a)
#define stringify_(a) #a

Loading…
Cancel
Save