Commit Graph
125 Commits
Author SHA1 Message Date
aurhat cc2ac85dd5 Improve order of displaying on HUD
Now command console over hudmessages, hudmessages over flag icons/scores
and player's stats.
Also fixed length of the line in command console.
2015-12-13 22:10:30 +01:00
aurhat 957f1e49ca Cleanup
Note: abbreviation of minutes and seconds in HUD messages in ktf is
needed, because for 5:4 aspect ratio messages could not fit in display.
2015-12-13 22:08:16 +01:00
aurhat 9c0f99f2a1 Cleanup
Remarks:
1. Changed order in keycmds lets to keep alphabetical order in saved.cfg .
2. Earlier long information in docs about arguments of command could be
invisible for low aspect ratio (example: "weapon" command), now it's fixed.
2015-07-04 11:30:58 +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 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 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 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 39cbee947d Merge branch 'master' into next 2015-02-08 16:17:04 +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 3bbe1f9555 fix mandatory client logfile
The logfile can't be created before the commandline arguments are parsed,
because before that, the home directory is unknown. This patch logs
into a memory buffer which is then copied to the logfile as soon as
the logfile is created after processing the commandline arguments.

The memory buffer is created during the initialisation of global variables,
and destroyed after the logfile is created.
2014-10-06 12:43:32 +02:00
ac-stef fabfb73c83 added mandatory client log file
- a client will now write all os console messages to "clientlog.txt"
- at every game start, the log file gets rotated (with five old logs kept)
- commandline parameter "-N" can be used to limit the number of lines
  (after the lines are logged, the file is closed)
2014-09-22 00:24:09 +02:00
ac-stef a0286d2b3f replace textfilter functions with one-fits-all version
* replaces filtertext() with a version with a dozen of single filters
  that can be used in any combination
* defines classes of allowed characters for strings for various uses
  (see protocol.h line 153ff)
* now the allowed charset of, for example, player names is defined
  in one location only
* fixes issue #58
2014-05-24 12:59:19 +02:00
ac-stef 493aefd34b fix: convert xmap path names for windows
* make sure, unsaved edits only count in editmode (otherwise "watercolour"
  in map configs would already be "edits")

* nicer filenames for backup-xmaps

* catch failed xmap file write access

* unsavededits is now flag (!= 0) and counter - to enable scripts to
  detect "new edits".

new commands:

xmap_delete_backup    deletes the backup xmap

xmap_keep_backup    moves the backup xmap to a regular named spot

xmap_rename    changes the nickname of an xmap
2014-05-19 12:31:26 +02:00
ac-stef b0649b5ea5 multiple map buffers for map editing: "xmaps"
An xmap holds everything related to map editing at a certain moment: it is
a map editing snapshot. It contains the name, the header, the geometry,
the entities, the extra headers, the undo/redo data and the cameraposition
from the moment, the snapshot was taken.

Xmaps are held in memory and, if persistentxmaps is set to "1", are saved
at game end and restored at game start.

xmap_list
  lists all xmaps currently in memory

xmap_store <nickname>
  create a snapshot and store it under the given nickname
  (nicknames have to qualify as valid filenames)

xmap_restore <nickname>
  restores the named snapshot. Also creates a backup snapshot of the
  current editing data.

xmap_restore
  restores the last automatic backup snapshot. Automatic snapshots are
  taken, a) before a snapshot is restored, b) before a new map is loaded
  (if there were unsaved edits on the map) and c) when the game ends (if
  there were unsaved edits).

xmap_delete <nickname>
  deletes the named snapshot.

Unsaved edits are flagged in the HUD with an "U" in the lower right
corner of the screen.

