WARNING: This has been thoroughly tested and I'm happy that it's -stable- (it shouldn't runtime). However, it might have a few niggly bugs caused by specific items using no-standard or weird code. Most bugs will be stuff like it not updating overlays and such and can be fixed simply by dropping the item. That being said, if you're not comfortable with this, I'd suggest waiting to update past this revision.

update_clothing() has been broken up into it's key parts. A full explanation can be found in code/modules/mob/living/carbon/human/update_icons.dm
the tl;dr of it is that overlay updates are no longer called by the gameticker. Instead they are called by procs such as u_equip db_cick etc. This means faster updates (although admittedly, more of them can be called per tick). This however is offset by the fact that specific overlays can be updated now, vastly improving its efficiency. This will especially help when there are large numbers of dead mobs.

Fixed the throw code for TKgrab so it can be toggled.

Cloaking for aliens/humans/ninjas was changed. It's very crude at the moment and for that I apologise. But it works and is very efficient.It also stops cloaked individuals becomming invincible due to people being unable to hit them (even when they know exactly where  they are)

Fixed a bunch of bugs with damage-overlays. They  were updating FAR FAR to frequently. They were also horribly inefficient. They should now be virtually seamless when updating and only use cached icons, so they aren't affected by lag as badly. This may help with explosions lag a little.

There's still a tonne of stuff I need to refine with this. I'll be refining it down into some helper procs to reduce on code duplication and such

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3811 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-06-13 19:03:25 +00:00
parent e8161929d1
commit 8961bd96d0
114 changed files with 1699 additions and 1590 deletions

View File

@@ -172,32 +172,42 @@ var/MAX_EXPLOSION_RANGE = 14
#define HIDEEARS 2 //APPLIES ONLY TO HELMETS!!
#define HIDEEYES 4 //APPLIES ONLY TO HELMETS!!
//clothing-overlay layers. They are floats so they always appear above the Mob
#define DAMAGE_LAYER -23
#define UNIFORM_LAYER -22
#define B_UNIFORM_LAYER -21
#define SHOES_LAYER -20
#define B_SHOES_LAYER -19
#define ID_LAYER -18
#define GLOVES_LAYER -17
#define B_GLOVES_LAYER -16
#define EARS_LAYER -15
#define SUIT_LAYER -14
#define B_SUIT_LAYER -13
#define FACE_LAYER -12
#define GLASSES_LAYER -11
#define FACEMASK_LAYER -10
#define B_FACEMASK_LAYER -9
#define HEAD_LAYER -8
#define B_HEAD_LAYER -7
#define SUIT_STORE_LAYER -6
#define BELT_LAYER -5
#define BACK_LAYER -4
#define CUFFED_LAYER -3
#define SHIELD_LAYER -2
#define INHANDS_LAYER -1
//Human Overlays Indexes
#define MUTANTRACE_LAYER 1 //TODO: make part of body?
#define MUTATIONS_LAYER 2
#define DAMAGE_LAYER 3
#define UNIFORM_LAYER 4
#define ID_LAYER 5
#define SHOES_LAYER 6
#define GLOVES_LAYER 7
#define EARS_LAYER 8
#define SUIT_LAYER 9
#define GLASSES_LAYER 10
#define FACEMASK_LAYER 11
#define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt?
#define SUIT_STORE_LAYER 13
#define BACK_LAYER 14
#define HAIR_LAYER 15 //TODO: make part of head layer?
#define HEAD_LAYER 16
#define HANDCUFF_LAYER 17
#define L_HAND_LAYER 18
#define R_HAND_LAYER 19
#define TOTAL_LAYERS 19
//Monkey Overlays Indexes
#define M_MASK_LAYER 1
#define M_BACK_LAYER 2
#define M_HANDCUFF_LAYER 3
#define M_L_HAND_LAYER 4
#define M_R_HAND_LAYER 5
#define M_TOTAL_LAYERS 5
//Xeno Overlays Indexes
#define X_HEAD_LAYER 1
#define X_SUIT_LAYER 2
#define X_L_HAND_LAYER 3
#define X_R_HAND_LAYER 4
#define X_TOTAL_LAYERS 4
//Cant seem to find a mob bitflags area other than the powers one