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 introduces a second pause mode:
Full game pause (as in menu), and world pause (as in spirit form).
All related checks are no longer done against WT_* constants,
but against the new world pause which is functionally equivalent,
but more flexible. Continuity::worldType is now only used to toggle
world pause correctly, and to apply some related graphical effects.
The world pause can also be controlled via script without actually
switching forms.
Added Lua functions:
+ node_setSpiritFreeze()
+ quad_setPauseLevel()
+ isWorldPaused()
+ setWorldPaused()
+ avatar_setShieldActive()
+ entity_isFillGrid()
* entity_setBoneLock() code made easier to read and not warn on no lock entity
+ entity_getMaxSpeedLerp()
+ entity_isEntityInside()
castSong() existing in the global Lua namespace caused it to be removed
and stored as an interface function as soon as a script was loaded.
The function was apparently never used in the game or other mod scripts,
thus renaming it now should be safe.
With this change, shots are no longer stored in a std::list.
In the current code, the global shot store may be modified while iterating,
this did not cause problems with the list implementation,
but would easily crash if a shot is removed while iterating.
To fix this, a 2nd vector stores shots to be deleted from the global store
and does so when no iteration is in progress and modifying the vector is
safe.
Added functions:
getFirstShot -- for iterating over all shots on the map
getNextShot
shot_setFirer
shot_setExtraDamage
shot_getExtraDamage
shot_getDamage
shot_getDamageType
shot_getName
This corrects render pass overriding, especially Li's arm, which was supposed
to be in front of the hug; and being eaten by a grouper, where Naija stayed
visible because the grouper skeletal's render pass was not set correctly.
This simplifies a few things. First, the values of DamageType are now continous,
with the benefit that they can now be stored in a std::bitset.
Second, this repairs entity_getNearestEntity(..., ET_AVATAR) or DT_ENEMY as param,
because these were 0, but the game expected -1 as universal value.
This way, any entity was returned when querying for ET_AVATAR or DT_ENEMY.
Now, 0 is the universal/NONE value, which should avoid mistakes like this.
- Map markers are now spawned on the player position, not above
- 66% alpha for world map icons, this way some of the stuff below the icon
can be seen.
- Unified and increased zoom-in distance. This way the view no longer forcefully
resets to another zoom level when selecting maps of different layers
(i.e. first an interior map, then zoom in, then select a regular map),
which was a little jarring. The increased zoom level is useful for
close-ups on tiny areas like the sun temple.