The files with the persistent xmaps are stored in mapediting/xmaps. After
they were restored at game start, the files are moved to
mapediting/xmaps/backups. Xmap files are cubescript files.
2014-05-15 17:34:25 +02:00
ac-stef c276c508da fix prompt cursor position
no more 1-char limit on inputcommand prompts
2014-05-14 22:38:29 +02:00
Lucas GAUTHERONandac-stef 8e0796a6ae transparency options for console and votes (resolves #45) 2014-05-14 14:28:54 +02:00
aurhat 88f9448238 Fix of the bug, which causes crash on Windows because of missing "history" file.
After first run of git AC version "config/history" file doesn't exist, what causes crash of  Windows AC version,  which can't find this file.
Commit just adds checking, whether this file exists - "if(!histbuf) return;" in loadhistory() .
Commit fixes also location of some brackets and spaces, in order to keep proper AC style.
2014-04-08 22:23:58 +02:00
Ronald Reagan c64d1e855b Console history save fixes 2014-01-30 17:21:35 -08:00
Ronald Reagan 1caf38e898 Added command line history. New file 'history' used in the config folder 2014-01-23 12:09:05 -08:00
Bukz cf6f3dfb94 prevent accidental message submission, thanks SKB
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7330 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-09 22:11:45 +00:00
Bukz 351f4a96dc need this here for some netbooks/etc. that don't have a regular return/enter key
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7250 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-22 19:26:11 +00:00
Bukz 24fd7f4b45 new commands findkey & findkeycode
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7154 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-06 04:18:56 +00:00
aerkefiende 66f8feee3b Replaced every tab with 4 spaces
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6927 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-11-12 22:28:11 +00:00
aerkefiende 19f4558112 Command line now can use the mouse input as well (thanks to Felix-The-Ghost and SKB)
conskip fix (thanks to SKB)
new windows binaries

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6926 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-11-12 21:53:44 +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
Bukz 01c09eeae1 updated win bins
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6836 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-06-12 15:15:00 +00:00
Bukz e57a13a248 Testing new native alias "KEYPRESS"
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6835 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-06-12 11:18:13 +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
Lucas GAUTHERON 9aa3585477 keybind fixes/cleanups
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6628 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-31 17:48:23 +00:00
Lucas GAUTHERON 8da769b0c2 hardcoded bind/specbind/editbind (win client included to keep it compatible with resetbinds.cfg)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6622 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-30 18:17:38 +00:00
Lucas GAUTHERON a57446cd4c cubescript fixes and cleanups
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6621 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-28 17:20:06 +00:00
Lucas GAUTHERON efe9e55a98 "searchbinds" command
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6620 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-28 16:55:49 +00:00
aerkefiende 06f73f4627 Replaced Tabs with 4 spaces in every source file
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6561 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-07-31 15:44:57 +00:00
Bukz 0c3ad5886b add2bind & numconlines
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6527 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-10 13:45:35 +00:00
Bukz 108b1b6d5c conopen VAR - 0 = not open, 1 = altcon open, 2 = fullcon open
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6525 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-09 11:04:54 +00:00
Bukz a90a346557 keybind command bug fix/changelog updates
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6522 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-06-08 19:53:23 +00:00
Bukz fc95d583f3 saved.cfg cleanup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6437 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-14 19:38:56 +00:00
Lee Salzman 890cac07bf warning fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5992 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-01-04 14:26:56 +00:00
Rafael Barreto 9325b67f1a clean up, some commands from kirin (thank you for the work), some anticheat compatibilities, balance teams saner check, check for map quality in the maprot, and more clean up
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5651 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-17 15:03:41 +00:00
Rafael Barreto 42e6a39207 testing: combat pistol (with burst!)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5307 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-08 19:57:31 +00:00
flowtron bc384939b3 revert default action back to "say"
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5095 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-28 21:25:40 +00:00
Rafael Barreto 8ffc66b034 clean up
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5080 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-27 03:37:45 +00:00
Rafael Barreto d174d82e1d Fixing lss nade spawn, some HUDEXTRAS stuff, and temporarily reverting the cursor related functions to 1.0.4 ones
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5076 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-27 02:21:37 +00:00
flowtron 75c2fa508c console usage indicator ( >, %, ! - say, teamsay, execute)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5067 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-26 20:59:07 +00:00
Lee Salzman e883c41781 added maxhistory var
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4767 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-01-14 00:56:15 +00:00