mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-25 11:01:30 +00:00
59 lines
1.1 KiB
Text
59 lines
1.1 KiB
Text
/***********************************************************************
|
|
|
|
item_pda.script
|
|
|
|
***********************************************************************/
|
|
|
|
object item_pda : weapon_base {
|
|
void init();
|
|
|
|
void Lower();
|
|
void Raise();
|
|
void Idle();
|
|
void ExitCinematic();
|
|
};
|
|
|
|
void item_pda::init() {
|
|
weaponState( "Raise", 0 );
|
|
}
|
|
|
|
void item_pda::Raise() {
|
|
weaponRising();
|
|
playAnim( ANIMCHANNEL_ALL, "raise" );
|
|
waitUntil( animDone( ANIMCHANNEL_ALL, 0 ) );
|
|
|
|
weaponState( "Idle", 0 );
|
|
}
|
|
|
|
void item_pda::Lower() {
|
|
string previous;
|
|
entity owner;
|
|
|
|
owner = getOwner();
|
|
previous = owner.getPreviousWeapon();
|
|
|
|
weaponLowering();
|
|
playAnim( ANIMCHANNEL_ALL, "putaway" );
|
|
waitUntil( animDone( ANIMCHANNEL_ALL, 0 ) );
|
|
owner.selectWeapon( previous );
|
|
weaponHolstered();
|
|
waitUntil( WEAPON_RAISEWEAPON );
|
|
weaponState( "Raise", 0 );
|
|
}
|
|
|
|
void item_pda::Idle() {
|
|
entity owner;
|
|
|
|
weaponReady();
|
|
owner = getOwner();
|
|
owner.openPDA();
|
|
while( owner.inPDA() ) {
|
|
waitFrame();
|
|
}
|
|
|
|
weaponState( "Lower", 0 );
|
|
}
|
|
|
|
void item_pda::ExitCinematic() {
|
|
weaponState( "Idle", 0 );
|
|
}
|