Originally posted by Seven
View Post
On another topic, I've been improving all the pain skins. I never liked how the existing pain skins were added to the existing skin (blendfunc add) rather than blending with it (blendfunc blend). I don't blame you for setting it up this way of course, since a blended skin looks bad if there isn't a unique pain skin for each individual monster. As such, I am creating a unique pain skin for each monster. I also discovered a bug along the way that I believe I have fixed (hopefully without causing other bugs). In this following code, I noticed the pain skin is only supposed to appear when the monster's health is halfway depleted, but instead the pain skin was showing up after firing the very first shot. I think the culprit was with the "else" command halfway through the "pain_skin_entity_think" function. I added a comment in the code below to my fix. Let me know if you think this might create more bugs, although so far the pain skins now work as they should!
Code:
if (self.owner.health < self.owner.health_initial) { if (self.owner.health < (0.5 * self.owner.health_initial)) { if (self.owner.painskin_helper == 2) // "2" is regular spider (it has 8 used skins) self.skin = 9; else if (self.owner.painskin_helper == 3) // "3" is yakman (he has 5 used skins) { self.skin = 6; if ((self.owner.skin == 1)||(self.owner.skin == 2)) self.alpha = autocvar_painskin_transparency - 0.1; // on dark skins painskin is stronger } else if (self.owner.painskin_helper == 4) // "4" is necromancer (he has 3 used skins) { self.skin = 4; self.alpha = autocvar_painskin_transparency - 0.1; // on dark skins painskin is stronger } else self.skin = 3; } else //I believe this is where the bug is. I changed it to else if (self.owner.health < (0.5 * self.owner.health_initial)) { if (self.owner.painskin_helper == 2) // "2" is regular spider (it has 8 used skins) self.skin = 8; else if (self.owner.painskin_helper == 3) // "3" is yakman (he has 5 used skins) { self.skin = 5; if ((self.owner.skin == 1)||(self.owner.skin == 2)) self.alpha = autocvar_painskin_transparency - 0.1; // on dark skins painskin is stronger } else if (self.owner.painskin_helper == 4) // "4" is necromancer (he has 3 used skins) { self.skin = 3; self.alpha = autocvar_painskin_transparency - 0.1; // on dark skins painskin is stronger } else self.skin = 2; } }
And for fun, here are some screenshots of the new pain skins and other HD skins to show what I've been up to. I took these screenshots without any Darkplaces lighting effects, because I wanted to show the skin quality without any fancy effects. I always feel a skin should look great without lighting, but sadly, many skins out there look terrible when you take away the in-game lighting. This is probably only about 3% of the HD content I have done in the last month. Haha.
Updated soldier showcasing the pain skin (the Grenade launcher is a redone PrimEvil skin):
New soldier with some variants behind him (parts of the soldier such as the face borrowed from Reforged; Armor of the variants borrowed from the PrimEvil player skin; 90% of the rest done by me):
New Nailgun Grunt variants. The shirt/armor borrowed from PrimeEvil player skins, touched up by me. The Nailgun is a redone PrimEvil skin:
New Reiver variant with pain skin done by me:
New HD Yakman skin done entirely by me (also with the new pain skin applied):
And here is a comparison of the old Wyvern skin with my new Wyvern skin, done entirely by scratch from me. I downsized it to 2k for the purpose of uploading it here, but the version I have is 4k.
Comment