I was reading this thread:
http://forums.alliedmods.net/showthread.php?t=66081
It got me thinking about how to consolidate all of the sprites in CS into one massive sprite. I've considered it before, but his success with the models has motivated me to go further.
Anyways, is there a way to "catch" when a sprite is spawned?
I'd like to:
1. Catch when spawned/displayed.
2. Determine which sprite is supposed to be shown.
3. Show my own sprite (with the correct frame(s), since there will be many of them inside).
I'm almost certain that this is not possible, but I'd like to hear from you guys.
When I look at something like this, for example:
Code:
#define TE_EXPLOSION 3 // Additive sprite, 2 dynamic lights, flickering particles, explosion sound, move vertically 8 pps
// write_byte(TE_EXPLOSION)
// write_coord(position.x)
// write_coord(position.y)
// write_coord(position.z)
// write_short(sprite index)
// write_byte(scale in 0.1's)
// write_byte(framerate)
// write_byte(flags)
It'd be entirely possible to show my sprite instead of the regular sprite that's shown, but I can't specify which frames to show. So, I don't think my idea will work.