summaryrefslogtreecommitdiff
path: root/src/mrsun.cpp
diff options
context:
space:
mode:
authorColin Noga <Tempus@Spectrum-Song.local>2011-09-28 02:33:45 -0500
committerColin Noga <Tempus@Spectrum-Song.local>2011-09-28 02:33:45 -0500
commitf35befab481e013d76631baf6abec5f69ff703a6 (patch)
treef9d17f5e9db68dfa7547a590134959c8b4b0a65f /src/mrsun.cpp
parent463bf1cb5059e14b3af73adf0037a9ae8a5dcd2c (diff)
downloadkamek-f35befab481e013d76631baf6abec5f69ff703a6.tar.gz
kamek-f35befab481e013d76631baf6abec5f69ff703a6.zip
added fire laser, airship gear retexture, and some minor sun fixes
Diffstat (limited to '')
-rwxr-xr-xsrc/mrsun.cpp42
1 files changed, 25 insertions, 17 deletions
diff --git a/src/mrsun.cpp b/src/mrsun.cpp
index 01ab485..3036a6b 100755
--- a/src/mrsun.cpp
+++ b/src/mrsun.cpp
@@ -33,6 +33,7 @@ class daMrSun_c : public dEn_c {
float spinStateOn;
int dying;
char sunDying;
+ char killFlag;
u64 eventFlag;
@@ -177,7 +178,7 @@ int daMrSun_c::onCreate() {
SetupTextures_Map(&bodyModel, 0);
glowModel.setup(rf.GetResMdl("SunGlow"), &allocator, 0x224, 1, 0);
- SetupTextures_Map(&glowModel, 0);
+ SetupTextures_Boss(&glowModel, 0);
}
else { // It's a moon
@@ -232,6 +233,7 @@ int daMrSun_c::onCreate() {
this->ySpiralOffset = 0.0;
this->dying = -5;
this->sunDying = 0;
+ this->killFlag = 0;
this->pos.z = 3300.00;
@@ -267,8 +269,10 @@ int daMrSun_c::onExecute() {
}
if (EventTable->events & this->eventFlag) {
- this->kill();
- this->pos.y = this->pos.y + 800.0;
+ if (this->killFlag == 0) {
+ this->kill();
+ this->pos.y = this->pos.y + 800.0;
+ this->killFlag = 1; }
}
return true;
@@ -620,6 +624,10 @@ void daMrSun_c::executeState_Spin() {
this->rot.y = this->rot.y + (18.4 * rotBonus); //}
+ float spitspeed;
+ if ((this->settings & 0xF) == 0) { spitspeed = 3.0; } // It's a sun
+ else { spitspeed = 5.0; } // It's a moon
+
int randomBall;
randomBall = GenerateRandomNumber(6);
if (randomBall == 1) {
@@ -630,29 +638,29 @@ void daMrSun_c::executeState_Spin() {
float ylaunch;
if (direction == 0) {
- xlaunch = 5.0;
+ xlaunch = spitspeed;
ylaunch = 0.0; }
else if (direction == 1) { // SE
- xlaunch = 5.0;
- ylaunch = 5.0; }
+ xlaunch = spitspeed;
+ ylaunch = spitspeed; }
else if (direction == 2) { // S
xlaunch = 0.0;
- ylaunch = 5.0; }
+ ylaunch = spitspeed; }
else if (direction == 3) { // SW
- xlaunch = -5.0;
- ylaunch = 5.0; }
+ xlaunch = -spitspeed;
+ ylaunch = spitspeed; }
else if (direction == 4) { // W
- xlaunch = -5.0;
+ xlaunch = -spitspeed;
ylaunch = 0.0; }
else if (direction == 5) { // NW
- xlaunch = -5.0;
- ylaunch = -5.0; }
+ xlaunch = -spitspeed;
+ ylaunch = -spitspeed; }
else if (direction == 6) { // N
xlaunch = 0.0;
- ylaunch = -5.0; }
+ ylaunch = -spitspeed; }
else if (direction == 7) { // NE
- xlaunch = 5.0;
- ylaunch = -5.0; }
+ xlaunch = spitspeed;
+ ylaunch = -spitspeed; }
if ((this->settings & 0xF) == 0) {
@@ -708,8 +716,8 @@ void daMrSun_c::executeState_Wait() {
int Choice;
int TimerMax;
- if ((this->settings & 0xF) == 0) { TimerMax = 20; } // It's a sun
- else { TimerMax = 15; } // It's a moon
+ if ((this->settings & 0xF) == 0) { TimerMax = 60; } // It's a sun
+ else { TimerMax = 30; } // It's a moon
if (this->timer > TimerMax) {