mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-16 17:45:52 +00:00
Remove unused bones, don't crash when hardcoded bones are not found
This commit is contained in:
parent
6c56bc94a9
commit
dff33b0530
2 changed files with 11 additions and 9 deletions
|
@ -2260,6 +2260,7 @@ bool Avatar::fireAtNearestValidEntity(const std::string &shot)
|
||||||
|
|
||||||
Vector dir;
|
Vector dir;
|
||||||
Vector p = position;
|
Vector p = position;
|
||||||
|
if(boneLeftArm)
|
||||||
p = boneLeftArm->getWorldPosition();
|
p = boneLeftArm->getWorldPosition();
|
||||||
//&& !dsq->game->isObstructed(TileVector(position))
|
//&& !dsq->game->isObstructed(TileVector(position))
|
||||||
/*
|
/*
|
||||||
|
@ -4153,15 +4154,16 @@ void Avatar::refreshModel(std::string file, const std::string &skin, bool forceI
|
||||||
if (file == "naija")
|
if (file == "naija")
|
||||||
{
|
{
|
||||||
bone_head = skeletalSprite.getBoneByIdx(1);
|
bone_head = skeletalSprite.getBoneByIdx(1);
|
||||||
boneRightFoot = skeletalSprite.getBoneByName("RightFoot");
|
|
||||||
boneLeftFoot = skeletalSprite.getBoneByName("LeftFoot");
|
|
||||||
boneRightArm = skeletalSprite.getBoneByName("RightArm");
|
|
||||||
boneLeftArm = skeletalSprite.getBoneByName("LeftArm");
|
boneLeftArm = skeletalSprite.getBoneByName("LeftArm");
|
||||||
boneFish2 = skeletalSprite.getBoneByName("Fish2");
|
boneFish2 = skeletalSprite.getBoneByName("Fish2");
|
||||||
|
if(boneFish2)
|
||||||
boneFish2->alpha = 0;
|
boneFish2->alpha = 0;
|
||||||
bone_dualFormGlow = skeletalSprite.getBoneByName("DualFormGlow");
|
bone_dualFormGlow = skeletalSprite.getBoneByName("DualFormGlow");
|
||||||
|
if (bone_dualFormGlow)
|
||||||
|
{
|
||||||
bone_dualFormGlow->scale = 0;
|
bone_dualFormGlow->scale = 0;
|
||||||
bone_dualFormGlow->setBlendType(BLEND_ADD);
|
bone_dualFormGlow->setBlendType(BLEND_ADD);
|
||||||
|
}
|
||||||
|
|
||||||
boneLeftHand = skeletalSprite.getBoneByName("LeftArm");
|
boneLeftHand = skeletalSprite.getBoneByName("LeftArm");
|
||||||
boneRightHand = skeletalSprite.getBoneByName("RightArm");
|
boneRightHand = skeletalSprite.getBoneByName("RightArm");
|
||||||
|
@ -4170,7 +4172,7 @@ void Avatar::refreshModel(std::string file, const std::string &skin, bool forceI
|
||||||
{
|
{
|
||||||
bone_dualFormGlow = 0;
|
bone_dualFormGlow = 0;
|
||||||
bone_head = 0;
|
bone_head = 0;
|
||||||
boneRightFoot = boneLeftFoot = boneRightArm = boneLeftArm = boneFish2 = skeletalSprite.getBoneByIdx(0);
|
boneLeftArm = boneFish2 = 0;
|
||||||
boneLeftHand = boneRightHand = 0;
|
boneLeftHand = boneRightHand = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -303,7 +303,7 @@ public:
|
||||||
|
|
||||||
Vector getHeadPosition();
|
Vector getHeadPosition();
|
||||||
|
|
||||||
Bone *boneRightFoot, *boneLeftFoot, *boneRightArm, *boneLeftArm, *boneFish2, *bone_head;
|
Bone *boneLeftArm, *boneFish2, *bone_head;
|
||||||
Bone *boneLeftHand, *boneRightHand;
|
Bone *boneLeftHand, *boneRightHand;
|
||||||
|
|
||||||
void startFlourish();
|
void startFlourish();
|
||||||
|
|
Loading…
Add table
Reference in a new issue