diff --git a/gamestate.c b/gamestate.c index 2288b3c..5c85cf3 100644 --- a/gamestate.c +++ b/gamestate.c @@ -662,7 +662,7 @@ const static SerMaybeFailure ser_ok = {0}; #define SER_ASSERT(cond) \ if (!(cond)) \ { \ - __assert(false, __FILE__, __LINE__, #cond); \ + __flight_assert(false, __FILE__, __LINE__, #cond); \ if (ser->save_or_load_from_disk) \ { \ Log("While saving/loading, serialization assertion failed %s on line %d\n", #cond, __LINE__); \ @@ -774,7 +774,8 @@ enum GameVersion VAddedSquadInvites, VRemovedTimeFromDiskSave, // did this to avoid wayy too big a time causing precision problems VReallyRemovedTimeFromDiskSave, // apparently last one didn't work - VMax, // this minus one will be the version used + VRemovedInsideOfMe, + VMax, // this minus one will be the version used }; // @Robust probably get rid of this as separate function, just use SER_VAR @@ -961,7 +962,14 @@ SerMaybeFailure ser_entity(SerState *ser, GameState *gs, Entity *e) SER_VAR(&e->wanted_thrust); SER_VAR(&e->energy_used); SER_VAR(&e->sun_amount); - SER_MAYBE_RETURN(ser_entityid(ser, &e->player_who_is_inside_of_me)); + + if (ser->version >= VRemovedInsideOfMe && ser->save_or_load_from_disk) + { + } + else + { + SER_MAYBE_RETURN(ser_entityid(ser, &e->player_who_is_inside_of_me)); + } } return ser_ok; diff --git a/queue.h b/queue.h index 7c9badd..2d3396d 100644 --- a/queue.h +++ b/queue.h @@ -4,7 +4,7 @@ #ifndef QUEUE_ASSERT void __flight_assert(bool cond, const char *file, int line, const char *cond_string); -#define QUEUE_ASSERT(condition) __assert(condition, __FILE__, __LINE__, #condition) +#define QUEUE_ASSERT(condition) __flight_assert(condition, __FILE__, __LINE__, #condition) #endif typedef struct QueueElementHeader diff --git a/types.h b/types.h index 5ce370d..9775e19 100644 --- a/types.h +++ b/types.h @@ -76,7 +76,7 @@ // defined in gamestate.c. Janky #ifndef assert -#define assert(condition) __assert(condition, __FILE__, __LINE__, #condition) +#define assert(condition) __flight_assert(condition, __FILE__, __LINE__, #condition) #endif // including headers from headers bad