//----------------------------------------------------------------------------- // Kills the player. //----------------------------------------------------------------------------- void PlayerObject::Kill() { // Indicate that the player is dying. m_dying = true; // Clear the player's movment. SetDrive( 0.0f ); SetStrafe( 0.0f ); SetFire( false ); Stop(); // Clear the player's weapons. ClearWeapons(); // Stop the player from changing weapons. m_changingWeapon = 0.0f; m_weaponChanging = false; // Play the death animation. PlayAnimation( ANIM_DEATH, 0.0f, false ); }
/* comefrom: Simulate */ DoDisasters(void) { /* Chance of disasters at lev 0 1 2 */ static short DisChance[3] = { 10*48, 5*48, 60}; register short x; if (FloodCnt) FloodCnt--; if (DisasterEvent) ScenarioDisaster(); x = GameLevel; if (x > 2) x = 0; if (NoDisasters) return; /*post*/ if (!Rand(DisChance[x])) { x = Rand(8); switch (x) { case 0: case 1: SetFire(); break; case 2: case 3: MakeFlood(); break; case 4: break; case 5: MakeTornado(); break; case 6: MakeEarthquake(); break; case 7: case 8: if (PolluteAverage > /* 80 */ 60) MakeMonster(); break; } } }