From 4b514c3fe74835db3d8425ac9edcb3d5428b9404 Mon Sep 17 00:00:00 2001 From: zonical Date: Sun, 24 Nov 2024 09:33:46 +1300 Subject: [PATCH 1/2] Move referencing-players.md from reference to guides --- docfx/docs/{reference => guides}/referencing-players.md | 0 docfx/docs/guides/toc.yml | 3 +++ docfx/docs/reference/toc.yml | 5 +---- 3 files changed, 4 insertions(+), 4 deletions(-) rename docfx/docs/{reference => guides}/referencing-players.md (100%) diff --git a/docfx/docs/reference/referencing-players.md b/docfx/docs/guides/referencing-players.md similarity index 100% rename from docfx/docs/reference/referencing-players.md rename to docfx/docs/guides/referencing-players.md diff --git a/docfx/docs/guides/toc.yml b/docfx/docs/guides/toc.yml index 477af3f63..903a358f0 100644 --- a/docfx/docs/guides/toc.yml +++ b/docfx/docs/guides/toc.yml @@ -6,3 +6,6 @@ - name: Dependency Injection href: dependency-injection.md + +- name: Referencing Players + href: referencing-players.md \ No newline at end of file diff --git a/docfx/docs/reference/toc.yml b/docfx/docs/reference/toc.yml index b4de3a76c..62b630950 100644 --- a/docfx/docs/reference/toc.yml +++ b/docfx/docs/reference/toc.yml @@ -1,5 +1,2 @@ - name: Core Configuration - href: core-configuration.md - -- name: Referencing Players - href: referencing-players.md + href: core-configuration.md \ No newline at end of file From 12e911a1e4a44481b909efa4c50ed9aa8e408996 Mon Sep 17 00:00:00 2001 From: zonical Date: Sun, 24 Nov 2024 10:04:29 +1300 Subject: [PATCH 2/2] Update game-events.md to add a caution regarding accessing data in GameEvent instances after the function is called. --- docfx/docs/features/game-events.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docfx/docs/features/game-events.md b/docfx/docs/features/game-events.md index 3c330a3f7..5faab3797 100644 --- a/docfx/docs/features/game-events.md +++ b/docfx/docs/features/game-events.md @@ -54,6 +54,9 @@ The specific subclass of `GameEvent` will provide strongly typed parameters from These event properties are mutable so you can update them as normal and they will update in the event instance. +> [!CAUTION] +> `GameEvent` instances and their properties will cease to exist after the event listener function is called, which means that you will encounter errors when accessing properties in timers and functions like `Server.NextFrame()`. You should store the value of properties in variables before calling functions like `Server.NextFrame()` so you can read the data safely. + ## Preventing Broadcast You can modify a game event so that it does not get broadcast to clients by modifying the `bool info.DontBroadcast` property. e.g.