Commit Graph
7495 Commits
Author SHA1 Message Date
ac-stef b080d634fc add memory-heavy key derivation function
* basically a hash function that delivers keylen bytes calculated
  from password and salt
* uses a lot of memory and a quite complex algorithm, to make
  brute-force offline-attacks on short passwords as hard as possible
* last line of defense against "evil little brothers"
2016-08-26 14:28:53 +02:00
ac-stef 8c7baa979c add SHA512 hash function and an entropy collector
SHA512 was adapted from a few public domain sources and pseudocode from
wikipedia. The entropy collector gathers entropy from keyboard events and
mouse movement - and, just for fun, from screenshots.
The entropy pool is saved at program exit and reloaded at program start.
Entropy is used to re-seed the pseudorandom generator (not that it would
make a difference).
2016-08-26 14:28:53 +02:00
ac-stef a45d926919 remove current auth system
* fix tiger hash for bigendian (we use the byte output, not the chunks)
* remove all ECC functions and comment out all calls to it
2016-08-26 14:28:53 +02:00
ac-stef 9230561697 remove illegal chars from map config files
from now on, the server's going to be very pedantic about this...
2016-08-26 14:28:53 +02:00
ac-stef 652a097c91 sync worker threads with mainloop 2016-08-26 14:28:53 +02:00
ac-stef 89f1f69eec readmapsthread
server: load all maps into memory, scan for more maps
in the background
2016-08-26 14:27:51 +02:00
ac-stef c70808e5a4 more detailed entstats
Shows some results of the new map quality checks. tbc
2016-08-26 14:08:56 +02:00
ac-stef 6454a645ae new map checks and statistics menu
Visualise the results of "mapareacheck".
2016-08-26 14:08:56 +02:00
ac-stef 084be76825 new command mapareacheck
Calculate some key values to determine map geometry viability.

mapareacheck <what>
  Returns different sets of statistics, depending on the keyword "what":

  vdelta
    Returns table of numbers of cubes within a certain range of vdelta
    differences (steepness)". First entry is "0..2 cubes steep", next is
    "2..4" and so on.

  steepest
    Returns the coordinates of the steepest heightfield cube.

  total
    Returns the number of non-solid cubes on the map.

  pprest
    Returns the number of cubes _not_ visible from one of the probe
    positions.

  pp (default)
    Returns a table of all (currently 64) probe points of the map. Each
    probe point is listed with:
      - x-coordinate
      - y-coordinate
      - floor height
      - area visible
      - volume of visible area
      - average height in visible area

DOCREF mapareacheck
2016-08-26 14:08:56 +02:00
ac-stef 77b7e9bb87 new entity type "dummy"
Adds a new entity type for use in scripts. The entity does not affect
rendering or physics and is not saved to map files.
2016-08-26 14:08:56 +02:00
ac-stef a33577c039 sort mapmodel entities during map save
* sort colored lights behind white ones to avoid a light bug
* sort all clipped entities to the end of the list to speed up physics
* sort all pickups and playerstarts to use smaller index numbers to
  use less bandwidth
2016-08-26 14:08:55 +02:00
ac-stef c54eb7f173 calcmapareastats()
new metrics to assess map geometry
2016-08-26 14:08:55 +02:00
ac-stef e1ce0979d0 rewrite calculation of map geometry bounding box
and rename client-side struct "mapdims" to clmapdims (to avoid confusion
with server-side data)
2016-08-26 14:08:55 +02:00
ac-stef 48e2ce3863 new command sortmapsoundslots
...and some options for sortmapmodelslots and sorttextureslots

All three commands now accept three modifier keywords as arguments:
  nosort     do not sort the list alphabetically
  nomerge    do not merge any slots
  mergeused  merge used and unused (identical) slots freely
By default, the list is sorted and only unused identical slots are merged.
The keywords can be combined in any order. "nomerge" takes priority over
"mergeused".

Examples:

  sortmapmodelslots
    Sort the mapmodel slot list alphabetically and merge unused identical
    slots. Merging an unused slot is pretty much the same as deleting it,
    so this command sorts the list and removes unneeded double entries.

  sortmapmodelslots nosort
    Merges (deletes) unused double entries in the mapmodel slot list.

  sorttextureslots nosort mergeused
    Merges double entries in the texture slot list. If two identical
    entries are used in the map, all uses are mapped to the new combined
    slot. This leaves no visual changes on the map. Should be avoided, if
    texture slots have been renamed manually - and the the renaming isn't
    finished yet.

  sortmapsoundslots mergeused
    Sorts the mapsound slot list and merges all double entries.

DOCREF sortmapmodelslots sorttextureslots sortmapsoundslots
2016-08-25 11:48:45 +02:00
ac-stef 2ebf328bb8 limit number of mapsound slots
(hardcoded)

no reason why we need more mapsound slots than texture and mapmodel slots
combined...
2016-08-25 00:55:04 +02:00
ac-stef 71c65c90ca fix lighting error on edifice
16x16 mip doesn't render properly - had to break it up

thx BrutalSystem
2016-08-24 19:13:16 +02:00
ac-stef a4e84cbf20 cleanup 2016-08-24 12:38:33 +02:00
ac-stef 5813fd4e02 fix corner bounces
try really hard to avoid the seams between corner cubes

possibly overkill, but it's working...
2016-08-23 18:47:40 +02:00
ac-stef 5561d78f05 reduce bumps during cornerslide
backpedal 1/42 of a microstep to get out of the way of rounding errors

(clip ents are not supposed to have seams, but at least GCC builds
with -O3 seem to also require a little here - so, 1/333 for clips)
2016-08-23 18:46:27 +02:00
ac-stef 42cbd10e1d fix cornerslide speed
instead of using a constant (and always wrong) speed, use the same part
of the movement vector that x- and y- slides use

(sadly, this fix seems to raise problems with the previous "fix sliding
along corners" commit, which seems to have liked the constant speed...)
2016-08-23 11:44:09 +02:00
ac-stef af1144b45d optionally show ladder entities in edit mode
If enabled, render ladder entities as blue wireframes.


DOCREF showladderentities
2016-08-23 00:42:00 +02:00
Alejandro V. Garciaandaurhat c1252941ba Add missing mapmodel
Supplement to ace4d2b
2016-08-22 23:04:35 +02:00
ac-stef bffb588ba9 cleanup physics
should not break anything
2016-08-22 18:12:33 +02:00
ac-stef 7f0eb74f1c fix sliding along corners
fixes getting "stuck" while sliding along a 45° wall made out of
single corner cubes (most of the time)
2016-08-22 17:02:59 +02:00
ac-stef 50764a86cf fix rotated clip entity collision checks
* properly rotate the player hitbox
* add "corner bounce" (doesn't work flawlessly - but it's probably as
  good as possible with this kind of physics engine)
2016-08-22 16:24:34 +02:00
ac-stef 612a6291f1 new command sortmapmodelslots
* sorts all mapmodel slots alphabetically
* combines (merges) slots with the same model and parameters

DOCREF sortmapmodelslots
2016-08-22 15:08:20 +02:00
ac-stef a8c06d1510 new command sorttextureslots
* sorts all (but the first five) slots alphabetically
* combines slots with the same texture and scale factor

DOCREF sorttextureslots
2016-08-22 15:08:20 +02:00
ac-stef 4df01cbd06 fix restoring xmaps 2016-08-22 15:08:20 +02:00
ac-stef 6c5bf68921 show model preview in "Edit mapmodel slots" menu 2016-08-22 15:08:20 +02:00
ac-stef 71132e3d35 escape dollar chars in strings
not escape the char, but trigger the quotes, actually
2016-08-22 15:08:20 +02:00
ac-stef 97c21ea044 new keybind to scroll the console by mousewheel
(for now) by default bound to the '#'-key (and backslash)

Press and hold the '#'-key and scroll the wheel to scroll console.
Just pressing and releasing '#' resets the console position.

Without the console open, releasing '#' always resets the console position.
2016-08-22 15:08:20 +02:00
ac-stef 8b9bdfa3e4 fix texlists in edited official maps
copied, cleaned and sorted the texlists from ac_* to dev_* maps
(to fix nonsense lists, created by incomplete texture slot delete code)
2016-08-20 14:49:51 +02:00
ac-stef d5bd896189 properly adjust texlists when deleting texture slots
check texlists during save (and print warning, if errors were corrected)

also add (undocumented) command to patch messed up texlists
2016-08-20 14:45:41 +02:00
ac-stef d48675911f fix too thin walls on several maps
one more too thin wall, on ac_shine at pos (87|163) can't be fixed
without visual changes

thx Robtics
2016-08-18 17:29:04 +02:00
ac-stef 9f284ac746 fix rendering error on ac_outpost 2016-08-16 23:09:15 +02:00
ac-stef c18306da1c fix buffer overread in jpeg encoder
for image resolutions not divisible by 8
pad with black area
2016-08-16 23:06:29 +02:00
ac-stef 0fd9603dcc switch to connected server in serverinfo display by pressing 'c'
one more undocumented feature :)
2016-08-16 23:03:45 +02:00
aurhat 862cb25adf Add config files to CB and VS projects 2016-08-15 14:09:11 +02:00
ac-stefandaurhat 158a33caed cleanup config files
* moved compatibility.cfg and autosave.cfg to config/opt/
* firstrun.cfg merged into defaults.cfg

DOCREF compatibilitymode alive currole curmode getclientmode curteam
DOCREF findpn pstat_score orderscorecolumns
2016-08-15 11:52:49 +02:00
aurhat 6a151001f4 Change name of VS project from cube to assaultcube 2016-08-15 11:52:39 +02:00
ac-stefandaurhat 46e659d4e0 fix rendering error on ac_desert 2016-08-15 11:52:29 +02:00
ac-stefandaurhat 938c2ccc87 fix pickup sound
hardwire armour sound for helmet - it's the same sound
2016-08-15 11:52:19 +02:00
aurhat 9eb0ec8177 Improve Visual Studio project 2016-08-15 11:51:46 +02:00
aurhat 4131a5a641 Add support for VS 2010
And drop support for VS 2008.
2016-08-15 11:50:58 +02:00
aurhat 9a309b78ac Update scripts for preparing Windows installer
Added windows batch file for portable use and removed batch without
profile directory.
2016-08-15 11:49:50 +02:00
ac-stef 7f9e2b19c9 fix glext command hanging without argument 2016-08-08 19:04:18 +02:00
ac-stef c96a983b65 fix edit selection height while grid is disabled
also: hide cleanshot helper scripts

DOCREF disablehud enablehud
2016-08-07 22:49:08 +02:00
ac-stef 27ebcdfeac fix dbgpos during spectating 2016-08-07 00:47:15 +02:00
ac-stef 6392527cb6 fix ktf indicator during spectating
also, disable ktf indicator during editing and enable damageblend, -roll
and -indicator during spectating

DOCREF ktfindicatoralpha
2016-08-07 00:26:29 +02:00
ac-stef 37ce06cd1c fix score calculation during spectating 2016-08-06 23:39:13 +02:00