diff options
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c index 1a9f774a1..410a707f1 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -11282,7 +11282,9 @@ BUILDIN(getunits) if (not_server_variable(*name)) { sd = script->rid2sd(st); + if (sd == NULL) { + script_pushint(st, 0); return true; // player variable but no player attached } } @@ -18157,7 +18159,7 @@ BUILDIN(setpcblock) if ((type & PCBLOCK_IMMUNE) != 0) sd->block_action.immune = state; - if ((type & PCBLOCK_SITSTAND) != 0) + if ((type & PCBLOCK_SITSTAND) != 0) sd->block_action.sitstand = state; if ((type & PCBLOCK_COMMANDS) != 0) @@ -25265,7 +25267,7 @@ void script_hardcoded_constants(void) script->set_constant("MST_AROUND3", MST_AROUND3, false, false); script->set_constant("MST_AROUND4", MST_AROUND4, false, false); script->set_constant("MST_AROUND", MST_AROUND , false, false); - + script->constdb_comment("pc block constants, use with *setpcblock* and *checkpcblock*"); script->set_constant("PCBLOCK_NONE", PCBLOCK_NONE, false, false); script->set_constant("PCBLOCK_MOVE", PCBLOCK_MOVE, false, false); |