diff --git a/program/characters/characters_login.c b/program/characters/characters_login.c index f62a82c8..93be8eff 100644 --- a/program/characters/characters_login.c +++ b/program/characters/characters_login.c @@ -5,7 +5,7 @@ void LoginCharactersInLocation(ref loc) // boal 01.02.2004 --> SetTimeScale(1.0); TimeScaleCounter = 0; -    DelPerkFromActiveList("TimeSpeed"); + DelPerkFromActiveList("TimeSpeed"); // boal 01.02.2004 <-- LocAi_Init(loc); string locID = loc.id; diff --git a/program/interface/interface.c b/program/interface/interface.c index 9c5a75da..e9b96193 100644 --- a/program/interface/interface.c +++ b/program/interface/interface.c @@ -742,7 +742,7 @@ void LaunchMainMenu() SetTimeScale(1.0); // fix TimeScaleCounter = 0; -    DelPerkFromActiveList("TimeSpeed"); + DelPerkFromActiveList("TimeSpeed"); } void LaunchSaveGame() diff --git a/program/scripts/ShipsUtilites.c b/program/scripts/ShipsUtilites.c index 40724713..fa288d53 100644 --- a/program/scripts/ShipsUtilites.c +++ b/program/scripts/ShipsUtilites.c @@ -172,7 +172,7 @@ int GenerateShipExt(int iBaseType, bool isLock, ref chr) string attr, sCity; int i; aref refShip; - float Кdckyrd = 1.0; + float Kdckyrd = 1.0; bool isShipyard = false; int iShip = CreateBaseShip(iBaseType); @@ -199,7 +199,7 @@ int GenerateShipExt(int iBaseType, bool isLock, ref chr) sCity = chr.City; if(CheckCharacterID(chr, sCity + "_shipyarder")) { - Кdckyrd = 0.8; + Kdckyrd = 0.8; isShipyard = true; } } @@ -441,20 +441,20 @@ int GenerateShipExt(int iBaseType, bool isLock, ref chr) rRealShip.Bonus_SpeedRate = (stf(rRealShip.SpeedRate)*iCannonDiff)/(15 * iDiffClass); rRealShip.Bonus_TurnRate = (stf(rRealShip.TurnRate)*iCannonDiff)/(15 * iDiffClass); - rRealShip.SpeedRate = stf(rRealShip.SpeedRate) + Кdckyrd * (frandSmall(stf(rRealShip.SpeedRate) / 5.0) - stf(rRealShip.SpeedRate) / 10.0); - rRealShip.TurnRate = stf(rRealShip.TurnRate) + Кdckyrd * (frandSmall(stf(rRealShip.TurnRate) / 5.0) - stf(rRealShip.TurnRate) / 10.0); - rRealShip.HP = sti(rRealShip.HP) + makeint(Кdckyrd * (rand(makeint(sti(rRealShip.HP)/5)) - makeint(sti(rRealShip.HP)/10))); - rRealShip.WindAgainstSpeed = stf(rRealShip.WindAgainstSpeed) + Кdckyrd * (frandSmall(stf(rRealShip.WindAgainstSpeed)/5.0) - stf(rRealShip.WindAgainstSpeed)/10.0); + rRealShip.SpeedRate = stf(rRealShip.SpeedRate) + Kdckyrd * (frandSmall(stf(rRealShip.SpeedRate) / 5.0) - stf(rRealShip.SpeedRate) / 10.0); + rRealShip.TurnRate = stf(rRealShip.TurnRate) + Kdckyrd * (frandSmall(stf(rRealShip.TurnRate) / 5.0) - stf(rRealShip.TurnRate) / 10.0); + rRealShip.HP = sti(rRealShip.HP) + makeint(Kdckyrd * (rand(makeint(sti(rRealShip.HP)/5)) - makeint(sti(rRealShip.HP)/10))); + rRealShip.WindAgainstSpeed = stf(rRealShip.WindAgainstSpeed) + Kdckyrd * (frandSmall(stf(rRealShip.WindAgainstSpeed)/5.0) - stf(rRealShip.WindAgainstSpeed)/10.0); } } if(!CheckAttribute(rRealShip, "QuestShip")) { - rRealShip.Capacity = sti(rRealShip.Capacity) + makeint(Кdckyrd * (rand(makeint(sti(rRealShip.Capacity)/4)) - makeint(sti(rRealShip.Capacity)/8))); - rRealShip.OptCrew = makeint(sti(rRealShip.OptCrew) + Кdckyrd * (rand(makeint(sti(rRealShip.OptCrew)/3)) - makeint(sti(rRealShip.OptCrew)/6))); + rRealShip.Capacity = sti(rRealShip.Capacity) + makeint(Kdckyrd * (rand(makeint(sti(rRealShip.Capacity)/4)) - makeint(sti(rRealShip.Capacity)/8))); + rRealShip.OptCrew = makeint(sti(rRealShip.OptCrew) + Kdckyrd * (rand(makeint(sti(rRealShip.OptCrew)/3)) - makeint(sti(rRealShip.OptCrew)/6))); rRealShip.MaxCrew = makeint(sti(rRealShip.OptCrew) * 1.25 + 0.5); // 25% перегруза - rRealShip.MinCrew = makeint(sti(rRealShip.MinCrew) + Кdckyrd * (rand(makeint(sti(rRealShip.MinCrew)/3)) - makeint(sti(rRealShip.MinCrew)/6))); - rRealShip.Weight = sti(rRealShip.Weight) + makeint(Кdckyrd * (rand(sti(rRealShip.Weight)/20) - rand(sti(rRealShip.Weight)/20))); + rRealShip.MinCrew = makeint(sti(rRealShip.MinCrew) + Kdckyrd * (rand(makeint(sti(rRealShip.MinCrew)/3)) - makeint(sti(rRealShip.MinCrew)/6))); + rRealShip.Weight = sti(rRealShip.Weight) + makeint(Kdckyrd * (rand(sti(rRealShip.Weight)/20) - rand(sti(rRealShip.Weight)/20))); } // to_do del --> diff --git a/program/sea_ai/AIShip.c b/program/sea_ai/AIShip.c index a6451282..318adabd 100644 --- a/program/sea_ai/AIShip.c +++ b/program/sea_ai/AIShip.c @@ -3856,7 +3856,7 @@ void Ship_UpdateParameters() { // boal --> if(!IsPerkIntoList("sink")) -        { + { if (rand(1) == 0) { PlaySound("Interface\_Abandon1.wav"); diff --git a/program/seadogs.c b/program/seadogs.c index d917e9e8..241dc1c1 100644 --- a/program/seadogs.c +++ b/program/seadogs.c @@ -1071,13 +1071,13 @@ void ProcessControls() // boal 27.11.03 time --> -  if (ControlName=="TimeScaleFaster" || ControlName == "TimeScaleSlower") -  { + if (ControlName=="TimeScaleFaster" || ControlName == "TimeScaleSlower") + { if (loadedLocation.type == "underwater") return; //запрет ускорения под водой. if (CheckAttribute(pchar, "questTemp.NoFast")) return; //запрет ускорения DeleteAttribute(pchar, "pause"); if (ControlName == "TimeScaleFaster") -      { + { if (TimeScaleCounter >= 12) { TimeScaleCounter += 4; @@ -1094,8 +1094,8 @@ void ProcessControls() } } } -      else -      { + else + { if (TimeScaleCounter >= 16) { TimeScaleCounter -= 4; @@ -1135,31 +1135,31 @@ void ProcessControls() { if (TimeScaleCounter > 6) TimeScaleCounter = 6; } -      float newTimeScale = 1 + (TimeScaleCounter)*0.25; // GetSeaTimeScale() -      if (newTimeScale < 0) //don't wanna crash the game -      { -        TimeScaleCounter = -4; -        newTimeScale = 0; -      } - -      Log_SetStringToLog("x" + newTimeScale); -      if (TimeScaleCounter == 0) //back to normal -      { + float newTimeScale = 1 + (TimeScaleCounter)*0.25; // GetSeaTimeScale() + if (newTimeScale < 0) //don't wanna crash the game + { + TimeScaleCounter = -4; + newTimeScale = 0; + } + + Log_SetStringToLog("x" + newTimeScale); + if (TimeScaleCounter == 0) //back to normal + { if(IsPerkIntoList("TimeSpeed")) -        { -        SetTimeScale(1.0); -        DelPerkFromActiveList("TimeSpeed"); -        } -      } -      else -      { -        SetTimeScale(newTimeScale); -        //if perk not in list -        if(!IsPerkIntoList("TimeSpeed")) -        { + { + SetTimeScale(1.0); + DelPerkFromActiveList("TimeSpeed"); + } + } + else + { + SetTimeScale(newTimeScale); + //if perk not in list + if(!IsPerkIntoList("TimeSpeed")) + { AddPerkToActiveList("TimeSpeed"); } -      } + } } // boal <-- switch(ControlName) @@ -1179,7 +1179,7 @@ void ProcessControls() { SetTimeScale(GetSeaTimeScale()); TimeScaleCounter = 4; -     Log_SetStringToLog(XI_ConvertString("Time x2")); + Log_SetStringToLog(XI_ConvertString("Time x2")); AddPerkToActiveList("TimeSpeed"); } break; diff --git a/program/sound.c b/program/sound.c index cfd07824..87a2cc33 100644 --- a/program/sound.c +++ b/program/sound.c @@ -3,7 +3,7 @@ #define MUSIC_SILENCE_TIME 180000.0 #define SOUNDS_FADE_TIME 200 -#event_handler ("LoadSceneSound", "LoadSceneSound") +#event_handler ("LoadSceneSound", "LoadSceneSound"); // PLAY int Play3DSound(string name, float x, float y, float z) {