SRP icon indicating copy to clipboard operation
SRP copied to clipboard

Suslov exploit

Open SurDno opened this issue 6 years ago • 3 comments

While talking with Suslov for the first time and getting your first equipment, you may get some more gear in the start.

20181203000352_1

This may be reproduced by pressing F and then immediately Esc (or both at the same time). If you try to do it after a few centiseconds had passed, you can't close dialog via Esc already.

I managed to do this up to 4 times in a row. Interestingly enough, I also got some knifes.

SurDno avatar Dec 02 '18 21:12 SurDno

More of dialog bug?

SurDno avatar Dec 03 '18 03:12 SurDno

Glad you reconsidered.

SurDno avatar Apr 02 '19 20:04 SurDno

This may also be reproduced by pressing Pause while in dialogue and then pressing Esc and unpausing the game back.

SurDno avatar Mar 26 '20 02:03 SurDno

The engine defaults to allowing the player to break out of dialogues. This behavior is altered on a per-dialogue basis in Cmeet_manager:process_use in xr_meet.script a few frames after the dialogue window has been opened:

		if self.npc:is_talking() then
			db.actor:allow_break_talk_dialog(self.st.allow_break)
		end

We can effectively invert this behavior (i.e. disallow the player to break out of dialogues by default) by adding the following to the body of function dialog_wnd_showed in pda.script:

	db.actor:allow_break_talk_dialog(false)

This immediately undoes the engine's allow-break-by-default behavior but still allows that behavior to be overridden if appropriate for the given dialogue.

Unfortunately, while this fixes the reported problem, it introduces another: whereas before it would take the "Exit" button a few frames to disappear after the dialogue window has been opened, it now takes the "Exit" button a few frames to appear after the dialogue window has been opened. This is more of an aesthetic annoyance than a functional one, but I'd prefer to get rid of the few-frame delay. My first instinct was to insert the following code into function motivator_binder:use_callback in xr_motivator.script:

		user:allow_break_talk_dialog(npc_st.meet.allow_break)

... but that didn't help.

Decane avatar Mar 31 '23 16:03 Decane

Fixed in https://github.com/Decane/SRP/commit/00c405e85d3931790231b07ad60ef00584da3076.

Decane avatar Mar 31 '23 18:03 Decane