mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-15 02:36:40 -04:00
Better combat log, fix crash when throw action during combat
This commit is contained in:
parent
e1967ded4f
commit
05726326bd
8 changed files with 186 additions and 165 deletions
|
@ -942,7 +942,9 @@ static char is_same_prefix(const char *name, const char *prev_name) {
|
|||
}
|
||||
|
||||
static int get_all_savegames_callback(const char *name, LIST_FILE_TYPE type , size_t size, void *ctx) {
|
||||
if (istrncmp(name, "sav.", 4) != 0) return 1;
|
||||
if (istrncmp(name, "sav.", 4) != 0
|
||||
&& istrcmp(name+strlen(name)-4,".sav") != 0)
|
||||
return 0;
|
||||
TSAVEGAME_CB_STATE *st = (TSAVEGAME_CB_STATE *)ctx;
|
||||
if (st->prefix_len == 0 || strncmp(name, st->prefix, st->prefix_len) == 0) {
|
||||
str_replace(&(st->files), st->count, name);
|
||||
|
@ -1006,7 +1008,7 @@ static void load_specific_file(int slot_num,char *filename,void **out,int32_t *s
|
|||
static TSAVEGAME_LIST get_all_savegames(unsigned long kampan) {
|
||||
//sav.creation_time.game_save_time
|
||||
char prefix[50];
|
||||
snprintf(prefix,500,"sav.%010lx.",kampan);
|
||||
snprintf(prefix,50,"sav.%010lx.",kampan);
|
||||
TSAVEGAME_CB_STATE st;
|
||||
st.files = create_list(32);
|
||||
st.prefix = kampan?prefix:NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue