1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-23 06:07:25 +08:00
Commit Graph

50 Commits

Author SHA1 Message Date
Dan Balasescu
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
ekrctb
b321b20e9d Remove OnAdd/OnRemove of HitObjectContainer
Instead, override `AddDrawable`/`RemoveDrawable`.
2021-06-03 15:00:16 +09:00
ekrctb
2c9e5b6c7e Replace EntryCrossedBoundary with more useful RemoveRewoundEntry property
It can be used for dynamically added entries.
2021-06-03 15:00:16 +09:00
ekrctb
fe2934db1d Factor out lifetime management logic of HitObjectContainer 2021-06-03 14:57:28 +09:00
ekrctb
ff04942295 Change timing of HitObjectContainer.OnAdd/OnRemove
Now, `OnAdd` is always invoked after the DHO is added to the container.
This change is required by `ScrollingHitObjectContainer` to compute origin adjusted lifetime when origin position is relative to the parent drawable size.
2021-05-31 20:56:25 +09:00
ekrctb
913fc8c3bc Revert the change of not adding non-pooled DHO to HOC until alive 2021-05-04 16:44:48 +09:00
ekrctb
c83c804057 Expose lifetime entries from HOC 2021-04-29 14:42:41 +09:00
ekrctb
d262956146 Always use LifetimeEntry to manage hit objects in HitObjectContainer
Previously, non-pooled DHOs were immediately added as children of the HOC when Add is called. Also, non-pooled DHOs were always attached to the HOC as children.
New behavior is that non-pooled DHOs are only added after CheckChildLifetime, and only attached to the HOC while the DHOs are alive.

- LifetimeManagementContainer inheritance of HOC is removed, as it is now all DHOs are "unmanaged" (previously `AddInternal(false)`).
- The signature of `Clear` is changed, and it is now always not disposing the children immediately.
2021-04-29 14:38:01 +09:00
smoogipoo
f4a31287bf Add/use IHitObjectContainer interface instead of IEnumerables 2021-02-08 20:11:06 +09:00
Bartłomiej Dach
1d9aaac2c2 Fix HOC not propagating DHO results applied on kill
`DrawableHitObject.OnKilled()` calls `UpdateResult()` to clean up a
hitobject's state definitively with regards to the judgement result
before returning the DHO back to the pool.

As it turns out, if a consumer was relying on this code path (as taiko
was in the case of nested strong hit objects), it would not work
properly with pooling, due to `HitObjectContainer` unsubscribing from
`On{New,Revert}Result` *before* calling the DHO's `OnKilled()`.

This in turn would lead to users potentially getting stuck in gameplay,
due to `ScoreProcessor` not receiving all results via that event path.

To resolve, change the call ordering to allow hit result changes applied
in `OnKilled()` to propagate normally.
2021-01-21 00:05:37 +01:00
smoogipoo
73e99718bc Change order of OnParentReceived() 2020-12-03 20:06:26 +09:00
ekrctb
6e40de58e9 Use new OnAdd and OnRemove to invalidate DHO 2020-11-27 13:36:40 +09:00
ekrctb
f6faf95e33 Revert changes to HitObjectUsageBegan, not use it. 2020-11-26 14:01:46 +09:00
ekrctb
b8a5cd94f7 Invoke HitObjectUsageFinished before removal 2020-11-24 19:46:57 +09:00
ekrctb
e34a205104 Rewrite hit object management, take three 2020-11-24 18:56:05 +09:00
Bartłomiej Dach
610ed99ae3 Add null checks to unguarded resolved-as-null fields 2020-11-14 14:52:58 +01:00
smoogipoo
c71b237c4f Merge all pooling support into Playfield 2020-11-14 00:59:08 +09:00
smoogipoo
36f1833f6e Move hitobject pooling to Playfield 2020-11-14 00:41:18 +09:00
smoogipoo
d83b479c81 Internalise lifetime extensions and events too 2020-11-13 19:21:45 +09:00
smoogipoo
8aaa500431 Add lifetime extensions 2020-11-12 18:34:50 +09:00
smoogipoo
243e913e4a Add hitobject usage events 2020-11-12 18:32:20 +09:00
smoogipoo
e44a8b3934 Resort as early as possible 2020-11-12 17:07:20 +09:00
smoogipoo
cf91962865 Fix test failures due to on-the-fly starttime changes 2020-11-12 16:58:40 +09:00
smoogipoo
16e4e8d032 Fix possible nullref 2020-11-12 14:54:33 +09:00
smoogipoo
f652eb9982 Remove GetDrawableRepresentation() override, add null hinting 2020-11-12 13:18:44 +09:00
smoogipoo
d7d77460fb Small refactorings 2020-11-12 12:55:42 +09:00
smoogipoo
a8929b0764 Revert unnecessary change of casting 2020-11-11 19:27:07 +09:00
smoogipoo
7d02018134 Remove some unnecessary implementations for now 2020-11-11 18:54:40 +09:00
smoogipoo
66213f2ed0 Add pooling support to DrawableRuleset + Playfield 2020-11-10 23:56:32 +09:00
smoogipoo
31e4d71852 Rewrite HitObjectContainer with pooling support 2020-11-10 22:49:02 +09:00
smoogipoo
91c627c22d Revert HOC changes 2020-11-07 00:57:33 +09:00
smoogipoo
248d342a2f Initial Apply()/FreeAfterUse() DHO implementation 2020-11-06 23:02:37 +09:00
Dean Herbert
3ea27e23e8 Update namespace references 2020-10-29 15:20:10 +09:00
Dean Herbert
dd5b15c64f Fix HitObjectContainer not correctly unbinding from startTime fast enough 2020-09-21 18:27:15 +09:00
smoogipoo
86ef73aa27 Implement HitObjectContainer.Clear() 2020-04-23 11:16:59 +09:00
smoogipoo
5664ce3109 Add hitobject container regression test 2019-12-18 18:51:12 +09:00
smoogipoo
df8f8ffd0d Fix potential exception during removal 2019-12-18 12:03:15 +09:00
smoogipoo
bcc19e29f2 Fix editor crashing after re-ordering objects 2019-12-18 02:56:29 +09:00
Dean Herbert
f1423b8cb5 Add more brackets 2019-07-18 00:03:04 +09:00
smoogipoo
a9286fee07 Recycle slider paths when the parenting slider dies 2019-07-17 16:20:27 +09:00
ekrctb
8955d5de04 Update hit object result when lifetime is end 2019-01-29 15:25:27 +09:00
ekrctb
504e79b968 Merge branch 'master' into use-lifetime-optimization 2019-01-29 12:15:02 +09:00
Dean Herbert
8617aaa2a7 Update licence header (and remove year) 2019-01-24 17:43:03 +09:00
ekrctb
6f8a2e6ff2 Use LifetimeManagementContainer
This is a significant performance boost for gameplay,
especially for long or stroyboard-heavy maps.
2018-12-13 15:23:06 +09:00
smoogipoo
368ceec47c Simplify creation of a playfield 2018-09-21 14:35:50 +09:00
Dean Herbert
3567823759 Reverse order of exposed objects in HitObjectContainer
Closes #2740.
2018-06-06 15:03:47 +09:00
Dean Herbert
32a74f95a5 Normalize all the line endings 2018-04-13 18:26:38 +09:00
smoogipoo
187a025d36 Make hitobjects sorted by their start times 2018-03-29 16:07:31 +09:00
smoogipoo
6a5a3b01b2 Fix license headers 2018-01-11 12:39:06 +09:00
smoogipoo
117ab8a26d Split out scrolling algorithm 2018-01-07 13:23:16 +09:00