2014-03-16 14:37:54 +00:00
|
|
|
|
|
|
|
gamevar vol 0 0
|
|
|
|
gamevar lev 0 0
|
|
|
|
|
|
|
|
// out-of-bounds volume/level numbers
|
|
|
|
gamevar badvol_oob 99 0
|
|
|
|
gamevar badlev_oob 999 0
|
|
|
|
|
|
|
|
// volume/level numbers for which no level is defined
|
|
|
|
gamevar badvol_nd 3 0
|
|
|
|
gamevar badlev_nd 32 0
|
|
|
|
|
2015-02-08 18:48:28 +00:00
|
|
|
define Q_tmp 255
|
|
|
|
definequote Q_tmp <temp>
|
|
|
|
define Q_tmp2 256
|
|
|
|
definequote Q_tmp2 <temp>
|
|
|
|
|
|
|
|
define Q_last_level 1000
|
|
|
|
definequote Q_last_level Last level (1-based): %d
|
|
|
|
define Q_dtime 1001
|
|
|
|
definequote Q_dtime Designer time for last level: %s
|
|
|
|
|
|
|
|
state print_designer_time
|
|
|
|
// This must not invoke an oob access on the C side if ud.last_level < 0!
|
|
|
|
qgetsysstr Q_tmp2 STR_DESIGNERTIME
|
|
|
|
|
|
|
|
qsprintf Q_tmp Q_dtime Q_tmp2
|
|
|
|
userquote Q_tmp
|
|
|
|
ends
|
|
|
|
|
|
|
|
onevent EVENT_NEWGAME
|
|
|
|
getuserdef .last_level lev
|
|
|
|
qsprintf Q_tmp Q_last_level lev
|
|
|
|
userquote Q_tmp
|
|
|
|
|
|
|
|
state print_designer_time
|
|
|
|
endevent
|
2014-03-16 14:37:54 +00:00
|
|
|
|
|
|
|
onevent EVENT_ENTERLEVEL
|
2015-02-08 18:48:28 +00:00
|
|
|
state print_designer_time
|
|
|
|
|
2014-03-16 14:37:54 +00:00
|
|
|
// must fail, since the current player is -1 in this event
|
2015-02-08 18:48:28 +00:00
|
|
|
qgetsysstr Q_tmp STR_PLAYERNAME
|
2014-03-16 14:37:54 +00:00
|
|
|
endevent
|
|
|
|
|
|
|
|
onevent EVENT_USESTEROIDS
|
|
|
|
getuserdef .volume_number vol
|
|
|
|
setuserdef .volume_number badvol_oob // LunaCON errors here
|
2015-02-08 18:48:28 +00:00
|
|
|
qgetsysstr Q_tmp STR_VOLUMENAME // C-CON errors here
|
2014-03-16 14:37:54 +00:00
|
|
|
setuserdef .volume_number vol
|
|
|
|
endevent
|
|
|
|
|
|
|
|
onevent EVENT_USEJETPACK
|
|
|
|
getuserdef .volume_number vol
|
|
|
|
getuserdef .level_number lev
|
|
|
|
|
|
|
|
setuserdef .volume_number badvol_oob // LunaCON errors here
|
|
|
|
setuserdef .level_number badlev_oob
|
2015-02-08 18:48:28 +00:00
|
|
|
qgetsysstr Q_tmp STR_MAPNAME // C-CON errors here
|
2014-03-16 14:37:54 +00:00
|
|
|
|
|
|
|
setuserdef .volume_number vol
|
|
|
|
setuserdef .level_number lev
|
|
|
|
endevent
|
|
|
|
|
|
|
|
onevent EVENT_JUMP
|
|
|
|
getuserdef .volume_number vol
|
|
|
|
getuserdef .level_number lev
|
|
|
|
|
|
|
|
setuserdef .volume_number badvol_nd
|
|
|
|
setuserdef .level_number badlev_nd
|
2015-02-08 18:48:28 +00:00
|
|
|
qgetsysstr Q_tmp STR_MAPFILENAME // LunaCON, C-CON error here
|
2014-03-16 14:37:54 +00:00
|
|
|
|
|
|
|
setuserdef .volume_number vol
|
|
|
|
setuserdef .level_number lev
|
|
|
|
endevent
|