Commit Graph
7223 Commits
Author SHA1 Message Date
ac-stef 786a6cdce1 filename filtering for media files
No more spaces in filenames. The only allowed chars are a-z, A-Z, 0-9 and
"-_.()".

An exception are texture filenames, which may also have a prefix command
like "<decal>" included.

Also fixed some memory leaks in media download.
2015-05-18 14:46:03 +02:00
ac-stef e318ecd68e integrated automatic embedded map config files
This patch enables an option to keep the map config embedded in the map
file - with autogenerated content. Any changes to map config data will be
written with the map. This includes data by loadnotexture, loadsky,
mapmodel, texture, fog, fogcolour, mapsound and shadowyaw. Once enabled,
all changes with those commands become persistent to the map.

New variables:

mapsoundchanged
  Set to "1" with every command that changes mapsound slots. Should be
  used to trigger a rebuild of mapsound menus.

New/changed commands:

mapsound
  Now returns the number of the created slot.

mapmodel
  Now returns the number of the created slot.

texture
  Now returns the number of the created slot.

loadsky
  Is now a builtin string variable (instead of a command), which means,
  that the current value can easily be retrieved or edited.
  The skymap name in the argument is now required to start with
  "textures/skymaps/" - but that part of the path can be omitted.
  examples:
    loadsky steini/steini2 (loads textures/skymaps/steini/steini2_*)
    loadsky textures/skymaps/steini/steini2 (same)
    loadsky ../foo/bar (loads textures/foo/bar_*)
    echo $loadsky

getnotexture
  Returns the current "notexture" path. (Set by loadnotexture)

dumpmapconfig (available for debug binaries only)
  Writes the current automatically generated map config to
  dumpmapconfig.txt.

DOCREF mapsoundchanged mapsound mapmodel texture loadsky getnotexture
2015-05-18 14:46:03 +02:00
ac-stef e3fc073742 add "gotoentity" command
jump to the location of a map entity

DOCREF gotoentity
2015-05-18 14:46:02 +02:00
ac-stef 04e3d946bc updated automatic mapmodel menus 2015-05-17 00:24:39 +02:00
ac-stef a8028b87ba add default mapmodel slot parameters to model config files
The parameters have been extracted from current official map config files.
Only parameter sets different from "0 0 0 0" have been added.
2015-05-17 00:24:39 +02:00
ac-stef 3b8f642a38 add description entries for scripted menu items
This looks ugly, if the descriptions are long. There should be some kind
of linewrap for descriptions.

DOCREF menuitem
2015-05-17 00:24:39 +02:00
ac-stef 42356bccb5 add attributes to previously unlisted mapmodels
These are 96 skeleton config files - to be filled with model descriptions
and menu keywords.
2015-05-17 00:24:39 +02:00
ac-stef f8e582bf7a add attributes to model configs
This commit is incomplete: only the information from menus_edit.cfg was
transferred to model config files. There are 96 more config files to be
created...
2015-05-17 00:24:39 +02:00
ac-stef 03f974b2bc additional text attributes for mapmodels
This adds a means to store additional attributes for mapmodels, including
a caching mechanism, so the mapmodels don't have to be loaded to access
the information. The goal is, to provide fully automatic mapmodel menus
for map editing who also add information about downloaded mapmodels.

Model attributes are extracted everytime, when a model is loaded. At game
end, all available data is written to config/mapmodelattributes.cfg and
restored at next startup. On release, a file with all (but only) official
models should be included. Since autodownloaded models are usually "loaded"
after download, those are automatically added to the database. If someone
adds models manually to the directories (media pack, w/e), the command
"loadallmapmodels" can be used to try to find all available models. The
only way to delete something from the database, is to delete the file
config/mapmodelattributes.cfg when the game is closed.

The current list of attributes is:

keywords
  List of one or more menu topics to list the model under. Check
  config/menus_edit.cfg for available keywords. Unknown keywords will
  be listed separately.

desc
  Short name or description of the model. Will be used as menu entry.

usage
  Important information for how to use that specific model.

author
  Who created the mapmodel. If it's a derivative of another model, state
  the author of the mod (refer to the original author under "license", if
  you like). Always use the exact same spelling for the same author, to
  allow menus to automatically group models by author.

license
  Free-text attribute for license info or info about additional
  contributors (or original authors for derivated works).

distribution
  One of "official", "autodownload" or "manual". Other values default to
  "manual". This is used to determine, if a map contains only original
  media or media that can be download automatically.

version
  Single numerical value to separate older from newer versions. Defaults
  to zero. Higher numbers mean "newer". Maybe someone manages to implement
  a versioning system for custom media in the future...

New commands:

mdlattribute <attr> <value>
  To be used in model config files. Adds a value for a specified
  attribute to the model.

mapmodelregister <modelpath> <attr1> <attr2> ...
  Adds values for all attributes to a specific mapmodel. This is used to
  restore the cached values from config/mapmodelattributes.cfg during
  game start. Does not actually verify of load the model.

mapmodelattributes <modelpath> <attr>
  Returns the value of a specific attribute of a mapmodel. If modelpath
  is a number, it is interpreted as index for the list of models in the
  current map config. If no attribute name is specified, all attributes
  are printed to the console instead.

getmapmodelattributes <list of attribute names>
  Returns a table of all known mapmodels. Each model is listed with the
  modelpath and the values for the requested attributes. To be used
  instead of a fixed table in menu_edit.cfg. In addition to attribute
  names, the function also allows the keywords "explodekeywords" and
  "sortby:" as arguments. If "explodekeywords" is given, all mapmodels
  with more than one keyword are listed multiple times, once for each
  keyword. If an attribute name is preceeded by "sortby:" the list will
  be sorted by this table column. If "sortby:" is used several times,
  this first sort will have highest priority. The list is always sorted
  by path by default.

  example:
    getmapmodelattributes sortby: author sortby: desc explodekeywords

loadallmapmodels
  Tries to load mapmodels from /all/ paths below packages/models/mapmodels.
  Will throw a lot of error messages, because not all directories contain
  models to load. This command can be used to build or rebuild the
  complete list of all available mapmodels. It is only necessary, if models
  are added manually to the directories, since every mapmodel gets added
  to the list when it is loaded - which takes care of all automatically
  downloaded models.

DOCREF mdlattribute mapmodelregister mapmodelattributes
DOCREF getmapmodelattributes loadallmapmodels
2015-05-17 00:24:38 +02:00
ac-stef c04da78554 fix toca/grid6x8
Until now, the mapmodel used the "notexture" texture, which obviously
worked quite well, because it is grey.

Another possible "fix" would be, to just keep using "notexture" and
instead delete skin.jpg.

This fix affects seven current official maps.
2015-05-17 00:24:38 +02:00
ac-stef bdf3f0f5cb option to crop leading and trailing whitespace for filtertext 2015-05-17 00:24:38 +02:00
ac-stef f86e2c1f4a fix loadcrosshair script in saved.cfg
"c" is already used as "const" and therefore is not allowed as temporary
alias...
2015-05-17 00:24:38 +02:00
ac-stef d55dbb47f4 output error message when temporary alias can not be created 2015-05-17 00:24:38 +02:00
ac-stef 890e13076c print error message if md3skin tries to skin non-existing meshes
the error message includes a list of available mesh names
2015-05-17 00:24:38 +02:00
ac-stef 3e84f11630 cleanup 2015-05-17 00:24:38 +02:00
ac-stef e0e77c4c7b updated ac_power
* dedicated models instead of skinning the mapmodels
* changed clip entities to tag clips where possible
2015-05-17 00:24:38 +02:00
ac-stef 2eca255355 ac_power -> dev_power 2015-05-17 00:24:38 +02:00
ac-stef ad263ea375 avoid triggering ASSERT due to insufficient floating point precision
For bigger lastmillis and zero basetime in combination with odd values for
as.speed, t can become negative due to rounding errors.

(time: 3404565, as.speed: 43,47826 -> t: -0,00575)
2015-05-17 00:21:28 +02:00
aurhat 65c2e0f83a Update locally position of dropped flag
After dropping the flag player1 will see for a very short moment,
before flag position will be updated by server, flag dropped at player1
position. Earlier he could see for this moment flag dropped in a place,
when it was picked up.
2015-05-13 20:43:56 +02:00
aurhat a9bf87b1e7 Indexing fix 2015-05-07 21:27:53 +02:00
aurhat b2da592d6e Save skin choice on quit 2015-05-07 18:58:34 +02:00
aurhat a1107a4318 Fix sound bug and remove wrong asserts for sound
The bug caused SIGTRAP during fastforwading demo in debug mode, when other
players disconnected.
These asserts were removed, because they can be triggered because of a bug.
2015-05-05 21:55:13 +02:00
aurhatandac-stef 8b2b7e0ac7 Change switching between spectate and edit mode
1. In multiplayer this switching isn't allowed, because it was broken
   and messed up, for example other players didn't see concurrently
   spectating and editing player.
