fixed a possible infinite loop in ClientEnvironment (dtime counter getting so small that it doesn't increment the value)
parent
9f859d8389
commit
ec3cb2d1d7
|
@ -808,10 +808,20 @@ void ClientEnvironment::step(float dtime)
|
||||||
|
|
||||||
f32 dtime_part;
|
f32 dtime_part;
|
||||||
if(dtime_downcount > dtime_max_increment)
|
if(dtime_downcount > dtime_max_increment)
|
||||||
|
{
|
||||||
dtime_part = dtime_max_increment;
|
dtime_part = dtime_max_increment;
|
||||||
|
dtime_downcount -= dtime_part;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
dtime_part = dtime_downcount;
|
dtime_part = dtime_downcount;
|
||||||
dtime_downcount -= dtime_part;
|
/*
|
||||||
|
Setting this to 0 (no -=dtime_part) disables an infinite loop
|
||||||
|
when dtime_part is so small that dtime_downcount -= dtime_part
|
||||||
|
does nothing
|
||||||
|
*/
|
||||||
|
dtime_downcount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Handle local player
|
Handle local player
|
||||||
|
|
|
@ -254,7 +254,6 @@ Doing now (most important at the top):
|
||||||
|
|
||||||
=== Next
|
=== Next
|
||||||
* Continue making the scripting system:
|
* Continue making the scripting system:
|
||||||
* Rip up everything unnecessary from the lua build system
|
|
||||||
* Make updateNodeMesh for a less verbose mesh update on add/removenode
|
* Make updateNodeMesh for a less verbose mesh update on add/removenode
|
||||||
* Switch to using a safe way for the self and env pointers
|
* Switch to using a safe way for the self and env pointers
|
||||||
* Make some global environment hooks, like node placed and general
|
* Make some global environment hooks, like node placed and general
|
||||||
|
|
Loading…
Reference in New Issue