Another glitch

Discussion about the original game by Ion Storm. Also known as Deus Ex: The Conspiracy.

Moderator: Forum Guards

Another glitch

Postby Poor » Sat May 05, 12 9:23 pm

This has been driving me and other cagematch players crazy. When you set an animal on fire, they seem to become invincible for as long as the flames last. After some investigating, it turns out the DX programmers are at fault.

To see the glitch, use targeting and injure a karkian until it has around 20% health. Then set it on fire. It's health will jump back to 100%. Any damage dealt by the player will become undone every second the animal is on fire.
Poor
Poster
 
Posts: 190
Joined: Tue Jan 04, 11 7:42 pm

Postby RedDynasty » Sat May 05, 12 10:01 pm

well i forgot to mention but dunno if this is true but i think greasels and gray( not confirmed) dont have this effect.
Where do you think the code is badly written\needs editing?
Image
Your not a gamer until you played this.
User avatar
RedDynasty
Wannabe
 
Posts: 130
Joined: Sun Apr 01, 12 8:12 pm
Location: Portugal

Postby Poor » Sun May 06, 12 12:35 am

I can confirm greasels and grays do have this effect. It's more noticable in animals with higher healths. The only way to kill an animal on fire is to deplete all of it's health within a 1 second window.

Human pawns have an overall health and 6 different healths for each body part:

Health, HealthHead, HealthTorso, HealthArmRight, HealthArmLeft, HealthLegRight, HealthLegLeft

When a human pawn is damaged it lowers the health of the body part hit. It then uses a function called GenerateTotalHealth() to look at the health of the body parts and sets Health to the overall health of the body.

But animals don't use healths for each body part. They only use Health. When an animal takes damage it lowers Health directly, without lowering the healths of the body parts and using GenerateTotalHealth(). What the programmers forgot to do is change the burning function for animals.

In the UpdateFire() function it calls GenerateTotalHealth(). But because the health of an animal's individual body parts is never lowered, they will have full health for each body part and GenerateTotalHealth() will set Health to the full amount. (the "HealthTorso -= 5;" in UpdateFire() is the only thing will hurt an individual body part of an animal)

Code: Select all
function UpdateFire()
{
   // continually burn and do damage
   HealthTorso -= 5;
   GenerateTotalHealth();
   if (Health <= 0)
   {
      TakeDamage(10, None, Location, vect(0,0,0), 'Burned');
      ExtinguishFire();
   }
}


To fix this you just have to put this in the Animal class:

Code: Select all
function UpdateFire()
{
   // continually burn and do damage
   Health -= 5;
   if (Health <= 0)
   {
      TakeDamage(10, None, Location, vect(0,0,0), 'Burned');
      ExtinguishFire();
   }
}
Last edited by Poor on Sun May 06, 12 12:36 am, edited 1 time in total.
Poor
Poster
 
Posts: 190
Joined: Tue Jan 04, 11 7:42 pm

Postby RedDynasty » Sun May 06, 12 1:56 am

and u can simply do that in the cmbanimal.uc right?
Image
Your not a gamer until you played this.
User avatar
RedDynasty
Wannabe
 
Posts: 130
Joined: Sun Apr 01, 12 8:12 pm
Location: Portugal

Postby Poor » Sun May 06, 12 2:40 am

Yup. Already updated it. Though my version is slightly different. When a player is on fire, it remembers who set them on fire. It doesn't do this for NPC but I changed it so it would. That way if the bot dies from the flames you caused, it will award the kill to you.
Poor
Poster
 
Posts: 190
Joined: Tue Jan 04, 11 7:42 pm

Postby atrey65789 » Sun May 06, 12 4:34 am

In UpdateFire, to be safe, I would put bInvincible to false, other than that, and after looking at the modified code you put up, that's all I can think of at the moment.
-A
atrey65789
Regular
 
Posts: 400
Joined: Thu Dec 22, 11 3:02 pm


Return to Deus Ex

Who is online

Users browsing this forum: No registered users and 10 guests