Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small syntax fixes #12

Open
wants to merge 4 commits into
base: develop-rus
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion program/characters/characters_login.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion program/interface/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ void LaunchMainMenu()
SetTimeScale(1.0);
// fix
TimeScaleCounter = 0;
    DelPerkFromActiveList("TimeSpeed");
DelPerkFromActiveList("TimeSpeed");
}

void LaunchSaveGame()
Expand Down
20 changes: 10 additions & 10 deletions program/scripts/ShipsUtilites.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
}
Expand Down Expand Up @@ -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 -->
Expand Down
2 changes: 1 addition & 1 deletion program/sea_ai/AIShip.c
Original file line number Diff line number Diff line change
Expand Up @@ -3856,7 +3856,7 @@ void Ship_UpdateParameters()
{
// boal -->
if(!IsPerkIntoList("sink"))
        {
{
if (rand(1) == 0)
{
PlaySound("Interface\_Abandon1.wav");
Expand Down
56 changes: 28 additions & 28 deletions program/seadogs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -1094,8 +1094,8 @@ void ProcessControls()
}
}
}
      else
      {
else
{
if (TimeScaleCounter >= 16)
{
TimeScaleCounter -= 4;
Expand Down Expand Up @@ -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)
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion program/sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down