Esempio n. 1
0
// the opening slide effect on load/new game
void weapon_introslide()
{
	if (player->curWeapon == WPN_NONE)
	{
		weapon_slide(LEFT, player->curWeapon);
		return;
	}
	
	stat_PrevWeapon(true);
	slide.lv_offset = 0;
	stat_NextWeapon(true);
}
Esempio n. 2
0
void PDoWeapons(void)
{
        // switching weapons. have to check for inputs_frozen since justpushed
        // reads inputs[] directly, not pinputs[].
        if (!player->inputs_locked) {
                if (justpushed(PREVWPNKEY)) stat_PrevWeapon();
                if (justpushed(NEXTWPNKEY)) stat_NextWeapon();
        }

        // firing weapon
        if (pinputs[FIREKEY]) {
                FireWeapon();
                RunWeapon(true);
        } else {
                RunWeapon(false);
        }

        PHandleSpur();
        run_whimstar(&player->whimstar);

        if (empty_timer)
                empty_timer--;
}