lore message resend
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
21c73c6672
commit
8a9abcc8e4
@ -1414,6 +1414,7 @@ Two EXCELLENT rock textures
|
||||
Fix rock2 texture
|
||||
biome floor elements controlling noise generator's voxel selection
|
||||
Plains (rock) biome
|
||||
Lore message resend from client on failure
|
||||
|
||||
|
||||
|
||||
|
||||
@ -29,6 +29,8 @@ import electrosphere.entity.EntityUtils;
|
||||
import electrosphere.logger.LoggerInterface;
|
||||
import electrosphere.net.NetUtils;
|
||||
import electrosphere.net.client.ClientNetworking;
|
||||
import electrosphere.net.parser.net.message.CharacterMessage;
|
||||
import electrosphere.net.parser.net.message.LoreMessage;
|
||||
import electrosphere.renderer.actor.Actor;
|
||||
import electrosphere.renderer.actor.ActorTextureMask;
|
||||
|
||||
@ -46,6 +48,11 @@ public class ClientLoading {
|
||||
*/
|
||||
static final int DRAW_CELL_EXPECTED_MINIMUM_FRAMES_TO_INIT = 10;
|
||||
|
||||
/**
|
||||
* Number of frames to wait before re-sending query for lore
|
||||
*/
|
||||
static final int LORE_RESEND_FRAMES = 1000;
|
||||
|
||||
|
||||
/**
|
||||
* Loads the race data from the server
|
||||
@ -72,10 +79,18 @@ public class ClientLoading {
|
||||
}
|
||||
//while we don't know what races are playable, wait
|
||||
WindowUtils.updateLoadingWindow("Waiting on lore");
|
||||
int framesWaited = 0;
|
||||
while(Globals.gameConfigCurrent.getCreatureTypeLoader().getPlayableRaces().size() == 0){
|
||||
if(framesWaited % LORE_RESEND_FRAMES == (LORE_RESEND_FRAMES - 1)){
|
||||
//request playable races
|
||||
Globals.clientConnection.queueOutgoingMessage(LoreMessage.constructRequestRacesMessage());
|
||||
//request characters available to this player
|
||||
Globals.clientConnection.queueOutgoingMessage(CharacterMessage.constructRequestCharacterListMessage());
|
||||
}
|
||||
try {
|
||||
TimeUnit.MILLISECONDS.sleep(5);
|
||||
} catch (InterruptedException ex) {}
|
||||
framesWaited++;
|
||||
}
|
||||
//once we have them, bring up the character creation interface
|
||||
//init character creation window
|
||||
|
||||
Loading…
Reference in New Issue
Block a user