Skip to content

API Changes SC 5.13

GeckoN edited this page Jul 19, 2017 · 6 revisions

API Changes:

  • CSurvivalMode is now available to server plugins.
  • CPlayerFuncs::FindPlayerByIndex() function now returns valid pointer only if the given player is actually connected to the server.
  • Added CASSoundEngine::FindMaterialType() function that returns material type for given texture. (issue #24)
  • Added CASConCommandSystem::ServerCommand() - more convenient way of executing custom AS commands from scripts. (issue #21)
  • Added CHAN_MUSIC value to the SOUND_CHANNEL enum.
  • Removed CHAN_NETWORKVOICE_BASE and CHAN_NETWORKVOICE_END from the SOUND_CHANNEL enum.
  • Added overloaded CSoundEngine::PrecacheSound() method that supports sound replacement for entities (issue #28)
  • Added CBaseEntity::IsBreakable() method that can be used to check whether this is a breakable brush entity or not.
  • Exposed CBaseEntity::StartPlayerFollowing() and CBaseEntity::StopPlayerFollowing() methods.
  • Removed CBaseEntity::StopFollowing() method (merged with StopPlayerFollowing()).
  • Optional parameter was added to StartPlayerFollowing()/StopPlayerFollowing() methods and will make the monster start/stop following the player without playing any sentence.
  • string::SetCharAt() is no longer const. (issue #44)
  • Added implicit conversion from char to uint32. (issue #35)
  • Fixed File::ReadLine() not handling CRLF line endings correctly. (issue #43)
  • Added override for IgnoreConditions() to the CBaseCustomMonsterEntity class. (issue #15)
  • CEngine is no longer const, selected members are non-const. (issue #20)
  • Added CEngine::force_retouch. (issue #19)
  • Added MOVE_TYPE enum for MoveToOrigin() movement types. (issue #30)
  • Removed CEngineFuncs::AnimationAutomove(). The corresponding function in the engine is empty. (issue #32)
  • Fixed return type of CEngineFuncs::Voice_GetClientListening() and Voice_SetClientListening(). (issue #33)
  • CCVar constructors now have proper default value for their string arguments. (issue #22)
  • CEntityFuncs methods will now release array references correctly if the array type is invalid. (issue #34)
  • Added missing ItemInfo opAssign method. (issue #37)

Hooks:

  • PlayerUse, PlayerPreThink, PlayerPostThink, GetPlayerSpawnSpot hooks are now available to server plugins.
  • Added PlayerEnteredObserver and PlayerLeftObserver hooks. Available to both - map scripts and server plugins.
  • WeaponPrimaryAttack, WeaponSecondaryAttack and WeaponTertiaryAttack hooks are now available to server plugins.
  • WeaponPrimaryAttack, WeaponSecondaryAttack and WeaponTertiaryAttack hooks - fixed invalid data type being used for the first function argument (caused run-time AS errors when hook arguments were accessed).

API Documentation Changes:

  • The built-in doc. generator now stores values for enum items.
  • The built-in doc. generator now stores document version and game version.
  • Tweaked few documentation strings. (including issue #25)
  • Changed the problematic <br/> and </br> tags in the documentation strings to "\n".

Format of the generated documentation was changed in SC 5.13. If you want to generate your own AS API documentation in HTML format, please use the updated ASDocGenerator utility (sources available here).

Clone this wiki locally