Commit Graph

2049 Commits

Author SHA1 Message Date
helixhorned ce948c6ee4 Factor out 2x identical code into G_WeaponHitCeilingOrFloor().
git-svn-id: https://svn.eduke32.com/eduke32@3077 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 20:41:30 +00:00
helixhorned b03c95443b Clean up G_MoveWeapons(), among other things getting rid of weird indentation.
git-svn-id: https://svn.eduke32.com/eduke32@3076 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 20:41:28 +00:00
helixhorned abd8753e66 Clean up A_MoveSprite(), no functional changes.
git-svn-id: https://svn.eduke32.com/eduke32@3075 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 20:41:25 +00:00
helixhorned 8adb9d27af Rearrange G_MoveTransports() code a little to cut down on nested switches.
git-svn-id: https://svn.eduke32.com/eduke32@3074 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 20:41:23 +00:00
helixhorned a92d5486c4 Replace all/most literal SE lotags 1/2 with SE_1_ABOVE_WATER or SE_2_UNDERWATER.
Also catch some other literal SEs and statnums.

git-svn-id: https://svn.eduke32.com/eduke32@3073 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 20:41:21 +00:00
helixhorned e921346dac TROR: Prototypical no-SE7 water submersion/emersion.
Submersion only happens when the upper sector has lotag 1 and its vertical
neighbor has lotag 2 (this can be useful to create non-submergible above-water
sectors).  Currently, only the player is handled.  On the implementation side,
the water handling code is split into P_Submerge() and P_Emerge() preparing the
"teleportation", and P_FinishWaterChange() for the finalization.

git-svn-id: https://svn.eduke32.com/eduke32@3072 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 20:41:17 +00:00
terminx bc9a29b121 CON access to ud.runkey_mode through get/setuserdef
git-svn-id: https://svn.eduke32.com/eduke32@3071 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 18:18:30 +00:00
terminx 2d58801d8c Add cvar "cl_runmode" to control ud.runkey_mode. This should fix the "allow walk while running" preference not saving.
git-svn-id: https://svn.eduke32.com/eduke32@3069 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 14:43:37 +00:00
terminx 83dd447621 Fix the bug I caused with custom projectiles :p
git-svn-id: https://svn.eduke32.com/eduke32@3067 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-11 03:25:10 +00:00
terminx 084ec632ea The other half of the previous commit.
git-svn-id: https://svn.eduke32.com/eduke32@3066 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-08 07:07:59 +00:00
terminx 5010b17efe Fix issue with explosion sound cutoff in E1L2. This implements functionality to stop playback and free up the voice of a currently playing sound of the same ID when there are already MAXSOUNDINSTANCES (currently 8) of the same sound playing, determined by distance/volume and which sound is oldest.
Initial determination is based purely on distance/volume, and if two qualifying sounds have the same distance/volume the one which started playback first is the one that gets the axe.

Feedback from other developers welcome.


git-svn-id: https://svn.eduke32.com/eduke32@3065 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-08 07:07:17 +00:00
helixhorned a2ed3682ee Lunatic: expose updatesector*, add random walker as timing test for them.
git-svn-id: https://svn.eduke32.com/eduke32@3064 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:26:29 +00:00
helixhorned 8f89c89d86 Lunatic: various tweaks and API changes/additions.
git-svn-id: https://svn.eduke32.com/eduke32@3063 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:26:24 +00:00
helixhorned 3a7b697a32 Lunatic-m32: save command input history.
git-svn-id: https://svn.eduke32.com/eduke32@3062 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:26:20 +00:00
helixhorned 1682eae693 Lunatic: various tweaks.
Going to extremes to avoid code duplication like the plague, but at
least it's great to learn about the whole function environment business.

git-svn-id: https://svn.eduke32.com/eduke32@3060 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:26:13 +00:00
helixhorned 36687ab986 Lunatic-m32: take over load path.
git-svn-id: https://svn.eduke32.com/eduke32@3059 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:26:09 +00:00
helixhorned 2851f412d2 Lunatic-m32: add an OSD command to be able to interface with stuff.
git-svn-id: https://svn.eduke32.com/eduke32@3058 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:26:04 +00:00
helixhorned f9e61ce37e Lunatic: fix up Makefiles, split dynsymlists.
The Makefile now has separate {GAME,EDITOR}LDFLAGS, so the correct
dynamic symbol list can be specified.

git-svn-id: https://svn.eduke32.com/eduke32@3057 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:25:58 +00:00
helixhorned 851c6b081d Lunatic: prototypical editor binding.
git-svn-id: https://svn.eduke32.com/eduke32@3056 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:25:52 +00:00
terminx 9120696e86 Minor cleanups in actors.c, mostly relating to custom projectiles and the like. A bug causing custom projectiles to knock the player back twice as far as the hard-coded ones was also fixed. There should be no other functional changes for the end user.
git-svn-id: https://svn.eduke32.com/eduke32@3053 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-05 20:48:10 +00:00
helixhorned f8480d00f9 In savegames, store dummy constant-length block instead of a _prlight array.
sizeof(_prlight) differs across compilers, and besides, Polymer lights were
not loaded anyway (they're restored live in-game later).  The savegame version
was not bumped, but only savegames made with builds where sizeof(_prlight)==261
(like synthesis) will stay compatible!
Report and helpful debugging information by LeoD.

git-svn-id: https://svn.eduke32.com/eduke32@3052 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-03 15:29:12 +00:00
helixhorned 30856c3949 In DNCOORDS display, add spritebridge and sbs.
git-svn-id: https://svn.eduke32.com/eduke32@3051 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-03 15:29:10 +00:00
helixhorned 1ba5ec469b Add helper program profdemo.lua, running EDuke32's demo profiling N times.
... and displaying statistics afterwards.  It was easier to do it this way
than porting stat.lua to C and especially adding more logic to the already
spaghetti-like demo playback code.

git-svn-id: https://svn.eduke32.com/eduke32@3049 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:52 +00:00
helixhorned b6db86ef0a In Load Game menu, show 32- or 64-bitness of save game on mismatch.
git-svn-id: https://svn.eduke32.com/eduke32@3048 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:49 +00:00
helixhorned 57348c1fdc Mapster32: make 'corruptcheck_noalreadyrefd' a separate OSD command.
Instead of having 'noalreadyrefd' as a 'corruptcheck' subcommand.
This way, TAB completion can be had.

git-svn-id: https://svn.eduke32.com/eduke32@3047 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:47 +00:00
helixhorned 9d0bffebde Mapster32: factor out some code (3x) into GetSaveBoardFilename().
git-svn-id: https://svn.eduke32.com/eduke32@3046 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:44 +00:00
helixhorned 13599f56b8 In -d command line arg, allow specifying demo number in addition to file name.
git-svn-id: https://svn.eduke32.com/eduke32@3045 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:40 +00:00
helixhorned 9128e8af04 For loadboard() and friends, pass a vec3_t position instead of separate x/y/z.
git-svn-id: https://svn.eduke32.com/eduke32@3042 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:30 +00:00
helixhorned 735d1ed77e Remove last argument from yax_getneighborsect(), make radarang[] engine.c-local.
git-svn-id: https://svn.eduke32.com/eduke32@3039 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:18 +00:00
terminx 6019e86010 Update ENet with the latest changes from github
git-svn-id: https://svn.eduke32.com/eduke32@3036 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 05:37:31 +00:00
helixhorned 99f9cfca7f foreachmap.lua: add option of only printing matching file names (like grep -l)
Also, add convenience wrapper script findmaps.sh for quickly searching for
sprites/walls/sectors satisfying a certain condition in all map files under
a given directory.

git-svn-id: https://svn.eduke32.com/eduke32@3030 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-26 22:54:01 +00:00
helixhorned 599a2049e6 Mapster32: add check for sprites being out of the maximal grid range (+-524288).
Requested auto-correction will place such sprites at their sector's first point.

git-svn-id: https://svn.eduke32.com/eduke32@3029 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-26 22:53:57 +00:00
helixhorned 2d3fe5083d Fix compilation on Debian 6.0 (Squeeze).
git-svn-id: https://svn.eduke32.com/eduke32@3026 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-24 21:09:34 +00:00
helixhorned 94ebe8211b Revert r2223's removing of bit 1 making it to setbrightness(), now a noop.
Hendricks found a bug caused by that commit, so this one enables exprimentation
with setbrightness() bit 1 behavior.

git-svn-id: https://svn.eduke32.com/eduke32@3025 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-24 21:09:31 +00:00
helixhorned 2e36784575 Add the option of starting demo profiling from the command line.
EDuke32 will exit afterwards.

git-svn-id: https://svn.eduke32.com/eduke32@3024 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-24 21:09:27 +00:00
helixhorned c04f7cbb4c foreachmap.lua: add shortcut for quickly finding certain sectors/walls/sprites.
git-svn-id: https://svn.eduke32.com/eduke32@3023 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-24 21:09:22 +00:00
helixhorned 7e05f5884c With SDL 1.2 builds, make the profiling be cancelable by pressing any key.
git-svn-id: https://svn.eduke32.com/eduke32@3022 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-15 15:28:30 +00:00
helixhorned 95d11b9703 Add a profiling option to the 'demo' OSD command.
See the comment in source/osdcmds.c for instructions on its usage.

git-svn-id: https://svn.eduke32.com/eduke32@3021 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-15 15:28:26 +00:00
hendricks266 9f0824e79f Fix three (probably harmless) maybe-uninitialized warnings.
git-svn-id: https://svn.eduke32.com/eduke32@3017 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-13 07:07:21 +00:00
hendricks266 132aebf1c1 patch from jfmact: "added c++ trimming to header" mathutil.h
git-svn-id: https://svn.eduke32.com/eduke32@3016 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-13 07:06:47 +00:00
hendricks266 74c00dbbd6 Revise EVENT_CHANGEWEAPON so that RETURN has no effect except for two values. -1 will cancel the weapon switch. -2 will override the switch to whatever value p->curr_weapon is set in the course of the event.
While we're at it, factor out duplicate code into P_ChangeWeapon().

git-svn-id: https://svn.eduke32.com/eduke32@3015 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-13 07:06:11 +00:00
hendricks266 a7688523a1 Possible fix for saving the "Fav priority" autoswitch setting.
git-svn-id: https://svn.eduke32.com/eduke32@3014 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-13 07:02:56 +00:00
helixhorned 91e8613ae4 SE17 setup: when failing to find warp z height for lower level, use heuristic.
Specifically, use the elevator's own ceiling z height instead of searching
nextsectors with nextsectorneighborz().  This makes maps like L9.map (Spaceport
from N64) or DEMOUNT.MAP work.  [Note well: work at all, since if it happened
to work before, that was pure coincidence.]

git-svn-id: https://svn.eduke32.com/eduke32@3013 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-12 09:48:31 +00:00
helixhorned 011e2b714a Replace some literal statnums with the corrensponding STAT_...
git-svn-id: https://svn.eduke32.com/eduke32@3011 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-12 09:46:21 +00:00
helixhorned 8f6d9c0986 Replace some more literal SE numbers, rename a couple of functions.
git-svn-id: https://svn.eduke32.com/eduke32@3010 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-12 09:45:14 +00:00
helixhorned eb4848fe05 Replace most other literal SEs/STs by symbolic enumeration values.
Have fun researching Duke3D's hardcoded weirdness!!!

git-svn-id: https://svn.eduke32.com/eduke32@3008 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-08 22:18:44 +00:00
helixhorned fba2556f9b Clean up some timing-related code.
- duke3d.h: comment the timing marcos a bit more
- factor out smoothratio calculation
- (TICRATE/TICSPERFRAME) --> REALGAMETICSPERSEC

git-svn-id: https://svn.eduke32.com/eduke32@3007 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-08 22:18:40 +00:00
helixhorned 8fba52a2bb New OSD cmd: demo <demonum or demofile>, starting one instantly from the menu.
Also, correct some comments made in the demo source made earlier. Oops.

git-svn-id: https://svn.eduke32.com/eduke32@3006 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-08 22:18:37 +00:00
helixhorned 8f8a3c6846 Move enum cheatindex_t from game.c to game.h and use its values in osdcmds.c.
git-svn-id: https://svn.eduke32.com/eduke32@3005 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-08 22:18:34 +00:00
helixhorned 06a64b8dd4 OSD command 'map': entering a name with a '*' wildcard lists those that match.
A new function maybe_append_ext() is added to common.c and used in the handling
of the -d<demo.edm> cmdline parameter and the 'map' OSD command with one
non-wildcard arg.  (It's slightly different from the way the extension was
maybe-appended previously.)

git-svn-id: https://svn.eduke32.com/eduke32@3004 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-08 22:18:31 +00:00