git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7390 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
671522e47c
commit
706355eda6
@ -11595,16 +11595,15 @@ void run_script(struct script_code *rootscript,int pos,int rid,int oid)
|
|||||||
//struct script_code *bck_script = NULL;
|
//struct script_code *bck_script = NULL;
|
||||||
//struct script_code *bck_scriptroot = NULL;
|
//struct script_code *bck_scriptroot = NULL;
|
||||||
//int bck_scriptstate = 0,bck_npcid = 0;
|
//int bck_scriptstate = 0,bck_npcid = 0;
|
||||||
struct script_stack *bck_stack = NULL;
|
//struct script_stack *bck_stack = NULL;
|
||||||
|
|
||||||
if (rootscript == NULL || pos < 0)
|
if (rootscript == NULL || pos < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
st = aCalloc(sizeof(struct script_state), 1);
|
|
||||||
|
|
||||||
if ((sd = map_id2sd(rid)) && sd->st && sd->st->scriptroot == rootscript && sd->st->pos == pos){
|
if ((sd = map_id2sd(rid)) && sd->st && sd->st->scriptroot == rootscript && sd->st->pos == pos){
|
||||||
st = sd->st;
|
st = sd->st;
|
||||||
} else {
|
} else {
|
||||||
|
st = aCalloc(sizeof(struct script_state), 1);
|
||||||
// the script is different, make new script_state and stack
|
// the script is different, make new script_state and stack
|
||||||
st->stack = aMalloc (sizeof(struct script_stack));
|
st->stack = aMalloc (sizeof(struct script_stack));
|
||||||
st->stack->sp = 0;
|
st->stack->sp = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user