Commit Graph
219 Commits
Author SHA1 Message Date
ac-stef 1a4fca5c3c make some editmode options persistent
keep values of showmodelclipping, showladderentities and showplayerstarts
2016-08-27 21:58:02 +02:00
ac-stef c70808e5a4 more detailed entstats
Shows some results of the new map quality checks. tbc
2016-08-26 14:08:56 +02:00
ac-stef e1ce0979d0 rewrite calculation of map geometry bounding box
and rename client-side struct "mapdims" to clmapdims (to avoid confusion
with server-side data)
2016-08-26 14:08:55 +02:00
ac-stef a4e84cbf20 cleanup 2016-08-24 12:38:33 +02:00
ac-stef af1144b45d optionally show ladder entities in edit mode
If enabled, render ladder entities as blue wireframes.


DOCREF showladderentities
2016-08-23 00:42:00 +02:00
ac-stef 32ffd3a4cd replace non-thread-safe functions
replace all uses of strtok, localtime, gmtime and readdir

on platforms without safe versions, use homebrew or unsafe...
2016-02-28 23:14:47 +01:00
ac-stef 917df65a51 remove all instances of round()
VS2008 doesn't have round() in math.h and the old inline function (removed
in 50d1413d, had problems in newer compilers). Now floor() or straight
casting to int is used. Let's see, which MS compiler will trip on that...
2015-09-24 19:51:50 +02:00
ac-stef 5a4b605b33 fix flag drop position under water
Just placing the flag on top of the water didn't work for fully flooded
map areas, as the flag went out of reach.
This fix tries to float the flag up to the surface and stops, if something
blocks the way.
2015-09-14 13:57:55 +02:00
Frank LENORMANDandac-stef 3ec0b1218d abide by the rules for reference objects 2015-07-18 00:51:00 +02:00
ac-stef 7a7a8da310 experimental: add per-slot mapmodel scale factors
4th parameter of the "mapmodel" command is now a scale factor between
0.25 and 4.0. Values outside that range (like the dummy zero from old
map config files) are interpreted as 1.0
Scaling does not affect the clipping, which has to be adjusted manually.

DOCREF mapmodel editmapmodelslot
2015-06-05 16:00:02 +02:00
ac-stef 4c148b8f0b fix rendering of mapmodel clips 2015-06-05 16:00:01 +02:00
ac-stef 2f1fc1c9c8 cleanup formatted output of entity attributes 2015-05-27 15:47:05 +02:00
ac-stef edd94fb931 tilted and rotated clip entities
Attribute 7 of clip- and plclip-entities now allows four different shapes
for the clips:

  0: basic rectangular (like in older AC versions)
  1: tilted in direction of x-axis
  2: tilted in direction of y-axis
  3: rotated by 45 degrees

The shapes 1 and 2 use the value of attr6 as slope angle.

The player only can walk upwards a tilted clip, if the height (attr4) is
at least 0.6 cubes. Slopes steeper than 5.0 can not be walked up (same
maximum step size as for sloped map geometry).

Mappers, please keep in mind: especially tilted clips are more expensive
than regular clips, but they are much cheaper than stairs built from a
bunch of regular clips. Large and small clips cost exactly the same, so
try to combine clips to keep the total number down.
2015-05-27 15:47:05 +02:00
ac-stef 84871a13f1 option to show all playerstarts in edit mode
Set showplayerstarts to "1" to see a playermodel rendered at all
playerstart entities.

DOCREF showplayerstarts
2015-05-27 15:47:05 +02:00
ac-stef f3904724d7 limit the range of certain entity attributes
For example, direction angle values can be reduced to +- 360 degree.
(0..360 would be sufficient, but some people like their angles negative)

This is not a reduction of functionality or a security measure - it's for
convenience only: values now wrap around at the borders of their useful
ranges.
2015-05-27 15:47:05 +02:00
ac-stef f774e4d841 higher resolution for entity attributes
Interpret the values for entity yaw angles and clip entity sizes as
fifths or tenths of cubes or degree.

This makes some entity attributes appear as float values to the user.
The map file still only keeps integer values - but now they are
interpreted differently - for example, a health pack elevation value of 6
now means 0.6 cubes instead of 6.

Note: the scaling factors are hardcoded - use ENTSCALE5 or ENTSCALE10
whereever possible. For generic entity editing, the scaling values are
also stored in entscale[] - but that table can not be changed without
breaking the map format! This scaling is similar to the treatment of the
vdelta values of map cubes.
2015-05-27 15:47:04 +02:00
ac-stef ea480a7b0c higher resolution for waterlevel
Interpret the waterlevel value as tenths of a cube.

