Commit Graph
236 Commits
Author SHA1 Message Date
drian 1535f9e4f6 #215 improved naming 2021-04-15 13:31:06 +02:00
drian 963190b072 #215 FreeBSD build fix proposal 2021-04-15 11:34:59 +02:00
drian 4a5c8ca5c5 #61 Cleanedit Mode 2021-04-15 10:19:58 +02:00
drian 70ba17e2b2 #250 (12) disallow flag drop if match is paused 2021-04-15 07:10:28 +02:00
ac-stef cb51e9f422 untangle entity rendering
fix unbatched model roll
2017-06-27 15:15:25 +02:00
ac-stef 49232e05e0 new commands to add modeinfo and artist info to maps
mapartist print|set|get|clear

  print:  prints the map artist player ID
  set:  sets the map artist player ID to the currently logged in player
  get:   returns the current map artist player ID
  clear:  erases an existing map artist record in the current map

modeinfo list|get|clear|<modelist> <modeflags>

  list:  lists current modeinfo entries
  get:  returns list of current modeinfo entries
  clear:  erases current list of modeinfo entries
  <modelist> <modeflags>:  specifies flags for a list of modes

DOCREF modeinfo mapartist
2017-06-27 15:15:23 +02:00
ac-stef 460066f7da cleanup closestent
- make sure, nextclosestent works for pinned entities
- menu entries for nextclosestent
- highlight closest ent
- have closestenttype return the current value and not change the value if
  the argument is "-"
- recognise manually changed closestenttypes in the menu

DOCREF closestenttype
2017-05-31 12:15:32 +02:00
ac-stef 954fe7ee7f cleanup edithide
- replace by simple bitmask
- rewrite showedithide, setedithide and seteditshow in cubescript
- menu added for convenient use

setedithide and seteditshow no longer accept entity type numbers as
parameters - only entity type names

showedithide, setedithide and seteditshow are considered deprecated

  edithideentmask

    Integer variable containing a bitmask of hidden entity types.

DOCREF showedithide setedithide seteditshow edithideentmask
2017-05-31 03:00:38 +02:00
ac-stef 2f99b368f0 allow mnemonics for execution context levels
scriptcontext and isolatecontext now allow plain text mnemonics for
context level arguments (one of CORE, CFG, PROMPT, MAPCFG, MDLCFG)

also:

- cleanup (some dead code and dead prototypes removed)
- some stuff renamed
- script errors now show context levels
- conc is no longer thread-safe (but slightly faster)

DOCREF scriptcontext isolatecontext
2017-05-18 16:19:01 +02:00
ac-stef a1687afb4c remove realtime model modding
models can still be changed by mod packages
2017-05-01 22:01:14 +02:00
ac-stef 68c7ad1fe6 cleanup pi
use only one constant for Pi, in case we ever need to change it
2017-04-28 15:18:00 +02:00
aurhat 4d2d326136 Cleanup 2017-02-18 22:40:07 +01:00
ac-stef 5177988bac show faulty playerstarts as yellow players 2016-11-03 14:20:34 +01:00
ac-stef 64a7eef335 some fixes 2016-11-01 00:40:07 +01:00
ac-stef efc04fe2dc fix rendering of very long ladder entities
and print more helpful error messages on entity attribute import overflows
2016-09-18 21:11:04 +02:00
ac-stef 397c441fed more verbose error messages for disabled commands 2016-09-16 17:35:47 +02:00
ac-stef 3ff5e44a39 add counts for used but unconfigured model and sound slots to entstats 2016-08-29 14:11:48 +02:00
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