1. 08 Feb, 2019 1 commit
  2. 01 Feb, 2019 1 commit
  3. 22 Nov, 2018 1 commit
  4. 21 Nov, 2018 2 commits
  5. 13 Nov, 2018 1 commit
  6. 12 Nov, 2018 1 commit
  7. 28 Oct, 2018 1 commit
  8. 19 Oct, 2018 1 commit
  9. 09 Oct, 2018 1 commit
    • cvet's avatar
      From engine excluded hardcoded specific item protos and item types/components. · 852b8c12
      cvet authored
      New items flags
      bool IsStatic - determine that item not generated and still in single instance for all map instances;
      bool IsWall - determine that is wall for mapper interface, contour drawing, lowest draw order, for correct lighting calculations and minimap;
      bool IsScenery - determine that is scenery for mapper interface, minimap, contour drawing and lowest draw order against other items on hex;
      bool IsCanOpen - engine handles item open/close state and affect bool Opened property (doors and containers);
      bool IsScrollBlock - instead of special hex now used this flag;
      bool IsHiddenPicture - used for hide picture on client but send item, because now IsHidden static items not send to client;
      bool IsTrigger - set this flag for dynamic or static items if you want to catch them in EventItemWalk or EventStaticItemWalk;
      bool IsHiddenInStatic - hide static items in resulted functions like GetStaticItem/GetStaticItems for performance boost.
      
      Properties
      TriggerNum Weapon.Anim1 Grid.ToMap Grid.ToMapEntire Grid.ToMapDir
      are excluded from engine.
      
      Removed following methods
      void Critter::TransitToMap(Map map, hash entire)
      Item Map::GetDoor(uint16 hexX, uint16 hexY)
      uint Map::CountEntire(hash entire) const
      array<hash> Map::GetAllEntires() const
      bool Map::GetEntireCoords(hash entire, uint skip, uint16& hexX, uint16& hexY) const
      bool Map::GetEntireCoords(hash entire, uint skip, uint16& hexX, uint16& hexY, uint8& dir) const
      uint Map::GetEntireCoords(hash entire, array<uint16> hexX, array<uint16> hexY, array<uint8> dirs) const
      bool Map::GetNearEntireCoords(hash& entire, uint16& hexX, uint16& hexY) const
      bool Map::GetNearEntireCoords(hash& entire, uint16& hexX, uint16& hexY, uint8& dir) const
      
      Renamed
      Map::GetScenery -> Map::GetStaticItem
      Map::GetSceneries -> Map::GetStaticItems
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@820 71b6ff52-6597-447a-9a87-58edf7a03249
      852b8c12
  10. 06 Oct, 2018 2 commits
    • cvet's avatar
      Comparison is null and !is null converted to == null and != null. · c19d3d0b
      cvet authored
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@819 71b6ff52-6597-447a-9a87-58edf7a03249
      c19d3d0b
    • cvet's avatar
      Item types moved to components. · 1d14e87c
      cvet authored
      Added new methods with predicate for retrieving items
      funcdef bool ItemPredicate(Item)
      Item Critter::GetItem(ItemPredicate predicate)
      const Item Critter::GetItem(ItemPredicate predicate) const
      array<Item> Critter::GetItems(ItemPredicate predicate)
      array<const Item> Critter::GetItems(ItemPredicate predicate) const
      array<Item> Map::GetItems(ItemPredicate predicate)
      array<const Item> Map::GetItems(ItemPredicate predicate) const
      array<Item> Map::GetItems(uint16 hexX, uint16 hexY, ItemPredicate predicate)
      array<const Item> Map::GetItems(uint16 hexX, uint16 hexY, ItemPredicate predicate) const
      array<Item> Map::GetItems(uint16 hexX, uint16 hexY, uint radius, ItemPredicate predicate)
      array<const Item> Map::GetItems(uint16 hexX, uint16 hexY, uint radius, ItemPredicate predicate) const
      Example: cr.GetItem(function(i){return i.Ammo != null;});
      
      Deleted methods
      Critter::GetItemsByType
      Map::GetItemsByType
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@818 71b6ff52-6597-447a-9a87-58edf7a03249
      1d14e87c
  11. 03 Oct, 2018 1 commit
  12. 27 Sep, 2018 1 commit
    • cvet's avatar
      Fixed working of game time. · 2fc6a717
      cvet authored
      Fixed working of Critter::ViewMap.
      
      Added global variables to determine build where scripts take run
      const bool __DesktopBuild
      const bool __TabletBuild
      const bool __WebBuild
      const bool __WindowsBuild
      const bool __LinuxBuild
      const bool __MacOsBuild
      const bool __AndroidBuild
      const bool __IOsBuild
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@814 71b6ff52-6597-447a-9a87-58edf7a03249
      2fc6a717
  13. 26 Sep, 2018 1 commit
    • cvet's avatar
      Added rendering feature for prerender some graphic to separate surface and... · b7bc980d
      cvet authored
      Added rendering feature for prerender some graphic to separate surface and then draw with some effect.
      New functions
      void ActivateOffscreenSurface(bool forceClear = false)
      void PresentOffscreenSurface(int effectSubtype) - draw whole screen entire
      void PresentOffscreenSurface(int effectSubtype, int x, int y, int w, int h) - draw custom rectangle
      void PresentOffscreenSurface(int effectSubtype, int fromX, int fromY, int fromW, int fromH, int toX, int toY, int toW, int toH) - draw custom rectangle to custom screen place
      Setup effects using function SetEffect( EFFECT_OFFSCREEN, X, ... ) where X is any non negative index witch you pass to present function.
      Example of usage - https://youtu.be/Anat94MEpi8
      
      Fixed effects 'Time' uniform.
      Added OnPostDraw gui callback, called after element (and their children) draw.
      EventRenderIface now not pass layer value, it's single call.
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@813 71b6ff52-6597-447a-9a87-58edf7a03249
      b7bc980d
  14. 23 Sep, 2018 1 commit
  15. 21 Sep, 2018 1 commit
    • cvet's avatar
      Added '#undef' directive. · 9d7a186d
      cvet authored
      Added 'filesystem' script class.
      Fixed 'ModelName' change handling.
      Fixed crash when pressing Maps/Locations in server gui.
      Fixed build pipeline on non Windows machines.
      Fixed scripts loading order for correct defines loading.
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@809 71b6ff52-6597-447a-9a87-58edf7a03249
      9d7a186d
  16. 18 Sep, 2018 1 commit
  17. 10 Sep, 2018 1 commit
  18. 09 Sep, 2017 1 commit
  19. 04 Sep, 2017 1 commit
    • cvet's avatar
      Improved properties component system. · 3872cdbc
      cvet authored
      To declare component use this syntax:
      #pragma property Entity Component ComponentName
      
      Example of declaration:
      #pragma property "Item Component Drug"
      #pragma property "Item Public uint Drug.Duration"
      #pragma property "Item Public bool Drug.IsForFun"
      #pragma property "Item Component Fuel"
      #pragma property "Item Public bool Fuel.IsBio"
      
      And using:
      if( item.Drug != null && item.Drug.IsForFun )
          Log( "Fun drugs!" );
      if( item.Fuel == null )
          return;
      
      For assigning components to entities need type their in proto files
      $Components = Drug Fuel # Special field for describe components list
      IsHidden = false # Regular properties
      Drug.Duration = 100 # Component properties
      Drug.IsForFun = true
      Fuel.IsBio = true
      ...
      
      On this system will be moved item types and different things.
      This useful for grouping variables under one space and restrict accidental access to non correct properties for this entity.
      All possible Ammo_Caliber, Ammo_MaxCount, AmmoCount will be changed to Ammo.Caliber, Ammo.MaxCount, Ammo.Count and etc.
      And if you try access to Ammo.Caliber in item which not contains Ammo component then Null pointer access will happen.
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@794 71b6ff52-6597-447a-9a87-58edf7a03249
      3872cdbc
  20. 02 Sep, 2017 1 commit
  21. 31 Aug, 2017 1 commit
    • cvet's avatar
      Mapper start fix. · 43009312
      cvet authored
      Added script dict string as key.
      Fixed work with corruption of blockers in BlockLines.
      
      Fixed -run option in compiler.
      Workable global functions in compiler run:
      void Assert(bool condition)
      void ThrowException(string message)
      int Random(int min, int max)
      void Log(string text)
      bool StrToInt(string text, int& result)
      bool StrToFloat(string text, float& result)
      uint GetDistantion(uint16 hexX1, uint16 hexY1, uint16 hexX2, uint16 hexY2)
      uint8 GetDirection(uint16 fromHexX, uint16 fromHexY, uint16 toHexX, uint16 toHexY)
      uint8 GetOffsetDir(uint16 fromHexX, uint16 fromHexY, uint16 toHexX, uint16 toHexY, float offset)
      uint GetTick()
      uint GetAngelScriptProperty(int property)
      void SetAngelScriptProperty(int property, uint value)
      hash GetStrHash(string str)
      string GetHashStr(hash h)
      uint DecodeUTF8(string text, uint& length)
      string EncodeUTF8(uint ucs)
      string[] GetFolderFileNames(string path, string extension, bool includeSubdirs)
      bool DeleteFile(string fileName)
      void CreateDirectoryTree(string path)
      string SHA1(string text)
      string SHA2(string text)
      int SystemCall(string command)
      int SystemCall(string command, string& output)
      void OpenLink(string link)
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@791 71b6ff52-6597-447a-9a87-58edf7a03249
      43009312
  22. 29 Aug, 2017 1 commit
    • cvet's avatar
      A lot of refactoring. · 7e295cc6
      cvet authored
      Fix for '_Raw' resources subfolder copying.
      Changing of mapper item properties now give side effects (PicMap, Light*, Block/Shoot flags, etc).
      In Mapper MapperMap class now just Map.
      Added string Map::FileDir property that holds directory of fomap file.
      Excluded Critter::MoveRandom().
      Fixed crashing on non-3d critter loads with enabled 3d rendering.
      Fixed crashing on 3d effect loading from cache.
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@790 71b6ff52-6597-447a-9a87-58edf7a03249
      7e295cc6
  23. 03 Apr, 2017 1 commit
  24. 06 Mar, 2017 1 commit
    • cvet's avatar
      Excluded stuff related to AI. · 2bb22396
      cvet authored
      Added some stuff for control movements:
      void Critter::MoveToCritter(Critter@+ cr, uint cut, bool isRun) - init moving to critter;
      void Critter::MoveToHex(uint16 hexX, uint16 hexY, uint cut, bool isRun) - init moving to hex;
      MovingState Critter::GetMovingState() const - current state;
      void Critter::ResetMovingState(uint& gagId) - reset state to Success and return id of critter/item for GagCritter/GagItem states;
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@786 71b6ff52-6597-447a-9a87-58edf7a03249
      2bb22396
  25. 13 Feb, 2017 1 commit
  26. 10 Feb, 2017 1 commit
  27. 09 Feb, 2017 1 commit
  28. 07 Feb, 2017 1 commit
  29. 01 Feb, 2017 1 commit
  30. 31 Jan, 2017 2 commits
    • cvet's avatar
      Web build index.html patching. · e12fd116
      cvet authored
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@772 71b6ff52-6597-447a-9a87-58edf7a03249
      e12fd116
    • cvet's avatar
      Excluded functions: · 1ee27eb0
      cvet authored
      Critter@+ GetPlayer(string name)
      uint GetPlayerId(string name)
      string GetPlayerName(uint playerId)
      
      Added funtion to retrieve player data, even if he offline:
      const Critter@ GetPlayer(string name)
      
      Added client global variables:
      const bool __IsConnected
      const bool __IsConnecting
      const bool __IsUpdating
      
      Excluded client global variables:
      string __Name
      string __RegName
      string __RegPassword
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@771 71b6ff52-6597-447a-9a87-58edf7a03249
      1ee27eb0
  31. 28 Jan, 2017 1 commit
    • cvet's avatar
      Now player critter after logout going to global map and need restore his place... · e7e2a73f
      cvet authored
      Now player critter after logout going to global map and need restore his place manually when his back.
      Do it in CritterInit callback.
      Added helpers to retrieve last position of player in game before exit:
      uint RefMapId
      hash RefMapPid
      uint RefLocationId
      hash RefLocationPid
      uint RefGlobalMapTripId
      uint RefGlobalMapLeaderId
      
      Deleted stuff related to registration properties, now need provide registration information manually.
      Use Rpc calls functionality.
      
      Changed functions specifications:
      uint CreateLocation(hash locPid, uint16 worldX, uint16 worldY, Critter[] critters) -> Location CreateLocation(hash locPid, uint16 worldX, uint16 worldY, Critter[] critters = null)
      bool Critter::TransitToHex(uint16 hexX, uint16 hexY, uint8 dir) -> void Critter::TransitToHex(uint16 hexX, uint16 hexY, uint8 dir)
      bool Critter::TransitToMap(uint mapId, uint16 hexX, uint16 hexY, uint8 dir) -> void Critter::TransitToMap(Map map, uint16 hexX, uint16 hexY, uint8 dir)
      bool Critter::TransitToMap(uint mapId, hash entire) -> void Critter::TransitToMap(Map map, hash entire)
      bool Critter::TransitToGlobal() -> void Critter::TransitToGlobal()
      bool Critter::TransitToGlobal(Critter[] group) -> void Critter::TransitToGlobal(Critter[] group)
      bool Critter::TransitToGlobalGroup(uint critterId) -> void Critter::TransitToGlobalGroup(Critter leader)
      
      Event where raised exception now automatically returns false.
      
      git-svn-id: https://xp-dev.com/svn/fonline_sdk@770 71b6ff52-6597-447a-9a87-58edf7a03249
      e7e2a73f
  32. 27 Jan, 2017 1 commit
  33. 26 Jan, 2017 2 commits
  34. 25 Jan, 2017 3 commits