mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-26 16:03:58 +00:00
Remove hack that keeps setting avatar collide radius.
This commit is contained in:
parent
d6180e7134
commit
17e0ec9d2e
2 changed files with 13 additions and 14 deletions
|
@ -117,6 +117,9 @@ const float NOTE_ACCEPT_DISTANCE = 25;
|
||||||
// we accept a note.
|
// we accept a note.
|
||||||
const float NOTE_ACCEPT_ANGLE_OFFSET = 15;
|
const float NOTE_ACCEPT_ANGLE_OFFSET = 15;
|
||||||
|
|
||||||
|
const int COLLIDE_RADIUS_NORMAL = 10;
|
||||||
|
const int COLLIDE_RADIUS_FISH = 8;
|
||||||
|
|
||||||
const int requiredDualFormCharge = 3;
|
const int requiredDualFormCharge = 3;
|
||||||
|
|
||||||
bool usingDigital = false;
|
bool usingDigital = false;
|
||||||
|
@ -1590,6 +1593,8 @@ void Avatar::changeForm(FormType form, bool effects, bool onInit, FormType lastF
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//rotationOffset.interpolateTo(Vector(0,0,0), 0.5);
|
//rotationOffset.interpolateTo(Vector(0,0,0), 0.5);
|
||||||
|
|
||||||
|
collideRadius = COLLIDE_RADIUS_NORMAL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FORM_SUN:
|
case FORM_SUN:
|
||||||
|
@ -1720,6 +1725,8 @@ void Avatar::changeForm(FormType form, bool effects, bool onInit, FormType lastF
|
||||||
refreshModel("FishForm", "");
|
refreshModel("FishForm", "");
|
||||||
//rotationOffset.interpolateTo(Vector(0,0,-90), 0.5);
|
//rotationOffset.interpolateTo(Vector(0,0,-90), 0.5);
|
||||||
//refreshModel("NaijaFish", "");
|
//refreshModel("NaijaFish", "");
|
||||||
|
|
||||||
|
collideRadius = COLLIDE_RADIUS_FISH;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FORM_SUN:
|
case FORM_SUN:
|
||||||
|
@ -4117,6 +4124,10 @@ Avatar::Avatar() : Entity(), ActionMapper()
|
||||||
|
|
||||||
refreshNormalForm();
|
refreshNormalForm();
|
||||||
|
|
||||||
|
if(dsq->continuity.form)
|
||||||
|
collideRadius = COLLIDE_RADIUS_FISH;
|
||||||
|
else
|
||||||
|
collideRadius = COLLIDE_RADIUS_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Avatar::revert()
|
void Avatar::revert()
|
||||||
|
@ -7059,15 +7070,6 @@ void Avatar::onUpdate(float dt)
|
||||||
vel2 = Vector(0,0,0);
|
vel2 = Vector(0,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//int collideCircle = 24;//24; // 48
|
|
||||||
int collideCircle = 10;
|
|
||||||
if (dsq->continuity.form == FORM_FISH)
|
|
||||||
collideCircle = 8;
|
|
||||||
// just for external access
|
|
||||||
// HACK: should always be using collide radius :| ?
|
|
||||||
|
|
||||||
//updateMovement
|
|
||||||
collideRadius = collideCircle;
|
|
||||||
if (!state.lockedToWall && !isFollowingPath() && !riding)
|
if (!state.lockedToWall && !isFollowingPath() && !riding)
|
||||||
{
|
{
|
||||||
/*collideCheck:*/
|
/*collideCheck:*/
|
||||||
|
@ -7119,10 +7121,7 @@ void Avatar::onUpdate(float dt)
|
||||||
//Vector testPosition = position + (vel *dt)*2;
|
//Vector testPosition = position + (vel *dt)*2;
|
||||||
position = newPosition;
|
position = newPosition;
|
||||||
|
|
||||||
|
if (dsq->game->collideCircleWithGrid(position, collideRadius))
|
||||||
int hw = collideCircle;
|
|
||||||
|
|
||||||
if (dsq->game->collideCircleWithGrid(position, hw))
|
|
||||||
{
|
{
|
||||||
if (dsq->game->lastCollideTileType == OT_HURT
|
if (dsq->game->lastCollideTileType == OT_HURT
|
||||||
&& dsq->continuity.getWorldType() != WT_SPIRIT
|
&& dsq->continuity.getWorldType() != WT_SPIRIT
|
||||||
|
|
|
@ -4541,7 +4541,7 @@ void DSQ::onUpdate(float dt)
|
||||||
os << "rot: " << avatar->rotation.z << " rotoff: " << avatar->rotationOffset.z << std::endl;
|
os << "rot: " << avatar->rotation.z << " rotoff: " << avatar->rotationOffset.z << std::endl;
|
||||||
os << "p(" << int(avatar->position.x) << ", " << int(avatar->position.y) << ")" << std::endl;
|
os << "p(" << int(avatar->position.x) << ", " << int(avatar->position.y) << ")" << std::endl;
|
||||||
os << "inp: " << avatar->isInputEnabled() << std::endl;
|
os << "inp: " << avatar->isInputEnabled() << std::endl;
|
||||||
os << "wallNormal(" << avatar->wallNormal.x << ", " << avatar->wallNormal.y << ")" << std::endl;
|
os << "wallNormal(" << avatar->wallNormal.x << ", " << avatar->wallNormal.y << ") collradius: " << avatar->collideRadius << std::endl;
|
||||||
os << "burst: " << avatar->burst << " burstTimer: " << avatar->burstTimer << std::endl;
|
os << "burst: " << avatar->burst << " burstTimer: " << avatar->burstTimer << std::endl;
|
||||||
os << "inCurrent: " << avatar->isInCurrent() << std::endl;
|
os << "inCurrent: " << avatar->isInCurrent() << std::endl;
|
||||||
os << "qsongCastDelay: " << avatar->quickSongCastDelay << std::endl;
|
os << "qsongCastDelay: " << avatar->quickSongCastDelay << std::endl;
|
||||||
|
|
Loading…
Add table
Reference in a new issue