Commit Graph
256 Commits
Author SHA1 Message Date
aurhat 0b5180c628 Fix centring the 512x512 scope image 2016-07-03 13:19:52 +02:00
aurhat baa24e0795 Show info about changing player only in multiplayer or demo mode 2016-05-10 22:00:05 +02:00
aurhat e4d5c2d361 Improve accuracy info and some elements of the HUD
Accuracy will be displayed only then, if scoreboard will be enabled, and
only for current weapon - in order to focus attention of players more on
gameplay/work for team than personal stats.
Added "accuracyinfo" command to see accuracy of all used weapons in
output console.
Added some cleanups and fixed memory leak.
2015-12-31 22:57:16 +01:00
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
ac-stefandaurhat 1917a07dfa fix flag visibility for htf on maps without bases
- fixes issue #140
- also removed some stale debug code
2015-12-12 22:22:01 +01:00
aurhat 747763fdf7 Show flag scores in "death camera" state 2015-10-20 21:57:16 +02:00
aurhat 7bba47a0dd Show on minimap indicative arrow at editing local player 2015-09-12 12:52:27 +02:00
aurhat 03a39feab8 Don't show players outside of map on minimap
When client connected to server (or started to play demo), where there was
a player dead since this client connecting, then position of the player
on minimap (and radar) was displayed wrongly outside of the map, sometimes
for the whole match. Now such positions will be hidden.
2015-09-08 15:09:24 +02:00
aurhat 2fb111adf4 Fix wall clock with 12h format
Stock strftime doesn't use capitalized "P", so for example on Windows
the wall clock didn't appear for 12h format. PM and AM are converted
to lowercase.
2015-09-08 01:05:54 +02:00
aurhat f10342fa80 Improve game time and wall clock display
1. Counting backward for gametimedisplay = 1 and forward for 2. The setting
added to HUD menu.
2. Changed name from clockdisplay to gimetimedisplay, in order to
distinguish clocks with system time and game time.
3. Added to wall clock options with UTC/GMT time and 12h format.

DOCREF clockcount clockdisplay gametimedisplay
2015-09-06 22:09:00 +02:00
aurhat 6605a20e00 Add a wall clock with local time
It uses strftime formatting from "wallclockformat" alias.

DOCREF wallclockformat
2015-08-06 21:08:46 +02:00
ac-stef 826499c12d enable gcc to check arguments of printf-like functions
Check printf-like functions like conoutf, if format strings and argument
lists match.

This commit also fixes a lot of code parts that actually had mismatching
argument lists - or did things, that this check does not like.

numtime() was rewritten in an ugly but very portable fashion (it's
recommended to stay away from "long long" format entries, because errors
usually only come up at runtime).

(some code was copied from sauer)
2015-08-02 19:40:41 +02:00
aurhat b2845b7c15 Improve "clean" screenshot
The parameter of blankouthud is "frames", so for example 1000 will take
20 seconds at 50 fps or 1 second at 1000 fps.

DOCREF blankouthud
2015-08-01 22:17:40 +02:00
ac-stef 380b8a1ebf cleanup shotgun code
no functional changes, only cleanup
2015-07-12 20:22:49 +02: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 d82b54de7e Show CN on HUD, if name of spectated player is a duplicate 2015-06-23 20:03:00 +02:00
ac-stef bdf53a5ab8 show preview of textures during editing
When textures of the map geometry are changed, five textures around the
current pick from the "last used" stack are shown. The texture assigned
to the "sky" slot is not shown. Instead, a plain blue rectangle is used.

hudtexttl
  Time to show texture preview (in milliseconds).

DOCREF hudtexttl
2015-06-10 14:22:11 +02:00
aurhat 842f120915 Fix and improve showing minimap and radar icons
Added features on minimap/radar:
1. local player is visible only when he doesn't follow;
2. player followed (watched) in third person point of view is visible
and his team too;
3. fix issue #99 ;
4. fix map position on radar, when player is followed in 3rd person pov -
before map didn't move with the followed player.
2015-06-07 14:24:14 +02:00
ac-stef ca7fbe9f19 minor fix 2015-06-05 16:00:02 +02:00
ac-stef 779df670fe fix scaled world textures (a.k.a hires textures)
Until now, every texture file was only loaded once after game start. When
a subsequent use of an already in use texture required a different
scaling factor, the texture was not reloaded. Simultaneous use of one
texture file with different scaling factors was completely impossible.

Now, the scaling factor is treated as part of the file name. Therefore, a
texture will be loaded again, if it is needed in a different scaling
factor.

Also: using out of range scaling factors with the "texture" command now
results in an error message. Some map config authors don't use the command
properly...

