👌
This commit is contained in:
@@ -144,8 +144,11 @@ Timestamp Connection::Run(World* world) {
|
||||
player->Killer = GetHash(true);
|
||||
}
|
||||
|
||||
out.states.jumping = in.keys.jump;
|
||||
out.states.jumping = player->GetVelocity().y > 0.1f;
|
||||
out.states.running = player->GetVelocity().Length() > .3f;
|
||||
out.states.still = !out.states.running;
|
||||
out.states.hit = player->m_hit;
|
||||
player->m_hit = false;
|
||||
|
||||
if (player->AmIDead()) {
|
||||
in.keys.shoot = false;
|
||||
@@ -171,6 +174,8 @@ Timestamp Connection::Run(World* world) {
|
||||
if (in.keys.shoot && m_shoot_acc <= 0.) {
|
||||
Bullets.emplace_back(new Bullet(player->GetPOV() + player->GetDirection(), player->GetDirection(), GetHash(true)));
|
||||
out.states.shooting = true;
|
||||
if (out.states.jumping)
|
||||
out.states.jumpshot = true;
|
||||
m_shoot_acc = BULLET_TIME;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user