Commit Graph
3984 Commits
Author SHA1 Message Date
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
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
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
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