TTT-2 / ttt2-role_necro

TTT2 necromancer role that is able to revive player and transform them into deagle armed zombies.
Apache License 2.0
2 stars 12 forks source link

Fixed edge-case issue where Necromancer could revive alive player #19

Closed ZacharyHinds closed 3 years ago

ZacharyHinds commented 3 years ago

If, somehow, an Alive player had a valid corpse on the map (such as because of the Death Faker traitor weapon), the Necromancer could "revive" the corpse, teleporting the player and changing their role.

This update fixes that issue, adding a player:Alive() check and a new error message if the targeted corpse's player is actually alive (this error may kind of ruin the Death Faker conceptually, but I'm not sure of a better solution).

TimGoll commented 3 years ago

Oh, great stuff as always! Could you open this as a PR to the normal defi as well? Or allow me to copy your code?

ZacharyHinds commented 3 years ago

When I get some time, I can sure. Although one thought I had was to leave the regular defib capable of "reviving" a fake body, since that could actually benefit the traitor who placed the fake body.

But I can still fix it.