diff options
| author | raven <citrons@mondecitronne.com> | 2026-02-10 17:30:34 -0600 |
|---|---|---|
| committer | raven <citrons@mondecitronne.com> | 2026-02-10 17:30:34 -0600 |
| commit | d24a596f8421dc6cd0f42948ec43876e607dcf73 (patch) | |
| tree | 5bd6e90d5cc6ea7b949aee0f7a486fd5cb81e13b /server/object/object.go | |
| parent | 8024722bd5db50bc3ec602b807819a87bd65035e (diff) | |
refactor login handling
Diffstat (limited to 'server/object/object.go')
| -rw-r--r-- | server/object/object.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/object/object.go b/server/object/object.go index 70b84c2..82e8c59 100644 --- a/server/object/object.go +++ b/server/object/object.go @@ -76,6 +76,10 @@ func (w *World) setData(id string, o proto.Object) { } } +func (w *World) GetCachedObject(id string) Object { + return w.objects[id] +} + func (w *World) GetObject(id string) Object { if w.objects[id] == nil { o := w.getData(id) @@ -83,7 +87,7 @@ func (w *World) GetObject(id string) Object { w.objects[id] = w.kinds[o.Kind].Undata(o) } } - return w.objects[id] + return w.GetCachedObject(id) } func (w *World) PutObject(id string, o Object) { |
