Commit Graph
224 Commits
Author SHA1 Message Date
ac-stef a013148305 save original aliases instead of local ones
If an alias has a local value assigned (by "push"), this change will write
the original value to saved.cfg instead of the last local value.

This has the additional effect, that aliases, that were created by "push",
will not be written to saved.cfg, since the original value was empty.
2015-03-06 13:46:13 +01:00
ac-stef d9b7e0e159 clean up saved.cfg
* combine all weapon attributes in a table
* sort variables and aliases
* group variables
* implement curname as SVAR
* implement cmdbuf as temporary alias
2015-02-23 20:17:43 +01:00
ac-stef 8153813c14 fix string escaping for SVARs
* avoid double richtext conversion for mspmsg
* fix minor memleak in pushident()
* always escape strings for the command buffer
2015-02-23 20:12:47 +01:00
ac-stef d585550315 automatic escaping for strings
* parsed words starting with " will handle richtext
* all strings in saved.cfg that need escaping are escaped
* new command "escape" to escape a string manually

DOCREF escape
2015-02-23 18:56:32 +01:00
ac-stef 1956f0acc0 clean up loadcrosshair
* use the same list of gun names for all occasions
* switched syntax, so that argument completion will work
* support old syntax, so old config files will work
* fix path handling by disallowing paths altogether ;)

DOCREF loadcrosshair
2015-02-23 18:55:58 +01:00
ac-stef 2231c06528 fix nesting of numargs 2015-02-23 18:52:34 +01:00
ac-stef 71ac04c129 only write variables with non-default values to saved.cfg 2015-02-23 18:52:34 +01:00
ac-stef f75f0c0af4 add optional pre-access function for SVARs
allows a SVAR to be assembled when needed

also:

* mapmsg is now a SVAR
* getmapmsg was removed (now: $mapmsg)
* new editsvar script to edit any SVAR in the console buffer
* nonfunctional menu removed

DOCREF mapmsg getmapmsg editsvar
2015-02-23 18:52:34 +01:00
ac-stef 390c4870ef fix memory leaks in sortlist and swapelements 2015-02-23 18:52:34 +01:00
ac-stef ed3b193b85 fix return value for cubescript command "execute" 2015-02-23 18:52:34 +01:00
ac-stef ec13fd7005 nested alias lookup
best explained with an example:

one = two ; two = three ; three = four
echo $one
> two
echo $$one
> three
echo $$$one
> four
2015-02-23 18:52:34 +01:00
ac-stef 47f71f1288 allow symbolic arguments for some commands
* new command "listoptions" lists the argument options for several
  argument types like entities, weapons and teamnames
* "burstshots", "weapon", "magcontent", "magreserve", "fragmessage" and
  "gibmessage" now allow guns to be specified by name
* "addpunct" allows plaintext arguments like "brackets" and "quotes"
* the "team" command now understands numeric teams
* entity types can now be specified by type index number
* removed some lists from the config files (now provided by listoptions)
* added argument completion for several commands
* change nextprimary from integer to string variable

DOCREF listoptions burstshots weapon addpunct
DOCREF fragmessage gibmessage magcontent magreserve
DOCREF nextprimary
2015-02-23 18:52:04 +01:00
ac-stef e89b2eae86 new looplist command
* optionally works with several variables
* does not leak memory

DOCREF looplist
2015-02-23 18:50:14 +01:00
aurhatandac-stef a284064e9f Complete backwards
Use LSHIFT to direct TAB-completion to browse backwards through the
available alternatives.

also: full cleanup of the commandcomplete()-code [by stef]

* fix crashing buffer overflow
* remove some ancient ludicrous code
* ignore more spaces
* browse command- and filename-alternatives in alphabetical order
* clean up nickcomplete
* more comments (sry)
2015-02-12 12:10:22 +01:00
ac-stef 39cbee947d Merge branch 'master' into next 2015-02-08 16:17:04 +01:00
aurhat fa483e1fcd Add custom description of demos
Custom description is displayed in "Watching demo" and "Play demo" menu.
2014-11-29 16:06:50 +01:00
ac-stef 8604c198e9 cleaning up cubescript hooks
- provide a function to easily assemble and execute the command
- context-selective execution of hooks
- restrict potentially exploitable or harmful hooks to singleplayer-modes
2014-11-12 17:06:35 +01:00
ac-stef 6ede08d011 keep the last five versions of saved.cfg and init.cfg
Renames the existing saved.cfg to saved-old-1.cfg (and an existing -1 to
-2, and so on) before the new saved.cfg is written.

