Skip to content

Commit

Permalink
Fixed serious bug where events are called in reversed order.
Browse files Browse the repository at this point in the history
Former-commit-id: 3eef4df
  • Loading branch information
bryanedds committed Feb 14, 2015
1 parent 96d18fa commit 2ff307e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion InfinityRpg/InfinityRpg/InfinityRpg/CharacterFacets.fs
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,4 @@ module CharacterCameraFacetModule =
(Cascade, world)

override facet.Register entity world =
monitor handleUpdate (observe UpdateEventAddress entity) world
monitor handleUpdate (observe UpdateEventAddress entity) world
6 changes: 3 additions & 3 deletions Nu/Nu/Nu/WorldPrimitives.fs
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ module WorldPrimitivesModule =
else failwith "Event name cannot be empty."

static member private getSortableSubscriptions getEntityPublishingPriority (subscriptions : SubscriptionEntry rQueue) world : (single * SubscriptionEntry) list =
List.fold
(fun subscriptions (key, simulant : Simulant, subscription) ->
List.foldBack
(fun (key, simulant : Simulant, subscription) subscriptions ->
let priority = simulant.GetPublishingPriority getEntityPublishingPriority world
let subscription = (priority, (key, simulant, subscription))
subscription :: subscriptions)
[]
subscriptions
[]

static member private getSubscriptionsSorted (publishSorter : SubscriptionSorter) eventAddress world =
let anyEventAddresses = World.getAnyEventAddresses eventAddress
Expand Down

0 comments on commit 2ff307e

Please sign in to comment.