Commit Graph
50 Commits
Author SHA1 Message Date
ac-stef ec2cdb4533 print filenames for errors in map and model config files 2017-05-17 14:13:45 +02:00
ac-stef 6bafdb0037 allow particle type names in md2emit and md3emit
md[2|3]emit <tag name> <particle type> <attrib1> <attrib2>

  particle type may now be numeric 0..19 or one of SPARK, SMOKE, ECLOSEST,
  BLOOD, DEMOTRACK, FIREBALL, SHOTLINE, BULLETHOLE, BLOODSTAIN, SCORCH,
  HUDMUZZLEFLASH, MUZZLEFLASH, ELIGHT, ESPAWN, EAMMO, EPICKUP, EMODEL,
  ECARROT, ELADDER, EFLAG

also: cleanup

DOCREF md2emit md3emit
2017-05-16 17:50:00 +02:00
ac-stef b650fca2ca persistidents cleanup
Restore the old persistidents system from AC 1.0, since it's working as
intended - if used properly.

As a reminder:

  * aliases created by "const" and "tempalias" are never persistent
  * aliases created or altered by "alias" or "=" become persistent, if
    the persistidents flag is set during that operation
  * persistidents if false during the execution of almost all config files
    during game start - those files can create aliases with default values
    which will not be persistent (until changed later while the flag is
    set)
  * before saved.cfg is executed, the flag is set and stays set all
    throughout the game - which means, that all changes (from menus, for
    example) will change the altered alias to "persistent"
  * exceptions for map or model config files are unnecessary, since those
    run restricted and can't create aliases anyway
  * exceptions are necessary for "late run" config files like those in
    config/opt/

The new command "persistidents" may be used to manually set or clear the
flag. It also returns the current state of the flag. If used in a config
file, the flag is restored to its original value when the file ends
execution.

In short: only late-run config files (meaning: run after saved.cfg was
restored) may need to manually set/reset the flag. Use const and tempalias
where appropriate and clear persistidents before creating an alias with a
not-to-save default value that may be changed and made persistent later.

DOCREF persistidents
2017-05-05 15:50:59 +02:00
ac-stef 1310516c14 keep track of map load errors
Collect warnings during load_world() and issue a warning at the end. Most,
but not all warnings already printed a message - which usually scrolls out
of the console quite fast.

The collected value is also given back by the loadmap command, which
allows batch editing scripts for maps stop at problematic maps.

Mapsound errors are not detected, if soundvol is zero. Missing textures are
not flagged, if notexture is set.

The error code is ored together from those elements:

0x0000001  entity attribute overflow
  One or more map entities had attribute values, that are no longer
  supported with map format 10. Rework manually.

0x0000010  map decoder error
  Indicates a damaged map file.

0x0000100  world error -1
  Map is completely solid. Very funny.

0x0000200  world error -2
  Map border is not solid. Fix manually.

0x0001000  missing skymap texture files
0x0002000  missing world texture files (only if no notexture is set)
0x0004000  missing mapmodel files
0x0008000  missing mapsound files

0x0010000  bad mapsound command in map config
0x0020000  bad mapmodel command in map config
0x0040000  bad texture command in map config
0x0080000  bad loadnotexture command in map config

0x0100000  error during loading of mapmodels (see earlier console output)

0x1000000  out of range integer value in map config (for example, "fog 0")
0x2000000  out of range float value in map config
0x4000000  generic cubescript error in map config

The command loadmap is now also available for non-debug builds.

DOCREF loadmap
2016-08-30 20:56:58 +02:00
ac-stef 6be832db4f better map model rotation
Create the rotation matrix with quaternions to avoid gimbal lock. The
matrix is created in a way, which has pitch and yaw behave as before.

Some of the quaternion code is borrowed from sauer, some from Q47 of the
Quaternions FAQ at http://vamos.sourceforge.net/matrixfaq.htm.
2015-06-05 16:00:03 +02:00
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 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 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 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
Bukz 7480f036d3 persistidents fixes (plz review/test)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7213 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-16 01:43:47 +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
sireus b33116712c sane(r) command signatures (warning: huge commit)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6908 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-10-06 22:49:49 +00:00
sireus b5c863a900 persistidents - control whether newly defined idents are persistent (suggested by Bukz)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6526 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-09 13:28:52 +00:00
Glen Masgai 8f2182e9e4 byte-order swap fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5662 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-20 12:24:21 +00:00
Lee Salzman 9256ee374b support for loading from zip files
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4717 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-11-08 00:53:19 +00:00
Lee Salzman e725e5ed8c string function cleanups
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4714 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-11-07 22:44:32 +00:00
flowtron 8d5b738dd9 fix typo in argument-format
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3409 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-11-06 01:37:22 +00:00
Lee Salzman 95cad2c3d1 removed libGLU dependency
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3280 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-10-27 07:41:46 +00:00
Lee Salzman 6004e8f432 matrix stack cleanup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3271 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-10-26 04:13:39 +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 e6a4c3825b shadow pitch fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2669 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-09-17 21:27:46 +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 5811c51c1a cfg var cleanups
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2605 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-09-15 02:07:20 +00:00
Lee Salzman c64c04eb71 discard empty meshes from md3s
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2602 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-09-15 00:32:43 +00:00
Lee Salzman a5f4d3f2f8 shadow blending optimization
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2560 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-09-13 10:15:29 +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
Lee Salzman b8686120bd model rendering optimizations
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2532 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-09-12 00:41:44 +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 6a2f46aac8 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1352 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-10-13 19:08:38 +00:00
Lee Salzman b57d3cf723 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1277 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-08-30 05:31:24 +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
Lee Salzman a13aadb796 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1177 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-07-26 01:17:04 +00:00
Lee Salzman 2bb92e9350 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1097 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-06-02 19:10:50 +00:00
Lee Salzman cb5302b2b5 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@991 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-05-07 11:07:55 +00:00
Lee Salzman e3d5ba1e44 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@982 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-04-27 20:57:30 +00:00
Lee Salzman d18443005d *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@966 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-04-19 06:39:16 +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 af61bec22f *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@945 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-04-09 09:38:46 +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 e203e13c82 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@551 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2006-11-09 21:05:15 +00:00
Lee Salzman 8bbc488caa *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@550 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2006-11-09 21:02:15 +00:00
Lee Salzman c7469a7873 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@548 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2006-11-09 20:09:16 +00:00