Commit graph

10519 commits

Author SHA1 Message Date
ZZYZX
27c5e21a1d Moved E_InitStaticHandlers(true) a bit higher in the initialization so that local scripts receive PlayerEntered properly 2017-02-03 09:04:01 +02:00
Christoph Oelckers
1515ab8f4a - removed the long broken and obsolete PlayMovie code. 2017-02-02 23:21:21 +01:00
ZZYZX
490159f6df Removed duplicate PlayerEntered call 2017-02-02 22:37:22 +02:00
ZZYZX
5d8b3e8084 Fixed PlayerEntered for non-travel enters 2017-02-02 22:22:10 +02:00
ZZYZX
7f2d97d7ef Reverted previous commit 2017-02-02 22:18:28 +02:00
ZZYZX
2f79f74d2d Fixed condition 2017-02-02 22:14:22 +02:00
ZZYZX
dae4a48574 G_FinishTravel: only call RETURN/REOPEN on actual hub return as documented, not on every snapshot/savegame load 2017-02-02 21:52:09 +02:00
ZZYZX
957a8cb117 Count resurrect cheat as respawn 2017-02-02 21:34:26 +02:00
ZZYZX
39355cf45d Implemented player scripts. 2017-02-02 21:25:07 +02:00
ZZYZX
19d2f6a4db REOPEN scripts should not be called per player pawn 2017-02-02 20:27:57 +02:00
ZZYZX
7fa50c22e5 Added player events 2017-02-02 20:26:56 +02:00
ZZYZX
bc1194d03b Added ordering for handlers - by int value returned by virtual function GetOrder(); Also, some handlers (WorldUnloaded and WorldThingDestroyed) are now executed in reverse order. 2017-02-02 19:57:00 +02:00
Christoph Oelckers
becc00a8be - added a check to P_VerifyBlockmap to discard all blockmap with blocks whose first entry is not 0.
Seems someone has written a node builder which violates this long-standing assumption (https://www.doomworld.com/vb/source-ports/92468-introducing-zokumbsp/)
However, rather than second-guessing the format's correctness it's more advisable to just discard such blockmaps to avoid some less obvious issues that may creep up.
2017-02-01 21:40:47 +01:00
Christoph Oelckers
d663f31e77 - removed the annoying assert in the dynamic light code.
I don't think that any of the remaining situations are a genuine problem, so let's just set the radius to the larger value.
2017-02-01 19:24:05 +01:00
Christoph Oelckers
a59a9e7420 - missed one. 2017-02-01 19:17:56 +01:00
Christoph Oelckers
6bfbff2a69 - renamed RF_INTERPOLATE to RF_INTERPOLATEANGLES to avoid confusion about its meaning. 2017-02-01 19:11:14 +01:00
Major Cooke
d55f1d3f6f - Adopted Nash's code for handling models with INTERPOLATE. 2017-02-01 19:09:18 +01:00
Major Cooke
39fcea9176 Added INTERPOLATE actor flag, allowing the previously reverted interpolation code to be toggleable. 2017-02-01 19:09:18 +01:00
Christoph Oelckers
04988a331b - fixed warning. 2017-02-01 19:07:41 +01:00
Christoph Oelckers
b77a0eb7cf - let D_PageDrawer always clear the background.
The math in DCanvas::FillBorder does not always work out so better clean the entire screen before drawing a fullscreen image to ensure that the menu blend is always drawn over something valid.
2017-02-01 11:44:13 +01:00
Christoph Oelckers
bc29f61bfd - set the default for menu mouse input to 'touchscreen-like' because there's too much hardware out there which doesn't play nice with mouse input events. 2017-02-01 11:25:28 +01:00
Christoph Oelckers
6d28aa3541 - do not use strtol for parsing critical values that can get large.
This function will truncate everything that is larger than LONG_MAX or smaller than LONG_MIN to fit into a long variable, but longs are 32 bit on Windows and 64 bit elsewhere, so to ensure consistency and the ability to parse larger values better use strtoll which does not truncate 32 bit values.
2017-02-01 11:19:55 +01:00
alexey.lysiuk
1fd37ff2ff Removed unused input from fog boundary fragment program
This should fix https://mantis.zdoom.org/view.php?id=151
2017-02-01 10:05:38 +02:00
Christoph Oelckers
90ee22b760 - don't let monsters without a See state disappear if they try to enter it. 2017-02-01 01:13:26 +01:00
Christoph Oelckers
ccacc23905 - fixed division by 0 in ActorMover code. 2017-02-01 00:21:30 +01:00
alexey.lysiuk
3d147a032c Proper RDTSC implementation for x86_64 targets
Higher 32 bits of Time Stamp Counter were ignored in non-MSVC Windows and macOS builds
2017-01-31 17:51:12 +02:00
alexey.lysiuk
47faaa87fc Fixed deprecation warning reported by Clang
warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
2017-01-31 17:41:44 +02:00
alexey.lysiuk
b12c8a8f79 RDTSC-based glcycle_t for macOS
Time profiler implementation is now closer to Windows version
2017-01-31 16:00:14 +02:00
alexey.lysiuk
1cdfcb4935 RDTSC-based cycle_t for macOS
Windows and macOS now share most of related code
Old implementation using mach_absolute_time() was more precise (at least in theory) but too costly
2017-01-31 15:57:47 +02:00
alexey.lysiuk
6225f60eb2 Added cheat flag for console variables
CVAR with this flag can be set in console or from command line when sv_cheats is enabled
There is no such restriction for changing its value from ACS, via SetCVar() and related functions
'cheat' modifier can be used in CVARINFO lump to create variable of this kind
2017-01-31 14:08:09 +01:00
Christoph Oelckers
94d5d6848e - moved all code that deletes some data from P_SetupLevel to P_FreeLevelData so that P_Shutdown can also call it.
This is particularly important for camera textures which otherwise would not be taken down before a restart.
2017-01-31 13:46:35 +01:00
Christoph Oelckers
3131c08640 - fixed: the restart CCMD must clear out all statically stored pointers to VM functions because they do not survive the shutdown that is needed before loading new data. 2017-01-31 13:41:23 +01:00
Christoph Oelckers
f0a325a904 - fixed: The restart CCMD needs to clear the global FraggleScript before taking down the class system.
This is a soft root and would never be deleted otherwise.
2017-01-31 13:22:05 +01:00
Christoph Oelckers
a188a8839a - fixed a typo in Hexen's light definitions. 2017-01-31 10:09:44 +01:00
ZZYZX
765bc2db39 Made map-section handlers in MAPINFO not static. Static now unambiguously means 'global from GameInfo'. 2017-01-31 06:24:39 +02:00
ZZYZX
6ada9c0291 Made map-section handlers in MAPINFO not static. Static now unambiguously means 'global from GameInfo'. 2017-01-31 06:22:01 +02:00
ZZYZX
26d38e6527 Since WorldThingDestroyed is the reverse of WorldThingSpawned, it should ignore actors that didn't call PostBeginPlay. 2017-01-31 04:53:18 +02:00
ZZYZX
89c475c2d1 Added WorldThingDamaged hook 2017-01-31 04:35:44 +02:00
ZZYZX
9942a59866 Almost forgot (x2): thing revived world event 2017-01-31 04:11:09 +02:00
ZZYZX
e74cd9883d We don't want to store event objects in savegames. 2017-01-31 04:02:55 +02:00
ZZYZX
066b22af0a Almost forgot: WorldTick hook, since ZScript doesn't have delays 2017-01-31 03:24:46 +02:00
ZZYZX
9a8a93fe51 Made global handlers (from GameInfo) implicitly transient, because these never get serialized anyway. 2017-01-31 02:37:36 +02:00
ZZYZX
3c1cecfa2b Implemented WorldLightning and WorldThingDestroyed. 2017-01-31 02:15:57 +02:00
ZZYZX
71f62af6db Implemented WorldThingDied (calls at the same point as SCRIPT_Kill); Added Inflictor parameter for WorldThingDied. 2017-01-31 02:07:00 +02:00
ZZYZX
27c8140c46 Replaced specialized event handlers with Event structure passed to a method; returned the check for virtual implementation to make sure that we don't waste time initializing the event data. 2017-01-31 01:28:47 +02:00
Christoph Oelckers
0e5aee48aa - clamp MAPINFO provided fog density values to a valid range because negative values can trigger undefined shader behavior. 2017-01-30 22:23:36 +01:00
Christoph Oelckers
7c5e3fb677 - disabled angular interpolation again.
This can only be used if the entirety of the game code is aware and dealing with this properly. However, that isn't the case so the amount of glitches this causes far exceeds the number of desired interpolations.
2017-01-30 14:19:50 +01:00
ZZYZX
5751f84350 Moved empty virtual methods to script side 2017-01-30 11:56:03 +02:00
ZZYZX
2382a76be5 Made separate .Find in Static handlers for convenience. 2017-01-30 09:33:06 +02:00
ZZYZX
c7e3ff2356 Static event handlers can create/register/unregister other static event handlers. 2017-01-30 09:28:27 +02:00