Bug fixes? No more save guy in medbay to disk

main
Cameron Murphy Reikes 2 years ago
parent f54fb58537
commit e6199fc021

@ -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,6 +774,7 @@ enum GameVersion
VAddedSquadInvites,
VRemovedTimeFromDiskSave, // did this to avoid wayy too big a time causing precision problems
VReallyRemovedTimeFromDiskSave, // apparently last one didn't work
VRemovedInsideOfMe,
VMax, // this minus one will be the version used
};
@ -961,8 +962,15 @@ SerMaybeFailure ser_entity(SerState *ser, GameState *gs, Entity *e)
SER_VAR(&e->wanted_thrust);
SER_VAR(&e->energy_used);
SER_VAR(&e->sun_amount);
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;
}

@ -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

@ -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

Loading…
Cancel
Save