Skip to content

Commit 08e9df1

Browse files
committed
Fix cTimeOfDay::SetTimeOfDay(). Rename cCombantant::func18h() to TakeDamage(). Improve parameters of cCreatureBase::funcB8h().
1 parent 2bcacf3 commit 08e9df1

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

Spore ModAPI/SourceCode/Simulator/GameTimeManager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ namespace Simulator
2828

2929
auto_METHOD_VOID(cTimeOfDay, SetDayDuration, Args(float seconds), Args(seconds));
3030
auto_METHOD_VOID(cTimeOfDay, SetSpeedMultiplier, Args(float multiplier), Args(multiplier));
31+
auto_METHOD_VOID(cTimeOfDay, SetTimeOfDay, Args(float timeOfDay, const Math::Vector3& position), Args(timeOfDay, position));
3132

3233
auto_STATIC_METHOD_(cGameTimeManager, cGameTimeManager*, Get);
3334

Spore ModAPI/Spore/Simulator/cCombatant.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ namespace Simulator
7878
/// Returns the weapon tool used by this combatant. This is only available for vehicles.
7979
/* 14h */ virtual cSpaceToolData* GetWeapon();
8080

81-
/* 18h */ virtual int func18h(float damage, uint32_t attackerPoliticalID, int, const Vector3&, cCombatant* pAttacker); // used to substract health?
81+
/// Called when the combatant is attacked, takes the damage
82+
/* 18h */ virtual int TakeDamage(float damage, uint32_t attackerPoliticalID, int, const Vector3&, cCombatant* pAttacker); // used to substract health?
8283

8384
/* 1Ch */ virtual void AddHostileUnit(cCombatant* combatant);
8485
/* 20h */ virtual Math::Vector3 func20h();

Spore ModAPI/Spore/Simulator/cCreatureAbility.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace Simulator
2929
class cCreatureAbility
3030
{
3131
public:
32-
virtual ~cCreatureAbility();
32+
virtual ~cCreatureAbility() {}
3333

3434
static bool Parse(cCreatureAbility* pAbility, App::PropertyList* pPropList);
3535

Spore ModAPI/Spore/Simulator/cCreatureBase.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ namespace Simulator
241241
/* ACh */ virtual bool funcACh(bool);
242242
/* B0h */ virtual int GetAbilitiesCount();
243243
/* B4h */ virtual cCreatureAbility* GetAbility(int index);
244-
/* B8h */ virtual bool funcB8h(int, int, int);
244+
/* B8h */ virtual bool funcB8h(cCombatant* target, int abilityIndex, Math::Vector3* hitPosition = nullptr);
245245
/* BCh */ virtual int funcBCh();
246246
/* C0h */ virtual bool funcC0h(cCreatureBase* pOtherCreature, float, float);
247247
/* C4h */ virtual void funcC4h();
@@ -288,7 +288,8 @@ namespace Simulator
288288
/* B70h */ int field_B70;
289289
/* B74h */ int mIntentionTowardsTarget;
290290
/* B78h */ float mNoAttackTimer; // not initialized
291-
/* B7Ch */ float field_B7C; // not initialized, alpha for animatedcreature, used in stealth?
291+
/// When creature is in stealth, opacity for the creature
292+
/* B7Ch */ float mStealthOpacity; // not initialized
292293
/* B80h */ float mCurrentLoudness; // not initialized
293294
/* B84h */ float mFoodValue;
294295
/* B88h */ int mStrengthRating; // 5

0 commit comments

Comments
 (0)