This should help in cases where players mess up their config, because the
config is deleted with a five-game-starts delay.
2014-11-02 23:17:00 +01: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
ac-stef dcd46bbec9 fix modifyvar
give a proper error message when trying to edit read-only vars
2014-05-14 22:38:29 +02:00
aerkefiende 0819beacdb Fix for command completion, thanks grenadier!
https://sourceforge.net/p/actiongame/bugs/497/#877d

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7642 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-11-09 17:16:59 +00:00
Lucas GAUTHERON dcb847d8ec memory leaks and indent style fix in sortlist/swapelements (thanks SKB)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7506 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-07-20 13:24:50 +00:00
Lucas GAUTHERON 727bb4cb69 autodl: fix downloading for packages containing spaces in their names
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7499 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-06-24 12:39:45 +00:00
Lucas GAUTHERON a9d971782b make command.cpp compatible with master
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7418 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-25 20:46:14 +00:00
Bukz 4100c8ee24 testchar cleanup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7376 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-20 22:58:03 +00:00
Lucas GAUTHERON 87782dcca9 warning fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7314 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-05 20:35:13 +00:00
Lucas GAUTHERON b625928475 allow aliases to be emptied
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7313 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-05 18:44:45 +00:00
Lucas GAUTHERON 009ed2d8d8 alias/const simplified
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7312 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-05 18:42:05 +00:00
Bukz 28933e4e8d menu fix/saved.cfg cleanup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7260 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-26 23:07:50 +00:00
Alejandro V. Garcia fec6978aed since persistidents is fixed storestring is not needed any more
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7215 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-16 05:07:29 +00:00
Bukz 9e78cc5f01 remove ispersist
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7214 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-16 01:50:14 +00: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 d17be6e153 "storestring" can be used like: /storestring [mode 5; map ac_depot] then call it with bind "M" [ execute $storestring ]
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7200 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-14 11:30:43 +00:00
Bukz 0d535eac5a sortlist and swapelements fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7199 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-14 09:47:25 +00:00
Bukz c88414a327 new commands swapelements & sortlist/script fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7148 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-04 05:38:41 +00:00
Lucas GAUTHERON 71f3e3815b save kill messages into saved.cfg instead of a separate file (client)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7030 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-01-05 22:28:52 +00:00
Lee Salzman d12ce7975c warning fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6974 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-12-13 14:23:27 +00:00
aerkefiende 5dfb39545d Improved tab completion made by Felix-The-Ghost
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6923 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-11-07 22:05:19 +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 af2d6ceb65 div=, div=f
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6876 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-09-14 21:36:28 +00:00
Lucas GAUTHERON ef76f7f88d hardcoded burst fire settings (menus still TODO)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6862 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-08-24 16:01:10 +00:00
sireus 66bcbbbabe experimental compatibility mode for 1.1.0.4 demos
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6848 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-06-29 14:19:40 +00:00
Bukz c97b1ca743 fixes/cleanup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6842 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-06-20 19:39:08 +00:00
Bukz 55a04c8cff fixes/MAXCL reduced to 16/protocol bump
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6813 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-05-29 21:31:43 +00:00
sireus 77c2dd3944 fixed some issues found by cppcheck
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6740 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-12-19 21:02:57 +00:00
Bukz 0e1bba1745 hardcoded votepending and getscrext
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6703 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-11-21 18:11:10 +00:00
Bukz f3b2c09d98 removing getvar in favor of having getalias work on both aliases and built-in client variables (fov), and execute & return commands
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6594 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-19 01:43:54 +00:00
Lucas GAUTHERON 7882c36a64 isconst + save constants as any alias in saved.cfg
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6582 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-16 16:39:57 +00:00
Lucas GAUTHERON acee7b2ebe oops (const couldn't overwrite)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6580 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-16 12:31:31 +00:00
Lucas GAUTHERON dbca100335 docs.cfg fix, reference.xml curteam entry, persisting constants support
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6579 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-16 12:09:37 +00:00