"readserverconfigsthread" gets triggered by poll_serverthreads() once a
minute to check the filesizes of all server config files. Altered files
get loaded into memory.
poll_serverthreads() in the main thread then processes the buffered files
one at a time. During processing, a semaphore is locked, so that other
threads can use the data structures derived from config files - if they
use the semaphore to lock the ressource.
Using the data from main thread can be done without using the semaphore,
since _all_ changes are done in the main thread.
If the main thread wants to update data that is locked by a thread, the
main thread will defer the changes for a minute. The main thread will
never lock.
also:
* -Y now sets the private key for the server
* -m without argument uses default masterserver URL
* servers run LAN-only by default (set ms URL and private key to
register with the master)
* use generic locale "POSIX"
almost 3000 lines of "errors" contained one actual memleak, one actually
unused variable and three actual ambiguous code parts
from cppcheck website: "The goal is to detect only real errors in the
code (i.e. have zero false positives)." :)
thx for finding five problems in our code
new tool: list media sources
new stage: check vantage points
new: add single map from menu
new: option to abort maps on stage errors
fixed: make sure, player is alive (to be able to enter edit mode) during
conversions
- copyent and pasteent now also work with the menu list of copied ents
- pressing editmeta while using pasteent opens the menu
- new switch command (not unlike the old one)
- make expandselection and shrinkselection work with multiple selections
DOCREF switch copyent pasteent
newent7 type attr1 attr2 attr3 attr4 attr5 attr6 attr7
Works like newent, but can set all seven attributes directly.
Does not automatically put the camera yaw angle into mapmodel and flag
entities.
fixed selectionwalk so that the first parameter can be ""
DOCREF newent7
- always allow read-only edittextureslot, editmapmodelslot and
editmapsoundslot
- allow setvantagepoint when editing offline or spectating offline
- new var editing_sp: 1 during edit mode in singleplayer (offline)
- additional menus for read-only access to map config slots
- new bonus edit scripts: selectmiddle and unclipentclippedmodels
DOCREF edittextureslot editmapmodelslot editmapsoundslot setvantagepoint
DOCREF editing_sp
menuitemmapload mapname action [hoveraction [desc]]
create menu entry for a map file
menudirlistsub action dots
adds subdirectory entries to a menu with a files list
has to come after the menudirlist command
<action> is the command to be executed, when the menu entry is chosen
if <dots> is 1, an entry ".." is added
enumfiles path [extension]
lists files in a directory
if extension is specified, only files of that extension are listed
if the extension is "dir", only directories are listed
DOCREF menuitemmapload menudirlistsub enumfiles
pressing CTRL+F12 during spectating creates a clean screenshot and saves
it as map preview picture
modkeypressed
returns 1, if a CTRL key is pressed and 0, if not
screenshotpreview [lines]
creates a screenshot cropped to 4:3 with a given number of lines
(in the range of 144 to 480, default 240 or last given value)
and jpeg quality 80
gotovantagepoint
now returns 1, if the map actually has a vantage point set
DOCREF screenshotpreview modkeypressed gotovantagepoint
(editentity, edittextureslot, editmapmodelslot, editmapsoundslot)
the commands are still not allowed to change anything in coop, but
information retrieval is ok
changed commands:
strstr haystack needle
now returns position of needle in haystack (counting from 1)
or zero, if not found
substr string start len
now counts negative length from total length
"substr text 1 -2" now returns the text without first and last char
strreplace text search replace
no longer restricted to 260 char stringlengths
removed commands:
swapelements, strpos (can be scripted, if required)
DOCREF strstr substr
DOCREF swapelements strpos
replace tokens starting with @ during scanning/sizing-up of []-blocks
@word look up word as in $word
@(...) evaluate braces
@[...] evaluate braces and look up result
@"..." parse quotes
in nested []-blocks, use multiple @ to determine time of replacement
(for example, @@@word is replaced when found inside three nested braces)
in regular $-lookup, $[...] now evaluates the braces before lookup
* fix some memory leaks
* rename stuff
* fix crash
Removed commands and variables:
chmenumdl (replaced by menumdl)
scorefont (replaced by "menufont score mono")
menuitemvar (better handled with fully dynamic menus)
Changed commands:
menufont menu font
Sets the font for a specific menu. If menu is "", the currently
initialised menu is used. Example: menufont score mono
menumdl menu mdl anim rotspeed scale
Assumes the function of the previous chmenumdl. If menu is "", the
currently initialised menu is used. Specifies, which model to render
and how. If only menu is specified, no model is rendered.
DOCREF chmenumdl scorefont menufont menumdl menuitemvar
- omit step size for sliders with value descriptions
- optionally auto-determine max value by list length
menuitemslider text min max value display action wrap
menuitemradio text min max value display action
text: menu item text
min: min value
max: max value (or optionally -1 and set by display string length)
value: initial value
display: list of value descriptions or value step size
action: executed on value changes (new value in arg1)
wrap: if 1, wrap slider around (radio buttons always wrap)
DOCREF menuitemslider menuitemradio