1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-28 23:48:30 +02:00
VVVVVV/desktop_version/src
Misa 53d725f78a Fix regression: Overzealous emitter dupe fix
Commit 4f881b9e26 fixed a duplication bug
where enemy movement types 10 and 12 would keep duplicating itself on
every frame if it was spawned outside of the rooms they were supposed to
be used in the main game. The downside was that this was an overzealous
fix and unintentionally broke some cases that were working before.

As brought to my attention by Ally, you can no longer place an edentity
with a `p1` of 10 or 12 (translating to movement type 10 or 12) in the
proper rooms and have it spawn perfectly working entities (that don't
clone on themselves every frame), whereas you could in 2.2. This is
considered a regression from 2.3.

So the problem here is that the reason the two emitter entities were so
dangerous outside their respective rooms is because the entity they
spawned (`createentity` entry 1) checked if it was in the correct rooms,
and if so, it would call `setenemy`, and `setenemy` would set the
`behave` attribute (movement type) correctly, and so the new entity
would have a different `behave` that wouldn't be the exact same `behave`
as the previous one, so it wouldn't be a duplicate emitter entity.

The previous `entityclonefix` worked okay for entry 1, because it would
only be run if the room checks failed and `setenemy` wasn't called, but
it broke a previously-working case for entry 56, because it was always
run for entry 56.

So the best way to check if we have a dangerous entity is not by seeing
if it is still `behave` 10 or 12 at the end of entity creation - because
10 or 12 could be harmless under the right conditions - but by checking
if the right conditions were satisfied, and if not, then neutralize the
entity.

