Commit graph

71 commits

Author SHA1 Message Date
ZZYZX
7905a0e041 Exported destructible geometry to ZScript 2018-11-07 11:00:08 +01:00
Player701
8e8d3719f7 - Introduced an enum named EventHandlerType and changed the bool argument in E_NewGame to this type. 2018-11-01 20:56:51 +01:00
player701
e04613811d - Static NewGame events now fire before loading a map, and normal NewGame events fire after registering per-map handlers and before all other events.
- Static event handlers now unregister after per-map handlers.
- All event handlers now unregister in reverse order.
2018-11-01 20:56:50 +01:00
ZippeyKeys12
b26aad2741 Add NewGame to EventHandler
https://forum.zdoom.org/viewtopic.php?t=61908
2018-09-15 20:33:13 +02:00
Marisa Kirisame
ab56666219 Add "IsFinal" parameter for CheckReplacement.
If set to true it guarantees that the replacement is final and will not go through the rest of the replacement chain.
2018-08-18 00:52:34 +02:00
Marisa Kirisame
5095ee28f1 Added CheckReplacement to event handlers, a function inspired by its namesake in Unreal's Mutator class.
Performs runtime replacement of actor classes.
Takes priority over the "replaces" keyword in both DECORATE and ZScript.
2018-08-18 00:52:32 +02:00
alexey.lysiuk
047ec41df9 Added activation type to WorldLine(Pre)Activated events
https://forum.zdoom.org/viewtopic.php?t=60232
(cherry picked from commit ba4cc1a6ca)
2018-05-09 10:34:12 +02:00
alexey.lysiuk
cbad9ac219 Fixed crash when event handler class isn't derived from StaticEventHandler 2018-03-29 16:41:29 +03:00
Marisa Kirisame
0656916bf2 Add WorldLinePreActivated to override line activation, as a counterpart to WorldLineActivated. 2018-03-24 16:30:49 +01:00
Marisa Kirisame
3072c9bf7c Add PostUiTick(). Happens after all other tickers. Useful for handling changes in the play side within the same tic. 2018-03-24 10:24:13 +01:00
Marisa Kirisame
69c6e95b08 Add worldlineactivated event, triggered after successful line activation. 2018-03-24 10:23:31 +01:00
Rachael Alexanderson
8b3cc6a617 - remove redundant vm.h include in events.cpp 2018-01-21 01:02:00 -05:00
alexey.lysiuk
ef9c3b4f54 Fixed unset inflictor in WorldThingDamaged event
https://forum.zdoom.org/viewtopic.php?t=57527
2017-08-09 16:16:33 +03:00
alexey.lysiuk
ecbfb255f7 Fixed handling of default values in EventHandler.SendNetworkEvent() 2017-04-22 10:28:53 +03:00
Christoph Oelckers
96d328de9b - removed all Doom Source license and all default Raven copyright headers and replaced them with GPLv3. Also fixed the license in a few other files.
For some files that had the Doom Source license attached but saw heavy external contributions over the years I added a special note to license all original ZDoom code under BSD.
2017-04-17 13:33:19 +02:00
Christoph Oelckers
6599e2c425 - moved the VM types into their own file and only include it where really needed. 2017-04-13 01:12:04 +02:00
Christoph Oelckers
1dcc017daf - reimplemented the position display, but changed its position a bit upward.
- activated the RenderOverlay event, now that it can be called from the correct spot, i.e. right after the top level HUD messages are drawn. The system's status output will still be drawn on top of them.
2017-03-29 23:51:53 +02:00
Magnus Norddahl
0c9014b984 - move r_utility globals into r_viewpoint and r_viewwindow
- change r_utility functions to only work on FRenderViewpoint and FViewWindow
2017-03-11 23:28:07 +01:00
ZZYZX
4dd1910d6d Fixed the size of the local params array for WorldTick/UiTick 2017-03-09 15:38:49 +01:00
ZZYZX
5eb20b7877 Removed Create, CreateOnce, Register, Unregister from the C++ side as well 2017-03-09 15:38:49 +01:00
ZZYZX
01561eb768 Added: UiTick in EventHandlers, a callback that executes at 35fps on every handler in ui scope;
Removed: RenderOverlay, RenderFrame (commented out), Create, CreateOnce, Register, Unregister (completely)
2017-03-09 15:38:49 +01:00
ZZYZX
883048b538 Added E_Responder call for direct mouse input interception 2017-03-07 12:46:26 +01:00
Christoph Oelckers
9d6b5f7015 - switched the menu code over to the data types of the event system.
Note that this will require adjustment of all menu code which overrides the Responder method!
2017-03-06 22:27:51 +01:00
ZZYZX
21ecd714ec Added a way to tell apart console-executed events from code-executed SendNetworkEvent 2017-03-06 11:23:36 +01:00
ZZYZX
3338fb7f33 Added SendNetworkEvent static method to EventHandler; Fixed qualified static method call from own class (previously was 'shadowed' by qualified virtual method call) 2017-03-04 00:57:41 +02:00
ZZYZX
723f9770a4 Merge remote-tracking branch 'gz/master' into gz_master2 2017-03-03 23:33:02 +02:00
ZZYZX
a924564bf3 Implemented hard separation between playsim ConsoleEvent and networked ConsoleEvent (ConsoleProcess, NetworkProcess) 2017-03-03 23:21:12 +02:00
Christoph Oelckers
720e05d131 - fixed memory leak in DEM_NETEVENT.
- added handling for DEM_NETEVENT to SkipCommand.
- keep the data of DEM_NETEVENT at a fixed length to simplify handling.
2017-02-27 02:31:19 +01:00
Christoph Oelckers
bfa7a2d737 - fixed: DStaticEventHandler did not declare its pointers. 2017-02-26 10:59:05 +01:00
Christoph Oelckers
c6a5e74c75 - added GC support to the events. OF_Fixed is not recommended because it can seriously impede the GC's functionality if just being used as a lazy means to avoid collection. 2017-02-24 19:01:19 +01:00
alexey.lysiuk
a9f650c3f2 Fixed compilation warnings reported by GCC/Clang
src/events.cpp:167:66: warning: format specifies type 'char *' but the argument has type 'char' [-Wformat]
src/events.cpp:167:84: warning: data argument not used by format string [-Wformat-extra-args]
src/events.cpp:1036:20: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
2017-02-14 22:13:31 +02:00
ZZYZX
b23937c924 Safety measures: disallow using netevent when not in a level 2017-02-06 16:14:18 +02:00
ZZYZX
52d9077477 Added playsim event (netevent CCMD) 2017-02-06 16:02:44 +02:00
ZZYZX
77546ad5c2 Added non-playsim console-called event 2017-02-06 15:52:20 +02:00
ZZYZX
b18b71c065 Mouse coordinates for UI mouse events are actually data1/data2, not x/y 2017-02-03 20:49:45 +02:00
ZZYZX
f816537992 Setting Order directly (while the event handler is registered) will result in all sorts of broken behavior. Made readonly. 2017-02-03 20:44:27 +02:00
ZZYZX
03f7c39ea7 Fixed mouse input in event handlers. Added RequireMouse field in event handler to signify that native mouse should be turned on for certain handlers. 2017-02-03 20:34:34 +02:00
ZZYZX
0d96517f5f Implemented RenderOverlay hook that executes directly after level and statusbar 2017-02-03 13:29:34 +02:00
ZZYZX
b45af599c5 Explicit handler deinitizliation in P_Shutdown and P_FreeLevelData 2017-02-03 13:01:15 +02:00
ZZYZX
9bb4cf1c03 User input events first take 2017-02-03 12:28:40 +02:00
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
ZZYZX
39355cf45d Implemented player scripts. 2017-02-02 21:25:07 +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
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
066b22af0a Almost forgot: WorldTick hook, since ZScript doesn't have delays 2017-01-31 03:24:46 +02:00