Commit graph

54 commits

Author SHA1 Message Date
smallmodel
581585a47c
Prevent clearing the event command list if the event system is not initialized
This fixes the issue where the game could crash (especially in optimized release) due to a memory corruption, because the event command list was deconstructed earlier
2024-10-15 20:52:53 +02:00
smallmodel
2e673a6bc9
Delete posted events when canceling 2024-10-13 23:49:52 +02:00
smallmodel
fc6bffe683
Don't post event when loading save game 2024-09-26 01:01:27 +02:00
smallmodel
f9d264058b
Use safe version of sprintf and strcpy 2024-09-20 23:08:53 +02:00
smallmodel
0b106cf47e
Print errors only when developer mode is set 2024-09-14 13:21:08 +02:00
smallmodel
5cc168111c
Fix class not dumping properly 2024-08-31 22:10:44 +02:00
smallmodel
56cbab8661
Fix NumEventCommands() returning an incorrect result 2024-08-31 21:42:07 +02:00
smallmodel
3cd5acf3aa
Fixed issue with case-sensitive variables.
normal/return commands are case-insensitive
getter/setter commands are case-sensitive
2024-04-22 20:10:01 +02:00
smallmodel
5a44740592
Fixed invalid event name causing crashes 2024-01-24 21:52:22 +01:00
smallmodel
b10ce9a426
Added GetKey() / SetKey() in con_set's Entry, so ScriptVariable can override it and set the key appropriately 2023-11-28 19:50:19 +01:00
smallmodel
bd2c1c387b
Added Event::Exists() to check if a given command name exists 2023-11-02 20:05:59 +01:00
smallmodel
1698f6d1bf
The return value of an event must be the first value 2023-11-02 19:53:26 +01:00
smallmodel
5824022745
Added ScriptRemove 2023-10-30 22:03:37 +01:00
smallmodel
3ecb5bd06a
Fixed WaitExecuteThreadInternal() waiting on the group instead of the thread 2023-10-30 21:59:47 +01:00
smallmodel
43bb5ce653
Fixed BroadcastEvent not returning true with 1 processed listener + Fixed UnregisterTarget not removing the name 2023-10-27 21:03:07 +02:00
smallmodel
30d26c3e44
Fixed register/unregistration 2023-10-27 20:42:01 +02:00
smallmodel
fb4bf4fcaa
Fixed wrong value() for GetGameScript in CreateScriptInternal() 2023-10-26 20:07:49 +02:00
smallmodel
6b79770783
Fixed HashCode for command_t (must be case-insensitive) 2023-09-18 23:35:11 +02:00
smallmodel
fc3749e008
Added Event() constructor that accepts another event and the number of arguments 2023-09-17 16:26:48 +02:00
smallmodel
c5a46be23e
Optimized calls to Event() (avoid allocating a new Event when it can be reused) 2023-09-07 18:22:07 +02:00
smallmodel
47a3c0bf55
Optimized event name
Use a static char*, instead of an allocated str
2023-09-07 18:05:49 +02:00
smallmodel
be04f31256
Replaced eventInfo_t with DataNode
DataNode is now used only at initialization time and is destroyed after initialization
2023-09-04 21:38:58 +02:00
smallmodel
7d4cdac52c
Use WaitTillAllowed for waitTillTimeout, waitTillAny and WaitTillAnyTimeout 2023-08-20 01:46:38 +02:00
smallmodel
de08fe7ca3
Fixed linux compile error 2023-08-19 21:21:41 +02:00
smallmodel
5b82cc4f11
Made Event::ErrorInternal const
Fixed ProcessEvent() not handling exceptions
2023-08-19 21:00:04 +02:00
smallmodel
46e57f0a1f
Added maxDataSize so the event can be preallocated 2023-08-19 20:48:46 +02:00
smallmodel
86a6dd020f
Check for WaitTillAllowed instead 2023-08-19 18:21:32 +02:00
smallmodel
2efeb7e972
Don't call Unregister with "delete" and "remove" in the destructor as UnregisterAll() will already do it
Don't call CancelPendingEvents() if the event system hasn't started
2023-08-19 15:39:59 +02:00
smallmodel
b1753df1ed
Reworked con_set and con_arrayset so that they have their own Entry class 2023-08-19 02:56:51 +02:00
smallmodel
3c2600648c
Fixed "immediateremove" wrong spelling 2023-08-17 03:03:08 +02:00
smallmodel
467802c466
Fixed crash when loading savegame 2023-08-16 19:13:52 +02:00
smallmodel
c4738966fe
Using g_utils.cpp from fakk 2023-08-15 01:27:35 +02:00
smallmodel
34535ad415
Moved AnimationEvent from Animate to a separate source file 2023-08-11 21:48:25 +02:00
smallmodel
3ca09613e1
Fixed string constants 2023-08-10 12:08:53 +02:00
smallmodel
c115796137
Optimized GetValue() so it moves value instead of copying it 2023-08-01 19:30:28 +02:00
smallmodel
8a46597820
Added a new constructor that accepts numArgs as parameters
(this fixes bad script commands)
2023-07-05 21:42:36 +02:00
smallmodel
5333c7ff4a
Removed empty line before opening braces 2023-07-05 20:52:55 +02:00
OM
04c7565281 Fixed a few warnings 2023-06-17 02:27:12 +02:00
OM
c287638f99 Reworked file inclusion (using relative path) 2023-06-17 01:24:20 +02:00
OM
e4fa0fff3a Renamed **game** to **fgame** 2023-06-15 23:44:02 +02:00
OM
e45289d28b Renamed **NO_SCRIPTENGINE** to **WITH_SCRIPT_ENGINE** 2023-05-29 01:33:07 +02:00
OM
1e18b027a0 Fixed Listener::EventPending always returning true regardless of the event 2023-05-18 00:52:27 +02:00
OM
a4e0e7b697 L_ProcessPendingEvents tweaks 2023-05-16 20:18:43 +02:00
L
1ed03b0716 Using LISTENER_Cvar_Get macro 2023-05-01 15:15:01 +02:00
L
8c6a6f553a Added Event::GetLastValue 2023-02-02 23:47:25 +01:00
L
773e8bc79f Fixed compilation errors related to case-sensitivity 2023-02-01 19:29:13 +01:00
L
d4faf0c0e0 Fixed compilation errors on Unix 2023-02-01 00:28:40 +01:00
L
b8c56cc23c Use override keyword when overriding virtual methods 2023-01-31 19:59:39 +01:00
L
cf18c3a96f Moved script stuff to their matching directory 2023-01-30 18:20:50 +01:00
L
a71c6db442 Using a definite stable version of MEM_BlockAlloc 2023-01-30 17:11:44 +01:00