fiserfd
This commit is contained in:
+8
-2
@@ -962,7 +962,13 @@ void Engine::Initiate()
|
||||
testcharacter->Step(deltatime);
|
||||
npc->Step(deltatime);
|
||||
soundsystem->Update();
|
||||
physicsengine->Step(deltatime);
|
||||
// Split into equal substeps of at most 1/120 s so jump arcs, falling and collisions
|
||||
// come out the same whatever the frame rate
|
||||
{
|
||||
const int substeps = std::max(1, (int)std::ceil(deltatime * 120.0f));
|
||||
const float subDt = deltatime / float(substeps);
|
||||
for (int i = 0; i < substeps; i++) physicsengine->Step(subDt);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// LAN: send our transform, apply the other player's
|
||||
@@ -1055,7 +1061,7 @@ void key_callback(GLFWwindow* window, int key, int scancode, int action, int mod
|
||||
{
|
||||
// F11: toggle fullscreen on the primary monitor, restoring the old window rect on exit
|
||||
if (key == GLFW_KEY_F11 && action == GLFW_PRESS) {
|
||||
static int wx = 100, wy = 100, ww = 1280, wh = 720;
|
||||
static int wx = 100, wy = 100, ww = 1920, wh = 1080;
|
||||
if (glfwGetWindowMonitor(window)) {
|
||||
glfwSetWindowMonitor(window, nullptr, wx, wy, ww, wh, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user