Commit graph

383 commits

Author SHA1 Message Date
terminx
f5346f4732 Menu options to control Polymer light and shadow counts
git-svn-id: https://svn.eduke32.com/eduke32@5408 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-24 00:30:35 +00:00
terminx
f22dbc6fdb Add r_pr_lighting 2, which disables the hard-coded lights while leaving lights added in maps enabled.
This also adds a menu option to control r_pr_lighting.

git-svn-id: https://svn.eduke32.com/eduke32@5406 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-23 23:00:21 +00:00
terminx
e742b42ef9 Disable Polymer lights attached to hidden switches.
git-svn-id: https://svn.eduke32.com/eduke32@5404 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-23 23:00:13 +00:00
terminx
c57be0fbdd Don't spawn BLOODPOOL 256 units above the ground.
git-svn-id: https://svn.eduke32.com/eduke32@5402 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-23 23:00:06 +00:00
terminx
87c8e86d44 Improve the behavior of the BLOODSPLAT family of sprites. This improves the effect so that the blood doesn't stutter when it moves, and no longer occasionally appears to climb back up the wall for a fraction of a second.
git-svn-id: https://svn.eduke32.com/eduke32@5397 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-21 19:54:02 +00:00
terminx
3975df6d2d Fix SE17 warp elevator transition jumps.
git-svn-id: https://svn.eduke32.com/eduke32@5393 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-20 07:15:21 +00:00
helixhorned
212343b390 Game: make BOUNCEMINE spawn FRAMEEFFECT only if moving horizontally.
Also add "zshoot -4096 BOUNCEMINE" to lunatic/test/weaponvars.con
to demonstrate that bouncemines can be shot.

git-svn-id: https://svn.eduke32.com/eduke32@5319 1a8010ca-5511-0410-912e-c29ae57300e0
2015-08-08 07:04:11 +00:00
terminx
b8442f0b67 Revert r5316 which completely broke BOUNCEMINE.
git-svn-id: https://svn.eduke32.com/eduke32@5318 1a8010ca-5511-0410-912e-c29ae57300e0
2015-08-02 08:50:31 +00:00
helixhorned
3730901f43 Game: don't spawn FRAMEEFFECT1 for BOUNCEMINE.
There's no point, really. Since the bouncemine is immobile, the tsprites
will all be overlaid at one point and show the same picture, as far
as I can see. Worse, since r4876, the generated sprites may draw on top
of the actual one. The former have their shade always set to
sprite[t->owner].shade though, and will then appear fully bright (shade
-127, since BOUNCEMINE sets it like this).

This fixes issue number 4 from
http://forums.duke4.net/topic/8042-five-minor-problems-report/

git-svn-id: https://svn.eduke32.com/eduke32@5316 1a8010ca-5511-0410-912e-c29ae57300e0
2015-08-02 08:40:42 +00:00
helixhorned
91f09c76c5 Game: in DNCOORDS display, show x/y/z for VEL + ps->fric x and y components.
Also, prettify some ps->fric-related code. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@5313 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-25 19:42:54 +00:00
helixhorned
ff56964e1b Game: fix displayed viewscreen when its x/yrepeat isn't evenly divisible by 4.
git-svn-id: https://svn.eduke32.com/eduke32@5312 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-25 17:23:22 +00:00
terminx
54d016902f vec2_t rotatesprite, take 2
git-svn-id: https://svn.eduke32.com/eduke32@5239 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-26 00:47:54 +00:00
helixhorned
80b766f13a When checking for SE7 water teleportation, regard sign of z velocity.
This fixes RPGs fired upwards at a steep angle teleporting immediately
to underwater when wading in water (reported via PM by Turok 64 Jr).

git-svn-id: https://svn.eduke32.com/eduke32@5190 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-16 11:56:47 +00:00
helixhorned
cf7de5b43a actors.c: fix 3 incorrect '/' -> tabledivide32_noinline rewrites in r4658.
Division has higher precedence than bitwise-OR.

The cases concerned SE3, SE4 and NEON* sprites.
Incidental info: the blinking of NEON* sprites can be controlled via their
lotag, similarly to how you how you give a "random flash number" as SE4 hitag.

git-svn-id: https://svn.eduke32.com/eduke32@5155 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-18 21:59:17 +00:00
terminx
53d2e0939e Revert "vec2_t rotatepoint()."
This reverts commit b0eeef385aecf9cea3ec2bd0ee82f59982942ce0.

git-svn-id: https://svn.eduke32.com/eduke32@5154 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-18 21:49:36 +00:00
terminx
ce5260e235 vec2_t rotatepoint().
git-svn-id: https://svn.eduke32.com/eduke32@5150 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-18 21:37:01 +00:00
hendricks266
8a9fb41d5f CON: Add EVENT_WORLD, EVENT_PREWORLD, and EVENT_PRELEVEL, which respectively function as EVENT_GAME, EVENT_PREGAME, and EVENT_LOADACTOR, but only running once instead of per-actor.
git-svn-id: https://svn.eduke32.com/eduke32@5098 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-27 12:29:05 +00:00
terminx
7845f5e2fe "Stylistic changes"
Translation: I made some stuff const because I felt like it.

git-svn-id: https://svn.eduke32.com/eduke32@5067 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:05 +00:00
helixhorned
1bfdd54f81 actors.c: make Enforcers and Troopers avoid ST1 sectors as in Duke3D.
That is, resurrect the stayput condition for LIZMAN and non-flying
LIZTROOP, but only if changing from a non-ST1 sector. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@5021 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-20 22:10:26 +00:00
terminx
88e0bfd7d3 More twalltype
git-svn-id: https://svn.eduke32.com/eduke32@4981 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-11 05:21:38 +00:00
helixhorned
7cc1067a3d actors.c: style-cleanup A_MoveSpriteClipdist(). DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4974 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-08 18:48:31 +00:00
terminx
4911b9a949 Revise C++ structure trackers for performance and introduce "tspritetype", for temporary sprites or other usages where using the trackers would be invalid or undesired. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4898 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:55:07 +00:00
helixhorned
d7b88df6af actors.c: replace hard-coded list with missing check for SFLAG_NODAMAGEPUSH.
In A_RadiusDamage(). The code snippet that is disabled for such actors
increases the damaged actor's .xvel by (4 times the) damage amount and
is responsible for the strange effect of enemies becoming faster TOWARDS
the player on being hit with an RPG frontally.

Thanks to Fox for a keen eye.

git-svn-id: https://svn.eduke32.com/eduke32@4863 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-28 20:57:13 +00:00
helixhorned
51fe706907 Tweak the behavior of viewscreens to what is more logical IMO.
- At a given time, at most one viewscreen may display TILE_VIEWSCR, namely
  that one which is g_curViewscreen
- sync kinds of distance to compare against VIEWSCREEN_ACTIVE_DISTANCE (was
  Manhattan vs. dist(), now both the latter)
- fix resetting to VIEWSCREEN tile when player is greater from it than that
  distance. When the player is closer to it again, it is *not* reset to
  TILE_VIEWSCR.
- more sync'd g_curViewscreen and sprite[i].yvel (for 'i' being the viewscreen
  sprite)

Note: in a multiplayer context, this needs to be thought about once more.

git-svn-id: https://svn.eduke32.com/eduke32@4843 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-26 17:30:00 +00:00
helixhorned
8b7c10892c Minor cleanup around security cameras / viewscreens. DONT_BUILD.
The only semantic change is that an out-of-sync instance of a distance to
check (viewscreen sprite <-> player sprite) is changed in
actors.c:G_MoveStandables(), from 2048 (as in Duke3D 1.5) to 8192, now
represented by the define VIEWSCREEN_ACTIVE_DISTANCE. I have not yet observed
any change in behavior regarding this change (but there ought to be one).

Also, in DNCOORDS display, print 'totalclock' count, too.

git-svn-id: https://svn.eduke32.com/eduke32@4831 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-21 15:51:48 +00:00
terminx
99e21ffa94 Part 1 of attempting to adhere to C standard section 7.1.3. It turns out it's illegal to use identifiers that begin with _ or have __ anywhere in them. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4747 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:32:56 +00:00
terminx
bf3c0de73a Mainly misc cleanups (and a fix for the C++ build), but there are a few important changes in here.
VM_OnEvent() has become VM_OnEvent(), VM_OnEventWithReturn(), VM_OnEventWithDist(), and VM_OnEventWithBoth() (the latter of which is only ever used once...). Of course, this required every call to VM_OnEvent() be changed.

memberlabel_t and vmstate_t have been changed to use the regular "int" type versus explicitly specifying int32_t as they did previously. The rationale for this change is simply that it looks cleaner, and I think we should move toward just using "int" in most cases where there's no particular reason to specify an explicit data type.

Also changes CON_KILLIT to just "return" instead of "continue". DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4745 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:29:25 +00:00
terminx
3e7f96c32d Fix up conveyor belts. This fixes breakage of the movement in general, as well as corrects the general behavior of the effect so that a player on a moving surface is moved at a constant rate, regardless of whether the player crouches, is shrunk, etc. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4741 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:28:12 +00:00
terminx
ce210a9fd7 Clean up some player code a bit... make bobposx/bobposy a vec2_t, make fricxv/fricyv a per-player vec2_t (TODO: CON access), promote angvel in input_t to int16_t and allow for player angle changes that result in odd numbered angles (we were effectively artificially limiting the angle to 1024 values before), fix some HUD model ID stuff that should help with the weapons in the HRP, clean up a bunch of random functions (P_FireWeapon(), P_DisplayTip(), P_DisplayAccess(), P_DisplayWeapon(), P_GetInput(), etc). Also clean up G_SetupFilenameBasedMusic() to loop through flac/ogg/mid when searching for usermap music replacements. Some of this really needs a BYTEVERSION bump, but these commits aren't for synthesis to build so we're not doing it yet. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4703 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:07:11 +00:00
terminx
183b34f48e More EDUKE32_PREDICT_FALSE, mostly in OSD_Printf(OSD_ERROR...) cases
git-svn-id: https://svn.eduke32.com/eduke32@4699 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:05:46 +00:00
terminx
8934226bb2 Another 5000 lines of pain and tears. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4680 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:36:34 +00:00
terminx
6c6b68d534 Various additional optimizations: add CLASSIC_SLICE_BY_4 mode to unroll some of the loops in a-c, replace integer divisions by a divisor unknown at compile time with usage of libdivide, clean up pragmas further by removing more old stuff that wasn't used anywhere. This is another one of those nasty commits that make people cry. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4658 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:29:21 +00:00
terminx
b7b0b2c7ba Fix up some incorrect PWEAPON macro usage
git-svn-id: https://svn.eduke32.com/eduke32@4654 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:27:01 +00:00
terminx
3eaf78da8b Tie a few random things previously hardcoded to p->curr_weapon == KNEE_WEAPON to curr_weapon being a weapon with a workslike of KNEE_WEAPON instead, and do the same with stuff hard coded for HANDREMOTE_WEAPON
git-svn-id: https://svn.eduke32.com/eduke32@4650 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:25:57 +00:00
terminx
144a4798ce More Polymost cleanup, also consolidate tilesizx and tilesizy into a single tilesiz vec2_t to ensure both x and y are always in the same cache line. I may add a new vec2_16t later. Still need to take care of emulating the old flat array for the sake of CON access.
git-svn-id: https://svn.eduke32.com/eduke32@4623 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:14:21 +00:00
helixhorned
40c2fc7d07 Lunatic: add actor.move() static function and documentation stub.
git-svn-id: https://svn.eduke32.com/eduke32@4590 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-07 18:10:16 +00:00
hendricks266
c1c01f0e0b Replace the funkily-formatted GNU.TXT with the FSF's official gpl-2.0.txt. Also, update the FSF's address in all source files that contain it.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4541 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-20 08:55:56 +00:00
helixhorned
66f5b547cf Replace two missed literal numbers with SE_* enum labels.
git-svn-id: https://svn.eduke32.com/eduke32@4492 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-30 19:39:06 +00:00
helixhorned
3ecf4ca4e5 actors.c: fix a A_CheckSpriteFlags() call for zombie actor to STANDABLE change.
This only affects zombie actors in a sector with a parallaxed ceiling. If they
have SFLAG_NOSHADE clear, their shade is taken from the ceiling upon
changing the statnum. Previously, A_CheckSpriteFlags() received a value that
could only be 0 or 1 for the sprite index (typo).

git-svn-id: https://svn.eduke32.com/eduke32@4477 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-22 08:56:56 +00:00
helixhorned
21de8bb53a Factor out approaching val. to target val by half-difference steps into logapproach().
Fix a case in G_MovePlayers(), where the player sprite's shade is approached
toward the ceiling/floor's shade. Before, it could stop at one above or below!

git-svn-id: https://svn.eduke32.com/eduke32@4392 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-23 14:29:09 +00:00
helixhorned
f077d57547 Amend r3822 ("Make deletion of an amb. sound MUSICANDSFX stop its sound again.")
We shouldn't be using its actor[].t_data[8] because that one is used by the
sprite rotation-fixing system (which fixes STAT_FX sprites to the positions
relative to the pivot, too).
Test case source/lunatic/test/delmusicsfx.lua still passes with this
modification.

git-svn-id: https://svn.eduke32.com/eduke32@4352 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:53 +00:00
helixhorned
b8bd2069ea Rename SPRITE_* flag enum constants to SFLAG_*, for consistency with CON.
git-svn-id: https://svn.eduke32.com/eduke32@4351 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:52 +00:00
helixhorned
1b1cb73e1c A couple of very minor code beauty tweaks.
git-svn-id: https://svn.eduke32.com/eduke32@4346 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:47 +00:00
helixhorned
8d47e476c7 LunaCON: for readgamevar, if ud.config.scripthandle < 0, keep value, don't err.
git-svn-id: https://svn.eduke32.com/eduke32@4256 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:54:34 +00:00
hendricks266
3ed90ca4f2 Block off hacks for the primitive splitscreen CON mod with SPLITSCREEN_MOD_HACKS so they are no longer compiled.
These hacks could no longer be allowed to co-opt the fake multiplayer mode, used for local testing and mod development.

I have half a mind to remove the hacks outright because they could be likened to drilling bolts directly into your car engine just so you could mount a bowling ball as a hood ornament. However, I don't want to take away the splitscreen hack mod from anyone who uses it, and the work done on these hacks should be useful if proper splitscreen were implemented internally using per-player input and multiple renderer/audio passes.

git-svn-id: https://svn.eduke32.com/eduke32@4249 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:04:51 +00:00
helixhorned
21d8e52f0a Remaining sanitizing of .yvel usage plus minor cleanup.
git-svn-id: https://svn.eduke32.com/eduke32@4229 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-28 17:04:36 +00:00
helixhorned
2dd9b7e495 Clean up legacy ROR code and introduce LEGACY_ROR define in game.h.
Also, bound-check two .yvel meant as sprite indices in actors.c.

git-svn-id: https://svn.eduke32.com/eduke32@4228 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-28 17:04:34 +00:00
helixhorned
efdd31d5a9 Guard retrieval of player index (.yvel) from APLAYER sprite.
It is unacceptable that yvel is on one hand modifiable without restriction from
scripting, but can be used as an array index without prior bound check in the C
code. Because that member has an overloaded meaning and is also used for
innocuous purposes such as the green color intensity of an SE light, it's
infeasible to restrict access from scripting. Consequently, we must add bound
checks on the C side. This is the first part of the effort to make .yvel safe,
adding two functions P_Get() and P_GetP(). There are a couple of other uses as
some kind of index.

git-svn-id: https://svn.eduke32.com/eduke32@4226 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-28 17:04:27 +00:00
helixhorned
d26ae58627 Rename 'camsprite' to 'g_curViewscreen', other related cleanup.
git-svn-id: https://svn.eduke32.com/eduke32@4220 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-26 19:45:12 +00:00
helixhorned
380aa880dc Consolidate P_AddWeaponNoSwitch into an additional P_AddWeapon argument.
git-svn-id: https://svn.eduke32.com/eduke32@4216 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-26 19:45:00 +00:00