mirror of
https://github.com/alexbatalov/fallout2-ce.git
synced 2024-11-01 23:26:57 +00:00
Reconcile script fixes from reference edition
This commit is contained in:
parent
5a0d5d2538
commit
9cad93c764
@ -1778,18 +1778,16 @@ int scriptSaveAll(File* stream)
|
||||
for (int index = 0; index < scriptExtent->length; index++) {
|
||||
Script* script = &(scriptExtent->scripts[index]);
|
||||
|
||||
lastScriptExtent = scriptList->tail;
|
||||
if ((script->flags & SCRIPT_FLAG_0x08) != 0) {
|
||||
scriptCount--;
|
||||
|
||||
lastScriptExtent = scriptList->tail;
|
||||
int backwardsIndex = lastScriptExtent->length - 1;
|
||||
while (lastScriptExtent != scriptExtent || backwardsIndex > index) {
|
||||
if (lastScriptExtent == scriptExtent) {
|
||||
if (backwardsIndex >= index) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (lastScriptExtent == scriptExtent && backwardsIndex <= index) {
|
||||
break;
|
||||
}
|
||||
|
||||
while (lastScriptExtent != scriptExtent || backwardsIndex > index) {
|
||||
Script* backwardsScript = &(lastScriptExtent->scripts[backwardsIndex]);
|
||||
if ((backwardsScript->flags & SCRIPT_FLAG_0x08) == 0) {
|
||||
break;
|
||||
@ -2685,7 +2683,7 @@ int scriptGetLocalVar(int sid, int variable, int* value)
|
||||
}
|
||||
|
||||
Script* script;
|
||||
if (scriptGetScript(sid, &script) == 1) {
|
||||
if (scriptGetScript(sid, &script) == -1) {
|
||||
*value = -1;
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user