This makes the waterlevel variable a float value to the user, while the
map file still stores an integer value - but now it is interpreted
differently - for example, a waterlevel value of 123 now means 12.3 cubes
instead of 123. Old map files are converted during loading.

Note: the values of waterlevel and hdr.waterlevel need to be in sync.

DOCREF waterlevel
2015-05-18 14:59:41 +02:00
ac-stef ae82b6b22e add attr5..7, add mapmodel pitch and roll
Keys 5, 6 and 7 (in combination with the scrollwheel) can be used to alter
the new entity attributes.

Pressing editmeta (LCTRL by default) speeds up the scrolling.

(Parts of the roll code are borrowed from Alejandro V. Garcia's commit
"Model rotations, experimental" from January 2013)

Note: coop edit is now broken between "next" and older clients, but I
  don't want to bump the protocol just yet.
2015-05-18 14:59:41 +02:00
aurhat 65c2e0f83a Update locally position of dropped flag
After dropping the flag player1 will see for a very short moment,
before flag position will be updated by server, flag dropped at player1
position. Earlier he could see for this moment flag dropped in a place,
when it was picked up.
2015-05-13 20:43:56 +02: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 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 e2ac8efadd remove restrictions on mapmodel rotation
Until now, the angles of mapmodels (and ctf-flags) were rounded to the
nearest 15-degree-step during rendering. This patch moves the rounding
to the time of placement of the model. Now the angle can be changed freely
after the model has been placed.

This commit also changes the angle resolution to 0.25 degree.

When changing the angle (press "1" + scrollwheel), additionally pressing
editmeta (a.k.a. LCTRL) changes the increments of the wheel from 1 to 10.

During a savemap with format 9, the angle resolution is reduced again, to
keep compatibility. Therefore, this features is only for testing right now.
It won't be preserved during a save (at least, as long as format 9 is used)
2014-10-22 12:08:42 +02:00
Bukz 18f5080ccd new command /showclips, doc fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7459 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-04-08 02:55:40 +00:00
Lucas GAUTHERON ba295eef7d editmode flag bug fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7445 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-31 10:08:38 +00:00
Bukz 5be04a9c06 modmdlpickupN - load custom pickup models via cubescript (plz review/test)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7201 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-14 12:54:12 +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 473f58c7de flag collision fixes
* extend pickup collision radius over full height
* make flags collide with plclips

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6883 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-09-21 23:14:34 +00:00
sireus 417850ca60 fixed particle type guesswork
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6878 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-09-14 22:57:42 +00:00
sireus 8f39911eb0 cleaned up spectator mess a bit
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6781 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-04-05 13:19:06 +00:00
Bukz 5a7e64793f onPickup fix, onDisconnect, docs
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6606 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-20 23:00:10 +00:00
Bukz 6495095a70 testing onPickup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6595 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-08-19 05:14:50 +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
sireus 4de620f757 entproperty now works in MP coop, but buffered
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6359 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-04-26 13:22:35 +00:00
sireus f9a2e7c52d rifle -> carbine
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6351 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-04-26 00:13:42 +00:00
flowtron f3e4d1b73b minor comments & fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6151 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-03-28 20:07:29 +00:00
Rafael Barreto d78954f068 pf without nades (replaced by pistol clips) and lss with 2 nades
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5729 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-10-09 19:55:13 +00:00
flowtron 5912a80a5e colourcoded editmode sparklies
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5699 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-09-26 22:10:24 +00:00
flowtron be5e0c7e53 spawn ent render:arrow in editmode
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5688 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-09-11 14:39:38 +00:00
Rafael Barreto e34e203dfd clean up and trying to identify why sometimes after a spawn, it is not possible to get some items
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5633 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-16 03:09:30 +00:00
flowtron 8637f6e4e9 avoid crashing on empty input .. "Duh!"
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5547 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-06 23:21:20 +00:00
flowtron deb082b15b show/hide sets of sparklies in editmode
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5441 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-22 16:40:18 +00:00
Rafael Barreto a8b039065a disabling the combat pistol for now
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5333 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-10 22:01:13 +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
Rafael Barreto 930294381d testing: reducing the delays in clientside item pickup delay after item and player spawn
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5280 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-03 18:41:40 +00:00
flowtron 48b711d0e3 removing remnants of client-side entity-arena workaround
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5274 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-03 14:53:54 +00:00
flowtron 229cc9a378 fix arenamode pickups just before end-of-round locally (sanity check please)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5266 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-02 17:49:57 +00:00
flowtron 94dc526837 lots of whitespace
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5265 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-02 16:49:20 +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
Rafael Barreto 3d30130761 bug fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5069 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-26 21:45:06 +00:00