Add invulnerability depends on kart for live join
This commit is contained in:
parent
52a4bbeac7
commit
55430a31a2
@ -1411,6 +1411,7 @@ void Kart::update(int ticks)
|
|||||||
m_xyz_front = getTrans()(front);
|
m_xyz_front = getTrans()(front);
|
||||||
|
|
||||||
// Hover the kart above reset position before entering the game
|
// Hover the kart above reset position before entering the game
|
||||||
|
// Add invulnerability depends on kart
|
||||||
if (m_live_join_util != 0 &&
|
if (m_live_join_util != 0 &&
|
||||||
(m_live_join_util > World::getWorld()->getTicksSinceStart() ||
|
(m_live_join_util > World::getWorld()->getTicksSinceStart() ||
|
||||||
World::getWorld()->isLiveJoinWorld()))
|
World::getWorld()->isLiveJoinWorld()))
|
||||||
@ -1424,6 +1425,8 @@ void Kart::update(int ticks)
|
|||||||
m_starting_transform.getBasis().getColumn(1) * 3.0f);
|
m_starting_transform.getBasis().getColumn(1) * 3.0f);
|
||||||
body->proceedToTransform(hovering);
|
body->proceedToTransform(hovering);
|
||||||
setTrans(hovering);
|
setTrans(hovering);
|
||||||
|
float time = getKartProperties()->getExplosionInvulnerabilityTime();
|
||||||
|
m_invulnerable_ticks = stk_config->time2Ticks(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the locally maintained speed of the kart (m_speed), which
|
// Update the locally maintained speed of the kart (m_speed), which
|
||||||
|
Loading…
Reference in New Issue
Block a user