1
0

fix cavespider poisoning even if attack is in cooldown

make attack function more responsive

fix cavespider poisoning even if attack is in cooldown
make attack function more responsive

Merge branch 'cavespider-attack' of github.com:Gargaj/cuberite into cavespider-attack

code style

fix cavespider poisoning even if attack is in cooldown
make attack function more responsive

fix cavespider poisoning even if attack is in cooldown
make attack function more responsive

Merge branch 'cavespider-attack' of github.com:Gargaj/cuberite into cavespider-attack

code style

Merge branch 'cavespider-attack' of github.com:Gargaj/cuberite into cavespider-attack

Merge branch 'master' into cavespider-attack

Merge branch 'master' into cavespider-attack

fix cavespider poisoning even if attack is in cooldown
make attack function more responsive

fix cavespider poisoning even if attack is in cooldown
make attack function more responsive

Merge branch 'cavespider-attack' of github.com:Gargaj/cuberite into cavespider-attack

code style

fix cavespider poisoning even if attack is in cooldown
make attack function more responsive

fix cavespider poisoning even if attack is in cooldown
make attack function more responsive

Merge branch 'cavespider-attack' of github.com:Gargaj/cuberite into cavespider-attack

code style

Merge branch 'cavespider-attack' of github.com:Gargaj/cuberite into cavespider-attack

Merge branch 'master' into cavespider-attack

Merge branch 'master' into cavespider-attack

Merge branch 'cavespider-attack' of github.com:Gargaj/cuberite into cavespider-attack
This commit is contained in:
Gargaj
2015-11-08 13:44:17 +01:00
parent f3d3c9adca
commit 392a3d319c
16 changed files with 48 additions and 27 deletions

View File

@@ -48,7 +48,7 @@ void cSkeleton::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cSkeleton::Attack(std::chrono::milliseconds a_Dt)
bool cSkeleton::Attack(std::chrono::milliseconds a_Dt)
{
cFastRandom Random;
m_AttackInterval += (static_cast<float>(a_Dt.count()) / 1000) * m_AttackRate;
@@ -60,17 +60,20 @@ void cSkeleton::Attack(std::chrono::milliseconds a_Dt)
cArrowEntity * Arrow = new cArrowEntity(this, GetPosX(), GetPosY() + 1, GetPosZ(), Speed);
if (Arrow == nullptr)
{
return;
return false;
}
if (!Arrow->Initialize(*m_World))
{
delete Arrow;
Arrow = nullptr;
return;
return false;
}
m_World->BroadcastSpawnEntity(*Arrow);
m_AttackInterval = 0.0;
return true;
}
return false;
}