HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit Damage Events - owned by Cohadar

12-11-2007, 11:09 AM#1
cohadar
Ok so here is the deal.

I claim this: It is possible to make damage detection engines with only one trigger.

How so?
By adding all unit damage events to same trigger duh.

But won't events for dead/removed units start to lag game/create event leaks?
No because unit damage events don't leak.

???
It is simple unit damage events are actually stored on units, not on triggers.
So when the unit dies and gets removed from game damage event for that unit is automatically removed with it !!!

Whaaaat? You are bullshitting, how can you possibly know that?
No I am not bullshitting and I know that because I am master of fugue, duh.

Here is a testmap as a proof.
Try to prove me wrong. :P
Attached Files
File type: w3xEvent Test.w3x (8.9 KB)
12-11-2007, 11:16 AM#2
Troll-Brain
well nice, but what about the other unit events and in general the other events.
They create leaks, no ?
12-11-2007, 11:26 AM#3
cohadar
Generic events create leaks,
specific events don't.
12-11-2007, 11:27 AM#4
grim001
handle count continues to increase.

this was already tested long ago.
Attached Files
File type: w3xEvent Test.w3x (9.1 KB)
12-11-2007, 12:04 PM#5
cohadar
Ha I knew there was a catch somewhere.
It was simply too good to be truth.

Well the thing is that I use this in my map,
and the reason I did not have any problems is because ABC is resistant to handle index increase.

I guess for most people this is still a big obstacle,
so it is still "trigger per unit" for you gamecache people.
12-11-2007, 01:39 PM#6
Vexorian
Lost handle references screw performance of handle allocators.

Quote:
so it is still "trigger per unit" for you gamecache people.
That's ridiculous considering gamecache was resistant to handle index increase since years ago.

--
Can anyone test specific unit events leak with unit state change events? I tested that some years ago and it did leak memory...
12-11-2007, 02:01 PM#7
cohadar
Quote:
Originally Posted by Vexorian
That's ridiculous considering gamecache was resistant to handle index increase since years ago.

Yes I was wrong there.
Handle count increase kills performance of common array attachment systems.
(and breaks them if they are not backuped with gamecache)
12-11-2007, 02:04 PM#8
Vexorian
The award for doing lame things goes to blizzard, again.

I guess this is because all the Event registering natives return an event handle.

Even though that event handle is totally useless blizz thought it was a good idea to make them return it...
12-11-2007, 02:48 PM#9
cohadar
Quote:
Originally Posted by Vexorian
The award for doing lame things goes to blizzard, again.

I guess this is because all the Event registering natives return an event handle.

Even though that event handle is totally useless blizz thought it was a good idea to make them return it...

Tell me about it.

I wonder if it is possible to reduce reference counter of handles by using some bytecode trick.