mirror of
https://github.com/glest/glest-source.git
synced 2025-02-24 11:42:31 +01:00
fix for updateAttackStopped and command queuing;
switching tilesets react with delay like switching maps; new/updated maps; reverted egypt mining slave model; many loading screens for scenarios
This commit is contained in:
parent
7397ff0368
commit
d7a65ed18e
@ -27,7 +27,7 @@ using namespace Shared::Platform;
|
||||
namespace Glest { namespace Game {
|
||||
|
||||
const string mailString = "contact@megaglest.org";
|
||||
const string glestVersionString = "v3.4.0-beta3";
|
||||
const string glestVersionString = "v3.4.0-dev";
|
||||
#if defined(SVNVERSION)
|
||||
const string SVN_Rev = string("Rev: ") + string(SVNVERSION);
|
||||
#elif defined(SVNVERSIONHEADER)
|
||||
|
@ -61,7 +61,7 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu, b
|
||||
currentFactionName_factionPreview="";
|
||||
mapPreviewTexture=NULL;
|
||||
hasCheckedForUPNP = false;
|
||||
needToPublishMap=false;
|
||||
needToPublishDelayed=false;
|
||||
mapPublishingDelayTimer=time(NULL);
|
||||
|
||||
publishToMasterserverThread = NULL;
|
||||
@ -666,7 +666,7 @@ void MenuStateCustomGame::mouseClick(int x, int y, MouseButton mouseButton){
|
||||
if(hasNetworkGameSettings() == true)
|
||||
{
|
||||
//delay publishing for 5 seconds
|
||||
needToPublishMap=true;
|
||||
needToPublishDelayed=true;
|
||||
mapPublishingDelayTimer=time(NULL);
|
||||
}
|
||||
}
|
||||
@ -734,8 +734,10 @@ void MenuStateCustomGame::mouseClick(int x, int y, MouseButton mouseButton){
|
||||
}
|
||||
if(hasNetworkGameSettings() == true)
|
||||
{
|
||||
needToSetChangedGameSettings = true;
|
||||
lastSetChangedGameSettings = time(NULL);
|
||||
|
||||
//delay publishing for 5 seconds
|
||||
needToPublishDelayed=true;
|
||||
mapPublishingDelayTimer=time(NULL);
|
||||
}
|
||||
}
|
||||
else if(listBoxMapFilter.mouseClick(x, y)){
|
||||
@ -1707,17 +1709,17 @@ void MenuStateCustomGame::update() {
|
||||
// give it to me baby, aha aha ...
|
||||
publishToMasterserver();
|
||||
}
|
||||
if(needToPublishMap){
|
||||
if(needToPublishDelayed){
|
||||
// this delay is done to make it possible to switch over maps which are not meant to be distributed
|
||||
if(difftime(time(NULL), mapPublishingDelayTimer) >= 5){
|
||||
// after 5 seconds we are allowed to publish again!
|
||||
needToSetChangedGameSettings = true;
|
||||
lastSetChangedGameSettings = time(NULL);
|
||||
// set to normal....
|
||||
needToPublishMap=false;
|
||||
needToPublishDelayed=false;
|
||||
}
|
||||
}
|
||||
if(!needToPublishMap){
|
||||
if(!needToPublishDelayed){
|
||||
bool broadCastSettings = (difftime(time(NULL),lastSetChangedGameSettings) >= 2);
|
||||
|
||||
if(broadCastSettings == true) {
|
||||
|
@ -98,7 +98,7 @@ private:
|
||||
time_t lastMasterserverPublishing;
|
||||
time_t lastNetworkPing;
|
||||
time_t mapPublishingDelayTimer;
|
||||
bool needToPublishMap;
|
||||
bool needToPublishDelayed;
|
||||
|
||||
bool needToRepublishToMasterserver;
|
||||
bool needToBroadcastServerSettings;
|
||||
|
@ -428,6 +428,12 @@ void UnitUpdater::updateAttackStopped(Unit *unit) {
|
||||
const AttackStoppedCommandType *asct= static_cast<const AttackStoppedCommandType*>(command->getCommandType());
|
||||
Unit *enemy;
|
||||
|
||||
if(unit->getCommandSize()>1)
|
||||
{
|
||||
unit->finishCommand(); // attackStopped is skipped if somthing else is queued after this.
|
||||
return;
|
||||
}
|
||||
|
||||
if(attackableOnRange(unit, &enemy, asct->getAttackSkillType())){
|
||||
unit->setCurrSkill(asct->getAttackSkillType());
|
||||
unit->setTarget(enemy);
|
||||
|
Loading…
x
Reference in New Issue
Block a user