mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-13 16:44:50 +02:00
#3 stop screaming after falling into the water
This commit is contained in:
@@ -1348,7 +1348,6 @@ struct Lara : Character {
|
|||||||
if (health > 0.0f)
|
if (health > 0.0f)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Sound::stop(TR::SND_SCREAM);
|
|
||||||
game->stopTrack();
|
game->stopTrack();
|
||||||
|
|
||||||
Core::lightColor[1 + 0] = Core::lightColor[1 + 1] = vec4(0, 0, 0, 1);
|
Core::lightColor[1 + 0] = Core::lightColor[1 + 1] = vec4(0, 0, 0, 1);
|
||||||
@@ -1836,6 +1835,7 @@ struct Lara : Character {
|
|||||||
wpnHide();
|
wpnHide();
|
||||||
if (stand != STAND_UNDERWATER && stand != STAND_ONWATER && (state != STATE_FALL && state != STATE_REACH && state != STATE_SWAN_DIVE && state != STATE_FAST_DIVE))
|
if (stand != STAND_UNDERWATER && stand != STAND_ONWATER && (state != STATE_FALL && state != STATE_REACH && state != STATE_SWAN_DIVE && state != STATE_FAST_DIVE))
|
||||||
animation.setAnim(ANIM_FALL_FORTH);
|
animation.setAnim(ANIM_FALL_FORTH);
|
||||||
|
stopScreaming();
|
||||||
return STAND_UNDERWATER;
|
return STAND_UNDERWATER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1863,6 +1863,7 @@ struct Lara : Character {
|
|||||||
updateEntity();
|
updateEntity();
|
||||||
// get damage from falling
|
// get damage from falling
|
||||||
if (velocity.y > 0.0f) {
|
if (velocity.y > 0.0f) {
|
||||||
|
stopScreaming();
|
||||||
if (state == STATE_FAST_DIVE && velocity.y > 133.0f) {
|
if (state == STATE_FAST_DIVE && velocity.y > 133.0f) {
|
||||||
hit(health + 1.0f, NULL, TR::HIT_FALL);
|
hit(health + 1.0f, NULL, TR::HIT_FALL);
|
||||||
} else {
|
} else {
|
||||||
@@ -1881,6 +1882,11 @@ struct Lara : Character {
|
|||||||
return STAND_AIR;
|
return STAND_AIR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void stopScreaming() {
|
||||||
|
if (velocity.y >= 154.0f)
|
||||||
|
Sound::stop(TR::SND_SCREAM);
|
||||||
|
}
|
||||||
|
|
||||||
virtual int getHeight() {
|
virtual int getHeight() {
|
||||||
if (stand == STAND_GROUND || stand == STAND_AIR)
|
if (stand == STAND_GROUND || stand == STAND_AIR)
|
||||||
return 768;
|
return 768;
|
||||||
|
Reference in New Issue
Block a user