omg 💣
This commit is contained in:
@@ -122,6 +122,13 @@ void Connection::Run(World* world) {
|
||||
last = m_input_vector.at(m_last_in);
|
||||
|
||||
el = (double)(in.timestamp - last.timestamp) / 1000.;
|
||||
|
||||
if (m_shoot_acc > 0.) {
|
||||
m_shoot_acc -= el;
|
||||
if (m_shoot_acc < 0.)
|
||||
m_shoot_acc = 0;
|
||||
}
|
||||
|
||||
player.get()->SetDirection(in.direction);
|
||||
player.get()->ApplyPhysics(player.get()->GetInput(in.keys.forward,
|
||||
in.keys.backward,
|
||||
@@ -129,6 +136,13 @@ void Connection::Run(World* world) {
|
||||
in.keys.right,
|
||||
in.keys.jump, false, el), world, el);
|
||||
|
||||
//if (in.keys.block)
|
||||
// ChunkDiffs.push_back()
|
||||
|
||||
if (in.keys.shoot && m_shoot_acc <= 0.)
|
||||
Bullets.push_back(Bullet(player.get()->GetPOV() + player.get()->GetDirection(), player.get()->GetDirection()));
|
||||
|
||||
|
||||
out.position = player.get()->GetPositionAbs();
|
||||
out.direction = in.direction;
|
||||
out.timestamp = in.timestamp;
|
||||
|
Reference in New Issue
Block a user