Commit Graph
34 Commits
Author SHA1 Message Date
ac-stef 3d1f7d9b95 fix mapmodel occlusion when using pitch and roll
may need a bit more work, though
2015-06-05 16:00:03 +02:00
ac-stef 7a7a8da310 experimental: add per-slot mapmodel scale factors
4th parameter of the "mapmodel" command is now a scale factor between
0.25 and 4.0. Values outside that range (like the dummy zero from old
map config files) are interpreted as 1.0
Scaling does not affect the clipping, which has to be adjusted manually.

DOCREF mapmodel editmapmodelslot
2015-06-05 16:00:02 +02:00
ac-stef ae82b6b22e add attr5..7, add mapmodel pitch and roll
Keys 5, 6 and 7 (in combination with the scrollwheel) can be used to alter
the new entity attributes.

Pressing editmeta (LCTRL by default) speeds up the scrolling.

(Parts of the roll code are borrowed from Alejandro V. Garcia's commit
"Model rotations, experimental" from January 2013)

Note: coop edit is now broken between "next" and older clients, but I
  don't want to bump the protocol just yet.
2015-05-18 14:59:41 +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 eb60302e67 cleanup
- fix possible crash in conc (but it's still an ugly hack)
- fix noob usage of strcmp
- flag some memory leaks (it would be nice, if the author(s) would clean
   up the mess himself)
- fix crash in substr
- whitespace cleanup

there are plenty more memory leaks in command.cpp - for example, every
goto in cubescript does not clean up anything
2014-05-14 22:54:37 +02:00
Alejandro V. Garcia a0640ddeed transparency test (old stuff from 2008)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7192 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-13 13:26:12 +00:00
Alejandro V. Garcia d9bde7f0d9 Revert experimental model rotations
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7034 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-01-06 00:18:27 +00:00
Alejandro V. Garcia c5e656fc9e Model rotations, experimental
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7029 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-01-04 09:41:15 +00:00
driAn 8b63ffeb44 audiomanager refactoring, class-ified world objects, member access cleanups
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3952 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-12-08 21:17:11 +00:00
Lee Salzman 89abd8be7d let blob shadows fade out when models sink through ground
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3151 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-10-18 23:33:43 +00:00
Lee Salzman f1ace61eaf make sure modelattach.m is initialized to NULL
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3017 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-10-14 20:52:27 +00:00
Lee Salzman e11a5f5514 better hitbox testing
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2992 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-10-13 01:17:44 +00:00
Lee Salzman b76491d06e vertex lighting option for mapmodels
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2656 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-09-17 03:34:58 +00:00
Lee Salzman f52bf7e25e stencil shadows
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2551 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-09-13 02:24:48 +00:00
Lee Salzman 834e223154 model culling fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2536 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-09-12 01:57:54 +00:00
driAn 132c9be72f reverted alphatex
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2408 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-08-27 16:46:50 +00:00
Lee Salzman 48bf81791d less silly implementation of alpha blending
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2398 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-08-26 20:44:08 +00:00
driAn ea00c18b39 mdlalphatexture mdl config for Toca models
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2397 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-08-26 20:06:20 +00:00
Lee Salzman 2bb7a48296 support for alpha-tested models
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1890 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-05-06 20:10:55 +00:00
Lee Salzman 4e21ab0e89 simplified tag setup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1752 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-04-07 11:31:03 +00:00
Lee Salzman 25ebf59714 particle emitter stuff
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1735 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-04-06 14:54:14 +00:00
Lee Salzman 2ed1e7366d better tag support
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1728 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-03-30 02:42:49 +00:00
Lee Salzman 072cc6d525 added resetgl command to restart renderer in-game
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1642 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-02-12 03:30:52 +00:00
Lee Salzman 06b16635de more transparent
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1581 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-01-21 16:57:16 +00:00
Lee Salzman 4572a3e45a lagged players show up transparent to avoid confusion
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1580 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-01-21 15:47:27 +00:00
Lee Salzman ff0501d424 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1214 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-08-08 05:31:34 +00:00
driAn 8586d5ecfe no message
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1153 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-06-06 18:57:58 +00:00
Lee Salzman e200d293b9 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1086 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-06-02 03:19:38 +00:00
Lee Salzman 1ceb43f609 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@956 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-04-11 12:08:10 +00:00
Lee Salzman 9e8711f1f3 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@955 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-04-11 12:06:56 +00:00
Lee Salzman 220bcccd58 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@926 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-04-05 22:16:15 +00:00
Lee Salzman b296653ae4 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@869 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-03-31 23:44:27 +00:00
Lee Salzman b316783db5 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@861 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-03-24 01:46:38 +00:00
Lee Salzman 4b8d32b733 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@698 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2006-11-17 18:13:55 +00:00