On the night of October 23, Valve released an update for Counter-Strike 2 that included changes to map scripting and fixed several critical bugs that were causing the game client to crash.
List of Changes
Map Scripting
-
Added the Instance function.
- Precache Returns a CSPrecache object.
- Added the CSPrecache.IsServerLoading function.
- Added the CSPrecache.IsServerLoaded function.
- Added the CSPrecache.IsClientLoading function.
- Added the CSPrecache.IsClientLoaded function.
- Added the CSPrecache.IsLoadedForAll method.
- Added the CSPrecache.Release function.
-
Added the CSHostage class.
- Added the CSHostage.IsBeingPickedUp function.
- Added the CSHostage.IsBeingCarried function.
- Added the CSHostage.IsRescued function.
- Added the CSHostage.GetRescuer function.
- Added the CSHostage.GetPickUpStartTime function.
- Added the CSHostage.GetPickUpFinishTime function.
- Added the CSPlayerPawn.GetHostage function.
- Added the Instance.OnHostagePickUpStart function.
- Added the Instance.OnHostagePickUpAbort function.
- Added the Instance.OnHostagePickUp function.
- Added the Instance.OnHostageDrop function.
- Added the Instance.OnHostageRescue function.
- Added the Instance.OnHostageKill function.
-
Added a new top-level export, Console.
- Added the Console.GetConvarBoolean function.
- Added the Console.GetConvarNumber function.
- Added the Console.GetConvarString function.
- Added the Console.GetConvarVector function.
- Added the Console.GetConvarQAngle function.
- Added the Console.GetConvarColor function.
- Added the Console.SetConvar function. The Console.SetConvar function is not restricted by the sv_cheats parameter and runs synchronously.
- The Instance.Msg function has been renamed to Console.Log.
- The Instance.ClientCommand, ServerCommand, and RegisterCheatCommand functions have been moved to Console.
-
Added a new top-level export, `GameRule`.
- Added the GameRules.StartWarmup function.
- The GameRules.EndWarmup function has been added.
- The GameRules.GetTeamScore function has been added.
- Added the GameRules.AddTeamScore function.
- Added the GameRules.TerminateRound function.
- The functions Instance.IsWarmupPeriod, IsFreezePeriod, IsTeamIntroPeriod, GetRoundsPlayed, GetRoundRemainingTime, SetRoundRemainingTime, and AddTeamMoney have been moved to GameRules.
- The moved and renamed methods are still accessible via their old paths, but are now considered deprecated
- Added custom top-level interface layout classes HUD_TEAMMENU_VISIBLE and HUD_CHAT_VISIBLE.
- The “radar_element” can now be displayed on the radar in all game modes, not just Rush.
- Added support for the GameRules.AddTeamMoney function with the CSTeamMoneyReason.NONE parameter and a specified amount.
- Fixed a critical crash in GameRules.AddTeamMoney with the CSTeamMoneyReason.NONE parameter.
- Fixed the enum values for CSTeamMoneyReason that did not match the point_script.d.ts file.
- Fixed CSWeaponAttackType enumeration values that did not match the point_script.d.ts file.
- Fixed the CSRadarPoint.IsVisibleToTeam function, which was returning a number instead of a boolean value.
- Fixed the CSObservablePoint.IsObservableForTeam function, which was returning a number instead of a boolean.
- Logged warnings now include the JavaScript call stack.
- Logged warnings now include detailed information about invalid argument values.
- Logged warnings now count the number of arguments starting from 0 instead of 1.
- Autocomplete for the `map_workshop` command has been improved.
The previous Counter-Strike 2 update was released on October 15. Overnight, the developers released a patch that included changes to the client and game server libraries for Windows and Linux, as well as to the digital signature file.