Get it from vsync.de: http://spring.vsync.de/luaManager/index.php#84
This widget allows you to broadcast your camera position to allies and/or specs, and to lock your camera to anyone else broadcasting using this widget.
Note on version numbers: Major version changes (the first number) will not be compatible, except v0.X is compatible with v1.X. Likewise, any versions with the same major version number are compatible. I may make v3.X when null characters work with LuaMsg.
Changelog
v2.91
Added the explicit L to "LockCamera". Happy now?
Fixed a misspelling with free camera (was causing bad packets).
Some other stuff I don't remember.
v2.7
Dark-colored players have light background; decodes all message for more responsive switching.
v2.5
Now broadcasts a packet to indicate transmission has stopped. This does not break compatibility, although older versions will treat this as a bad packet, and they do not send such packets.
v2.4
Added command /luaui lockcamera_interval [number] to set broadcast interval (minimum 0.25 s). Saves between games. Default is 1 s. This used to be 0.5s; hopefully this will make it less twitchy as well as reducing network traffic.
v2.3
No longer highlights/tooltips when closed.
Title bar now highlights instead of refresh button when closed.
Recent broadcaster time increased to 30s (from 10s).
v2.2
Enabled by default again.
Now highlights the component your mouse is over.
Players are now displayed in color.
Background is now more opaque.
Refresh button highlights in yellow if there are new broadcasters since last refresh.
Currently locked player always shows on list, even if they have not broadcasted recently.
v2.1
Fixed some issues in the custom floating-point representation.
v2.0
New EXPERIMENTAL version. NOT COMPATIBLE WITH VERSIONS 0.X or 1.X. This one uses compression, hopefully reducing packet sizes tenfold or so. Disabled by default since it is likely buggy. Layer is now -5, so you can move it off of Advanced Players List.
v1.6
Fixed a crashbug.
v1.5
No longer sends duplicate packets.
v1.4
Starts closed when player, open when spec.
Separate broadcast settings for players and specs. Default: only broadcast to specs and only as player. Still saves settings.
v1.3
Enabled by default.
Fixed some lock/unlock bugs.
v1.2
Added tooltips. Now automatically refreshes list on game start.
v1.1
Bugfix, hopefully you can actually lock camera now.
Clicking on the name of the player you are already locked to or your own name will unlock your camera.
v1.0
Basic GUI. Probably buggy.
v0.3
Fixed crash when invalid team is specified in specteam.
v0.2
Increased transition time a little, hopefully this will make the camera smoother.
Now broadcasts by default.
Added new command lockcamera_specteam, this works like the standard specteam command but it locks the camera as well.
v0.1
First forum release.
Thanks to MidKnight and rakhim for testing.
Thanks to jK, det, and aegis for getting me started with packet size reduction.
Use the GUI, or the following commands:
/luaui lockcamera_interval [number] to set broadcast interval (minimum 0.25 s).
/luaui lockcamera_broadcastallies to toggle broadcasting to allies. Defaults to true, is saved across games.
/luaui lockcamera_broadcastspecs to toggle broadcasting to specs. Defaults to true, is saved across games.
/luaui lockcamera_list to list recent broadcasters.
/luaui lockcamera [number|name] to lock camera to that player (to unlock camera, don't provide a number/name).
/luaui lockcamera_specteam [number] to specteam and lock camera.
/luaui lockcamera_gui to toggle GUI.
Put this in uikeys.txt to replace normal /specteam:
Code: Select all
unbind 1 specteam 0
unbind 2 specteam 1
unbind 3 specteam 2
unbind 4 specteam 3
unbind 5 specteam 4
unbind 6 specteam 5
unbind 7 specteam 6
unbind 8 specteam 7
unbind 9 specteam 8
unbind 0 specteam 9
unbind Ctrl+1 specteam 10
unbind Ctrl+2 specteam 11
unbind Ctrl+3 specteam 12
unbind Ctrl+4 specteam 13
unbind Ctrl+5 specteam 14
unbind Ctrl+6 specteam 15
unbind Ctrl+7 specteam 16
unbind Ctrl+8 specteam 17
unbind Ctrl+9 specteam 18
unbind Ctrl+0 specteam 19
bind 1 luaui lockcamera_specteam 0
bind 2 luaui lockcamera_specteam 1
bind 3 luaui lockcamera_specteam 2
bind 4 luaui lockcamera_specteam 3
bind 5 luaui lockcamera_specteam 4
bind 6 luaui lockcamera_specteam 5
bind 7 luaui lockcamera_specteam 6
bind 8 luaui lockcamera_specteam 7
bind 9 luaui lockcamera_specteam 8
bind 0 luaui lockcamera_specteam 9
bind Ctrl+1 luaui lockcamera_specteam 10
bind Ctrl+2 luaui lockcamera_specteam 11
bind Ctrl+3 luaui lockcamera_specteam 12
bind Ctrl+4 luaui lockcamera_specteam 13
bind Ctrl+5 luaui lockcamera_specteam 14
bind Ctrl+6 luaui lockcamera_specteam 15
bind Ctrl+7 luaui lockcamera_specteam 16
bind Ctrl+8 luaui lockcamera_specteam 17
bind Ctrl+9 luaui lockcamera_specteam 18
bind Ctrl+0 luaui lockcamera_specteam 19
Dev Notes
As with all of my widgets, several of the major config variables are at the top. You can change the packet header, but you can't communicate with anybody with a different header. I used custom pack/unpacks to a) save on packet size, since it is not essential that camera positions are really precise, and b) to get past null-unsafeness, which has since been fixed. I won't update the format unless I have another reason besides the new null-safeness, though, since my hack to get past it only affects roughly one out of every 256 packets, and even then it only results in a error of 1 part in 256.