mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-07-15 08:08:45 +00:00
refactor: remove calls to Vec3::newTemp and Vec3::newPermanent
This commit is contained in:
@@ -404,25 +404,25 @@ void LocalPlayer::aiStep() {
|
||||
|
||||
if (abilities.flying) // minecraft->options->isFlying )
|
||||
{
|
||||
Vec3* viewVector = getViewVector(1.0f);
|
||||
Vec3 viewVector = getViewVector(1.0f);
|
||||
|
||||
// 4J-PB - To let the player build easily while flying, we need to
|
||||
// change this
|
||||
|
||||
#ifdef _DEBUG_MENUS_ENABLED
|
||||
if (abilities.debugflying) {
|
||||
flyX = (float)viewVector->x * input->ya;
|
||||
flyY = (float)viewVector->y * input->ya;
|
||||
flyZ = (float)viewVector->z * input->ya;
|
||||
flyX = (float)viewVector.x * input->ya;
|
||||
flyY = (float)viewVector.y * input->ya;
|
||||
flyZ = (float)viewVector.z * input->ya;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
if (isSprinting()) {
|
||||
// Accelrate up to full speed if we are sprinting, moving in the
|
||||
// direction of the view vector
|
||||
flyX = (float)viewVector->x * input->ya;
|
||||
flyY = (float)viewVector->y * input->ya;
|
||||
flyZ = (float)viewVector->z * input->ya;
|
||||
flyX = (float)viewVector.x * input->ya;
|
||||
flyY = (float)viewVector.y * input->ya;
|
||||
flyZ = (float)viewVector.z * input->ya;
|
||||
|
||||
float scale = ((float)(SPRINT_DURATION - sprintTime)) / 10.0f;
|
||||
scale = scale * scale;
|
||||
|
||||
Reference in New Issue
Block a user