mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-08 07:30:33 -04:00
map sanitization (invalid references in map)
This commit is contained in:
parent
14d1a4666d
commit
00e7005c02
4 changed files with 64 additions and 19 deletions
|
@ -380,7 +380,7 @@ static const int console_height = 165;
|
|||
static const int console_padding = 3;
|
||||
static int console_blink = 0;
|
||||
static char console_visible = 0;
|
||||
#define CONSOLE_FONT H_FTINY
|
||||
#define CONSOLE_FONT H_FLITT5
|
||||
|
||||
void draw_console_window() {
|
||||
if (!console_visible) return;
|
||||
|
@ -584,15 +584,17 @@ static int process_actions(const char *command) {
|
|||
|
||||
}
|
||||
if (istrcmp(command, "ascent") == 0) {
|
||||
int lev = postavy[0].exp;
|
||||
int lev = postavy[0].level;
|
||||
for (int i = 0; i < POCET_POSTAV; ++i) {
|
||||
THUMAN *p = postavy+i;
|
||||
if (p->used) lev = MAX(lev,p->level);
|
||||
}
|
||||
for (int i = 0; i < POCET_POSTAV; ++i) {
|
||||
THUMAN *p = postavy+i;
|
||||
p->exp = level_map[lev-1];
|
||||
check_player_new_level(p);
|
||||
if (p->used) {
|
||||
p->exp = level_map[lev-1];
|
||||
check_player_new_level(p);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue