Welcome!

Join our community of MMORPG enthusiasts and private server developers! By registering, you'll gain access to in-depth discussions on source codes, binaries, and the latest developments in MMORPG server files. Collaborate with like-minded individuals, explore tutorials, and share insights on building and optimizing private servers. Join us today and unlock the full potential of MMORPG server development!

Join Today!

[Tutorial] Fix freeze after spawn

Junior Spellweaver
Joined
Jun 22, 2014
Messages
175
Reaction score
87
Location
C:/inetpub
If you spawn you are freezed at the spawnpoint and thats annoying.

WarZ.sln
Search:
Code:
// IF PLAYER IS FAST LOAD ON PLAYER CANT MOVE 12sec because fastload problem.        // wait 12 secs for fastload load building around player.
   // prevPos2 = GetPosition();
        if (g_FastLoad->GetBool() && r3dGetTime() > gClientLogic().localPlayerConnectedTime + 12 && gClientLogic().localPlayer_ == this)
          controller->Move(vel * TimePassed, 0.5f);
       
    if (!g_FastLoad->GetBool())
      controller->Move(vel * TimePassed, 0.5f);
 
        prevPos = GetPosition();
        controller->prevpos = GetPosition();
        parent::Update(); // manually update position after updating physics. Needed for camera, otherwise it will be lagging one frame behind

and change the red:
Code:
// IF PLAYER IS FAST LOAD ON PLAYER CANT MOVE 12sec because fastload problem.        // wait 12 secs for fastload load building around player.
   // prevPos2 = GetPosition();
[COLOR=#ff0000]       if (g_FastLoad->GetBool() && r3dGetTime() > gClientLogic().localPlayerConnectedTime + 1 && gClientLogic().localPlayer_ == this)[/COLOR]
          controller->Move(vel * TimePassed, 0.5f);
       
    if (!g_FastLoad->GetBool())
      controller->Move(vel * TimePassed, 0.5f);
 
        prevPos = GetPosition();
        controller->prevpos = GetPosition();
        parent::Update(); // manually update position after updating physics. Needed for camera, otherwise it will be lagging one frame behind

Credits: @GigaToni & Me
 
Last edited:
It´s equal, because it´s just the time where you are freezed. And no PC in this world will load this game in 1 second so it dont cares.
 
Boohoo for all of you in space ships..

I don't see how this fixes the issues with 60% of players that are stuck on loading for a lot longer being spawned in game and unable to move due to screen being still on loading screen with 0 fps.
 
How to having this work with OverZ source? I can find the lines with fastload in it but it's quite not the same as the code above.
 
Back