home *** CD-ROM | disk | FTP | other *** search
- /*
- ==============================================================================
-
- Secondary Impulse Command Checker
-
- ==============================================================================
- */
-
- void() player_stand1;
- void() player_diea1;
- void() player_dieb1;
- void() player_diec1;
-
- //=============================================================
- // PlayDead - Simulates player death
- //=============================================================
- void () PlayDead =
- {
- local float i;
-
- self.play_dead = 1;
-
- // Turn off bonus.
- self.invisible_finished = 0; // don't die as eyes
- self.invincible_finished = 0;
- self.super_damage_finished = 0;
- self.radsuit_finished = 0;
- // Chages vision.
- self.view_ofs = '0 0 -8';
-
- // Commented for now ( trying to decide... )
- /* Changes move to TOSS
- self.movetype = MOVETYPE_TOSS;
- if (self.velocity_z < 10)
- self.velocity_z = self.velocity_z + random()*300;
- */
-
- // Change weapon to shotgun
- self.play_dead_weapon = self.weapon;
- self.weapon = IT_SHOTGUN;
- self.currentammo = self.ammo_shells;
- self.weaponmodel = "progs/v_shot.mdl";
- self.weaponframe = 0;
- self.items = self.items | IT_SHELLS;
-
- // Play death frames
- i = 1 + floor(random()*3);
- if (i == 1) player_diea1();
- else if (i == 2) player_dieb1();
- else player_diec1();
-
- bprint ("SOMEONE IS PLAYING DEAD...\n");
- };
-
- //=============================================================
- // Awake - Returns player to normal
- //=============================================================
- void () Awake =
- {
- self.view_ofs = '0 0 22';
-
- // Back to normal movement
- // self.movetype = MOVETYPE_WALK;
-
- // Restore weapons
- self.weapon = self.play_dead_weapon;
- W_SetCurrentAmmo();
-
- self.play_dead = 0;
- player_stand1();
- };
-
- //=============================================================
- // CheckSecondaryImpulseCommands - Called by weapons.qc before
- // processing impulses
- // Later it will include an autogib routine to kill permanent
- // users of the playdead routine.
- //=============================================================
- void () CheckSecondaryImpulseCommands =
- {
- if (self.impulse == 100)
- PlayDead ();
- else if (self.impulse == 101)
- Awake ();
- };
-