mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-09 15:49:52 +00:00
Decouple form specific effects from the actual form.
Most hardcoded form == FORM_* checks all over the place have been replaced. Now, forms change certain avatar properties, which are in turn checked in the places that previously had these explicit form checks. This allows specifying functionality via scripting, for additional forms with new effects or a new combination of existing effects. OT_HURT now deals damage of type DT_WALLHURT, and by setting avatar->setDamageTarget(DT_WALLHURT, false) collision with walls can be made harmless (exactly as nature form used to be). Add related Lua functions: + setWorldType() - Change WT without actually switching to spirit form + setCanActivate() + avatar_setCanBurst() + avatar_canBurst() + avatar_setCanLockToWall() + avatar_canLockToWall() + avatar_setCanSwimAgainstCurrents() + avatar_canSwimAgainstCurrents() + getSceneColor() + DT_WALLHURT
This commit is contained in:
parent
55ead19076
commit
e8a7889f82
7 changed files with 124 additions and 47 deletions
|
@ -1419,7 +1419,7 @@ bool Entity::updateCurrents(float dt)
|
|||
float useLen = len;
|
||||
if (useLen < 500)
|
||||
useLen = 500;
|
||||
if (!(this->getEntityType() == ET_AVATAR && dsq->continuity.form == FORM_BEAST && dsq->game->avatar->bursting))
|
||||
if (!(this->getEntityType() == ET_AVATAR && dsq->game->avatar->canSwimAgainstCurrents() && dsq->game->avatar->bursting))
|
||||
{
|
||||
doCollisionAvoidance(1, 4, 1, &vel2, useLen);
|
||||
}
|
||||
|
@ -1439,7 +1439,7 @@ bool Entity::updateCurrents(float dt)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (this->getEntityType() == ET_AVATAR && dsq->continuity.form == FORM_BEAST)
|
||||
if (this->getEntityType() == ET_AVATAR && dsq->game->avatar->canSwimAgainstCurrents())
|
||||
{
|
||||
int cap = 100;
|
||||
if (!vel.isZero())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue