Commit Graph
7594 Commits
Author SHA1 Message Date
ac-stef bb8bfeb752 mute error messages while probing default model skins
Unless otherwise specified in a config file, every model (md2 or md3)
tries to load skin.jpg, skin.png, ../skin.jpg and ../skin.png (in that
order). This commit silences the errors if some of those attempts fail.

There is still an error message, if none of the four files can be found.

The commit also deletes five identical skin.jpg and places one in ../
2016-10-11 21:36:49 +02:00
ac-stef ade460517d reuse skin 2016-10-10 22:18:26 +02:00
aurhat 1d91e49bbe Add high-res player skins
Thanks protox aka PrimoTurbo, the author of the high-res player skins:
http://primoturbo.deviantart.com/art/AssaultCube-Protox-HQ-Reskin-202784715

High-res player skins are added in mod zip package.
They are disabled by default.
2016-10-10 15:57:15 +02:00
ac-stef f7a54907db map fixes
thx BrutalSystem
2016-10-09 00:49:06 +02:00
aurhat 923feb249a Add detection and setting resolution as in desktop
Partially the code is ported from Sauerbraten.
Commit changes also menu items in Display resolutions menu.

DOCREF setdesktopres
2016-10-08 20:40:19 +02:00
aurhat 3c5012e768 Don't check collision during spectating in 1st person view
It fixes the problem, that during spectating in 1st person view,
when spectated player collided (for example with wall) and crouched,
then his crouches weren't visible for player1.
2016-10-08 20:19:57 +02:00
aurhatandac-stef 4858e9db75 Fix displaying stats of previous weapon on the HUD
Earlier if player held grenade in the hands and other player
connected to server and started to spectate him, then this second
player always saw assault rifle stats on the HUD as previously
selected weapon. It happens, because new client doesn't know, what
was previous weapon of players on the server, which didn't switch
yet weapon after its connection, so GUN_ASSAULT is set by default.
So if first player used for e.g. sniper rifle, then displayed ammo
stats were 0/0. Now then are displayed stats of primary weapon.
2016-10-08 17:17:37 +02:00
ac-stef bc57ac2360 map fixes
thx BrutalSystem
2016-10-08 00:28:33 +02:00
ac-stef 245c0f4c56 map fixes 2016-10-04 22:05:17 +02:00
ac-stef 2436478c64 add new protocol data type for asymmetric small integers
best suited for values ranging from -1 to 252
2016-10-02 12:59:25 +02:00
aurhatandac-stef ab27d952d6 Adjust in-game menus
Introduced common parts of In-game and In-game admin menus, fixed showing
player skin in In-game admin menu (thx BrutalSystem).
2016-10-01 22:03:55 +02:00
ac-stef 07d9ae608d fix menuinitselection for dynamic menus
If a menu is not (yet) big enough for the selection to be set, wait until
the menu is opened and initialised - then try again.
2016-10-01 20:08:25 +02:00
ac-stef 13e6460ff3 set lastmenu during execution of menuinit script 2016-10-01 16:51:25 +02:00
ac-stef d56d8f91b6 fix restricting watercolour
get coal down from 213 to 91 clipped entities
2016-09-28 16:22:11 +02:00
ac-stef 5ba5d1b4b3 optionally show media origin in slot lists 2016-09-26 22:45:34 +02:00
ac-stef 18375a7c18 sort shadow entities behind lights
- restrict watercolour to edit mode
- some map fixes
- add dev_coal
2016-09-25 16:07:06 +02:00
ac-stef 9afca836c9 cleanup
bring clang (and g++) back to O3
cleanup jpegenc error handling
2016-09-19 18:16:19 +02:00
ac-stef efc04fe2dc fix rendering of very long ladder entities
and print more helpful error messages on entity attribute import overflows
2016-09-18 21:11:04 +02:00
ac-stef c66f846cf0 better selection handling for arch and slope placement
enlargearchslopeselections

  If the variable is set to 1, after placing an arch or a slope, the
  selection is enlarged, so that the arch or slope can be changed by
  vdelta increments (for example, to raise an arch in 1/4 cube increments).
  This is also the classic behaviour.
  If the variable is set to 0 (which is now default), the selection remains
  unchanged. This way, for example, the arch can be raised or lowered by
  regular cube increments.
  The arch menu allows changing the setting and also contains a script to
  enlarge the selections once.

pushselections

  New script to store the positions of all current selections. Can be used
  repeatedly. To restore the selections, type "popselections".

enlargevdeltaselections

  Enlarges all selections by one cube in x- and y- direction, to change a
  selection from the "cube area" to the "vdelta area".
  If an argument is given, it is used as increment value, so, for example
  "enlargevdeltaselections -1" undoes a previous enlargement.

DOCREF enlargearchslopeselections pushselections enlargevdeltaselections
2016-09-18 17:13:24 +02:00
ac-stef a291b74504 take measurements to create arch prefabs from existing maps
The arch menu now allows

 * editing all vertices instead of only half of them, for non-symmetrical
   arches
 * deleting saved custom arches
 * using custom arches for other widths than what they were created for
 * measuring an arch on a map and creating a prefab of it

Scripts:

av_measure

  "echo (av_measure)" prints the list of vdelta values of a selected arch.
  Only works as expected, if the selection is only 1 cube wide. To use the
  measurements to create a width 8 arch, select 8x1 cubes under the arch
  to copy and type "av 8 (av_measure)". Or use the menu.

av width-1 vdelta_list

  One of the oldest scripts of the game (and because of that, the first
  argument stayed "arch width minus one", for compatibility reasons).
  Creates a prefab arch of the desired width. If the list has exactly
  as many entries as required, all of them are used to create the prefab -
  this is the way the script has always worked.
  If there are too few or too many elements in the list, the script will
  try to take half the required values from the list and mirror the other
  half to create a symmetrical arch. This way, a list can be used for
  slightly wider or narrower archs. Or use the menu.
2016-09-18 00:22:27 +02:00
ac-stef aca74e1b59 allow copy, paste, undo, redo and selectionwalk in coop edit
limited to selection areas of at max 4096 cubes, which is 64x64 cubes
2016-09-17 22:11:07 +02:00
ac-stef 27c8f43711 add zipped message packets 2016-09-17 22:11:07 +02:00
aurhat 9e521dfd4a Fix setting random skin of RVSF bots
Also improve assignment bots to teams.
2016-09-17 18:25:33 +02:00
ac-stef 925645ecb3 new custom arch prefab editor
The menu lists all prefab arches and allows to edit them with sliders.
Arches can be saved and restored.

"archvertex" now returns the old value of the vertex, and if the vertex
argument is omitted, doesn't change it.

enumalias prefix

  Lists all persistent aliases that start with prefix. Returns a table
  with two entries per alias: 1) full name and 2) name without prefix

DOCREF archvertex enumalias
2016-09-17 01:01:40 +02:00
ac-stef dae7773d68 fix involuntary shooting when switching guns while throwing a nade
also: more aggressive middle mouse button
2016-09-16 21:08:48 +02:00
ac-stef 397c441fed more verbose error messages for disabled commands 2016-09-16 17:35:47 +02:00
ac-stef fc3c77868f add hardcoded stairs command for coop
stairs xs ys

  Places stairs in all selections. xs and ys determine the step width
  in x- and y-direction.

DOCREF stairs
2016-09-16 14:06:27 +02:00
ac-stef 4dc54e22b5 allow more edit commands in coop edit
The edit protocol now allows the following commands in multiplayer:

  arch, slope, edittag, edittagclip, selectionrotate, selectionflip

also:

  mapenlarge has been limited to size 10 in multiplayer

  entitiy undelete in multiplayer has been fixed

SV_EDITS, SV_EDITD and SV_EDITE are to be cleaned up with a protocol bump

DOCREF arch slope edittag edittagclip selectionrotate selectionflip
2016-09-16 14:06:27 +02:00
ac-stef 815f4aa764 add selectall command
selectall

  selects the whole map (minus the two cubes wide border)

DOCREF selectall
2016-09-16 14:06:26 +02:00
ac-stef c5904dc065 add stairs to edit menu 2016-09-16 14:06:26 +02:00
ac-stef 6b15891cfd undo changes back to a specific state
undolevel <level>

  Returns the number of undo steps that can be undone. If argument "level"
  is given, as many steps are undone, until "level" steps remain.

Example, during editing:

  echo (undolevel)
    prints number of previous editing steps, for example "55"

  ... do some editing ...

  undolevel 55
    undoes all changes to restore the previous state (if that state
    is still in memory... keep in mind, undo-space is limited, see
    "undomegs" parameter)

  Unless memory limits delete states, undolevel commands can be undone
  with "redo".

