mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-22 11:51:11 +00:00
SERVER: Add a use delay to the Mystery Box
This commit is contained in:
parent
bfc60fac84
commit
e757682d88
1 changed files with 16 additions and 2 deletions
|
@ -55,6 +55,16 @@ void() MBOX_OpenAnimation6 = [6, MBOX_OpenAnimation7 ] { self.frame = 6; MBOX_Up
|
|||
void() MBOX_OpenAnimation7 = [7, MBOX_OpenAnimation8 ] { self.frame = 7; MBOX_UpdateGlowFrame(); };
|
||||
void() MBOX_OpenAnimation8 = [8, SUB_Null ] { self.frame = 8; MBOX_UpdateGlowFrame(); };
|
||||
|
||||
//
|
||||
// MBOX_WaitEnd()
|
||||
// Ends the per-use delay for the Mystery Box.
|
||||
//
|
||||
void() MBOX_WaitEnd =
|
||||
{
|
||||
self.boxstatus = 0;
|
||||
self.think = SUB_Null;
|
||||
}
|
||||
|
||||
//
|
||||
// MBOX_Reset()
|
||||
// Resets the Mystery Box to be ready for
|
||||
|
@ -63,7 +73,12 @@ void() MBOX_OpenAnimation8 = [8, SUB_Null ] { self.frame = 8; MBOX_Up
|
|||
inline void() MBOX_Reset =
|
||||
{
|
||||
self.frame = 0;
|
||||
self.boxstatus = 0;
|
||||
self.boxstatus = -1;
|
||||
|
||||
// Add a 3 second delay before the Mystery Box
|
||||
// can be interact with again.
|
||||
self.think = MBOX_WaitEnd;
|
||||
self.nextthink = time + 3;
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -651,7 +666,6 @@ void() MBOX_Touch =
|
|||
if (self.owner == other)
|
||||
{
|
||||
other.reload_delay = 0;
|
||||
self.boxstatus = 0;
|
||||
self.owner = world;
|
||||
if (other.weapon != self.boxweapon.weapon && other.secondaryweapon != self.boxweapon.weapon && other.secondaryweapon && other.thirdweapon != self.boxweapon.weapon)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue