75 Commits
Author SHA1 Message Date
Alex S 25b336eb58 fix(fgame): print objective text to all player screens (#901) 2026-03-10 21:16:46 +01:00
smallmodel 1b33f499e7 fix(fgame): add missing skipFade parameter from mohaab in leveltransition and missiontransition 2026-01-29 19:50:27 +01:00
smallmodel 9fd2fb13f1 feat(fgame): add an optional parameter to removeclass and killclass to control subclass inclusion (#863)
Subclasses are included by default.
2025-12-15 23:52:32 +01:00
smallmodel 042108d12c fix(fgame): createlistener must create a SimpleArchivedEntity instead of a Listener (#855)
This allows these objects to be removed upon map change or restart.
This also allows existing scripts to assign a targetname on the created object.
2025-11-29 18:12:37 +01:00
smallmodel 26508d26f0 docs: correctly annotate version changes in comments 2025-11-21 23:19:46 +01:00
smallmodel c2d5f203b8 fix(fgame): remove unnecessary radian conversion for sqrt() 2025-11-20 19:38:27 +01:00
smallmodel a824d9e912 Fix access violation in angles_pointat with entity and target 2025-08-16 22:50:57 +02:00
smallmodel 850b6de927 Fix cache ignoring sv_precache when called from scripts 2025-07-06 19:47:10 +02:00
smallmodel bd93897286 Add PMF_NO_WEAPONBAR to hide the weapon bar using drawhud 2 2025-07-02 21:28:12 +02:00
smallmodel 8c03001cbb Make sure to check if the entity is valid for removeent 2025-06-29 19:45:27 +02:00
smallmodel ba3e68adc5 Make the trace functions properly match with the original game 2025-06-08 23:48:17 +02:00
smallmodel 9ec3c68d64 Add file functions that uses the engine file API (#740)
This provides a safer and more secure alternative to the standard C file API.
2025-06-07 23:54:31 +02:00
smallmodel d7ed1c8530 Add a script function to get the value of a key given an info string 2025-06-03 19:36:33 +02:00
smallmodel 8bbebe9dea Send the print command to each client instead of broadcasting
This prevents spamming the server console/logfile with print messages
2025-05-25 02:38:08 +02:00
smallmodel e37a5f4d06 Add "isBot" to check whether or not the player is a bot 2025-02-02 21:02:06 +01:00
smallmodel 1eb7458af9 Add event_subscribe and event_unsubscribe scripting commands 2025-02-02 19:14:07 +01:00
smallmodel 7f0c506fea Add a comment about the spawn behavior in OG 2025-01-16 23:59:04 +01:00
smallmodel 3f9bed938e Fix NULL string checking 2025-01-15 18:03:37 +01:00
smallmodel 619d27da81 Add getentity 2025-01-15 18:00:04 +01:00
smallmodel a067c58b3d Add EV_ScriptThread_FileClose2 to call fclose() without getting the return value 2025-01-01 23:38:49 +01:00
smallmodel b16aaa5adc Use a scripted object to store the C file handle for file functions 2025-01-01 12:40:59 +01:00
smallmodel acf2dd0ad1 Use an integer when waiting
Since the expected time is in milliseconds, it's best to use an integer instead. Floating-point numbers lose precision as they get larger, especially when the level's current time is long (e.g., over 24 hours). This loss of precision could cause scripts to wait unsuccessfully with small numbers, causing unexpected behaviors
2024-12-13 22:17:43 +01:00
smallmodel b719455b78 Add the missing newline for iprintln functions 2024-11-25 19:18:15 +01:00
smallmodel e2f4d8cd6b Use explicit constants when checking g_gametype 2024-11-22 19:44:53 +01:00
smallmodel b68bb4cee7 Fix integer overflow in wait command that would cause infinite loop in stock scripts
It was causing a rare infinite loop in anim/stand.scr where it waits for 9999999 if the actor is unarmed and medic
2024-11-16 19:10:26 +01:00
smallmodel 3e84dbe6ac Initialize skipFade 2024-11-06 18:53:43 +01:00
smallmodel f347102ecb Add the skipFade parameter in bsptransition so the fade can be skipped
Useful for scripts that are using fadeout during cinematics and then transitioning to the nextmap, like in e2l2 where vehicles explode at the end of the mission
2024-11-05 22:37:33 +01:00
smallmodel 8a774c02dc Call G_BeginIntermission() instead of G_MissionFailed() when calling missionfailed 2024-11-03 00:41:26 +01:00
smallmodel f9d264058b Use safe version of sprintf and strcpy 2024-09-20 23:08:53 +02:00
Sébastien Noel a010e648ee Fix a few typos 2024-09-19 10:52:47 +02:00
smallmodel 74ccb03e54 Reduced compilation warnings 2024-06-07 20:34:13 +02:00
smallmodel 884a76db4c Drop error instead of throwing an exception to meet non-throwing exception specification 2024-06-07 19:55:33 +02:00
smallmodel a85694b548 Fixed incorrect method for EV_ScriptThread_Showmenu.
This fixes #302 where screen text with the mission date would never be shown.
2024-05-28 20:49:09 +02:00
smallmodel daa7aceecf Fixed sighttrace not properly passing entities
This fixes the issue where some scripts (like e2l3's BattleHouse) expect sighttrace to ignore entities (fixes #202)
2024-05-01 17:43:04 +02:00
smallmodel 06dab5d8b0 Refactored ScriptThread::EventPointsWithinDist for more clarity 2024-04-21 19:39:39 +02:00
smallmodel bd999a6d9c Fixed Trace's pass_entities parameter (didn't properly ignore entities) 2024-02-15 23:48:23 +01:00
smallmodel 56044dd8f8 HideMouse doesn't take parameters 2024-02-03 23:19:55 +01:00
smallmodel 808916029e Formatted scriptthread source file 2024-01-29 00:03:51 +01:00
smallmodel 24dbc1ce4e Use C vectors 2024-01-28 23:29:56 +01:00
smallmodel ad917d96c8 Use roundf() for more clarity 2024-01-17 19:33:07 +01:00
smallmodel d217b1d561 Fixed some events having wrong parameters for documentation 2023-12-28 20:50:47 +01:00
smallmodel 0167f0a3a4 Using Added in OPM comments 2023-12-28 20:35:33 +01:00
smallmodel 433305617c IsAlive: check if the given listener is an actual entity 2023-11-26 20:38:14 +01:00
smallmodel e453d1fa17 Added "none" for teamwin argument 2023-11-13 18:22:35 +01:00
smallmodel a7301ed7b6 Fixed teamwin not working on TOW and Liberation 2023-11-13 18:21:08 +01:00
smallmodel 81b711364e Use Event::Exists() instead of getting it, to see if an event exists 2023-11-02 20:14:34 +01:00
smallmodel 7fe7a12167 In CreateThreadInternal and CreateScriptInternal, use GetScriptClass() directly from ScriptThread 2023-11-01 16:53:31 +01:00
smallmodel 220c82954c Don't execute script thread now if paused 2023-10-30 22:46:50 +01:00
smallmodel f96b606a1a Fixed ScriptThread timing 2023-10-27 21:02:18 +02:00
smallmodel 57e450a745 Thread state fix 2023-10-27 20:41:47 +02:00