I considered making the emitter entities work everywhere - which would
be simpler - but I didn't want to go too far and add a new feature,
especially in a minor release.
2024-06-07 14:20:28 -07:00
..
ActionSets.h Add controller button layout mappings 2023-03-21 19:59:48 -07:00
Alloc.h Replace all free calls with VVV_free[func] 2022-11-30 22:50:08 -08:00
BinaryBlob.cpp Replace all free calls with VVV_free[func] 2022-11-30 22:50:08 -08:00
BinaryBlob.h Use fixed-size int types for resourceheader 2021-09-23 22:21:49 -07:00
BlockV.cpp Make activity zone prompts loc::gettext'ed at display time 2023-09-20 16:20:24 -07:00
BlockV.h Make activity zone prompts loc::gettext'ed at display time 2023-09-20 16:20:24 -07:00
ButtonGlyphs.cpp Add support for GameCube glyphs. 2024-01-18 00:10:20 -05:00
ButtonGlyphs.h Add "type:" override check for virtual Sony gamepads. 2023-12-01 12:08:26 -05:00
Constants.h Fix SCREEN_HEIGHT_PIXELS being wrong constant 2021-10-01 09:35:28 -07:00
Credits.h CONTRIBUTORS.txt: leo60228 -> leo vriska 2024-05-21 20:57:19 -07:00
CustomLevels.cpp Unload zips before loading zips 2024-06-04 15:42:39 -07:00
CustomLevels.h Translate level title and creator on-the-fly 2024-02-02 18:57:24 -08:00
CWrappers.cpp Upscale screenshots 2x 2024-01-09 15:48:41 -08:00
CWrappers.h Upscale screenshots 2x 2024-01-09 15:48:41 -08:00
DeferCallbacks.c Add deferred callbacks to game loop 2021-03-21 02:55:42 -04:00
DeferCallbacks.h Add deferred callbacks to game loop 2021-03-21 02:55:42 -04:00
Editor.cpp Fix regression: Foreground redraw after G keybind 2024-06-03 20:58:52 -07:00
Editor.h Revert "Translate editor notes on-the-fly" 2024-02-02 19:13:59 -08:00
Ent.cpp Disable more flashing elements if a11y is on 2023-04-05 20:02:29 -07:00
Ent.h Use SDL_Color for colors instead of colourTransform 2023-01-01 16:36:43 -08:00
Entity.cpp Fix regression: Overzealous emitter dupe fix 2024-06-07 14:20:28 -07:00
Entity.h Remove x-position from setactivityposition 2023-02-17 20:47:32 -08:00
Enums.h Remove unused game-gamestates 2021-12-18 00:01:32 -08:00
Exit.h Use SDL_NORETURN 2021-09-27 10:32:23 -07:00
FileSystemUtils.cpp Save screenshots with proper filenames 2024-01-09 15:48:41 -08:00
FileSystemUtils.h Add support for internal screenshots 2024-01-09 15:48:41 -08:00
Finalclass.cpp Strip out old special roomname system 2023-03-02 22:58:12 -08:00
Finalclass.h Indicate what special roomnames are in the levels 2022-12-31 20:04:56 -08:00
Font.cpp Properly fix setfont/setrtl in between text boxes 2024-01-23 15:33:38 -08:00
Font.h Properly fix setfont/setrtl in between text boxes 2024-01-23 15:33:38 -08:00
FontBidi.cpp Don't pass newline characters to bidi algorithm 2024-01-08 19:17:44 -08:00
FontBidi.h Add RTL level property and print flag 2024-01-08 19:17:44 -08:00
Game.cpp Fix UB from out-of-range <stretch> 2024-03-29 20:22:00 -07:00
Game.h Translate NDM hardest room on-the-fly 2024-02-02 18:57:24 -08:00
GlitchrunnerMode.c Split glitchrunner mode into multiple versions 2021-08-05 13:35:21 -04:00
GlitchrunnerMode.h Split glitchrunner mode into multiple versions 2021-08-05 13:35:21 -04:00
GOGNetwork.c Axe NETWORK_[set/get]AchievementProgress() 2021-09-19 21:49:54 -07:00
Graphics.cpp Fix UB from out-of-range <stretch> 2024-03-29 20:22:00 -07:00
Graphics.h Implement scaling modes manually 2024-02-03 18:11:11 -08:00
GraphicsResources.cpp Fix loading of PNG resources on big-endian machines 2024-01-22 10:48:38 -05:00
GraphicsResources.h Place GraphicsResources functions in header file 2024-01-09 16:03:05 -08:00
GraphicsUtil.cpp Upscale screenshots 2x 2024-01-09 15:48:41 -08:00
GraphicsUtil.h Upscale screenshots 2x 2024-01-09 15:48:41 -08:00
Input.cpp Disable state locking if inc'ing state w/ ACTION 2024-05-25 23:34:03 -07:00
Input.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
InterimVersion.h Use PR_RIGHT for interim version info in main menu 2023-02-13 23:27:00 -08:00
InterimVersion.in.c Use PR_RIGHT for interim version info in main menu 2023-02-13 23:27:00 -08:00
KeyPoll.cpp Implement scaling modes manually 2024-02-03 18:11:11 -08:00
KeyPoll.h Generalize stretch mode mouse scaling fix 2023-08-17 19:57:54 -07:00
Labclass.cpp Add level exploring menu for translators 2022-12-31 20:04:56 -08:00
Labclass.h Indicate what special roomnames are in the levels 2022-12-31 20:04:56 -08:00
LevelDebugger.cpp Replace [Press {button} to toggle gameplay] by freeze/unfreeze 2024-01-19 16:31:39 -08:00
LevelDebugger.h Fix moving entities flashing in over 30fps mode 2023-11-19 17:34:23 -08:00
Localization.cpp Make language screen show up once more 2024-02-08 10:28:27 -08:00
Localization.h Make language screen show up once more 2024-02-08 10:28:27 -08:00
LocalizationMaint.cpp Add RTL level property and print flag 2024-01-08 19:17:44 -08:00
LocalizationMaint.h Add cutscene test menu 2022-12-31 20:04:56 -08:00
LocalizationStorage.cpp Add RTL level property and print flag 2024-01-08 19:17:44 -08:00
LocalizationStorage.h Add a system for selecting between wordy/wordy2 2024-01-06 14:11:40 -08:00
lodepng_wrapper.c Migrate LodePNG to submodule 2022-03-13 23:50:37 -07:00
Logic.cpp Fix moving entities flashing in over 30fps mode 2023-11-19 17:34:23 -08:00
Logic.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
main.cpp Fix info args not working with -console 2024-06-03 21:42:57 -07:00
MakeAndPlay.h Use multiline comments in C files 2021-04-17 00:50:04 -04:00
Map.cpp Add support for right-aligned roomtext 2024-01-09 13:13:04 -08:00
Map.h Add support for right-aligned roomtext 2024-01-09 13:13:04 -08:00
Maths.h Use SDL_Point instead of rolling our own point struct 2023-01-28 23:32:14 -08:00
Music.cpp Fix remaining audio speedup/slowdown bug 2023-11-28 20:16:38 -05:00
Music.h Implement haltedsong 2023-06-08 15:38:26 -07:00
Network.c Axe NETWORK_[set/get]AchievementProgress() 2021-09-19 21:49:54 -07:00
Network.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Otherlevel.cpp Indicate what special roomnames are in the levels 2022-12-31 20:04:56 -08:00
Otherlevel.h Indicate what special roomnames are in the levels 2022-12-31 20:04:56 -08:00
preloader.cpp XFLIP LOADING... screen 2024-01-08 19:17:44 -08:00
preloader.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
ReleaseVersion.h Bump version to 2.4.2 2024-03-29 21:18:39 -07:00
Render.cpp Fix "Thanks for playing!" reversed in Flip Mode 2024-05-25 23:33:45 -07:00
Render.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
RenderFixed.cpp Indicate modes when loading in to gameplay 2024-01-08 20:01:27 -08:00
RenderFixed.h Show skip prompt during credits and ending picture 2023-06-05 17:57:23 -07:00
RoomnameTranslator.cpp Move all other text boxes to new system 2024-02-02 18:57:24 -08:00
RoomnameTranslator.h Migrate more prints to font::, determine font for most textboxes 2023-02-13 23:27:00 -08:00
Screen.cpp Fix resize-to-nearest could be larger than desktop 2024-02-05 18:03:32 -08:00
Screen.h Implement scaling modes manually 2024-02-03 18:11:11 -08:00
ScreenSettings.h Store display index of window to settings 2023-03-21 00:23:42 -07:00
Script.cpp Fix copy-paste error in customposition 2024-03-29 19:55:41 -07:00
Script.h Save textbox state, allow lang switches w/ textbox 2024-02-02 18:57:24 -08:00
Scripts.cpp Fix "he'd be a a big help" typo 2023-11-30 08:38:40 -08:00
Spacestation2.cpp Use enums for time trial indexes 2023-06-05 17:57:23 -07:00
Spacestation2.h Indicate what special roomnames are in the levels 2022-12-31 20:04:56 -08:00
SteamNetwork.c Upscale screenshots 2x 2024-01-09 15:48:41 -08:00
TerminalScripts.cpp Add textcase(n) commands to scripts 2022-12-31 20:04:56 -08:00
Textbook.c VS2010 buildfixes. 2023-11-27 12:09:42 -05:00
Textbook.h Add Textbook 2022-12-31 20:04:56 -08:00
Textbox.cpp Remove textboxwrap() and wrap() return value 2024-02-02 18:57:24 -08:00
Textbox.h Remove textboxwrap() and wrap() return value 2024-02-02 18:57:24 -08:00
ThirdPartyDeps.c Replace all free calls with VVV_free[func] 2022-11-30 22:50:08 -08:00
Tower.cpp Add POS_MOD macro and use for all positive modulos 2021-09-24 17:48:15 -07:00
Tower.h Remove vmult lookup tables 2021-09-24 16:37:27 -07:00
TowerBG.h Move from surfaces to the SDL render system 2023-01-28 14:36:28 -08:00
Unreachable.h Use _SDL_HAS_BUILTIN 2022-12-29 16:13:54 -08:00
Unused.h Factor out UNUSED macro to header file 2021-05-25 15:23:34 -04:00
UTF8.c Add UTF8.c 2023-02-27 23:00:41 -08:00
UTF8.h Add UTF8.c 2023-02-27 23:00:41 -08:00
UtilityClass.cpp Add a system for selecting between wordy/wordy2 2024-01-06 14:11:40 -08:00
UtilityClass.h Add a system for selecting between wordy/wordy2 2024-01-06 14:11:40 -08:00
VFormat.c Add a system for selecting between wordy/wordy2 2024-01-06 14:11:40 -08:00
VFormat.h Add support for button glyph display 2023-03-21 19:59:48 -07:00
Vlogging.c Fix info args not working with -console 2024-06-03 21:42:57 -07:00
Vlogging.h Add -console option on Windows 2022-11-14 19:40:23 -08:00
WarpClass.cpp Add level exploring menu for translators 2022-12-31 20:04:56 -08:00
WarpClass.h Indicate what special roomnames are in the levels 2022-12-31 20:04:56 -08:00
XMLUtils.cpp Move all settings to settings.vvv 2020-11-04 12:06:57 -05:00
XMLUtils.h Add localization "foundation" (many code changes) 2022-12-31 20:04:56 -08:00
Xoshiro.c VS2010 buildfixes. 2023-11-27 12:09:42 -05:00
Xoshiro.h Replace Gravitron RNG with seeded Xoshiro 2021-08-27 12:28:35 -07:00