TOMB4 icon indicating copy to clipboard operation
TOMB4 copied to clipboard

Fixed crocodile underwater death animation

Open TokyoSU opened this issue 1 year ago • 4 comments

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.

TokyoSU avatar Jan 26 '24 10:01 TokyoSU

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).

Kappa971 avatar May 01 '24 17:05 Kappa971

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

TokyoSU avatar May 02 '24 08:05 TokyoSU

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;?

Kappa971 avatar May 02 '24 09:05 Kappa971

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

TokyoSU avatar May 02 '24 09:05 TokyoSU