2. In demo mode switching from spectate to edit mode is improved.
3. Several years broken code for edit mode is reverted.
2015-05-03 22:42:06 +02:00
aurhat 419c8717ba Hide team icon when player is in TEAM_SPECT and doesn't follow
Till now when player was in TEAM_SPECT and didn't follow (SM_FLY),
then wrongly CLA icon was displayed near the radar.
2015-05-03 22:12:02 +02:00
aurhat 1d497ac4d8 Add dedicated crosshair in edit mode
DOCREF loadcrosshair
2015-04-28 20:47:54 +02:00
aurhat b96066031b Remove items-tmp.png - obsolete temporary file 2015-04-28 20:46:14 +02:00
aurhat 8916ad4fa4 Fix playing weapon sounds
No more sounds audible on the whole map in bot modes, when bots change
weapon or have no ammo.
Gun change sound in bot code was a duplicate, so removed.
2015-04-25 20:11:26 +02:00
aurhat 0969310be2 Fix local akimbo expiration 2015-04-25 19:12:40 +02:00
Cmdr-Thrawnandaurhat 7e0b2be051 Changes to sound muting menus
* Fixed completely broken hitsound mute toggle
* Moved bullet sound toggles into appropriate menu
* Changed heartbeat toggle to use muteitem (for consistency)
* Fixed footsteps toggle (Previous behavior was to turn off all
footstep sounds, a toggle already existing elsewhere, rather
than muting the specific sound as it's intended to)
* Sorted sound menu (At grenadier's request)
2015-04-25 13:58:44 +02:00
ac-stef 6431260cf2 fix issue #98
Not every filename contains a '.'
2015-04-23 21:44:03 +02:00
ac-stef a951cad8ab fix mingw compile
uint64_t requires stdint.h for mingw

thx Mr.Floppy
2015-04-21 01:58:53 +02:00
ac-stef 1d1e995454 fix some warnings 2015-04-18 15:24:31 +02:00
ac-stef 1f6cd99408 fix CR-handling for looplist 2015-04-18 14:07:45 +02:00
cmdr_thrawnandaurhat 7fd5d19941 Update Game Mode Descriptions
* Added descriptions for modes 20 and 21
* Altered punctuation / whitespace for consistency
* Fixed grammar (you -> your)
2015-04-18 00:43:12 +02:00
aurhat 6e7246d6cd Disable debug messages in bot modes
Uncomment added line to enable these messages.
2015-04-17 21:08:25 +02:00
aurhat 4e0e128b16 Fix and improve displaying map message in menu 2015-04-17 17:11:34 +02:00
Pascal de Bruijnandaurhat 76ec19b746 settings: allow edittoggle to be reconfigured
"editbind E edittoggle" is needed for such cases, when edittoggle will be
bounded to key, for which editbind exists. Then that will allow to
exit from edit mode still with use a key.
2015-04-15 20:36:01 +02:00
ac-stef 57a0d286c1 automatic mapmodel menus
auto-generate mapmodel menus depending on the actually available models
in the current map config.

Also fixes memory leak in "newmenu".

DOCREF mapmodelname mapmodelbyname mapmodelchanged
2015-04-12 18:09:36 +02:00
ac-stef f511889731 customisable sort order for file lists in menus 2015-04-12 18:09:36 +02:00
RandumKiwiandac-stef 5e8c64d8b7 Bind Q to change to previously selected weapon.
This will mirror the default bind in other FPS games and therefore
make AC easier to understand for unarmeds.
2015-04-12 18:06:09 +02:00
aurhat beeba9ad76 Add Code::Blocks project for Linux 2015-04-06 12:24:50 +02:00
ac-stef 453c79ee6d minor fixes to get master to compile again 2015-04-06 10:37:13 +02:00
aurhat c3ae2066d0 Don't check a duplicate of player1 name in demo mode 2015-04-05 21:58:29 +02:00
aurhat 1d1c9e6f96 Improve key binds
Changes:
1. added single aliases bounded to the keys, in order to maintain easier
the binds;
2. cleaned up binds;
3. updated Keyboard menu and fixed searching binds.
Remark: aliases bounded to the keys shouldn't have leading and trailing
white spaces, if they are present in Keyboard menu, otherwise they won't
be found. So construction like, for example: bind SLASH [ key_commandline ]
is inadmissible.
4. Alternate edit binds (default disabled) moved to
config/opt/alternateeditbinds.cfg and removed old_editbinds variable.

DOCREF old_editbinds
2015-04-03 23:44:22 +02:00
ac-stef fe97817dac use proper delete macro 2015-04-03 21:10:17 +02:00
aurhat 5de86f9838 Cleanup
Fixed nested list in Cubescript, fixed conopen (now read-only), removed changeteam(),
fixed name of shortcuts for team survivor modes (so it fixes
https://github.com/assaultcube/AC/issues/73 ).

DOCREF ts tsurv btsurv
2015-03-29 14:57:29 +02:00
ac-stef 631685afb6 new commands curmenu and closecurmenu
curmenu gives back the name of the currently open menu, which can be used
to close just that.

The new script "closecurmenu" uses curmenu to close the current menu.

DOCREF curmenu closecurmenu
2015-03-29 13:21:47 +02:00
ac-stef 36b0f3edc0 hide speed when menu is shown 2015-03-28 16:48:05 +01:00
ac-stef 793aca3cf1 fix memory leak 2015-03-28 14:05:04 +01:00
ac-stef 1e188aadbd fix loadcrosshair 2015-03-26 15:07:50 +01:00