Skip to content

Commit 6251a88

Browse files
committed
Fix bug (and typo) with isHervibore
1 parent 88ded97 commit 6251a88

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,13 @@ namespace Simulator
259259
DefineAddress(OnStartSwimming, SelectAddress(0xC147D0, 0xC14F70));
260260
DefineAddress(Update, SelectAddress(0xC20C50, 0xC21530));
261261
DefineAddress(TakeDamage, SelectAddress(0xBFC500, 0xBFCF10));
262+
DefineAddress(IsHervibore, SelectAddress(0xC0B040, 0xC0B8E0));
263+
DefineAddress(CanEatPlants, SelectAddress(0xC0B040, 0xC0B8E0));
262264
}
263265

264266
namespace Addresses(cCombatant)
265267
{
266268
DefineAddress(TakeDamage, SelectAddress(0xBFC500, 0xBFCF10));
267-
DefineAddress(IsHervibore, SelectAddress(0xC0B040, 0xC0B8E0));
268269
}
269270

270271
namespace Addresses(cCropCirclesToolStrategy)

Spore ModAPI/Spore/Simulator/cCombatant.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ namespace Simulator
151151
};
152152
ASSERT_SIZE(cCombatant, 0xC8);
153153

154-
namespace Addresses(cCombatant){
154+
namespace Addresses(cCombatant) {
155155
DeclareAddress(TakeDamage);
156156
}
157157

Spore ModAPI/Spore/Simulator/cCreatureBase.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ namespace Simulator
208208
/// @returns
209209
int PlayVoice(const char* pName, int param2, int param3);
210210

211-
/// also returns true for omnivores
212-
bool IsHervibore(); // TODO: fix typo without causing crash.
211+
/// Returns true if the creature's diet can eat plants, that is, for herbivores and omnivores
212+
bool CanEatPlants();
213213

214214

215215
/* 54h */ virtual void CreateLocomotionStrategy();
@@ -423,5 +423,6 @@ namespace Simulator
423423
DeclareAddress(Update); // 0xC20C50 0xC21530
424424
DeclareAddress(TakeDamage);
425425
DeclareAddress(IsHervibore); // 0xC0B040 0xC0B8E0
426+
DeclareAddress(CanEatPlants); // 0xC0B040 0xC0B8E0
426427
}
427428
}

0 commit comments

Comments
 (0)