Forum

Fixing the "telefrag chase" bug

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Fixing the "telefrag chase" bug

Postby Orion » Wed May 16, 2007 11:43 pm

Hi.

I've found this bug on QIP, that's when you chase an enemy through a teleporter, you or both get telefragged.

I've discovered why this happens: is because the teledeath entity is removed after 0.2 seconds, so if you chase an enemy and teleport to the destination before 0.2 seconds are up, then you'll get telefragged.

To fix the bug, open triggers.qc and find spawn_death() at line 343.
Just set the nextthink to 0.01 and you're ready! :)

Don't worry if the nextthink is 0.01, in 0.01 second or more time after your enemy teleported, YOU will telefrag him istead of you getting telefragged, and one won't get stuck to the other.

But can happen something weird if you're glued at your enemy, if both teleport at same time, dunno if you, your enemy or both get telefragged...
User avatar
Orion
 
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Postby Lardarse » Fri May 18, 2007 2:55 am

self.nextthink=time; will force it to be next frame. But nonetheless, that's a good spot.
User avatar
Lardarse
 
Posts: 266
Joined: Sat Nov 05, 2005 1:58 pm
Location: Bristol, UK


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest