Shpoike / Quakespasm

Extra bloaty junk to modernise stuff a bit.
http://triptohell.info/moodles/qss/
GNU General Public License v2.0
184 stars 41 forks source link

[Bug] Hurt_touch behavior #79

Open NightFright2k19 opened 2 years ago

NightFright2k19 commented 2 years ago

When trying to modify hurt_touch in triggers.qc to implement a QuakeC fix so that multiple coop clients touching this entity at once all get hurt (not just the first one), code does not behave as intended in QSS.

With the code implemented, whenever a monster or you is touching Shub (in end.bsp), damage is dealt. This might also apply to other entities, but couldn't be tested.

Does not happen with Quakespasm 0.94.1, only QSS (x64 2021-09-13).

Code (triggers.qc):

.float dmgtime;
.float attack_finished;

void() hurt_touch =
{
    if (!other.takedamage)
            return;
    if (time != self.dmgtime)
        if (time < self.attack_finished)
            return;
    T_Damage (other, self, self, self.dmg);
    self.dmgtime = time;
    self.attack_finished = time + 1;
}
NightFright2k19 commented 2 years ago

Still happening in build from Oct 6.