Commit Graph
590 Commits
Author SHA1 Message Date
aurhat f9ec71cbab Fix switching from spectator to active team in bot modes
Before this fix player could switch from spectate to alive mode,
but he stayed in SPECTATOR team.
Note: 2 mouse clicks are necessary to player's spawn. Second respawnself()
is needed, because spawnplayer() is executed before server will switch
player1 to active team, so he would always spawn in CLA base (in bot
team modes).
2014-09-30 10:45:18 +02:00
aurhatandac-stef 414c69fef7 fix illegal typecast
fixes crash during intermission caused by activated and held grenade
2014-09-11 10:47:44 +02:00
aurhatandac-stef ced0baf67a Removed unnecessary restrictions of switching to SPECTATOR team
Note: spectate() function doesn't have such restrictions.
2014-07-19 14:38:33 +02:00
aurhatandac-stef 60eb0ac393 Turn off sniper rifle's scope during intermission 2014-07-19 14:38:33 +02:00
aurhatandac-stef 79943778e7 Show list of demos in "Download demo" menu 2014-07-08 19:02:17 +02:00
ac-stef 556b1eb7f2 add map vantage points
The vantage point is supposed to be a distinctive view on a map - like the
angle from which the preview picture was taken.

This commit adds three commands: clearvantagepoint, setvantagepoint and
gotovantagepoint. None has any parameters, all are only allowed in edit
mode. A map can only have one vantage point.
2014-06-23 16:15:47 +02:00
aurhat 5a88f9c323 Fix bugs in spectator mode and removed unused FPCNs
First fix - now togglespect lets to return automatically to previously
spectated player, after spectating him, switching to "fly spectate" mode
and again to spectating players.
Second fix - now player doesn't land and stuck outside of new map,
when during spectating somebody map changed.
FCPNs are removed, because currently they aren't used.
2014-06-20 22:13:18 +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 e313a99beb fix buffer overflow for unknown mode numbers
to test, try /mode 1337 ; map ac_desert
2014-05-24 11:42:00 +02:00
ac-stef 08faac728d fix: show intermission after demo playback
thx jamz :)
2014-05-21 22:50:19 +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
aurhat 5b94bab21f Fix of wrong "alive" status in scoreboard.
This commit fixes the issue: https://github.com/assaultcube/AC/issues/21
Player in spectate mode isn't dead, so when he switches from spectate to active mode, he is still non-dead.
Therefore d->state=="CS_DEAD" doesn't work in such cases.
This commit removes also some aimless line.
2014-04-05 13:52:41 +02:00
aurhat 1bb7a5d7ac Restoring previous conditions in setfollowplayer().
Current conditions appeared with commit: https://github.com/assaultcube/AC/commit/8f39911eb0725b22bb4dc3a50d3e89702afcc49c
The problem with its is, that when player is SPECTATOR,  then "/setfollowplayer CN" command works only on players in CLA team, and should work on all, like "changefollowplayer".
This commit fixes that. Thread related to this bug: http://forum.cubers.net/thread-7495.html
2014-02-16 13:50:06 +01:00
aurhat ef165773b8 This commit fixes removing sleeps in "resetsleep" function.
To test this bug make, for example, 3 long-standing sleeps, add checking of number of sleeps before and after existing "loopv(sleep)",
and later  type "/resetsleeps" command in AC - result: 3 sleeps "before" and 1 remains "after".

Explanation by stef: after deleting elements from vectors there are no holes,
so if there were sleeps[0], sleeps[1] and sleeps[2], then after removing sleeps[0] there left
sleeps[0] and sleeps[1], so during next loop cycle this sleeps[0] is neglected (because i=1).

Commit just changes loopv to loopvrev (loop from end to begin).
2014-02-15 10:55:07 +01:00
James Harris 5e639fdec2 Fix bug #510 "Wrong CN is displayed ("-1"), when "whois -1" is executed." ty gren
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7688 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-12-27 09:08:29 +00:00
Lucas GAUTHERON ffe23e79d7 hitsound 2
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7595 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-10-12 07:54:05 +00:00
Lucas GAUTHERON 60d677c1e7 better spectate mode fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7590 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-10-11 16:59:16 +00:00
Lucas GAUTHERON 397759bb44 /whois -1 fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7589 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-10-11 16:54:35 +00:00
Lucas GAUTHERON e29f9a1368 spectate mode fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7588 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-10-11 16:43:16 +00:00
Lucas GAUTHERON e09f3600a1 indent fix, cleanup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7575 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-10-06 15:39:27 +00:00
Lucas GAUTHERON 3c509af36a setnext fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7561 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-09-29 14:20:35 +00:00
Lucas GAUTHERON f8e42cfff9 setskin bug fix (it seems the skin system is unnecessarily complicated and may need to be reworked anyway)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7523 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-08-02 12:13:39 +00:00
Lucas GAUTHERON 6e19d0c44d use ffa spawns in... ffa gamemodes.
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7504 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-06-27 23:19:39 +00:00
Bukz 00f8ef6259 temporary new sound for KTF flag scores
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7437 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-28 16:41:19 +00:00
Lucas GAUTHERON ebcbbbc933 autodownload update
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7389 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-23 08:05:58 +00:00
Lucas GAUTHERON a7a1e46bcc merged branch
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7382 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-22 19:49:21 +00:00
Bukz 24c7936d09 bot settings menu, nextGameMode VAR
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7349 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-13 10:25:34 +00:00
Bukz 39bff67587 onCallVote fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7253 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-23 00:09:52 +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 2644841f31 don't count suicides as teamkills
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7245 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-21 05:10:04 +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
Lucas GAUTHERON 294ea128a3 more customizable scoreboard, allow ratio to be displayed (again)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7032 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-01-05 22:47:31 +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
Lucas GAUTHERON 8c084668cb disabling some debugging commands
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7020 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-12-31 12:19:31 +00:00
Lucas GAUTHERON f2a9b61683 drawzone: allow multiple zones to be drawn at once
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7013 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-12-30 20:40:41 +00:00
Lucas GAUTHERON ff4bb6c8e5 map vote message fixed (when using custom game times)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6999 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-12-27 10:41:42 +00:00
Lucas GAUTHERON 6607fcd7b3 curmodeattr fix (also fixes survival mode for me), svn protocol bumped (to avoid conflicts between beta and SVN)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6980 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-12-16 14:51:15 +00:00
Ronald Reagan ca838cd760 Two bug fixes, Mouse1+E crash, and setnext in SP crash
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6969 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-12-11 20:52:57 +00:00
aerkefiende 7291df0f85 sprintf isn´t as handy and secure as snprintf, but there´s no snprintf on windows (except a little different sprintf_s)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6951 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-12-06 22:21:43 +00:00
sireus 0831b6a567 fixed mode handling in callvote/votestring
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6949 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-12-06 17:48:10 +00:00
Ronald Reagan 2900af4f15 Map votestring bug #1 fixed
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6928 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-11-17 19:36:16 +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
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 907ecb044a can now explicitly specify target team on forceteam vote
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6897 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-09-30 20:07:22 +00:00
sireus b4385a4897 armor no longer affects knife damage
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6887 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-09-23 16:58:55 +00:00
sireus cc459fea50 votestring fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6885 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-09-22 11:33:02 +00:00
sireus 98d17a20eb votable time limit
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6881 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-09-17 22:41:38 +00:00
Lucas GAUTHERON bfda69a7f1 extending rev 6866 fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6867 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-08-25 07:08:59 +00:00
sireus 1356590f9d fix IP-related endianness confusion
(please double-check, I don't have HW to test this :) )

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6866 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-08-24 20:19:08 +00:00