MantisBT - Zandronum
View Issue Details
0002872Zandronum[All Projects] Suggestionpublic2016-10-08 20:442016-10-08 21:08
ibm5155 
 
normalfeatureN/A
newopen 
MicrosoftWindowsXP/Vista/7
3.0-beta 
 
0002872: CCMD demo_skiptomap
Usage: Just like demo_skiponextmap, but instead of skiping to the next map, it skip all the maps while the next maps isnt the map given by the argmument.

example:

there's a demo with the maps (m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,...,m30,m31,m32).
you type on console "demo_skiptomap m31" and then it skip all the maps till m31 is reached, if you try to run "demoskiptomap m33" it'll skip all the maps and it'll end the demo file).


I want this because sometimes I record a community map Project where I'm in, and sometimes my demo files has like 35 maps beofore mine, so having a simple ccmd to explicitly tells zandronum what map you want to view, it'll save alot of time for me :) (and also for others)
No tags attached.
Issue History
2016-10-08 20:44ibm5155New Issue
2016-10-08 20:48WaTaKiDNote Added: 0015815
2016-10-08 21:08ibm5155Note Added: 0015816

Notes
(0015815)
WaTaKiD   
2016-10-08 20:48   
one thing to consider, what if m31 is played multiple times? will demo_skiptomap m31 just cycle thru each occurence?
(0015816)
ibm5155   
2016-10-08 21:08   
then demo_skiptomap will act like demo_skiptonextmap, it'll skip to the next map that matches the given argument

so, lets say we start at the first map on demo:

                    1 2 3 4 5 (skip map order call)
                    v v v v v
DEMO LIST { M1, M2, M3,M3,M3,M4,M5,M6,M3,M7,M8}
            1 2 3 4 5 6 7 8 9 10 11 12 (demo array)

demo_skiptomap M3; will jump to the 3rd map on the demo file
demo_skiptomap M3; will jump to the 4th map on the demo file
demo_skiptomap M3; will jump to the 5th map on the demo file
demo_skiptomap M3; will jump to the 9th map on the demo file
demo_skiptomap M3; will end the demo since there were maps after M8


I belive the code could look something like this: (It is only a sketch)
'http://pastebin.com/VtWvR3Xj [^]'
and then add some code into the SVC_MAPNEW switch from cl_main