added attack animations when attacking trees and mirrors
This commit is contained in:
parent
0ee99c4c73
commit
6a9453f8c9
3
game.cpp
3
game.cpp
|
@ -7455,6 +7455,7 @@ bool movepcto(int d, int subdir, bool checkonly) {
|
||||||
playSound(c2, "hit-axe" + pick123());
|
playSound(c2, "hit-axe" + pick123());
|
||||||
c2->wall = waNone;
|
c2->wall = waNone;
|
||||||
sideAttack(cwt.c, d, moPlayer, 0);
|
sideAttack(cwt.c, d, moPlayer, 0);
|
||||||
|
animateAttack(cwt.c, c2, LAYER_SMALL);
|
||||||
}
|
}
|
||||||
else if(c2->wall == waBigTree) {
|
else if(c2->wall == waBigTree) {
|
||||||
drawParticles(c2, winf[c2->wall].color, 8);
|
drawParticles(c2, winf[c2->wall].color, 8);
|
||||||
|
@ -7462,11 +7463,13 @@ bool movepcto(int d, int subdir, bool checkonly) {
|
||||||
playSound(c2, "hit-axe" + pick123());
|
playSound(c2, "hit-axe" + pick123());
|
||||||
c2->wall = waSmallTree;
|
c2->wall = waSmallTree;
|
||||||
sideAttack(cwt.c, d, moPlayer, 0);
|
sideAttack(cwt.c, d, moPlayer, 0);
|
||||||
|
animateAttack(cwt.c, c2, LAYER_SMALL);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(!peace::on) {
|
if(!peace::on) {
|
||||||
addMessage(XLAT("You swing your sword at the mirror."));
|
addMessage(XLAT("You swing your sword at the mirror."));
|
||||||
sideAttack(cwt.c, d, moPlayer, 0);
|
sideAttack(cwt.c, d, moPlayer, 0);
|
||||||
|
animateAttack(cwt.c, c2, LAYER_SMALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(survivalist && isHaunted(c2->land))
|
if(survivalist && isHaunted(c2->land))
|
||||||
|
|
Loading…
Reference in New Issue