Commit Graph
3977 Commits
Author SHA1 Message Date
aurhat 4e0e128b16 Fix and improve displaying map message in menu 2015-04-17 17:11:34 +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
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
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
RandumKiwi 138eacd621 Updated comments only
Moved the comment on the CXX flag to a seperate line, so that compiling logs don't show extra whitespace. Additionally, I've added a comment about why we use clang++ (instead of g++) to help future 3rd parties.
2015-03-26 11:22:07 +13:00
ac-stef b7a551361f fix falling through mapmodels and clips when pushed 2015-03-25 21:42:29 +01:00
ac-stef 85f7a22e64 flush logfile in case of crash 2015-03-25 02:56:49 +01:00
ac-stef 982bc037a7 moved "scripts" folder to "config/autostart"
All cfg-files in config/autostart get executed during startup.

- more appropriate directory name and place
- files are now sorted alphabetically, as promised
- doubles are removed (resulting from identical file names in home and
  install tree) since they would only result in files run twice
- scripts with file names prefixed with "_veryfirst_", "_beforesaved_"
  or "_aftersaved_" will be run as very first config file, right before
  saved.cfg or right after saved.cfg
- all remaining files will be run right before autoexec.cfg
- the directory "config/autostart" will be created, if it doesn't already
  exist in the home tree
2015-03-24 02:06:19 +01:00
ac-stef 5bf27f802c fix memory leak in execdir 2015-03-24 02:06:19 +01:00
ac-stef b4b1c0bf91 add debug warning for unknown argument keywords
"weapon asault" will now print a warning to console.
2015-03-24 02:06:19 +01:00
ac-stef 7b607a6c43 allow comments inside cubescript lists
like this:
  alias listwiththreeelements [
    first   // first element
    second  // second element
    third   // third element
  ]

"echo $listwiththreeelements" will print everything, including comments,
but "echo (listlen $listwiththreeelements)" will print "3", and
"echo (at $listwiththreeelements 1)" will print "second".
2015-03-24 02:06:18 +01:00
aurhat 82f0f4e128 Remove leftover blend parameter from drawequipicons function 2015-03-22 21:55:05 +01:00
aurhat 13ed2bd977 Fix akimbo expiring
Before, if player switched to akimbo just as it expired, he ended up with
akimbo and 0 ammo. Now his weapon will change to default weapon (the most
often primary), as if he would take akimbo in the hands.
2015-03-16 21:16:42 +01:00
aurhat 63bbd353fc Align equipment icons and stats on HUD
Among other things it fixes https://github.com/assaultcube/AC/issues/65 .
It betters also display for oldfashionedgunstats=1.
2015-03-07 12:17:44 +01:00
ac-stef 5619fb2e7e allow multiple arguments for "pop"
instead of "pop var_a ; pop var_b" you can write "pop var_a var_b"

Also, "pop" will now give back the removed value of the first alias from
the argument list. This allows using the pop'd value one last time.

DOCREF pop
2015-03-06 19:36:29 +01:00
ac-stef 1c402a7d93 omit empty aliases from command completion
Some operations, like pop or looplist, leave empty aliases behind. Mostly,
this is without consequence - but before this commit, they showed up
during command completion.
2015-03-06 14:37:42 +01:00
ac-stef 045343a26d fix crosshairnames
damn akimbo special treatment...
2015-03-06 14:31:51 +01:00
ac-stef 0f8dbf69aa introduce temporary aliases
An alias, that was at least once used with the new "tempalias" will not be
written to saved.cfg.

So, now there are four ways to create aliases:

1) alias (or "=")
  General alias, who's value gets saved at game exit in saved.cfg, and
  restored at the next restart - unless the alias was created at a time,
  where persistidents was zero (usually during execution of the game's own
  config files during startup).

2) const
  Creates an alias, that can not be changed. Makes it harder for users
  to destroy their config.

3) push
  Reassigns an alias with a new value. After "pop", the old value is
  restored. Allows the use of "local" aliases in scripts. Also avoids
  name conflicts.

4) tempalias
  Like "alias", but the value will not be written to saved.cfg.

The commit also changes aliases, written by the engine itself, to "temp":
gametimestart, __getmaprevisions

DOCREF tempalias
2015-03-06 14:17:08 +01:00
ac-stef 32db3e5e88 new options for saved.cfg
Defaults to omitting variables from saved.cfg, that are still at default
value. By setting omitunchangeddefaults to zero, those variables get
written, but commented out. The variable "groupvariables" sets the number
of variables with similar names, that can be grouped on one line. Setting
it to zero will additionally write min, max and default values and a
short description of the variable to file.

In general, variables, that are still at default value, will not be
restored from saved.cfg, so when the default in the game is changed, all
clients will use that new default. This way, testers don't have to erase
their saved.cfg as often.

DOCREF omitunchangeddefaults groupvariables
2015-03-06 14:01:52 +01:00
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 02869f988a fix keyrepeat
don't disable keyrepeat when going straight from menus to saycommand
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
aurhat 6b27825a52 Revert "sdl_ttf, utf8"
This reverts commit 33683a9471.
2015-02-14 16:12:45 +01:00
aurhat 1b70e0b94d Remove obsolete utf8 code/dependencies
It reverts part of e232a3f3ac ,
also removes dependencies from all IDE.
2015-02-14 16:12:43 +01:00
ac-stef 4b75405829 remove some dead code
and some braind* concepts
2015-02-12 12:54:03 +01:00
ac-stef d4110288da undo TAB-completion with LSHIFT+ESC
New commandline key-combination LSHIFT-ESC.
Resets the commandline to the state before using TAB-completion.
Useful, if TAB-completion wasn't helpful.
2015-02-12 12:19:38 +01:00
ac-stef 3b9075049c omit commands with leading blanks from history
like "HISTCONTROL = ignorespace" in bash
2015-02-12 12:17:04 +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 78f2bac38d enable keyrepeat in menus
* also fix a memory leak
* fix mitem type TYPE_TEXTINPUT
* the name change from type to mitemtype is of cosmetic nature
2015-02-09 11:56:50 +01:00
aurhat befd22d2e8 Don't hide the sniper rifle scope if scoreboard is enabled
The fix also allows to turn on/off the scope during intermission (since
a few years the scope was blocked in intermission, because it was
immediately turned off by scoreboard).
2015-02-08 23:05:37 +01:00
ac-stef d7c2c8333a add mrproper target to fix enet build
Sometimes the enet build seems to get messed up and "make" won't work
anymore in ../enet. The mrproper target tries to clean up ../enet, but
if it doesn't work, it deletes ../enet/Makefile manually. This triggers
a configure run in ../enet with the next make invocation - which should
fix everything.
2015-02-08 17:46:11 +01:00