projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
38514b4
)
launch option to load world
author
hgn
<hgodden00@gmail.com>
Mon, 11 Dec 2023 09:17:13 +0000
(09:17 +0000)
committer
hgn
<hgodden00@gmail.com>
Mon, 11 Dec 2023 09:17:13 +0000
(09:17 +0000)
skaterift.c
patch
|
blob
|
history
skaterift.h
patch
|
blob
|
history
diff --git
a/skaterift.c
b/skaterift.c
index e488f778f0cfa63e613b36bd39ee850a1e8b08e5..00fb7d5656a4f31e9d0a6df390ecfaa2573a855d 100644
(file)
--- a/
skaterift.c
+++ b/
skaterift.c
@@
-85,6
+85,10
@@
static void vg_launch_opt(void){
if( vg_long_opt( "demo" ) ){
skaterift.demo_mode = 1;
}
if( vg_long_opt( "demo" ) ){
skaterift.demo_mode = 1;
}
+
+ if( (arg = vg_long_opt_arg( "world" )) ){
+ skaterift.hub_world = arg;
+ }
}
static void vg_preload(void){
}
static void vg_preload(void){
@@
-166,7
+170,7
@@
static addon_reg *skaterift_mount_world_unloadable( const char *path, u32 ext ){
static void skaterift_load_world_content(void){
/* hub world */
static void skaterift_load_world_content(void){
/* hub world */
- addon_reg *hub = skaterift_mount_world_unloadable(
"maps/dev_hub"
, 0 );
+ addon_reg *hub = skaterift_mount_world_unloadable(
skaterift.hub_world
, 0 );
skaterift_mount_world_unloadable( "maps/mp_spawn",
ADDON_REG_CITY|ADDON_REG_PREMIUM );
skaterift_mount_world_unloadable( "maps/mp_mtzero",
skaterift_mount_world_unloadable( "maps/mp_spawn",
ADDON_REG_CITY|ADDON_REG_PREMIUM );
skaterift_mount_world_unloadable( "maps/mp_mtzero",
diff --git
a/skaterift.h
b/skaterift.h
index f96d17c61b470fae836be8a9cdb2bf592d58bd90..a21e6ab423642b4b86903b8c7490cff9471df3a6 100644
(file)
--- a/
skaterift.h
+++ b/
skaterift.h
@@
-68,9
+68,12
@@
struct{
int demo_mode;
audio_channel *aud_air;
int demo_mode;
audio_channel *aud_air;
+ const char *hub_world;
}
static skaterift = {
}
static skaterift = {
- .op = k_async_op_clientloading, .time_rate = 1.0f, .demo_mode = 1 };
+ .op = k_async_op_clientloading, .time_rate = 1.0f, .demo_mode = 1,
+ .hub_world = "maps/dev_hub"
+};
/* Skaterift api */
static void skaterift_change_world_start( addon_reg *reg );
/* Skaterift api */
static void skaterift_change_world_start( addon_reg *reg );