diff options
Diffstat (limited to '')
-rwxr-xr-x | src/firelaser.cpp | 27 |
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() { |