User Details
- User Since
- Tue, May 10, 1:35 AM (1 w, 5 d)
Fri, May 13
formatting whitespace, change some let to const.
Default arguments for EjectOrKill, removed VIM from .gitignore
Thu, May 12
generated with git diff -U9999 instead of git diff --no-prefix -U9999
I don't know what Vulcan is trying to tell me here.
Diff has context now I hope.
renamed attacker and attackerOwner parameters to changeSource and changeSourceOwner in Health.RegisterHealthChanged and throughout GarisonHolder.
Wed, May 11
Potential optimization to the event listener?
git diff --no-prefix -U9999
Tue, May 10
@wraitii Ok, thanks for the help :)
style conformity changes, no semantic change.
Remove DamageTaken, add attacker and attackerOwner to HealthChanged
HealthChanged is fired in RegisterHealthChanged
RegisterHealthChanged is called in Reduce
Reduce is called in TakeDamage
TakeDamage has attacker
@wraitii Another issue with storing which entity they died trying to get out of is that the entity might not be destroyed at that moment.
@wraitii Storing in the stats tracker and integrating at the end sounds ok. It won't assign loot.
oh wait, the last line of
void CComponentManager::PostMessage(entity_id_t ent, const CMessage& msg)
is
SendGlobalMessage(ent, msg);
Looking at source/simulation2/system/ComponentManager.cpp line 974 it seems to be saying that when you provide an entity to PostMessage only the components of that entity will be notified.
@Stan would something like
@Stan Is that true when the event is targeting a single entity as well?
I put some time into thinking about how to do this without a message but didn't come up with anything better. JS event emitters are generally kinda cheap I thought? Just a hash table lookup with a JIT symbol and a run through an array of callbacks. Should cost almost nothing if there are no listeners. O(1)?
included previously unincluded files
fixing which files are included hopefully