Skip to content

Commit

Permalink
Removed unused Player init.
Browse files Browse the repository at this point in the history
  • Loading branch information
afritz1 committed Dec 15, 2024
1 parent 6755777 commit 4207aa7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
25 changes: 0 additions & 25 deletions OpenTESArena/src/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,31 +152,6 @@ Player::~Player()
DebugAssert(this->physicsCharacterVirtual == nullptr);
}

void Player::init(const std::string &displayName, bool male, int raceID, int charClassDefID,
int portraitID, const CoordDouble3 &feetCoord, const Double3 &direction, const Double3 &velocity,
double maxWalkSpeed, int weaponID, const ExeData &exeData, JPH::PhysicsSystem &physicsSystem, Random &random)
{
this->displayName = displayName;
this->firstName = GetFirstName(displayName);
this->male = male;
this->raceID = raceID;
this->charClassDefID = charClassDefID;
this->portraitID = portraitID;
this->maxWalkSpeed = maxWalkSpeed;
this->weaponAnimation.init(weaponID, exeData);
this->primaryAttributes.init(raceID, male, exeData);
this->inventory.clear();

if (!TryCreatePhysicsCharacters(physicsSystem, &this->physicsCharacter, &this->physicsCharacterVirtual, &this->physicsCharVsCharCollision))
{
DebugCrash("Couldn't create player physics collider.");
}

this->setPhysicsPositionRelativeToFeet(VoxelUtils::coordToWorldPoint(feetCoord));
this->setPhysicsVelocity(velocity);
this->setCameraFrame(direction);
}

void Player::init(const std::string &displayName, bool male, int raceID, int charClassDefID,
const PrimaryAttributes &primaryAttributes, int portraitID, const CoordDouble3 &feetCoord, const Double3 &direction,
const Double3 &velocity, double maxWalkSpeed, int weaponID, const ExeData &exeData, JPH::PhysicsSystem &physicsSystem)
Expand Down
5 changes: 0 additions & 5 deletions OpenTESArena/src/Player/Player.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ struct Player
Player();
~Player();

// Make player with rolled attributes based on race & gender.
void init(const std::string &displayName, bool male, int raceID, int charClassDefID,
int portraitID, const CoordDouble3 &feetCoord, const Double3 &direction, const Double3 &velocity,
double maxWalkSpeed, int weaponID, const ExeData &exeData, JPH::PhysicsSystem &physicsSystem, Random &random);

// Make player with given attributes.
void init(const std::string &displayName, bool male, int raceID, int charClassDefID, const PrimaryAttributes &primaryAttributes,
int portraitID, const CoordDouble3 &feetCoord, const Double3 &direction, const Double3 &velocity,
Expand Down

0 comments on commit 4207aa7

Please sign in to comment.