Secret feature

Former-commit-id: 254581d14d272f77b2d047dd8a740a458270c0b2
This commit is contained in:
Joshua Barretto 2019-05-09 18:57:43 +01:00
parent cf4e02252a
commit 3b44bda43c
2 changed files with 13 additions and 4 deletions

View File

@ -196,9 +196,11 @@ impl<S: PostMsg, R: PostMsg> PostBox<S, R> {
let msg_bytes = bincode::serialize(&send_msg).unwrap();
let mut msg_bytes = lz4_compress::compress(&msg_bytes);
/*
if msg_bytes.len() > 512 {
println!("MSG SIZE: {}", msg_bytes.len());
}
*/
// Assemble into packet
let mut packet_bytes = msg_bytes

View File

@ -1,5 +1,8 @@
// Standard
use std::f32::consts::PI;
use std::{
f32::consts::PI,
ops::Mul,
};
// Library
use vek::*;
@ -24,8 +27,12 @@ impl Animation for IdleAnimation {
let waveultracos_slow = (anim_time as f32 * 1.0 + PI).cos();
let wave_dip = (wave_slow.abs() - 0.5).abs();
let head_look = Vec2::new(
(global_time as f32 / 5.0).floor().mul(7331.0).sin() * 0.5,
(global_time as f32 / 5.0).floor().mul(1337.0).sin() * 0.25,
);
next.head.offset = Vec3::new(5.5, 2.0, 11.5 + waveultra_slow * 0.4);
next.head.ori = Quaternion::rotation_x(waveultra_slow * 0.05);
next.head.ori = Quaternion::rotation_z(head_look.x) * Quaternion::rotation_x(head_look.y);
next.head.scale = Vec3::one();
next.chest.offset = Vec3::new(5.5, 0.0, 7.5 + waveultra_slow * 0.4);
@ -57,11 +64,11 @@ impl Animation for IdleAnimation {
next.r_hand.scale = Vec3::one();
next.l_foot.offset = Vec3::new(-3.4, 0.0, 8.0);
next.l_foot.ori = Quaternion::rotation_x(-0.04 - waveultra_slow * 0.04);
next.l_foot.ori = Quaternion::identity();
next.l_foot.scale = Vec3::one();
next.r_foot.offset = Vec3::new(3.4, 0.0, 8.0);
next.r_foot.ori = Quaternion::rotation_x(-0.04 - waveultra_slow * 0.04);
next.r_foot.ori = Quaternion::identity();
next.r_foot.scale = Vec3::one();
next.weapon.offset = Vec3::new(-5.0, -6.0, 18.5);