mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-08-20 09:57:09 +00:00
Merge f569b999c4 into c3e02fb2d6
This commit is contained in:
commit
5c87b792aa
|
|
@ -377,6 +377,25 @@ void Minecart::tick()
|
||||||
|
|
||||||
void Minecart::activateMinecart(int xt, int yt, int zt, bool state)
|
void Minecart::activateMinecart(int xt, int yt, int zt, bool state)
|
||||||
{
|
{
|
||||||
|
if (!state)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (level->isClientSide)
|
||||||
|
return;
|
||||||
|
|
||||||
|
shared_ptr<Entity> riderEntity = rider.lock();
|
||||||
|
if (riderEntity)
|
||||||
|
{
|
||||||
|
riderEntity->ride(nullptr);
|
||||||
|
float yOffset = 0.5f;
|
||||||
|
float xOffset = 1.0f;
|
||||||
|
float zOffset = 0.0f;
|
||||||
|
riderEntity->absMoveTo(x + xOffset, y + yOffset, z + zOffset, riderEntity->xRot, riderEntity->yRot);
|
||||||
|
|
||||||
|
setHurtDir(-getHurtDir());
|
||||||
|
setHurtTime(10);
|
||||||
|
markHurt();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Minecart::comeOffTrack(double maxSpeed)
|
void Minecart::comeOffTrack(double maxSpeed)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue