It's still not pretty though since there's no interpolation from G_DrawRooms().
git-svn-id: https://svn.eduke32.com/eduke32@3149 1a8010ca-5511-0410-912e-c29ae57300e0
Instead of later in P_ProcessInput(). This fixes one drawrooms() call in
between where the sectnum is the camera's, but the position the player's,
which can lead to a slow "outer view" render in Polymer.
git-svn-id: https://svn.eduke32.com/eduke32@3142 1a8010ca-5511-0410-912e-c29ae57300e0
These control the maximum difference in height between two sectors that the player will automatically traverse without needing to jump.
The latter controls the special case when the player's sector's lotag is ST_1_ABOVE_WATER or p->spritebridge == 1.
BYTEVERSION bumped.
git-svn-id: https://svn.eduke32.com/eduke32@3100 1a8010ca-5511-0410-912e-c29ae57300e0
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
This is one of the cases where the duplicated code has minor modifications
at each site. These are handled by function args here.
git-svn-id: https://svn.eduke32.com/eduke32@2983 1a8010ca-5511-0410-912e-c29ae57300e0
Playing around with Coccinelle's semantic patches... be prepared for more.
git-svn-id: https://svn.eduke32.com/eduke32@2979 1a8010ca-5511-0410-912e-c29ae57300e0
Well, this never worked anyway, but invoking demons flying out of your
nose is never a good idea.
git-svn-id: https://svn.eduke32.com/eduke32@2977 1a8010ca-5511-0410-912e-c29ae57300e0
Note that since setting RETURN did nothing before, there is no backwards compatibility to uphold. Therefore, setting RETURN to 1 will cause the pistol to be selected, not disable the event. Set RETURN to -1 to cancel switching.
git-svn-id: https://svn.eduke32.com/eduke32@2976 1a8010ca-5511-0410-912e-c29ae57300e0
Basically, base palettes with lower indices trump higher ones. For example,
when one player is underwater and the other above, the normal palette takes
precedence.
git-svn-id: https://svn.eduke32.com/eduke32@2955 1a8010ca-5511-0410-912e-c29ae57300e0
To enable it, the HUD-less (maximized) screen size must be selected.
git-svn-id: https://svn.eduke32.com/eduke32@2944 1a8010ca-5511-0410-912e-c29ae57300e0
Using the players's cursectnum instead of "updating" the sectnum means that it
won't glitch on SoS. The z clamping (basically a port of some code from
G_DrawRooms) is so that the view won't be drawn from under the floor when shrunk.
git-svn-id: https://svn.eduke32.com/eduke32@2939 1a8010ca-5511-0410-912e-c29ae57300e0
Using rotatesprite with bit 8 clear (scale to viewport) but using
fullscreen clipping bounds is never what we want. Also, tweak for
fake multi.
git-svn-id: https://svn.eduke32.com/eduke32@2932 1a8010ca-5511-0410-912e-c29ae57300e0
This uses the new rotatesprite bit introduced earlier. Also, allow the
HUD-less screen size.
git-svn-id: https://svn.eduke32.com/eduke32@2931 1a8010ca-5511-0410-912e-c29ae57300e0
I checked all direct and transitive uses of that function and am fairly
confident that it is never used.
git-svn-id: https://svn.eduke32.com/eduke32@2930 1a8010ca-5511-0410-912e-c29ae57300e0
The black translucent background underneath the user map list will now
be drawn with a shade 32 tile 0 instead of tile BLANK, since I've seen
the latter being replaced in some mod. Also, it will look the same
regardless of screen aspect.
git-svn-id: https://svn.eduke32.com/eduke32@2928 1a8010ca-5511-0410-912e-c29ae57300e0
This makes the code rather more readable in some places. Unlike the two
preceding commits, this one is actually purely textual replacement.
git-svn-id: https://svn.eduke32.com/eduke32@2877 1a8010ca-5511-0410-912e-c29ae57300e0
Functions affected are G_Move* in actors.c and A_Shoot in player.c.
Here, the p variable had function scope, now it's redeclared in shorter
blocks. I'm still relatively sure that no observable behavior was changed,
though not as sure as in part 1. Also, some dead assignments and the like
are eliminated.
git-svn-id: https://svn.eduke32.com/eduke32@2876 1a8010ca-5511-0410-912e-c29ae57300e0
uhypsq calculates the hypotenuse using unsigned multiplication. This is
permissible since for arbitrary int32s a and b, the following holds in
two's complement arithmetic:
(int32_t)((uint32_t)a * b) == (int32_t)((int64_t)a * b)
("Signed and unsigned multiplication is the same on the bit level.")
This fixes various overflows where wall lengths for walls of length > 46340
are calculated, but does not rid us of other overflows in the same vein
(usually dot products between vectors where one point is a wall vertex and
the other a position in a sector).
git-svn-id: https://svn.eduke32.com/eduke32@2791 1a8010ca-5511-0410-912e-c29ae57300e0
This fixes an integer overflow when a distance is calculated later.
git-svn-id: https://svn.eduke32.com/eduke32@2785 1a8010ca-5511-0410-912e-c29ae57300e0
NAM and Napalm can now share their con, def, and rts files if the one for their respective game is not present because the con and rts files are identical.
Also, decapitalize two string literals missed in r2540.
git-svn-id: https://svn.eduke32.com/eduke32@2726 1a8010ca-5511-0410-912e-c29ae57300e0
EVENT_SOUND: triggered upon playback of any sound, this allows the "hard coded" sounds to be altered in a context-aware fashion instead of having to resort to clunky hacks like replacing them with a blank sound effect. RETURN var
iable is set to the sound effect # of the sound to be played, or -1 to cancel playback.
EVENT_CHECKTOUCHDAMAGE: triggered in P_CheckTouchDamage() whenever the player collides with anything. Value of RET
URN is set to the result provided by clipmove() and so can be decoded in the same way. Value of RETURN when the event is over can also be manipulated to control some of the hard coded damage effects.
EVENT_CHECKFLOORDAMAGE: triggered in P_CheckFloorDamage(), RETURN is simply the picnum of the floor of the sector t
he player is in. Can be used to cancel hard coded floor damage effects or to make other tiles exhibit the same eff
ects
Other misc fixes and cleanups, including a possible workaround for Duke Plus SECTOREFFECTOR light issues wherein all SE49 and SE50 that have a statnum of STAT_EFFECTOR are simply changed to STAT_LIGHT during the STAT_EFFECTOR loop
now.
git-svn-id: https://svn.eduke32.com/eduke32@2652 1a8010ca-5511-0410-912e-c29ae57300e0
This is so that it may be intercepted in the future.
The only code that's not replaced by the function call is with the CON
interface to g_player[].ps->pals via player[].pals X and .pals_time.
Also, comment out one instance because it's overwritten by a succeeding one.
git-svn-id: https://svn.eduke32.com/eduke32@2643 1a8010ca-5511-0410-912e-c29ae57300e0
Among other things, comment out very seldomly (or not at all)
used sprite member macros: SV, ZV, RX, RY, CX, CY, CD, PL.
git-svn-id: https://svn.eduke32.com/eduke32@2639 1a8010ca-5511-0410-912e-c29ae57300e0
The nofloorpalrange beginning and end indices are silently clamped to 1 .. 255.
git-svn-id: https://svn.eduke32.com/eduke32@2524 1a8010ca-5511-0410-912e-c29ae57300e0