DOCREF undolevel
2016-09-16 14:06:26 +02:00
ac-stef 96a028c263 guess height for selections set by command 2016-09-15 18:15:51 +02:00
ac-stef 1b8eeac7ce font fixes 2016-09-14 20:35:13 +02:00
ac-stef 643328b5a1 properly compress chars_default.png
thx BrutalSystem
2016-09-13 21:28:47 +02:00
ac-stef 1a482e5394 final corner physics fix
if corner sliding doesn't work, try x- and y-slides as well
2016-09-13 21:17:07 +02:00
ac-stef a976e5b4ba map fix 2016-09-11 11:17:25 +02:00
ac-stef 29a3970b72 fix flyspeed
and a compiler optimisation error

(for clang >= 4, O3 may be reactivated in the makefile)
2016-09-09 22:22:55 +02:00
ac-stef 588e9f9de8 some fixes for OSX 2016-09-08 22:36:46 +02:00
ac-stef 123e2b2b12 cleanup 2016-09-08 01:20:45 +02:00
ac-stef 423df0c66f omit "./" prefix from media file paths in map config files
Ignore it, if "./" prefixes a media path given with a texture, mapmodel
or mapsound command. It's useless and prevents comparing path names.
2016-09-06 19:15:26 +02:00
ac-stef a5470d5ea0 really clear all binds during "resetbinds"
including self-assigned ones

_resetallbinds

  Clears _all_ binds for all keys and all modes. Do not use the command
  manually.

DOCREF _resetallbinds
2016-09-06 18:43:37 +02:00
ac-stef 27754f4a9b cleanup 2016-09-06 17:17:38 +02:00
ac-stef 40e8b1cf5e some map fixes 2016-09-05 20:42:56 +02:00
ac-stef 6de0af1b6f disable water reflection in editmode
with enabled reflection, the editing grid is not visible through the
water surface

as a side-effect also fixes #71
2016-09-04 22:00:57 +02:00
ac-stef cb630bde49 add per-map overrides to disable graphics features
The mapper has now the choice to disable several graphics features on
the client (for his map only, of course). The overrides are stored in
the map header.

mapoverride_nowaterreflect

  If "1", water reflection is disabled. Useful, when odd water colours
  are used to emulate other liquids that are not supposed to be that
  reflective.

mapoverride_limitwaveheight

  If "1", waveheight is capped at 0.1 max. Useful for small water
  areas (like puddles), where higher waves would look weird.

mapoverride_nostencilshadows

  If "1", stencil shadows are disabled. On clients, where stencil shadows
  are otherwise enabled, blob shadows are used instead. If shadows are
  disabled anyway, they stay disabled. Useful for dim maps, where hard
  shadows make no sense.


The player is free to ignore any of those overrides:

ignoreoverride_nowaterreflect

  If "1", mapoverride_nowaterreflect is ignored and regular client
  settings are used.

ignoreoverride_limitwaveheight

  If "1", mapoverride_limitwaveheight is ignored, and "waveheight" is
  used unchanged.

ignoreoverride_nostencilshadows

  If "1", mapoverride_nostencilshadows is ignored.


DOCREF mapoverride_nowaterreflect ignoreoverride_nowaterreflect
DOCREF mapoverride_limitwaveheight ignoreoverride_limitwaveheight
DOCREF mapoverride_nostencilshadows ignoreoverride_nostencilshadows
2016-09-04 17:44:22 +02:00
ac-stef bc2a091f95 show map timestamp in map info menu
also: more stuff in the map settings menu

getmaptimestamp fmt

  Returns the "last written" timestamp of the current map in the requested
  format. If fmt starts with "U", the time is given as UTC, otherwise
  as local time. If fmt is empty, or not given or just the "U", the format
  defaults to "YYYYMMDD_hh.mm.ss". Use "%c" to get something nicer.

DOCREF getmaptimestamp
2016-09-04 15:00:00 +02:00
ac-stef c7c02521ad add thread-safe variant of timestring() 2016-09-04 13:45:14 +02:00
ac-stef 9852b98bf3 unify screenshot code
no need to have the same code three times

also: have jpegenc use our stream lib
2016-09-04 04:42:59 +02:00
ac-stef 07b34ce42c fix mapshots
png and bmp images were mirrored

fix mapshot paths

fix jpeg crash on file creation failure
2016-09-04 01:50:53 +02:00
ac-stef ac4e2e60b4 optimised dev_dusk
* heightfield render errors fixed
* model-clipping simplified
* shadowyaw changed a little to avoid ugly artifacts
2016-09-04 00:52:20 +02:00