projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4f3f294
)
clear runs when respawning
author
hgn
<hgodden00@gmail.com>
Thu, 5 Oct 2023 11:11:46 +0000
(12:11 +0100)
committer
hgn
<hgodden00@gmail.com>
Thu, 5 Oct 2023 12:54:49 +0000
(13:54 +0100)
player.c
patch
|
blob
|
history
world_routes.h
patch
|
blob
|
history
diff --git
a/player.c
b/player.c
index 9938de6507c7aa7963e32906424c6c32b051963c..7a31eda047382aba659f289a36f156494b77d5c4 100644
(file)
--- a/
player.c
+++ b/
player.c
@@
-10,6
+10,7
@@
#include "player_replay.h"
#include "network.h"
#include "network_common.h"
#include "player_replay.h"
#include "network.h"
#include "network_common.h"
+#include "world_routes.h"
static int localplayer_cmd_respawn( int argc, const char *argv[] ){
ent_spawn *rp = NULL, *r;
static int localplayer_cmd_respawn( int argc, const char *argv[] ){
ent_spawn *rp = NULL, *r;
@@
-257,6
+258,13
@@
static void player__spawn( ent_spawn *rp ){
player_subsystems[ localplayer.subsystem ]->reset( rp );
localplayer.boundary_hash ^= NETMSG_BOUNDARY_BIT;
player_subsystems[ localplayer.subsystem ]->reset( rp );
localplayer.boundary_hash ^= NETMSG_BOUNDARY_BIT;
+
+ for( u32 i=0; i<vg_list_size(world_static.instances); i++ ){
+ world_instance *instance = &world_static.instances[i];
+ if( instance->status == k_world_status_loaded ){
+ world_routes_clear( instance );
+ }
+ }
}
}
diff --git
a/world_routes.h
b/world_routes.h
index b6843ed090b45c05b795df1fa61f2f3c30ebac2f..13541eddd519842fbd43fa58cc442334772f5f62 100644
(file)
--- a/
world_routes.h
+++ b/
world_routes.h
@@
-20,5
+20,6
@@
static void world_gen_routes_generate( u32 instance_id );
static void world_routes_update_timer_texts( world_instance *world );
static void world_routes_update( world_instance *world );
static void world_routes_fixedupdate( world_instance *world );
static void world_routes_update_timer_texts( world_instance *world );
static void world_routes_update( world_instance *world );
static void world_routes_fixedupdate( world_instance *world );
+static void world_routes_clear( world_instance *world );
#endif /* ROUTES_H */
#endif /* ROUTES_H */