Register FAQ Search Today's Posts Mark Forums Read
Go Back   JazzJackrabbit Community Forums » Maintenance & Feedback » JJ2+ Issue Tracker

Bug Report TNTs break Rocket Turtle pathing

RSGDB

JCF Member

Joined: Jan 1970

Posts: 20

RSGDB has disabled reputation

Feb 1, 2024, 12:52 PM
RSGDB is offline
Reply With Quote
TNTs break Rocket Turtle pathing

Tried spamming a bunch of TNTs in close proximity near an approaching rocket turtle. The blast sends the boss flying. It then continues to move in its original direction and flies out of the stage.

Plus, in another instance I emptied the turtle's health bar, got a boss defeat message, but the level didn't end and the boss was still active but unkillable. Softlocked. I never managed to reproduce it so I can't figure out the cause. My best guess is that I landed the finishing blow with a seeker missile while the enemy was offscreen.

[Would it be ok if I use this thread to report any further bugs I find, if I find any? I don't want to bloat the subforum with new threads for every little thing I may or may not find, especially if it turns out to not be a bug.]
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,983

Violet CLM has disabled reputation

Feb 3, 2024, 10:28 AM
Violet CLM is offline
Reply With Quote
It's hard to know what to do with TNT. Any object with jjOBJ::isBlastable has a risk of having its jjOBJ::xSpeed and jjOBJ::ySpeed set by a TNT blast. See DoFullBlast in g_hit.c, where Arjan acknowledges this is an issue but never got around to solving it. We don't notice this for most objects because a single TNT blast will kill them, except for occasional Tuf Turtles walking around at super speed, but it can also mess up Bubba and Devan in particular.

Probably the simplest solution would be to change TNT so it only sets speeds for pickups and bullets, not for other objects such as enemies and bosses. I'm not thinking of any obvious reason that would be a bad idea, but I'd invite people to weigh in.

Please don't use the same thread to report multiple things. If a thread clearly states its issue in the opening post and title, it's easy to remember where it was reported, it's easy for other people to know what the thread is about and reply to it with their own experiences or preferences, and it's easy to decide when it's ready to close. If there are multiple issues in one thread, none of those things are true.
__________________
Seren Seren's Avatar

JCF Member

Joined: Feb 2010

Posts: 864

Seren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to all

Feb 3, 2024, 01:00 PM
Seren is offline
Reply With Quote
Quote:
Originally Posted by Violet CLM View Post
It's hard to know what to do with TNT. Any object with jjOBJ::isBlastable has a risk of having its jjOBJ::xSpeed and jjOBJ::ySpeed set by a TNT blast.
It's worth mentioning that, contrary to the current scripting documentation for jjOBJ::isBlastable, the property is responsible not only for changing the affected object's velocity but also for having impact on the object at all, such as dealing damage, so it would not be sufficient to modify the relevant object presets (although perhaps it wouldn't hurt to modify reality to match the documentation rather than the other way around).
__________________

I am an official JJ2+ programmer and this has been an official JJ2+ statement.
Seren Seren's Avatar

JCF Member

Joined: Feb 2010

Posts: 864

Seren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to all

Feb 3, 2024, 01:45 PM
Seren is offline
Reply With Quote
Quote:
Originally Posted by Violet CLM View Post
Probably the simplest solution would be to change TNT so it only sets speeds for pickups and bullets, not for other objects such as enemies and bosses. I'm not thinking of any obvious reason that would be a bad idea, but I'd invite people to weigh in.
From a scripting standpoint, the most unusual object I made that intentionally allowed TNT to change its velocity was falling scenery in ground force levels - you might have one such relevant level under the filename breakingCyclones.j2l where it's used for vases. It's neither a pickup nor a bullet; its handling is set to SPECIAL.

On the other hand, I have no doubt I and other people also made countless objects that should really not have their velocity modified from outside, for which we forgot to set isBlastable to false because it's one of the last things you'd ever think of. I wouldn't be against relying on object type to determine whether to apply velocity changes, but it might be important to provide a simple way to restore the original behavior where desirable. onObjectHit does not relay any information about the position of the TNT explosion so currently there is no obvious way to do that.
__________________

I am an official JJ2+ programmer and this has been an official JJ2+ statement.
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,983

Violet CLM has disabled reputation

Feb 3, 2024, 04:52 PM
Violet CLM is offline
Reply With Quote
Quote:
onObjectHit does not relay any information about the position of the TNT explosion so currently there is no obvious way to do that.
An additional benefit to exposing the position or angle would be that shootable poles could reliably fall away from TNT, instead of sometimes towards it.
__________________
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 01:15 AM.