Skip to content

Commit

Permalink
Fix warning log with slime entities are created
Browse files Browse the repository at this point in the history
  • Loading branch information
adepierre committed May 5, 2024
1 parent 6c6c5b4 commit 0a04628
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions botcraft/src/Game/Entities/entities/monster/SlimeEntity.cpp
Expand Up @@ -11,6 +11,10 @@ namespace Botcraft

SlimeEntity::SlimeEntity()
{
// As Slime don't inherit from MonsterEntity, AttackDamage is not initialized in parent constructor
// It is overwritten when size is set, but it needs to be initialized before
attributes.insert({ EntityAttribute::Type::AttackDamage, EntityAttribute(EntityAttribute::Type::AttackDamage, 1.0) });

// Initialize all metadata with default values
SetIdSize(1);
}
Expand Down

0 comments on commit 0a04628

Please sign in to comment.