summaryrefslogtreecommitdiff
path: root/src/firelaser.cpp
diff options
context:
space:
mode:
authorStephen Simpson <megazig@gmail.com>2011-10-10 16:12:27 -0500
committerStephen Simpson <megazig@gmail.com>2011-10-10 16:12:27 -0500
commit5f3eca3f6074605272b7bdde4a685d2f0934d6a7 (patch)
tree858805a7c4f495e202a5e954c7a320db57e83da1 /src/firelaser.cpp
parenta61758720db96f59e0fb82aab9f326d37e186a11 (diff)
parentc83ed47633a037acd6cdab7d37087bca5edd6daa (diff)
downloadkamek-5f3eca3f6074605272b7bdde4a685d2f0934d6a7.tar.gz
kamek-5f3eca3f6074605272b7bdde4a685d2f0934d6a7.zip
Merge branch 'level-select' of ssh://treeki.shacknet.nu:30000/Kamek into level-select
Diffstat (limited to '')
-rwxr-xr-xsrc/firelaser.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/firelaser.cpp b/src/firelaser.cpp
index 244d659..db615ec 100755
--- a/src/firelaser.cpp
+++ b/src/firelaser.cpp
@@ -45,6 +45,7 @@ int daFireLaser_c::onCreate() {
this->timer = 0;
this->direction = this->settings & 0xF;
+ this->spitspeed = 8.0;
char eventNum = (this->settings >> 16) & 0xFF;
this->eventFlag = (u64)1 << (eventNum - 1);
@@ -89,29 +90,29 @@ void daFireLaser_c::executeState_pewpewpew() {
float ylaunch;
if (this->direction == 0) {
- xlaunch = spitspeed;
+ xlaunch = this->spitspeed;
ylaunch = 0.0; }
else if (this->direction == 1) { // SE
- xlaunch = spitspeed;
- ylaunch = spitspeed; }
+ xlaunch = this->spitspeed;
+ ylaunch = this->spitspeed; }
else if (this->direction == 2) { // S
xlaunch = 0.0;
- ylaunch = spitspeed; }
+ ylaunch = this->spitspeed; }
else if (this->direction == 3) { // SW
- xlaunch = -spitspeed;
- ylaunch = spitspeed; }
+ xlaunch = -this->spitspeed;
+ ylaunch = this->spitspeed; }
else if (this->direction == 4) { // W
- xlaunch = -spitspeed;
+ xlaunch = -this->spitspeed;
ylaunch = 0.0; }
else if (this->direction == 5) { // NW
- xlaunch = -spitspeed;
- ylaunch = -spitspeed; }
+ xlaunch = -this->spitspeed;
+ ylaunch = -this->spitspeed; }
else if (this->direction == 6) { // N
xlaunch = 0.0;
- ylaunch = -spitspeed; }
+ ylaunch = -this->spitspeed; }
else if (this->direction == 7) { // NE
- xlaunch = spitspeed;
- ylaunch = -spitspeed; }
+ xlaunch = this->spitspeed;
+ ylaunch = -this->spitspeed; }
dStageActor_c *spawner = CreateActor(106, 0, this->pos, 0, 0);
@@ -125,6 +126,8 @@ void daFireLaser_c::executeState_pewpewpew() {
}
+ else { this->timer = 0; }
+
}
void daFireLaser_c::endState_pewpewpew() {