(http://static.jc-mp.com/img/logo.png)
0.1.2 Release
23rd January 2014 08:00 UTC
Key Information
General
As this update is quite large, we're giving early access to the 0.1.2 client and server in the Steam publicbeta branch in the Betas tab for testing. Do not switch to this branch unless you are willing to actively help find issues and prepare your scripts for the release. If you don't know how to switch to the branch, we advise you wait for the official release.
Note that this will lock you out of all 0.1.1 servers; if you need to regain access, simply switch back to "NONE - Opt out of all beta programs."
Server Owners
As of 0.1.2, the PlayerStreamDistance, VehicleStreamDistance, and CheckpointStreamDistance values in config.lua have been merged into one StreamDistance variable. The CellSize variable has been removed in favor of deducing it from the StreamDistance variable. If you have made changes to these variables, make sure to update your config appropriately, or it will use default values.
For example, the Streamer section of your config.lua may have looked like this (not including comments):
Streamer =
{
PlayerStreamDistance = 500,
VehicleStreamDistance = 500,
CheckpointStreamDistance = 500,
CellSize = 512
}
It should be changed to this:
Streamer =
{
-- The default distance before objects are streamed out.
-- Default value (in metres): 500
StreamDistance = 500
}
If you haven't changed the values, it is still advisable you update the Streamer section for compatibility.
Server Owners and Scripters
This update will remove the FireRegisteredEvent, Register and Unregister functions that were deprecated as of 0.1.1. You must remove these from your scripts to ensure that your scripts will run with 0.1.2.
All of the default scripts have been updated to fix this; if you are using them, you can copy them from the default_scripts folder or from GitHub (https://github.com/jc2mp).
Otherwise, to manually update your scripts, simply find and replace "Events:FireRegisteredEvent" to "Events:Fire" and remove any lines with "Events:Register" and "Events:Unregister" in them, so that (for example) this script:
Events:Register( "JoinGamemode" )
Events:Subscribe( "JoinGamemode", JoinGamemode )
function SomeFunction( player )
Events:FireRegisteredEvent( "JoinGamemode", player )
end
Events:Unregister( "JoinGamemode" )
will become
Events:Subscribe( "JoinGamemode", JoinGamemode )
function SomeFunction( player )
Events:Fire( "JoinGamemode", player )
end
0.1.2 Changelog
Object Spawning
Unleash the true potential of JC2-MP scripting!
(http://static.jc-mp.com/images/012_announce/objects.png) (http://static.jc-mp.com/images/012_announce/objects.png)
It's finally here! We've added the ability to spawn any model from the game, giving scripters an opportunity to massively extend Panau with their own crazy creations. The majority of JC2 models are spawnable; will you be the first to create a majestic city in the sky? Or will you be the first to create a stunt server filled with insane ramps and loops? The potential lies in your hands!
To help you find models for use on a server, Trix has put together a model viewer script for 0.1.2 which you can find here (https://github.com/trixnz/jc2mp-model-viewer). Please note it is meant for development purposes only; unless you're a scripter in need of models, don't run it on your server.
Work-in-progress documentation for object spawning can be found here (http://wiki.jc-mp.com/Lua/Server/StaticObject).
Highlighted Servers
Check out the servers of the week!
(http://static.jc-mp.com/images/012_announce/highlighted_servers.png) (http://static.jc-mp.com/images/012_announce/highlighted_servers.png)
We've noticed that some of the more exotic, interesting servers aren't getting all the attention they deserve; to help remedy this, we've chosen to highlight these servers and rotate through them on a regular basis. You can apply for your server to be highlighted here (http://www.jc-mp.com/forums/index.php/topic,4445.0.html).
To start off, we've decided to highlight the excellent Battle for Panau (http://www.jc-mp.com/forums/index.php/topic,3787.0.html) and Real Life (http://www.jc-mp.com/forums/index.php/topic,2919.0.html) servers as we feel these are an excellent example of how we'd like JC2-MP to develop going forward. Think you've got something equally as promising coming up? Let us know!
New Features
Shared
Reenabled Lua's debug functions
Removed Events functions: FireRegisteredEvent, Register and Unregister
Added (websafe) constants to Color
Added common vector constants
Added Transform2:Invert and Transform3:Invert
Added StaticObject, allowing you to spawn most objects from the game
Server
Replaced OGP with GameSpy4 query protocol, making it possible to connect to a server when Announce = false, as well as improving server stability
Added Player:GetIP
Unhandled packet warnings now print the source IP address
Added Console:Run under IKnowWhatImDoing, allowing scripts to run console commands
Added the PlayerWorldChange Lua event
Removed CellSize in config.lua; merged PlayerStreamDistance, VehicleStreamDistance and CheckpointStreamDistance into one StreamDistance variable
Client
Added highlighted servers
Added BaseWindow functions SetWidth, SetHeight, GetWidth, GetHeight, RelativeToAbsolute and AbsoluteToRelative
Added Label functions GetTextSize and SetTextSize
Added TableRow functions (Get/Set) BackgroundEvenColor, BackgroundOddColor, BackgroundHoverColor, BackgroundEvenSelectedColor, BackgroundOddSelectedColor
Added the LocalPlayerWorldChange Lua event
Added BaseWindow:Subscribe with the events HoverEnter, HoverLeave, Focus, Blur, PreRender, Render, and PostRender
Added Render:SetClip
Added the MouseUp Lua event
Added Game:GetTime to get the time of the current world
Bug Fixes
Shared
Attempting to access invalid static Lua class variables now returns nil instead of erroring
Changed static gettable for Lua classes to also return instance methods; i.e. you can get Player.SendChatMessage without requiring an actual player
Fixed Vector2 and Vector3 default constructors having uninitialised components
Time is now properly synced across all worlds, not just DefaultWorld; clients also receive the time every 30 seconds to prevent drift
Server
IKnowWhatImDoing now unlocks more, including os and io functions
Client
Fixed a very prevalent crash related to invalid data being passed into JC2's landscape code
Fixed crash when unloading a module with a modal window
Player is now made vulnerable after disconnecting from a server
Fixed passing LocalPlayer through Events:Fire not working
Fixed (parent, name) GWEN constructors not applying the name
Changed default server browser sort to lowest ping
Fixed vehicles sometimes becoming invulnerable when being repaired
Fixed sometimes dying inside terrain after CalcView reenables the local player
Fixed Window:DisableResizing not working
Clamped font size from 0 to 512
Increased font size on main menu
Menu/console windows are now resized on resolution change
Changed GWEN Slider background line to white to improve visibility
Fixed ProgressBar:SetCycleSpeed not updating the auto label
Fixed BaseWindow:__eq being undefined
Fixed scrollbar being invisible in a GWEN Tree
Fixed infinite loop in GWEN when labels with word wrap are too small
Fixed labels with word wrap not being docked correctly
Fixed cursor not showing up for all corners of a window
Looking forward to seeing how every server grows from here; can't wait to pop in and check them out! :)