================== SV_LoadTransition_f ================== */
| 301 | ================== |
| 302 | */ |
| 303 | void SV_LoadTransition_f(void) |
| 304 | { |
| 305 | const char *map; |
| 306 | const char *spawntarget; |
| 307 | |
| 308 | map = Cmd_Argv(1); |
| 309 | if ( !*map ) { |
| 310 | return; |
| 311 | } |
| 312 | |
| 313 | qbLoadTransition = qtrue; |
| 314 | |
| 315 | #ifdef JK2_MODE |
| 316 | SCR_PrecacheScreenshot(); |
| 317 | #endif |
| 318 | SV_Player_EndOfLevelSave(); |
| 319 | |
| 320 | //Save the full current state of the current map so we can return to it later |
| 321 | SG_WriteSavegame( va("hub/%s", sv_mapname->string), qfalse ); |
| 322 | |
| 323 | //set the spawntarget if there is one |
| 324 | spawntarget = Cmd_Argv(2); |
| 325 | if ( *spawntarget != '\0' ) |
| 326 | { |
| 327 | Cvar_Set( "spawntarget", spawntarget ); |
| 328 | } |
| 329 | else |
| 330 | { |
| 331 | Cvar_Set( "spawntarget", "" ); |
| 332 | } |
| 333 | |
| 334 | if ( !SV_TryLoadTransition( map ) ) |
| 335 | {//couldn't load a savegame |
| 336 | SV_Map_( eForceReload_NOTHING ); |
| 337 | } |
| 338 | qbLoadTransition = qfalse; |
| 339 | } |
| 340 | //=============================================================== |
| 341 | |
| 342 | char *ivtos( const vec3_t v ) { |
nothing calls this directly
no test coverage detected