Also: removed the unneeded createtexturefromsurface()
2015-06-05 16:00:01 +02:00
ac-stef 79f78711bd automatically reduce showstats when dbgpos is set
Reduces "showstats 2" to "showstats 1" when dbgpos is set to "1".

DOCREF showstats dbgpos
2015-05-27 15:47:05 +02:00
aurhat 419c8717ba Hide team icon when player is in TEAM_SPECT and doesn't follow
Till now when player was in TEAM_SPECT and didn't follow (SM_FLY),
then wrongly CLA icon was displayed near the radar.
2015-05-03 22:12:02 +02:00
ac-stef 36b0f3edc0 hide speed when menu is shown 2015-03-28 16:48:05 +01:00
ac-stef 1e188aadbd fix loadcrosshair 2015-03-26 15:07:50 +01:00
aurhat 82f0f4e128 Remove leftover blend parameter from drawequipicons function 2015-03-22 21:55:05 +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 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 39cbee947d Merge branch 'master' into next 2015-02-08 16:17:04 +01:00
aurhat c31399a36a Add additional options to crosshairfx
0 - turn off all effects; 1 - turn on all effects;
2 - turn on color change/off size change for AR and > 3 shots in a row;
3 - turn off color change/on size change for AR and > 3 shots in a row.
It fixes https://github.com/assaultcube/AC/issues/72 .

DOCREF crosshairfx
2015-01-24 12:44:45 +01:00
aurhat d86e1a9581 Allow only flying spectating in bot modes 2015-01-24 12:18:48 +01:00
aurhat 8e6fbd9d7b Add the clock to scoreboard and change clockdisplay
Commit shows time in format mm:ss in scoreboard, instead of
"X minutes remaining" info.
It also enables the clock default on the HUD and adds "clockcount"
variable which let to choose between counting forward or backward
in the clocks.

DOCREF clockdisplay clockcount
2014-12-06 17:53:29 +01:00
aurhat 87bf71c8f1 Change position of "SCROLL/SPACE..." HUD messages
Now "SCROLL/SPACE..." messages will be visible on the right side
of display, in every standard aspect ratio.
2014-11-15 15:12:06 +01:00
ac-stef 4fdba4fa4a less ugly mapdims
replaced the mapdims array with a struct with properly identified members

also reduced the calclight postfilter to actually used map areas
2014-11-12 17:52:44 +01:00
aurhat 8838972e83 Display HUD messages over some less important info 2014-10-04 20:27:44 +02:00
aurhat c2dbf57816 Do "SCROLL to change player" visible in any standard aspect ratio
Above text was cut for aspect ratio 5:4 (quite much) and 4:3 (a little) for
previous value "left = (VIRTW*3/2)*6/8"
2014-06-28 12:30:25 +02:00
aurhatandac-stef 07780a8f92 move the clock to the right side 2014-06-11 22:24:31 +02:00
aurhatandac-stef b728a33bb3 Fix of wrong stats of pistol's ammo on HUD
...when player holds nade and akimbo disappears.
To test the bug: take akimbo, take grenade, press "g"  and wait for akimbo disappearing.
Then stats on HUD shows, that player has pistol with 0 ammo, instead of full magazine.
2014-05-17 23:41:38 +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 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
Lucas GAUTHERONandac-stef 8e0796a6ae transparency options for console and votes (resolves #45) 2014-05-14 14:28:54 +02:00
Ronald Reagan 305ef19887 Removing lasttarget 2014-01-23 09:23:40 -08:00
Lucas GAUTHERON 31c0d29bc2 minor code "fixes"
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7276 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-02 15:04:23 +00:00
Cristian Vlasceanu 491fb73c2d fix for crosshair not showing when spectating;
fix for setfollowplayer 0 crashing the game in bot mode

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7251 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-22 20:30:26 +00:00
Bukz f353141284 alias newselkeys - "binds" a list of keys to make new (multiple) selections in editmode (left CTRL is default)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7221 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-17 02:21:07 +00:00
Bukz 7ab718f74e /loadcrosshair fixes/updates (plz review/test)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7211 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-16 00:09:22 +00:00
Alejandro V. Garcia ea57f8b39a clean up
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7048 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-01-09 23:51:00 +00:00
aerkefiende d8815d7362 Removed commented line (based on rev. 7044)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7045 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-01-08 19:32:16 +00:00
Alejandro V. Garcia 4bd9947d67 Flags bug fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7044 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-01-08 09:58:43 +00:00
Ronald Reagan 3b5d000c78 Added comments and fully commented out drawsgpat
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7041 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-01-07 18:16:13 +00:00
aerkefiende 17f62e3375 radarheight min 5 max 500 def 150
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6994 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-12-23 23:00:44 +00:00