Skip to content

Commit

Permalink
Fixed minor bugs that gave compile errors :(
Browse files Browse the repository at this point in the history
  • Loading branch information
BrentDaMage committed May 5, 2024
1 parent e22ee57 commit 7f63d78
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion GameMods.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//#define MOD_POPOUT_CONSOLE // Open a separate console aside from the game window. By default only the debugger can see our logs. Win32 Debug only.

// Tests
#define TEST_SURVIVAL_MODE // Test survival mode.
//#define TEST_SURVIVAL_MODE // Test survival mode.

// Features (major changes)

Expand Down
2 changes: 1 addition & 1 deletion source/world/entity/Cow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ class Cow : public Animal
int getMaxHealth() const override { return 10; }
float getSoundVolume() const override { return 0.4; }

Entity* getBreedOffspring(Animal* pOther) { new Cow(m_pLevel); }
Entity* getBreedOffspring(Animal* pOther) { return new Cow(m_pLevel); }
};
4 changes: 2 additions & 2 deletions source/world/entity/MobFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ Mob* MobFactory::CreateMob(EntityType entityType, Level *level)

#undef ENT

#define ENT(enumType, classType) case ENTITY_TYPE_ ## enumType: return "entity."###classType;
#define ENT(enumType, classType) case ENTITY_TYPE_ ## enumType: return "entity."#classType;

char* MobFactory::GetMobNameID(EntityType entityType)
std::string MobFactory::GetMobNameID(EntityType entityType)
{
switch (entityType)
{
Expand Down
4 changes: 2 additions & 2 deletions source/world/entity/MobFactory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
class MobFactory
{
static Mob* CreateMob(EntityType entityType, Level *level);
static char* GetMobNameID(EntityType entityType);
static EntityType MobFactory::GetEntityTypeFromMobName(std::string mobName);
static std::string GetMobNameID(EntityType entityType);
static EntityType GetEntityTypeFromMobName(std::string mobName);
};

0 comments on commit 7f63d78

Please sign in to comment.