Skip to content

Fixed crocodile underwater death animation#71

Open
TokyoSU wants to merge 2 commits intoTrxyebeep:masterfrom
TokyoSU:master
Open

Fixed crocodile underwater death animation#71
TokyoSU wants to merge 2 commits intoTrxyebeep:masterfrom
TokyoSU:master

Conversation

@TokyoSU
Copy link
Copy Markdown

@TokyoSU TokyoSU commented Jan 26, 2024

Problem fixed:

  • The crocodile won't float toward the water surface.
  • Also the CreatureFloat() use only the first frame to trigger death since it's frame == frame_base ... which is wrong.
  • Also CreatureFloat() check the y position without offset so '<= water_level' not always trigger.

- The crocodile won't float toward the water surface.
- Also the CreatureFloat() use only the first frame to trigger death since it's frame == frame_base ... which is wrong.
- Also CreatureFloat() now check the y position with a offset of 16 above it to avoid <= water_level to not trigger correctly.
@Kappa971
Copy link
Copy Markdown

Kappa971 commented May 1, 2024

Hi, I'm trying to compile Tomb4 with your fix but in Visual Studio 2022 I'm getting this error:
C7664 '<': ordered comparison between pointer and zero integer ('ITEM_INFO *' and 'int')

savegame.cpp - line 1010

if (creature->enemy < 0)
	creature->enemy = 0;

EDIT
I was able to compile the executable by setting in Visual Studio 2022 Configuration Properties > C/C++ > Language, Conformance mode to No (/permissive).

@TokyoSU
Copy link
Copy Markdown
Author

TokyoSU commented May 2, 2024

Sorry for the late reply @Kappa971
Just remove this line and everything will work :)

@Kappa971
Copy link
Copy Markdown

Kappa971 commented May 2, 2024

Sorry for the late reply @Kappa971 Just remove this line and everything will work :)

Thanks for reply. So can I safely remove if (creature->enemy < 0) and creature->enemy = 0;?

@TokyoSU
Copy link
Copy Markdown
Author

TokyoSU commented May 2, 2024

yep, since enemy is a pointer, < 0 does not make sense, i did remove it and seen nothing happening when loading a save.

Pass the project to next version (VS2022)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants